Skip to content

bpo-36829: PyErr_WriteUnraisable() normalizes exception #13507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 22, 2019
Merged

bpo-36829: PyErr_WriteUnraisable() normalizes exception #13507

merged 3 commits into from
May 22, 2019

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented May 22, 2019

PyErr_WriteUnraisable() now creates a traceback object if there is no
current traceback. Moreover, call PyErr_NormalizeException() and
PyException_SetTraceback() to normalize the exception value.

https://bugs.python.org/issue36829

vstinner added 3 commits May 22, 2019 23:02
PyErr_WriteUnraisable() now creates a traceback object if there is no
current traceback. Moreover, call PyErr_NormalizeException() and
PyException_SetTraceback() to normalize the exception value. Ignore
any error.
Replace runtime check with assertions. _PyTraceBack_FromFrame() is
used by PyTraceBack_Here() which is performance critical (called from
ceval.c).
@vstinner vstinner merged commit df22c03 into python:master May 22, 2019
@vstinner vstinner deleted the unraisablehook_traceback branch May 22, 2019 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants