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
Recent changes to CPython's grammar and PEG parser, PEP-617 #2759
Comments
|
Yup, the project is currently targeting 3.8 so this shouldn't come as a surprise. Hopefully, at some point in the future, 3.9 will be the new goal and using a PEG parser will probably be needed. |
|
Also: #2417 |
|
I think we are practically not pinning a target. Any patch for 3.9+ features will be appreciated. |
|
I believe 3.8 is the absolute minimum because it's referenced in |
|
we just can change it to 3.9 once we feel it is more convenient. that happened a few times. |
|
We'd better to rewrite our parser based on same parser definition with CPython. |
|
see also: charliermarsh/ruff#286 |



sobolevn commentedJul 29, 2021
•
edited
Feature
CPython3.9+ support some new grammar rules, like
()aroundwithexpression:» python3.9 --version Python 3.9.4 » python3.9 Python 3.9.4 (default, Apr 5 2021, 01:47:16) [Clang 11.0.0 (clang-1100.0.33.17)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> with (open('a') as f): ... print(f) ... Traceback (most recent call last): File "<stdin>", line 1, in <module> FileNotFoundError: [Errno 2] No such file or directory: 'a'But, RustPython does not support it:

I think that the root of this problem is that new PEG parser is not supported: https://github.com/RustPython/RustPython/blob/master/parser/src/python.lalrpop
Python Documentation
https://www.python.org/dev/peps/pep-0617/
The text was updated successfully, but these errors were encountered: