From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 30 Aug 2022 08:38:53 +0000 (-0700) Subject: Doc: Update Py_TPFLAGS_HAVE_FINALIZE in docs (GH-96273) X-Git-Tag: v3.10.7~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e89f8b0ae4f00677b3111ed563ad67acd21e9cbf;p=thirdparty%2FPython%2Fcpython.git 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 --- diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst index 9bb0e6dbbcf8..b939d930b18c 100644 --- a/Doc/c-api/typeobj.rst +++ b/Doc/c-api/typeobj.rst @@ -1990,9 +1990,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 @@ -2010,6 +2007,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`)