Author serhiy.storchaka
Recipients corona10, pitrou, serhiy.storchaka, shihai1991, vstinner
Date 2020-10-21.20:52:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1603313553.4.0.509288379809.issue41052@roundup.psfhosted.org>
In-reply-to
Content
I came to the same conclusion after trying to fix it. But we cannot just do it now. We have to fix bugs in Python 3.9 and support protocols 0 and 1 for some deprecation period.

Also protocols 0 and 1 are used in some third-party implementations for other programming languages, so they can be used for interoperability with other languages.

The proposed patch adds additional check. It uses the fact that the __new__ attribute for classes implemented in C is a bultin function with __self__ pointing to this class (it is created in tp_new_wrapper()).
History
Date User Action Args
2020-10-21 20:52:33serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, vstinner, corona10, shihai1991
2020-10-21 20:52:33serhiy.storchakasetmessageid: <1603313553.4.0.509288379809.issue41052@roundup.psfhosted.org>
2020-10-21 20:52:33serhiy.storchakalinkissue41052 messages
2020-10-21 20:52:33serhiy.storchakacreate