Issue 26515: Update extending/embedding docs to new way to build modules in C (original) (raw)

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: Alyssa 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:28 admin set github: 70702
2020-12-15 15:36:08 petr.viktorin set messages: +
2020-10-23 12:31:29 petr.viktorin set messages: +
2020-01-11 12:45:38 ncoghlan set messages: + versions: + Python 3.9, - Python 3.6, Python 3.7, Python 3.8
2019-05-16 20:05:17 petr.viktorin set messages: +
2019-05-15 02:32:57 vstinner set nosy: + petr.viktorin
2018-08-06 03:05:47 berker.peksag set nosy: + berker.peksagtype: enhancementversions: + Python 3.7, Python 3.8, - Python 3.5
2018-08-06 02:57:34 berker.peksag set keywords: + patchstage: needs patch -> patch reviewpull_requests: + <pull%5Frequest8177>
2016-03-09 02:43:41 brett.cannon create