Skip to content
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

bpo-44622: Set line number of END_ASYNC_FOR to match that of iterator. #27160

Merged
merged 4 commits into from
Jul 15, 2021

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Jul 15, 2021

END_ASYNC_FOR can only follow the iterator, so giving it the same line number as the iterator is correct even though END_ASYNC_FOR is artificial.

By giving END_ASYNC_FOR a real line number, any artificial code following it gets a meaningful line number.

https://bugs.python.org/issue44622

Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

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

LGTM but I would recommend to add a comment about this near the change so is a gir clear why the artificial instruction is getting a line number

@markshannon markshannon merged commit f333ab0 into python:main Jul 15, 2021
@miss-islington
Copy link
Contributor

Thanks @markshannon for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @markshannon, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker f333ab0f2edec26a769ed558263ac662e5475451 3.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants