mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-77560: Report possible errors in restoring builtins at finalization (GH-94255)
Seems in the past the copy of builtins was not made in some scenarios, and the error was silenced. Write it now to stderr, so we have a chance to see it.
This commit is contained in:
parent
75cb3abc3b
commit
bec802dbb8
1 changed files with 1 additions and 1 deletions
|
@ -1462,7 +1462,7 @@ finalize_restore_builtins(PyThreadState *tstate)
|
|||
}
|
||||
PyDict_Clear(interp->builtins);
|
||||
if (PyDict_Update(interp->builtins, interp->builtins_copy)) {
|
||||
_PyErr_Clear(tstate);
|
||||
PyErr_WriteUnraisable(NULL);
|
||||
}
|
||||
Py_XDECREF(dict);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue