Python 3.13 fix for missing dict segfault
Python 3.13 removed a safety net from PyModule_Type's tp_init slot that created the module's md_dict member if it was NULL. This safety net was removed because, since Python 3.11, the md_dict is created by tp_new and is never expected to be NULL. So, in our own code, we must ensure that tp_new is called before tp_init.
Please register or sign in to comment