mirror of
https://github.com/python/cpython.git
synced 2026-05-21 03:44:14 -04:00
43fa76638f
It's not safe to raise an exception in `PyObject_ClearWeakRefs()` if one is not already set, since it may be called by `_Py_Dealloc()`, which requires that the active exception does not change. Additionally, make sure we clear the weakrefs even when tuple allocation fails.
Source files for various builtin objects