[3.9] bpo-39934: Account for control blocks in 'except' in compiler. (GH-22395)#23303
[3.9] bpo-39934: Account for control blocks in 'except' in compiler. (GH-22395)#23303markshannon merged 2 commits intopython:3.9from
Conversation
|
I made this PR manually because there were significant merge conflicts. Please check I got it right. |
Fidget-Spinner
left a comment
There was a problem hiding this comment.
LGTM, though I think you need to change your title to [3.9] bpo-39934: Account for control blocks in 'except' in compiler. (GH-22395) . And the first message should be:
Pushes an artificial control "block" around the `except` part of a try-except.
This ensures that the computed depth in the compiler matches the actual depth in the runtime.
(cherry picked from commit 02d126aa09d96d03dcf9c5b51c858ce5ef386601 )
This will allow the bots to register it as a backport :). For more info, you can check the devguide section on backporting.
One potential concert may be that ADDOP_JREL was changed to ADDOP_JUMP in #21714. Although no behavior should have changed, I hope this doesn't cause problems in the future.
|
Thanks for doing this. The changes look good to me. |
|
I've added the news file. I took this up to familiarize myself with the process. If you prefer to to backport we can just close this and the bpo issue. Up to you. |
|
This is good. I don't need to do it myself. |
Pushes an artificial control "block" around the
exceptpart of a try-except.This ensures that the computed depth in the compiler matches the actual depth in the runtime.
(cherry picked from commit 02d126a )
https://bugs.python.org/issue39934