Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented May 28, 2019

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.

https://bugs.python.org/issue36829

@vstinner vstinner changed the title bpo-36829: sys.unraisablehook() explicits flush stderr bpo-36829: sys.excepthook and sys.unraisablehook flush May 28, 2019
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.
@vstinner vstinner merged commit a85a1d3 into python:master May 28, 2019
@vstinner vstinner deleted the unraisable_flush branch May 28, 2019 14:01
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants