Skip to content

Commit 077e5da

Browse files
authored
Support the old limited C API 3.2 (#190)
Add a PyIter_NextItem() implementation for limited C API 3.3 and older. Add a PyInit implementation for limited C API 3.4 and older (without PyModuleDef_Slot).
1 parent 183f44b commit 077e5da

6 files changed

Lines changed: 266 additions & 103 deletions

File tree

‎docs/api.rst‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,9 @@ PyThreadState
809809

810810
See `PyThreadState_GetID() documentation <https://docs.python.org/dev/c-api/init.html#c.PyThreadState_GetID>`__.
811811

812-
Availability: Python 3.7. Not available on PyPy.
812+
Availability: Python 3.7.
813+
814+
Not available on PyPy nor on limited C API 3.8 and older.
813815

814816
PyInterpreterState
815817
^^^^^^^^^^^^^^^^^^
@@ -818,7 +820,9 @@ PyInterpreterState
818820

819821
See `PyInterpreterState_Get() documentation <https://docs.python.org/dev/c-api/init.html#c.PyInterpreterState_Get>`__.
820822

821-
Not available on limited C API 3.8 and older.
823+
Not available on limited C API 3.8 and older on Unix.
824+
825+
Not available in stable ABI 3.9 and older on Windows.
822826

823827

824828
GC protocol
@@ -933,7 +937,9 @@ part of the Python C API.
933937

934938
.. c:function:: PyFrameObject* _PyThreadState_GetFrameBorrow(PyThreadState *tstate)
935939

936-
:c:func:`PyThreadState_GetFrame` variant. Not available on PyPy.
940+
:c:func:`PyThreadState_GetFrame` variant.
941+
942+
Not available on PyPy nor with the limited C API 3.8 and older.
937943

938944
Not available on limited C API 3.8 and older.
939945

‎docs/changelog.rst‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
Changelog
22
=========
33

4-
* 2026-10-06: Add functions:
4+
* 2026-10-08: Add support for the limited C API 3.2.
5+
* 2026-10-08: Add functions:
56

67
* ``PyImport_ImportModuleAttr()``
78
* ``PyImport_ImportModuleAttrString()``

0 commit comments

Comments
 (0)