Visitar URL original
gh-77560: Report possible errors in restoring builtins at finalization by serhiy-storchaka · Pull Request #94255 · python/cpython · GitHub
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-77560: Report possible errors in restoring builtins at finalization
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.
  • Loading branch information
serhiy-storchaka committed Jun 25, 2022
commit d3ef25e9d647093bad495ee8e04042b2aee267dd
2 changes: 1 addition & 1 deletion Python/pylifecycle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down