Repository navigation
Implement PEP 793 – PyModExport #140550
Copy link
Copy link
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-C-APItype-featureA feature request or enhancementA feature request or enhancement
Description
Activity
- addedtype-featureA feature request or enhancementA feature request or enhancement
on Oct 24, 2025 - addedinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
on Oct 24, 2025 I'd appreciate a review of the reference docs update: #141197
9 remaining items
@encukou I am trying to update a library to include this feature in 3.15, and I am wondering if the PY_VERSION_HEX for this version is 0x030F0000. Does this version exist?
- added a commit that references this issue
on May 5, 2026 I am trying to update a library to include this feature in 3.15, and I am wondering if the PY_VERSION_HEX for this version is 0x030F0000. Does this version exist?
Sorry, I missed the notification.
To use wording in the docs:
0x030F0000does not correspond to any Python release, but is useful in numeric comparisons.You can use
0x030F0000to mean "3.15+" in e.g.:PY_VERSION_HEX >= 0x030F0000#define Py_LIMITED_API 0x030F0000#define Py_TARGET_ABI3T 0x030F0000
- added a commit that references this issue
on Sep 15, 2026 - added a commit that references this issue
on Sep 15, 2026
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-C-APItype-featureA feature request or enhancementA feature request or enhancement
Feature or enhancement
Proposal:
See PEP 793. I'll copy the abstract for reference:
PyInit_*(gh-140550: PEP 793 reference documentation #141197)a notice for(edit: This shouldn't have changed/broken more than usual.)DYNLOADFILEusers?#141780) (gh-140550: Docs notes for PEP 793 #151661)PyImport_AppendInittab& friends (gh-140550: Docs notes for PEP 793 #151661)PyMod_ExecinPyImport_CreateModuleFromInitfuncdocs is linked (gh-140550: PEP 793 reference documentation #141197)PyMODEXPORT_FUNCin blurb for#141672blurb for#141780xxlimited.cupdate (gh-140550: Update xxlimited with 3.15 limited API & PEP 697 #142827)_Py_OPAQUE_PYOBJECTinxxlimited.c(by 3.15.0 beta)Optional stretch goals:
PyInitfunction fromLib/test/test_cext/extension.c(gh-140550: Remove PyInit function from test_cext #141511)importdl: load the DLL onceboolfor the GIL flag (gh-140550: Use a bool for the Py_mod_gil value #141519)spec.nameinPyModule_FromSlotsAndSpecPy_mod_methodsPyModule_GetStateWithToken()functionHas this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
See also:
__declspec(dllexport)on Windows #141672