Author kj
Recipients gvanrossum, kj, serhiy.storchaka
Date 2021-07-16.15:42:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1626450127.26.0.991814301918.issue44654@roundup.psfhosted.org>
In-reply-to
Content
> 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 :)!
History
Date User Action Args
2021-07-16 15:42:07kjsetrecipients: + kj, gvanrossum, serhiy.storchaka
2021-07-16 15:42:07kjsetmessageid: <1626450127.26.0.991814301918.issue44654@roundup.psfhosted.org>
2021-07-16 15:42:07kjlinkissue44654 messages
2021-07-16 15:42:07kjcreate