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 vstinner
Recipients christian.heimes, erlendaasland, pablogsal, serhiy.storchaka, shreyanavigyan, vstinner
Date 2021-04-30.23:00:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I checked " Types converted pre Python 3.9" and "Types converted in Python 3.9" of:

(I didn't check "Types converted in Python 3.10" yet.)

These lists are not complete, for example select.kevent was not listed whereas it has a bug.

_struct.unpack_iterator can be modified to use Py_TPFLAGS_DISALLOW_INSTANTIATION: its tp_new method always raises an exception.


* select.kevent: BUG, use {Py_tp_new, PyType_GenericNew} slot which doesn't properly initialize kqueue_event_Object!

Need review:

* _ast.AST: use {Py_tp_new, PyType_GenericNew} and {Py_tp_init, ast_type_init} slots. What happens if tp_new is called without calling tp_init?

Implement tp_new (ok!):

* _abc._abc_data
* _json.Scanner
* _json.Encoder
* select.devpoll
* select.epoll
* select.kqueue
* _random.Random
* _struct.Struct 

Other cases (ok!):

* _ssl.SSLError inherits from OSError and reuses OSError structure (PyOSErrorObject): the inherited tp_new works as expected.
Date User Action Args
2021-04-30 23:00:50vstinnersetrecipients: + vstinner, christian.heimes, serhiy.storchaka, pablogsal, erlendaasland, shreyanavigyan
2021-04-30 23:00:50vstinnersetmessageid: <>
2021-04-30 23:00:50vstinnerlinkissue43916 messages
2021-04-30 23:00:50vstinnercreate