Skip to content

Commit 463a0d6

Browse files
authored
Document missing type flags as part of Stable ABI
The documentation is currently pretty inconsistent about listing the type flags as part of the Stable ABI. Some are listed and some aren't. I've hopefully got all the important ones. I haven't done `_Py_TPFLAGS_MATCH_SELF` which is exposed in the Limited API but starts with an underscore. I also haven't done things like `Py_TPFLAGS_VALID_VERSION_TAG`, `Py_TPFLAGS_HAVE_FINALIZE`, `Py_TPFLAGS_HAVE_VERSION_TAG` which are exposed in the Limited API but now don't do anything.
1 parent 9712dc1 commit 463a0d6

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Misc/stable_abi.toml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1786,6 +1786,28 @@
17861786
added = '3.2'
17871787
[const.Py_TPFLAGS_HAVE_GC]
17881788
added = '3.2'
1789+
[const.Py_TPFLAGS_READY]
1790+
added = '3.2'
1791+
[const.Py_TPFLAGS_READYING]
1792+
added = '3.2'
1793+
[const.Py_TPFLAGS_IS_ABSTRACT]
1794+
added = '3.2'
1795+
[const.Py_TPFLAGS_LONG_SUBCLASS]
1796+
added = '3.2'
1797+
[const.Py_TPFLAGS_LIST_SUBCLASS]
1798+
added = '3.2'
1799+
[const.Py_TPFLAGS_TUPLE_SUBCLASS]
1800+
added = '3.2'
1801+
[const.Py_TPFLAGS_BYTES_SUBCLASS]
1802+
added = '3.2'
1803+
[const.Py_TPFLAGS_UNICODE_SUBCLASS]
1804+
added = '3.2'
1805+
[const.Py_TPFLAGS_DICT_SUBCLASS]
1806+
added = '3.2'
1807+
[const.Py_TPFLAGS_BASE_EXC_SUBCLASS]
1808+
added = '3.2'
1809+
[const.Py_TPFLAGS_TYPE_SUBCLASS]
1810+
added = '3.2'
17891811

17901812
[const.METH_VARARGS]
17911813
added = '3.2'
@@ -2276,6 +2298,13 @@
22762298
[function.PyGC_IsEnabled]
22772299
added = '3.10'
22782300

2301+
# New type flags in 3.10
2302+
2303+
[const.Py_TPFLAGS_DISALLOW_INSTANTIATION]
2304+
added = '3.10'
2305+
[const.Py_TPFLAGS_IMMUTABLETYPE]
2306+
added = '3.10'
2307+
22792308
# Add new C API in Python 3.11
22802309

22812310
[function.PyType_GetName]

0 commit comments

Comments
 (0)