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

Update min LibCST version when it supports Python 3.9 relaxed decorator syntax #18

Closed
2 tasks done
Zac-HD opened this issue May 20, 2021 · 6 comments
Closed
2 tasks done

Comments

@Zac-HD
Copy link
Owner

Zac-HD commented May 20, 2021

with (a() as b, c() as d):
    pass

@(lambda f: f)
def g():
    pass

is valid Python 3.9 syntax which triggers psf/black#1948 and, in --refactor mode, Instagram/LibCST#486 and Instagram/LibCST#490. Once these upstream bugs are fixed, we should:

  • update the minimum version of Black
  • update the minimum version of LibCST
@Zac-HD
Copy link
Owner Author

Zac-HD commented Jan 12, 2022

Per Instagram/LibCST#285 (comment), an upcoming release will enable their new Rust-based parser for 3.10 & 3.11 grammar by default 🎉

(maybe this will also make it faster?)

@isidentical
Copy link
Contributor

black also now supports 3.10+ syntax with patma / parenthesized with statements.

@Zac-HD
Copy link
Owner Author

Zac-HD commented Feb 13, 2022

shed now requires stable black (:tada::tada:) though I'm still waiting on psf/black#664 for #17 🙂

@Zac-HD
Copy link
Owner Author

Zac-HD commented Apr 27, 2022

This all works now; we just need to add some tests and bump the minimum required version.

@jpaniagua26
Copy link

I tried adding adding a test to check for python 3.9 syntax but it failed. Apparently libcst has not yet added syntax checking for this python version. https://github.com/jpaniagua26/shed/tree/python39syntax

@Zac-HD Zac-HD changed the title Update Black & LibCST when they support Python 3.9 syntax Update min LibCST version when it supports Python 3.9 syntax May 11, 2022
@Zac-HD Zac-HD changed the title Update min LibCST version when it supports Python 3.9 syntax Update min LibCST version when it supports Python 3.9 relaxed decorator syntax May 11, 2022
@Zac-HD
Copy link
Owner Author

Zac-HD commented May 26, 2023

Closed by 6906329, released as shed == 23.05.2 🎉

@Zac-HD Zac-HD closed this as completed May 26, 2023
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