]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-141909: Add `PyModuleDef_Slot` and earlier Py_mod_* constants to stable ABI manife...
authorPetr Viktorin <encukou@gmail.com>
Tue, 25 Nov 2025 14:16:49 +0000 (15:16 +0100)
committerGitHub <noreply@github.com>
Tue, 25 Nov 2025 14:16:49 +0000 (15:16 +0100)
These were added to the limited API in 3.5.
Not including them in `Misc/stable_abi.toml` was a bug.

Doc/c-api/module.rst
Doc/data/stable_abi.dat
Misc/stable_abi.toml

index 1994a3c7d01ca75da67f4a918cfd22da94cbd98a..5d91de48d0d8a5542c88f7c622d73abad23522a9 100644 (file)
@@ -328,6 +328,8 @@ The available slot types are:
    ``PyModuleDef`` has non-``NULL`` ``m_traverse``, ``m_clear``,
    ``m_free``; non-zero ``m_size``; or slots other than ``Py_mod_create``.
 
+   .. versionadded:: 3.5
+
 .. c:macro:: Py_mod_exec
 
    Specifies a function that is called to *execute* the module.
@@ -342,6 +344,8 @@ The available slot types are:
    If multiple ``Py_mod_exec`` slots are specified, they are processed in the
    order they appear in the *m_slots* array.
 
+   .. versionadded:: 3.5
+
 .. c:macro:: Py_mod_multiple_interpreters
 
    Specifies one of the following values:
index 437f552cccf55ba2980a93b090e4619c13a7c1f0..4d9ac8537e2e81c50a46d82de9fe4a2dac1bd746 100644 (file)
@@ -464,6 +464,7 @@ data,PyMethodDescr_Type,3.2,,
 type,PyModuleDef,3.2,,full-abi
 type,PyModuleDef_Base,3.2,,full-abi
 func,PyModuleDef_Init,3.5,,
+type,PyModuleDef_Slot,3.5,,full-abi
 data,PyModuleDef_Type,3.5,,
 func,PyModule_Add,3.13,,
 func,PyModule_AddFunctions,3.7,,
@@ -983,8 +984,12 @@ macro,Py_bf_releasebuffer,3.11,,
 type,Py_buffer,3.11,,full-abi
 type,Py_intptr_t,3.2,,
 macro,Py_mod_abi,3.15,,
+macro,Py_mod_create,3.5,,
 macro,Py_mod_doc,3.15,,
+macro,Py_mod_exec,3.5,,
+macro,Py_mod_gil,3.12,,
 macro,Py_mod_methods,3.15,,
+macro,Py_mod_multiple_interpreters,3.12,,
 macro,Py_mod_name,3.15,,
 macro,Py_mod_state_clear,3.15,,
 macro,Py_mod_state_free,3.15,,
index 7ca3059db9ed9767873f7204fb7515441e3ab4c0..7d156f4b864f68afe1b69c866f1f4e2f3123c335 100644 (file)
     added = '3.5'
 [data.PyModuleDef_Type]
     added = '3.5'
+[const.Py_mod_create]
+    added = '3.5'
+[const.Py_mod_exec]
+    added = '3.5'
+[struct.PyModuleDef_Slot]
+    added = '3.5'
+    struct_abi_kind = 'full-abi'
 
 # New slots in 3.5:
 # d51374ed78a3e3145911a16cdf3b9b84b3ba7d15 - Matrix multiplication (PEP 465)
     added = '3.12'
 [const.Py_TPFLAGS_ITEMS_AT_END]
     added = '3.12'
+[const.Py_mod_multiple_interpreters]
+    added = '3.12'
+
 [function.PyImport_AddModuleRef]
     added = '3.13'
 [function.PyWeakref_GetRef]
     added = '3.13'
 [function.PyEval_GetFrameLocals]
     added = '3.13'
+[const.Py_mod_gil]
+    added = '3.12'
 
 [function.Py_TYPE]
     # Before 3.14, this was a macro that accessed the PyObject member