bpo-36829: sys.excepthook and sys.unraisablehook flush by vstinner · Pull Request #13620 · python/cpython

@vstinner vstinner changed the title bpo-36829: sys.unraisablehook() explicits flush stderr bpo-36829: sys.excepthook and sys.unraisablehook flush

May 28, 2019

@vstinner

sys.excepthook() and sys.unraisablehook() now explicitly flush the
file (usually sys.stderr).

If file.flush() fails, sys.excepthook() silently ignores the error,
whereas sys.unraisablehook() logs the new exception.

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

Jan 14, 2020
sys.excepthook() and sys.unraisablehook() now explicitly flush the
file (usually sys.stderr).

If file.flush() fails, sys.excepthook() silently ignores the error,
whereas sys.unraisablehook() logs the new exception.