Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9625de6

Browse files
authored
Doc: Update Py_TPFLAGS_HAVE_FINALIZE in docs (GH-96273)
It is now deprecated and the docs should reflect that.
1 parent 7517735 commit 9625de6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Doc/c-api/typeobj.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2005,9 +2005,6 @@ and :c:type:`PyType_Type` effectively act as defaults.)
20052005
PyErr_Restore(error_type, error_value, error_traceback);
20062006
}
20072007

2008-
For this field to be taken into account (even through inheritance),
2009-
you must also set the :const:`Py_TPFLAGS_HAVE_FINALIZE` flags bit.
2010-
20112008
Also, note that, in a garbage collected Python,
20122009
:c:member:`~PyTypeObject.tp_dealloc` may be called from
20132010
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.)
20252022

20262023
.. versionadded:: 3.4
20272024

2025+
.. versionchanged:: 3.8
2026+
2027+
Before version 3.8 it was necessary to set the
2028+
:const:`Py_TPFLAGS_HAVE_FINALIZE` flags bit in order for this field to be
2029+
used. This is no longer required.
2030+
20282031
.. seealso:: "Safe object finalization" (:pep:`442`)
20292032

20302033

0 commit comments

Comments
 (0)