Skip to content

Commit cb3aba3

Browse files
[3.13] gh-141004: Document missing type flags (GH-145127) (GH-145317)
gh-141004: Document missing type flags (GH-145127) (cherry picked from commit dc1b56a) Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
1 parent cd3e9b3 commit cb3aba3

File tree

2 files changed

+46
-3
lines changed

2 files changed

+46
-3
lines changed

Doc/c-api/typeobj.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,6 +1414,52 @@ and :c:data:`PyType_Type` effectively act as defaults.)
14141414
It will be removed in a future version of CPython
14151415

14161416

1417+
.. c:macro:: Py_TPFLAGS_HAVE_VERSION_TAG
1418+
1419+
This is a :term:`soft deprecated` macro that does nothing.
1420+
Historically, this would indicate that the
1421+
:c:member:`~PyTypeObject.tp_version_tag` field was available and
1422+
initialized.
1423+
1424+
1425+
.. c:macro:: Py_TPFLAGS_INLINE_VALUES
1426+
1427+
This bit indicates that instances of this type will have an "inline values"
1428+
array (containing the object's attributes) placed directly after the end
1429+
of the object.
1430+
1431+
This requires that :c:macro:`Py_TPFLAGS_HAVE_GC` is set.
1432+
1433+
**Inheritance:**
1434+
1435+
This flag is not inherited.
1436+
1437+
.. versionadded:: 3.13
1438+
1439+
1440+
.. c:macro:: Py_TPFLAGS_IS_ABSTRACT
1441+
1442+
This bit indicates that this is an abstract type and therefore cannot
1443+
be instantiated.
1444+
1445+
**Inheritance:**
1446+
1447+
This flag is not inherited.
1448+
1449+
.. seealso::
1450+
:mod:`abc`
1451+
1452+
1453+
.. c:macro:: Py_TPFLAGS_HAVE_STACKLESS_EXTENSION
1454+
1455+
Internal. Do not set or unset this flag.
1456+
Historically, this was a reserved flag for use in Stackless Python.
1457+
1458+
.. warning::
1459+
This flag is present in header files, but is not be used.
1460+
This may be removed in a future version of CPython.
1461+
1462+
14171463
.. c:member:: const char* PyTypeObject.tp_doc
14181464
14191465
.. corresponding-type-slot:: Py_tp_doc

Tools/check-c-api-docs/ignored_c_api.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ Py_HASH_EXTERNAL
2222
PyABIInfo_FREETHREADING_AGNOSTIC
2323
# object.h
2424
Py_INVALID_SIZE
25-
Py_TPFLAGS_HAVE_VERSION_TAG
26-
Py_TPFLAGS_INLINE_VALUES
27-
Py_TPFLAGS_IS_ABSTRACT
2825
# pyexpat.h
2926
PyExpat_CAPI_MAGIC
3027
PyExpat_CAPSULE_NAME

0 commit comments

Comments
 (0)