[Python-checkins] Doc: Update Py_TPFLAGS_HAVE_FINALIZE in docs (GH-96273)
methane
webhook-mailer at python.org
Tue Aug 30 04:31:36 EDT 2022
https://github.com/python/cpython/commit/9625de6fab4597bcd04ec390b680b053b0533816
commit: 9625de6fab4597bcd04ec390b680b053b0533816
branch: main
author: da-woods <dw-git at d-woods.co.uk>
committer: methane <songofacandy at gmail.com>
date: 2022-08-30T17:31:14+09:00
summary:
Doc: Update Py_TPFLAGS_HAVE_FINALIZE in docs (GH-96273)
It is now deprecated and the docs should reflect that.
files:
M Doc/c-api/typeobj.rst
diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst
index dfe91ee358d0..20cdffed110c 100644
--- a/Doc/c-api/typeobj.rst
+++ b/Doc/c-api/typeobj.rst
@@ -2005,9 +2005,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
@@ -2025,6 +2022,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`)
More information about the Python-checkins
mailing list