This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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 <>
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()).
Date User Action Args
2020-10-21 20:52:33serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, vstinner, corona10, shihai1991
2020-10-21 20:52:33serhiy.storchakasetmessageid: <>
2020-10-21 20:52:33serhiy.storchakalinkissue41052 messages
2020-10-21 20:52:33serhiy.storchakacreate