Message379251
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:33 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou, vstinner, corona10, shihai1991 |
2020-10-21 20:52:33 | serhiy.storchaka | set | messageid: <1603313553.4.0.509288379809.issue41052@roundup.psfhosted.org> |
2020-10-21 20:52:33 | serhiy.storchaka | link | issue41052 messages |
2020-10-21 20:52:33 | serhiy.storchaka | create | |
|