Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
ast.parse() uses the assert statement to validate thefeature_version argument:
$python3 -c'import ast; ast.parse("print", feature_version=(2, 7))'Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/jwilk/.local/lib/python3.11/ast.py", line 45, in parse assert major == 3AssertionError
This is bad because the check will go away if you enable optimizations:
$python3 -O -c'import ast; ast.parse("print", feature_version=(2, 7))'&&echo yayyay
Your environment
Python 3.11.0b4
Metadata
Metadata
Assignees
Labels
No labels