GeezerVison is showing github.com — Docs Examples Focus on Outdated Single-Phase Init Modules and Static Types · Issue #134160 · python/cpython
Docs Examples Focus on Outdated Single-Phase Init Modules and Static Types #134160DescriptionA variety of pages show examples (or provide explanations) around single-phase init modules and static types, but should focus on the newer, recommended alternatives. For example:
For reference:
Linked PRs
Reacted by Adam Turner, Ralf Gommers and Petr Viktorin Activityneonene commented on May 19, 2025
|
.. note:: |
|
|
|
Unlike our ``spam`` example, ``xxmodule`` uses *multi-phase initialization* |
|
(new in Python 3.5), where a PyModuleDef structure is returned from |
|
``PyInit_spam``, and creation of the module is left to the import machinery. |
|
For details on multi-phase initialization, see :PEP:`489`. |
Should alternatives be explained according to xxmodule? I'm not sure what "xx" officially means, though. Or, maybe new eggs examples, leaving/removing the legacy page and xxmodule.c? ericsnowcurrently commented on May 21, 2025 Good point. I'm not quite sure. Keeping the old tutorials around makes sense in some ways, but perhaps not in a different file somehow or maybe just not listed in the index?
As to the xxmodule it may make sense to add a new equivalent for multi-phase init. @encukou might have some thoughts on this. ericsnowcurrently commented on May 21, 2025 Ideally we would update the docs back to 3.12 at least. encukou commented on May 21, 2025 Thank you for doing this! Sorry that I can't give this my full attention right now.
xxmodule: Use xxlimited instead.
Backporting: AFAIK, stats show that most people go to the current version. IMO, at this point, backporting big changes to 3.14 is fine.
encukou commented on May 27, 2025 The docs are now incorrect :(
I'm sorry that I missed the review window; I was planning to take a look next week but didn't announce that.
Would it make sense to revert the 3.13 backport at least? encukou commented on Dec 5, 2025 added a commit that references this issue on Dec 19, 2025gh-134160: Start "Extending and embedding" with a Diataxis-style tuto…
MetadataMetadataStatusShow more project fields
DevelopmentNo branches or pull requestsIssue actions
|