◐ Shell
clean mode source ↗

bpo-42639: atexit._run_exitfuncs() uses sys.unraisablehook by vstinner · Pull Request #23779 · python/cpython

atexit._run_exitfuncs() now logs callback exceptions using
sys.unraisablehook, rather than logging them directly into
sys.stderr and raise the last exception.

Run GeneralTest of test_atexit in a subprocess since it calls
atexit._clear() which clears all atexit callbacks.

_PyAtExit_Fini() sets state->callbacks to NULL.

adorilson pushed a commit to adorilson/cpython that referenced this pull request

Mar 13, 2021
…23779)

atexit._run_exitfuncs() now logs callback exceptions using
sys.unraisablehook, rather than logging them directly into
sys.stderr and raising the last exception.

Run GeneralTest of test_atexit in a subprocess since it calls
atexit._clear() which clears all atexit callbacks.

_PyAtExit_Fini() sets state->callbacks to NULL.