-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
gh-87320: dont crash in code module with bad sys.excepthook #122456
gh-87320: dont crash in code module with bad sys.excepthook #122456
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Misc/NEWS.d/next/Library/2024-07-30-14-46-16.gh-issue-87320.-Yk1wb.rst
Outdated
Show resolved
Hide resolved
Misc/NEWS.d/next/Library/2024-07-30-14-46-16.gh-issue-87320.-Yk1wb.rst
Outdated
Show resolved
Hide resolved
Thanks @cfbolz for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…xcepthook (pythonGH-122456) Before, the exception caused by calling non-default sys.excepthook in code.InteractiveInterpreter bubbled up to the caller, ending the REPL. (cherry picked from commit bd3d31f) Co-authored-by: CF Bolz-Tereick <cfbolz@gmx.de>
Sorry, @cfbolz and @serhiy-storchaka, I could not cleanly backport this to
|
GH-122514 is a backport of this pull request to the 3.13 branch. |
Thank you for your contribution @cfbolz. Your responses were very quick and of high quality. |
…n sys.excepthook (pythonGH-122456) Before, the exception caused by calling non-default sys.excepthook in code.InteractiveInterpreter bubbled up to the caller, ending the REPL. (cherry picked from commit bd3d31f) Co-authored-by: CF Bolz-Tereick <cfbolz@gmx.de>
GH-122515 is a backport of this pull request to the 3.12 branch. |
@serhiy-storchaka thanks a lot for the review and your help! |
…xcepthook (pythonGH-122456) Before, the exception caused by calling non-default sys.excepthook in code.InteractiveInterpreter bubbled up to the caller, ending the REPL.
Catch errors in
code.InteractiveCodeInterpreter
when callingsys.excepthook
fails. Report them in the same style that the classic interpreter has reported them.