Skip to content

PEP 758 changes do not have CHECK_VERSION guard for usage with ast.parse(..., feature_version=(3, 13))#133194

@sobolevn

Description

@sobolevn

Bug report

Right now this test passes:

deftest_pep758_except_without_parens(self): code=textwrap.dedent(""" try: ... except ValueError, TypeError: ... """) ast.parse(code, feature_version=(3, 14)) withself.assertRaises(SyntaxError): ast.parse(code, feature_version=(3, 13))

But, it should not pass. I have a PR ready.

Linked PRs

Metadata

Metadata

Assignees

Labels

3.14bugs and security fixestopic-parsertype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions