mirror of
https://github.com/python/cpython.git
synced 2026-05-06 12:49:07 -04:00
d7e04e7b8d
gh-146480: Override the exception in _PyErr_SetKeyError() (GH-146486)
If _PyErr_SetKeyError() is called with an exception set, it now
replaces the current exception with KeyError (as expected), instead
of setting a SystemError or failing with a fatal error (in debug
mode).
(cherry picked from commit d4153a9f76)
Co-authored-by: Victor Stinner <vstinner@python.org>
Miscellaneous source files for the main Python shared library