Skip to content

Commit bded835

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

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
@@ -1484,6 +1484,52 @@ and :c:data:`PyType_Type` effectively act as defaults.)
14841484
It will be removed in a future version of CPython
14851485

14861486

1487+
.. c:macro:: Py_TPFLAGS_HAVE_VERSION_TAG
1488+
1489+
This is a :term:`soft deprecated` macro that does nothing.
1490+
Historically, this would indicate that the
1491+
:c:member:`~PyTypeObject.tp_version_tag` field was available and
1492+
initialized.
1493+
1494+
1495+
.. c:macro:: Py_TPFLAGS_INLINE_VALUES
1496+
1497+
This bit indicates that instances of this type will have an "inline values"
1498+
array (containing the object's attributes) placed directly after the end
1499+
of the object.
1500+
1501+
This requires that :c:macro:`Py_TPFLAGS_HAVE_GC` is set.
1502+
1503+
**Inheritance:**
1504+
1505+
This flag is not inherited.
1506+
1507+
.. versionadded:: 3.13
1508+
1509+
1510+
.. c:macro:: Py_TPFLAGS_IS_ABSTRACT
1511+
1512+
This bit indicates that this is an abstract type and therefore cannot
1513+
be instantiated.
1514+
1515+
**Inheritance:**
1516+
1517+
This flag is not inherited.
1518+
1519+
.. seealso::
1520+
:mod:`abc`
1521+
1522+
1523+
.. c:macro:: Py_TPFLAGS_HAVE_STACKLESS_EXTENSION
1524+
1525+
Internal. Do not set or unset this flag.
1526+
Historically, this was a reserved flag for use in Stackless Python.
1527+
1528+
.. warning::
1529+
This flag is present in header files, but is not be used.
1530+
This may be removed in a future version of CPython.
1531+
1532+
14871533
.. c:member:: const char* PyTypeObject.tp_doc
14881534
14891535
.. 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)