]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-99293: Document that `Py_TPFLAGS_VALID_VERSION_TAG` shouldn't be used. (#GH-101736)
authorMark Shannon <mark@hotpy.org>
Thu, 9 Feb 2023 13:05:53 +0000 (13:05 +0000)
committerGitHub <noreply@github.com>
Thu, 9 Feb 2023 13:05:53 +0000 (14:05 +0100)
Document that Py_TPFLAGS_VALID_VERSION_TAG shouldn't be used.

Doc/c-api/typeobj.rst
Misc/NEWS.d/next/C API/2023-02-09-10-38-20.gh-issue-99293.mFqfpp.rst [new file with mode: 0644]

index 644830b940b4173c1ba2ddd24834c194c54e7106..fd8f49ccb1caabb8b5c74c96b5565779dce6d3a7 100644 (file)
@@ -1313,6 +1313,16 @@ and :c:type:`PyType_Type` effectively act as defaults.)
       .. versionadded:: 3.10
 
 
+   .. data:: Py_TPFLAGS_VALID_VERSION_TAG
+
+      Internal. Do not set or unset this flag.
+      To indicate that a class has changed call :c:func:`PyType_Modified`
+
+      .. warning::
+         This flag is present in header files, but is an internal feature and should
+         not be used. It will be removed in a future version of CPython
+
+
 .. c:member:: const char* PyTypeObject.tp_doc
 
    An optional pointer to a NUL-terminated C string giving the docstring for this
diff --git a/Misc/NEWS.d/next/C API/2023-02-09-10-38-20.gh-issue-99293.mFqfpp.rst b/Misc/NEWS.d/next/C API/2023-02-09-10-38-20.gh-issue-99293.mFqfpp.rst
new file mode 100644 (file)
index 0000000..8c0f055
--- /dev/null
@@ -0,0 +1,2 @@
+Document that the Py_TPFLAGS_VALID_VERSION_TAG is an internal feature,
+should not be used, and will be removed.