File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2005,9 +2005,6 @@ and :c:type:`PyType_Type` effectively act as defaults.)
2005
2005
PyErr_Restore(error_type, error_value, error_traceback);
2006
2006
}
2007
2007
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
-
2011
2008
Also, note that, in a garbage collected Python,
2012
2009
:c:member: `~PyTypeObject.tp_dealloc ` may be called from
2013
2010
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.)
2025
2022
2026
2023
.. versionadded :: 3.4
2027
2024
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
+
2028
2031
.. seealso :: "Safe object finalization" (:pep:`442`)
2029
2032
2030
2033
You can’t perform that action at this time.
0 commit comments