bpo-33363: raise SyntaxError for async for/with outside async functions#6616
Merged
1st1 merged 3 commits intopython:masterfrom Apr 27, 2018
Merged
bpo-33363: raise SyntaxError for async for/with outside async functions#66161st1 merged 3 commits intopython:masterfrom
1st1 merged 3 commits intopython:masterfrom
Conversation
1st1
reviewed
Apr 27, 2018
| { | ||
| basicblock *start, *except, *end; | ||
| if (c->u->u_scope_type != COMPILER_SCOPE_ASYNC_FUNCTION) | ||
| return compiler_error(c, "'async for' outside async function"); |
1st1
approved these changes
Apr 27, 2018
Member
|
Also need a NEWS entry. Please use |
Member
Author
|
Thanks for the review! |
|
@1st1: Please replace |
Contributor
Contributor
|
Sorry, @zsol and @1st1, I could not cleanly backport this to |
Member
|
Thanks for the PR and opening the issue, Zsolt! |
Member
|
@zsol Can you submit a separate PR against 3.7? |
zsol
added a commit
to zsol/cpython
that referenced
this pull request
Apr 27, 2018
…ns (python#6616) (cherry picked from commit e239650)
zsol
added a commit
to zsol/cpython
that referenced
this pull request
Apr 27, 2018
…unctions (pythonGH-6616). (cherry picked from commit e239650) Co-authored-by: Zsolt Dollenstein <[email protected]>
|
GH-6619 is a backport of this pull request to the 3.7 branch. |
1st1
pushed a commit
that referenced
this pull request
Apr 27, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is still caught only at the compile phase (in python 3.6 it's caught even earlier).
https://bugs.python.org/issue33363