- Clarify that not all problems with PEP 3121 are solved
- Add a pseudo-code overview
- Clarify that PyModuleDef_Init does very little
- Say that the execution phase isn't done for non-module objects
- Link to docs on support for multiple interpreters
- Reword text about lack of finder for multi-module extensions
- Mention changes in imp and _imp modules
- Remove stale footnote
Summary by Petr Viktorin:
- Reuse the PyInit_* hook, instead of adding PyModuleExport_*;
add the PyModuleDef_Init helper
- Per-module state is allocated at the beginning of the execute step
- Docstrings & methods from the def are added unconditionally
- Rename PEP to better reflect what it ended up doing
- Mention built-in modules, which get the same changes
- Several rewordings and clarifications
Summary:
- PyModuleExport -> PyModuleDef (which brings us down to two slot types,
create & exec)
- Removed "singleton modules"
- Stated that PyModule_Create, PyState_FindModule, PyState_AddModule,
PyState_RemoveModule will not work on slots-based modules.
- Added a section on C-level callbacks
- Clarified that if PyModuleExport_* returns NULL, it's as if it wasn't
defined (i.e. falls back to PyInit)
- Added API functions: PyModule_FromDefAndSpec, PyModule_ExecDef
- Added PyModule_AddMethods and PyModule_AddDocstring helpers
- Added PyMODEXPORT_FUNC macro for x-platform declarations of the export
function
- Added summary of API changes
- Added example code for a backwards-compatible module
- Changed modules ported in the initial implementation to "array" and "xx*"
- Changed ImportErrors to SystemErrors in cases where the module is
badly written (and to mirror what PyInit does now)
- Several typo fixes and clarifications