◐ Shell
clean mode source ↗

[3.9] bpo-39934: Account for control blocks in 'except' in compiler. (GH-22395) by iritkatriel · Pull Request #23303 · python/cpython

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.