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

(cherry picked from commit 202fce0dbde1da32d8abc2eb59ddfce6f6a3c9fa)

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

index bc844582ff43771a1f839c3fc5bd42fb57b6b65d..11b488e4e520695aea5668848174c38be2835b8e 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 86054f87e9f6ae08b4af8c41ba43b3796d344d14..b69799f5a4235a9b23bdb1f6647e9c60ba804f06 100644 (file)
@@ -454,6 +454,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,,
@@ -972,6 +973,10 @@ macro,Py_bf_getbuffer,3.11,,
 macro,Py_bf_releasebuffer,3.11,,
 type,Py_buffer,3.11,,full-abi
 type,Py_intptr_t,3.2,,
+macro,Py_mod_create,3.5,,
+macro,Py_mod_exec,3.5,,
+macro,Py_mod_gil,3.13,,
+macro,Py_mod_multiple_interpreters,3.12,,
 macro,Py_mp_ass_subscript,3.2,,
 macro,Py_mp_length,3.2,,
 macro,Py_mp_subscript,3.2,,
index 27d57e695d3ae0bc1123bf6926fe2b332c6c9bfe..cc58ffc176af590e727f3e9525dc52f80da15405 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.13'
 
 [function.Py_TYPE]
     added = '3.14'