New submission from Petr Viktorin <[email protected]>:
_PyType_GetModuleByDef (added in bpo-42100)allows module state access from slot methods (like tp_init or nb_add), the main thing missing from PEP 573 (Module State Access from C Extension Methods). It's time to make it public. The function itself can be implemented using only limited API, though it's a bit tricky to do so correctly (and our implementation uses private speedups), so it's better if extension authors can use it as a pre-made building block. Discussed in: https://mail.python.org/archives/list/[email protected]/thread/WMSDNMQ7A6LE6X4MQW4QAQUKDDL7MJ72/ Note that a bug was found in the CPython optimization recently: bpo-46433 ---------- components: C API messages: 412378 nosy: petr.viktorin priority: normal severity: normal status: open title: Add PyType_GetModuleByDef to the public & limited API versions: Python 3.11 _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue46613> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
