Ken Jin <kenjin4...@gmail.com> added the comment:

> I am going to backport these changes to 3.10 to make backporting of future 
> fixes easier.
> * Move declarations of _Py_make_parameters and _Py_subs_parameters ...

Unfortunately, _Py_make_parameters and _Py_subs_parameters are 3.11 only. They 
were part of https://github.com/python/cpython/pull/26980. And we couldn't 
backport it to 3.10 (please see the PR thread). Maybe we can ask Pablo to 
reconsider for addition in 3.10rc1 if we can get a core dev to approve that?

> * Perform cheaper tests before more expensive tests in is_unionable().
> * Optimize __module__ look up in is_typing_module().

Yeah I noticed it re-lookups __module__ unnecessarily multiple times for the 
same type. I tried fixing this a month ago (and also convert to interned PyId 
strings) but for some reason microbenchmarks didn't show much gain. Things may 
be different after you clean things up.

> * Extract related tests to separate class.

Yes please :). Maybe even a separate file altogether. GenericAlias has its own 
test_genericalias.

A big +1 on everything else. They were bugging me for a while but I didn't have 
the time to fix them. Thanks for taking this up Serhiy :)!

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44654>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to