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.

classification
Title: Update extending/embedding docs to new way to build modules in C
Type: enhancement Stage: patch review
Components: Documentation Versions: Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: berker.peksag, brett.cannon, docs@python, eric.snow, ncoghlan, petr.viktorin
Priority: normal Keywords: patch

Created on 2016-03-09 02:43 by brett.cannon, last changed 2022-04-11 14:58 by admin.

Pull Requests
URL Status Linked Edit
PR 8682 closed berker.peksag, 2018-08-06 02:57
Messages (5)
msg261398 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2016-03-09 02:43
https://docs.python.org/3/extending/extending.html#a-simple-example uses PyModule_Create() instead of PyModuleDef_Init().
msg342668 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2019-05-16 20:05
Correct usage of multi-phase init might now get users stuck when they start needing per-module state. See PEP 573 "Module State Access from C Extension Methods" for the (hopefully) last thing that prevents me from generally recommending multi-phase init.

That PEP is on my list for after PRP 590 is done.
Before it's implemented, I'm happy leaving PyModuleDef_Init to experts -- that is, have it in the reference docs only.
msg359792 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2020-01-11 12:45
Changed target version as per Petr's comment (PEP 573 is close to being accepted for 3.9 - it just needs some editing to improve clarity in the PEP itself, rather than needing any changes to the technical proposal)
msg379432 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2020-10-23 12:31
There is now PEP 630. Still not done enough to move it out of draft status, but usable for converting simple modules.
msg383069 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2020-12-15 15:36
PEP 630 is now Active. I believe the vast majority of modules can now be ported, and it should be helpful for early adopters (including CPython stdlib). But there are still Open Issues and the API not battle-tested on all the edge cases.

The PEP is written to be easily integrated into official docs when the time comes.
History
Date User Action Args
2022-04-11 14:58:28adminsetgithub: 70702
2020-12-15 15:36:08petr.viktorinsetmessages: + msg383069
2020-10-23 12:31:29petr.viktorinsetmessages: + msg379432
2020-01-11 12:45:38ncoghlansetmessages: + msg359792
versions: + Python 3.9, - Python 3.6, Python 3.7, Python 3.8
2019-05-16 20:05:17petr.viktorinsetmessages: + msg342668
2019-05-15 02:32:57vstinnersetnosy: + petr.viktorin
2018-08-06 03:05:47berker.peksagsetnosy: + berker.peksag

type: enhancement
versions: + Python 3.7, Python 3.8, - Python 3.5
2018-08-06 02:57:34berker.peksagsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request8177
2016-03-09 02:43:41brett.cannoncreate