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 petr.viktorin
Recipients petr.viktorin
Date 2022-02-02.16:55:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643820922.83.0.000906972876287.issue46613@roundup.psfhosted.org>
In-reply-to
Content
_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/capi-sig@python.org/thread/WMSDNMQ7A6LE6X4MQW4QAQUKDDL7MJ72/
Note that a bug was found in the CPython optimization recently: bpo-46433
History
Date User Action Args
2022-02-02 16:55:22petr.viktorinsetrecipients: + petr.viktorin
2022-02-02 16:55:22petr.viktorinsetmessageid: <1643820922.83.0.000906972876287.issue46613@roundup.psfhosted.org>
2022-02-02 16:55:22petr.viktorinlinkissue46613 messages
2022-02-02 16:55:22petr.viktorincreate