Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Doc/data/stable_abi.dat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions Doc/tools/extensions/c_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,17 @@ def add_annotations(app: Sphinx, doctree: nodes.document) -> None:

# Stable ABI annotation.
if record := stable_abi_data.get(name):
if ROLE_TO_OBJECT_TYPE[record.role] != objtype:
record_object_type = ROLE_TO_OBJECT_TYPE[record.role]
if (
record_object_type != objtype
# Some macros are documented as functions
and not (
record_object_type == 'macro' and objtype == 'function'
)
):
msg = (
f"Object type mismatch in limited API annotation for {name}: "
f"{ROLE_TO_OBJECT_TYPE[record.role]!r} != {objtype!r}"
f"{record_object_type!r} != {objtype!r}"
)
raise ValueError(msg)
annotation = _stable_abi_annotation(record)
Expand Down
20 changes: 20 additions & 0 deletions Misc/stable_abi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1872,6 +1872,19 @@
[function.PyThread_start_new_thread]
added = '3.2'

# Python 3.2 macros

[macro.Py_CLEAR]
added = '3.2'
[macro.Py_DECREF]
added = '3.2'
[macro.Py_INCREF]
Comment thread
vstinner marked this conversation as resolved.
added = '3.2'
[macro.Py_XDECREF]
added = '3.2'
[macro.Py_XINCREF]
added = '3.2'


### Python 3.3 ##############################################################

Expand Down Expand Up @@ -2225,6 +2238,13 @@
[function.PyObject_GC_IsTracked]
added = '3.9'

# Python 3.9 macros

[macro.Py_SET_REFCNT]
added = '3.9'
[macro.Py_SET_TYPE]
added = '3.9'


### Python 3.10 #############################################################

Expand Down
Loading