Serhiy Storchaka added the comment: I called the fix a workaround because other solution may be to make PyType_FromSpec() not setting tp_new in such cases. I expect that this is common mistake when convert a static class to a heap class with PyType_FromSpec(). At least we should add warnings in C API documentation and PEP 384. Or change the behavior of PyType_FromSpec() if it is appropriate. But this is different issue. If PyType_FromSpec() will be changed, proposed fix can be reverted.
---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23815> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com