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

ast.parse allows assignment expressions with old feature_version #94947

Closed
hauntsaninja opened this issue Jul 18, 2022 · 1 comment
Closed

ast.parse allows assignment expressions with old feature_version #94947

hauntsaninja opened this issue Jul 18, 2022 · 1 comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@hauntsaninja
Copy link
Contributor

The following should raise SyntaxError:

ast.parse('''(b := 2)''', feature_version=(3, 6))
@hauntsaninja hauntsaninja added the type-bug An unexpected behavior, bug, or error label Jul 18, 2022
@hauntsaninja hauntsaninja added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Jul 18, 2022
pablogsal pushed a commit that referenced this issue Jul 18, 2022
* gh-94947: Disallow parsing walrus with feature_version < (3, 8)

* oops, commit the parser

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 18, 2022
…pythonGH-94948)

* pythongh-94947: Disallow parsing walrus with feature_version < (3, 8)

* oops, commit the parser

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit ae0be5a)

Co-authored-by: Shantanu <[email protected]>
miss-islington added a commit that referenced this issue Jul 18, 2022
…4948)

* gh-94947: Disallow parsing walrus with feature_version < (3, 8)

* oops, commit the parser

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit ae0be5a)

Co-authored-by: Shantanu <[email protected]>
hauntsaninja added a commit to hauntsaninja/cpython that referenced this issue Jul 18, 2022
… (3, 8) (pythonGH-94948)

* pythongh-94947: Disallow parsing walrus with feature_version < (3, 8)

* oops, commit the parser

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>.
(cherry picked from commit ae0be5a)

Co-authored-by: Shantanu <[email protected]>
pablogsal pushed a commit that referenced this issue Jul 18, 2022
GH-94948) (#94969)

* gh-94947: Disallow parsing walrus with feature_version < (3, 8)

* oops, commit the parser

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>.
(cherry picked from commit ae0be5a)

Co-authored-by: Shantanu <[email protected]>
@AlexWaygood
Copy link
Member

Fixed in #94948, and backported to all bugfix branches 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants