mirror of
https://github.com/python/cpython.git
synced 2026-06-01 00:59:47 -04:00
ce6a533c4b
In PyObject_GC_Del, in Py_DEBUG mode, when warning about GC objects that were not properly untracked before starting destruction, take care to untrack the object _before_ warning, to avoid triggering a GC run and causing the problem the code tries to warn about. Also make sure to save and restore any pending exceptions, which the warning would otherwise clobber or trigger an assertion error on.
Source files for standard library extension modules, and former extension modules that are now builtin modules.