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

stops the monkeypatch on lib2to3 grammar #776

Closed
wants to merge 1 commit into from

Conversation

moore3071
Copy link

Lib2to3 provides a proper grammar without exec statements for Python 3 come Python 3.7.5.
Since Python 3.7.5 was just released, it might be wise to delay this pull request for a brief amount of time so those using system-based package managers can catch up.

@bwendling
Copy link
Member

Unfortunately this doesn't work for Python 2, so it'll fail if someone tries to use Python 2...

Base automatically changed from master to main January 23, 2021 06:09
@hartwork
Copy link
Contributor

@bwendling since Python 2 support is out the door by now, does this change the evaluation of this pull request for 2023?

@bwendling
Copy link
Member

@hartwork We could probably be more brutal with removing Python 2 from YAPF. For instance, we probably don't need the PY3 variable anymore either. This also needs to go into the CHANGELOG and README files.

@hartwork
Copy link
Contributor

@bwendling good point 👍

Regarding change log and readme, I wonder if changelog should be all at once when making a release or distributed in pull request but with the constant potential for merge conflicts — both have downsides. What do you think?

One thing I should definitionally mention: use of python_grammar_no_print_and_exec_statement seems to require Python >=3.8. How do you feel about dropping support for Python 3.7? For proof:

# python3.7 -c 'from lib2to3 import pygram; print("\n".join(dir(pygram)))' | grep python_grammar
python_grammar
python_grammar_no_print_statement

# python3.7 --version
Python 3.7.16

If https://www.python.org/downloads/ is correct, 3.7 goes end-of-life 2023-06-27 i.e. in two months.

I'm also wondering if @moore3071 is still interested in this pull request, since their profile shows no GitHub activity after 2019.
@moore3071 are you still interested in the pull request?

@bwendling
Copy link
Member

I'm not yet comfortably removing 3.7 support as there's likely to be 3.7 code still in use in a lot of places (e.g. Google).

As for updating the CHANGELOG, I know it's a hassle, but I feel that if we stop updating it with each commit then it'll be that much harder to gather the documentation for a release.

@hartwork
Copy link
Contributor

hartwork commented May 2, 2023

I'm not yet comfortably removing 3.7 support as there's likely to be 3.7 code still in use in a lot of places (e.g. Google).

@bwendling alright, it's not dead yet. Now's a great time to start wearing a "Python 3.7 is almost dead!" shirt at work 😃

As for updating the CHANGELOG, I know it's a hassle, but I feel that if we stop updating it with each commit then it'll be that much harder to gather the documentation for a release.

Alright! 👍

bwendling pushed a commit that referenced this pull request May 2, 2023
* Resolve use of Python 2 grammar + fix three related test cases

* Simplify ParseCodeToTree with identical semantics
@hartwork
Copy link
Contributor

hartwork commented May 2, 2023

@bwendling can we close this as superseded by #1090?

@bwendling bwendling closed this May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants