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

Plans on 3.9+ support? #39

Open
sobolevn opened this issue Mar 26, 2021 · 4 comments
Open

Plans on 3.9+ support? #39

sobolevn opened this issue Mar 26, 2021 · 4 comments

Comments

@sobolevn
Copy link

Hi! Do you have any plans on supporting new Python versions?
Or since this is a backport - this is out of scope?

@amyreese
Copy link
Owner

If there's a reasonable grammar change for PEP 614, I'd be willing to review a PR. However, given the broader move towards PEG parsing in CPython, it's likely that fissix will never support Python 3.10 or future versions, as those grammar changes can not be expressed with pgen2, and adopting a PEG parser is almost certainly out of scope for this project.

I think it would be better to build a new project with similar goals on top of CPython's PEG parser, and drive adoption in projects that currently use fissix/parso/baron/etc.

@cclauss
Copy link
Contributor

cclauss commented Apr 25, 2024

The GitHub Actions pass on current versions of CPython and even on Python 3.13 beta which has lib2to3 removed.

What is the status of this issue?

@amyreese
Copy link
Owner

I see this issue as primarily tracking support for syntax features from Python versions past 3.8, when lib2to3 was unofficially deprecated/abandoned in CPython. I'm not aware of any grammar changes/fixes in upstream lib2to3, but would be happily surprised to find out otherwise, and we can always pull those into fissix if possible.

Otherwise, as-is fissix will run just fine on newer version of Python, but can't parse things like decorator expressions, match statements, exception groups, inline type vars, etc. If your code worked on Python 3.8, then fissix will continue to work on it as well, but short of someone working to update fissix's grammar/parser, or porting Black's work from their own custom fork, this is probably the end of the line for fissix feature wise.

As an alternative, I can recommend LibCST, which has its own PEG parser and already supports 3.12 syntax, but of course it's not a drop-in replacement for fissix. It has a much more detailed set of types for each CST node, closer in spirit to the ast module in stdlib, but with all the necessary features for tracking whitespace/comments/etc.

I've personally used LibCST with good results in µsort and Fixit, so my own need for maintaining fissix has mostly passed, but I will continue to do so as long as others find it useful. At one point I considered working with PyCQA to hand off ownership/maintenance since it's used by their modernize project, but even that would have required more effort than it was worth to me — happy to let someone else lead that charge if they are interested.

@cclauss
Copy link
Contributor

cclauss commented Apr 25, 2024

Perfect answer @amyreese. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants