[issue43148] Call sys.unraisablehook in the REPL when sys.excepthook is broken

STINNER Victor report at bugs.python.org
Tue Feb 9 05:38:31 EST 2021


STINNER Victor <vstinner at python.org> added the comment:

It makes sense to call _PyErr_WriteUnraisableMsg() when sys.excepthook raise a new exception. Do you want to propose a PR for that?

sys.excepthook documentation mentions sys.unraisablehook:
https://docs.python.org/dev/library/sys.html#sys.excepthook

threading._make_invoke_excepthook logs threading.excepthook failure using sys.excepthook.

Note: Carl also suggested to add a way to invoke sys.unraisablehook explicitly, not only for testing purpose. It would help in some cases.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43148>
_______________________________________


More information about the Python-bugs-list mailing list