summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-08-30 08:38:40 (GMT)
committerGitHub <noreply@github.com>2022-08-30 08:38:40 (GMT)
commit53a344ef8099f131934d9d5032e8a1cd605cf963 (patch)
treeadb3f481af205e2d8e6cb0e8a8c99efb268aef26
parent1901ee7a5251a3a2a2d9f65f25205b0b918d5c97 (diff)
downloadcpython-53a344ef8099f131934d9d5032e8a1cd605cf963.zip
cpython-53a344ef8099f131934d9d5032e8a1cd605cf963.tar.gz
cpython-53a344ef8099f131934d9d5032e8a1cd605cf963.tar.bz2
Doc: Update Py_TPFLAGS_HAVE_FINALIZE in docs (GH-96273)
It is now deprecated and the docs should reflect that. (cherry picked from commit 9625de6fab4597bcd04ec390b680b053b0533816) Co-authored-by: da-woods <dw-git@d-woods.co.uk>
-rw-r--r--Doc/c-api/typeobj.rst9
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst
index 01d67a5..8be489a 100644
--- a/Doc/c-api/typeobj.rst
+++ b/Doc/c-api/typeobj.rst
@@ -1984,9 +1984,6 @@ and :c:type:`PyType_Type` effectively act as defaults.)
PyErr_Restore(error_type, error_value, error_traceback);
}
- For this field to be taken into account (even through inheritance),
- you must also set the :const:`Py_TPFLAGS_HAVE_FINALIZE` flags bit.
-
Also, note that, in a garbage collected Python,
:c:member:`~PyTypeObject.tp_dealloc` may be called from
any Python thread, not just the thread which created the object (if the object
@@ -2004,6 +2001,12 @@ and :c:type:`PyType_Type` effectively act as defaults.)
.. versionadded:: 3.4
+ .. versionchanged:: 3.8
+
+ Before version 3.8 it was necessary to set the
+ :const:`Py_TPFLAGS_HAVE_FINALIZE` flags bit in order for this field to be
+ used. This is no longer required.
+
.. seealso:: "Safe object finalization" (:pep:`442`)