diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2022-06-25 16:02:09 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-25 16:02:09 (GMT) |
| commit | bec802dbb87717a23acb9c600c15f40bc98340a3 (patch) | |
| tree | 9f786ba20d3e66d7cb958c4dce4b80b132fc0905 /Python | |
| parent | 75cb3abc3bf10c7be3b374bfb4c060c36d251411 (diff) | |
| download | cpython-bec802dbb87717a23acb9c600c15f40bc98340a3.zip cpython-bec802dbb87717a23acb9c600c15f40bc98340a3.tar.gz cpython-bec802dbb87717a23acb9c600c15f40bc98340a3.tar.bz2 | |
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.
Diffstat (limited to 'Python')
| -rw-r--r-- | Python/pylifecycle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index c2c9e90..65e7f23 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -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); } |
