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

Python 3.8 support #772

Closed
mattseymour opened this issue Oct 18, 2019 · 16 comments
Closed

Python 3.8 support #772

mattseymour opened this issue Oct 18, 2019 · 16 comments

Comments

@mattseymour
Copy link

Add support for python 3.8 new syntax changes:

@kamahen
Copy link
Contributor

kamahen commented Oct 21, 2019

It appears that lib2to3/Grammar.txt hasn't been updated to include the new features. (I've downloaded the Python 3.8 source tarball and also looked at github.

@kamahen
Copy link
Contributor

kamahen commented Oct 21, 2019

I've created https://bugs.python.org/issue38551

@kamahen
Copy link
Contributor

kamahen commented Oct 23, 2019

https://bugs.python.org/issue36541 contains a proposed PR to bring lib2to3 up-to-date.

@p-patil
Copy link

p-patil commented Dec 10, 2019

Has support for python 3.8 syntax been added yet? I tried cloning the repo today and running on a file with the walrus operator, and got a lib2to3.pgen2.parse.ParseError, so I guess lib2to3 hasn't merged the PR for updating to 3.8 yet?

@martsa1
Copy link

martsa1 commented Feb 12, 2020

I just bumped into this as well.

@kamahen
Copy link
Contributor

kamahen commented Feb 18, 2020

This appears to solve the problem: https://bugs.python.org/issue36541

Also, Python 3.9 will add a positional-only grammar change: https://www.python.org/dev/peps/pep-0570/

@HacKanCuBa
Copy link

Also, Python 3.9 will add a positional-only grammar change: https://www.python.org/dev/peps/pep-0570/

Which grammar change would that be? I couldn't find it in the PEP regarding current grammar for 3.8. Thanks!

@smokephil
Copy link

smokephil commented May 6, 2020

It works with Python 3.8.3rc1

Edit: only the walrus operator

@bentheiii
Copy link

Any update on this issue? lib2to3 is deprecated anyhow and YAPF is now unusable in newer projects...

@kamahen
Copy link
Contributor

kamahen commented Jul 5, 2020

@gwelymernans - want to have a chat about this? I might be persuaded to figure out what's needed and maybe even implement it (step 1: figure out which of the alternatives to lib2to3 is likely to be the best).

The big question: how popular is yapf vs black? I wouldn't want to put in a lot of effort if it turns out that the world has decided on the one-size-fits-all approach.

@bwendling
Copy link
Member

@kamahen #448 is an open issue about this. I would love for someone to take this up, as my current projects don't allow for much time to focus on YAPF.

@HacKanCuBa
Copy link

How important is to still support Python2, which is deprecated, vs support Python3.8+? Isn't it easier to just drop support for v2? I know a ton of people is going to hate me, but its probably easier to just fork the project to support v2 and simply remove its support here.

@vapier
Copy link
Member

vapier commented Jul 7, 2020

dropping py2 sounds great. seems like a good excuse to jump the version series too.

@kamahen
Copy link
Contributor

kamahen commented Jul 8, 2020

Let's see if there's any discussion on this proposal (linked from item #448) for replacing lib2to3 with an augmented stdlib ast module:
https://mail.python.org/archives/list/[email protected]/thread/X2HJ6I6XLIGRZDB27HRHIVQC3RXNZAY4/

@gpshead
Copy link
Contributor

gpshead commented Dec 14, 2020

python/cpython#23759 should fix lib2to3 for the remaining positional only argument pep-570 syntax omission; that'll take a while to trickle down to various people's CPython installs.

@bwendling
Copy link
Member

Closed with 7c408b9.

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

10 participants