Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-105658: fix excess trace events for except block ending with a conditional block#109384
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
iritkatriel commented Sep 13, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
carljm left a comment
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.
I don't see a test here that reflects the case in the filed bug, where the line number actually jumps back to a previous line in a conditional. I believe that this change would fix that, but would it make sense to add an explicit test for it?
Misc/NEWS.d/next/Core and Builtins/2023-09-13-19-16-51.gh-issue-105658.z2nR2u.rst Outdated Show resolvedHide resolved
Uh oh!
There was an error while loading. Please reload this page.
| (3, 'line'), | ||
| (3, 'exception'), | ||
| (5, 'line'), | ||
| (6, 'line'), |
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.
On main we have here another (5, 'line'),
miss-islington commented Sep 14, 2023
Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
miss-islington commented Sep 14, 2023
Sorry, @iritkatriel, I could not cleanly backport this to |
bedevere-bot commented Sep 14, 2023
|
bedevere-bot commented Sep 14, 2023
|
… a conditional block (python#109384) (cherry picked from commit 4a54074)
bedevere-bot commented Sep 14, 2023
|
bedevere-bot commented Sep 14, 2023
|
GH-109411 is a backport of this pull request to the 3.12 branch. |
bedevere-bot commented Sep 14, 2023
|
This will remove the event with the wrong line number. It will still work because RERAISE doesn't need to have a line number attached. In exception_unwind, the instruction pointer on the frame is used to determine which exception handler should be invoked. The location of the reraise doesn't show up in the traceback.
Fixes#105658.