GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

Conversation

@iritkatriel

@iritkatriel iritkatriel commented Nov 15, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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 02d126a )

https://bugs.python.org/issue39934

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@iritkatriel
bpo-39934: backport PR 22395 to 3.9
d43fbfd
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Nov 15, 2020
@bedevere-bot bedevere-bot added the awaiting review label Nov 15, 2020
@iritkatriel

iritkatriel commented Nov 15, 2020

Copy link
Copy Markdown
Member Author

I made this PR manually because there were significant merge conflicts. Please check I got it right.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Fidget-Spinner
Fidget-Spinner approved these changes Nov 16, 2020
View reviewed changes

@Fidget-Spinner Fidget-Spinner left a comment

Copy link
Copy Markdown
Member

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, 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

iritkatriel reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bedevere-bot bedevere-bot added awaiting core review and removed awaiting review labels Nov 16, 2020
@iritkatriel iritkatriel changed the title bpo-39934: backport PR 22395 to 3.9 [3.9] bpo-39934: Account for control blocks in 'except' in compiler. (GH-22395) Nov 16, 2020
@bedevere-bot bedevere-bot mentioned this pull request Nov 16, 2020
bpo-39934: Account for control blocks in 'except' in compiler. #22395
Merged
@bedevere-bot bedevere-bot added the type-bug An unexpected behavior, bug, or error label Nov 16, 2020
@pablogsal
pablogsal requested a review from markshannon November 16, 2020 18:35
@markshannon

markshannon commented Nov 17, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Thanks for doing this.
I wasn't going to bother with this because it's an obscure bug, it's fixed in 3.10 and I'm lazy 🙂

The changes look good to me.
I presume the NEWS item will need backporting as well.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iritkatriel
add news
dd5be40
@iritkatriel

iritkatriel commented Nov 17, 2020

Copy link
Copy Markdown
Member Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@markshannon

markshannon commented Nov 17, 2020

Copy link
Copy Markdown
Member

This is good. I don't need to do it myself.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@markshannon
markshannon merged commit 48a9c0e into python:3.9 Nov 17, 2020
@bedevere-bot bedevere-bot removed the awaiting core review label Nov 17, 2020
@iritkatriel
iritkatriel deleted the 3.9 branch November 17, 2020 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Fidget-Spinner Fidget-Spinner Fidget-Spinner approved these changes
@markshannon markshannon Awaiting requested review from markshannon

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@iritkatriel @markshannon @Fidget-Spinner @the-knights-who-say-ni @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.