On 2019-11-25 13:15, Stefan Behnel wrote:
I think that PEP 573 is ready to be accepted, to greatly improve the state of extension modules in CPython 3.9.
It has come a long way since the original proposal and went through several iterations and discussions by various interested people, effectively reducing its scope quite a bit. So this is the last call for comments on the latest version of the PEP, before I will pronounce on it. Please keep the discussion in this thread.
I have received substantial private feedback, and I'll need to make another update to:
## Better separate C-API additions:
- PyType_FromModuleAndSpec - PyType_GetModule - PyType_DefiningTypeFromSlotFunc - PyType_GetModuleState
- METH_METHOD flag - PyCMethod (function signature)
from CPython implementation details:
- ht_module (member of the undocumented PyHeapTypeObject) - PyCMethodObject (extends the undocumented PyCFunctionObject; used internally to hold information to pass to PyCMethod) - PyCFunction_GET_CLASS (helper for the internal class) - defining_class clinic converter
(See https://email@example.com/message/B2VDVLABM4... for a proposal to formalize this distinction as "rings", and for some reasons why it is good.)
## Clarify that ht_module is not inherited
## Specify what "defining class" means more rigorously