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

[BUG] Missing documentation on pyupgrade in pull request docs #59853

Open
danielrobbins opened this issue Mar 20, 2021 · 2 comments · May be fixed by #59934
Open

[BUG] Missing documentation on pyupgrade in pull request docs #59853

danielrobbins opened this issue Mar 20, 2021 · 2 comments · May be fixed by #59934

Comments

@danielrobbins
Copy link

@danielrobbins danielrobbins commented Mar 20, 2021

Currently, https://docs.saltproject.io/en/latest/topics/development/pull_requests.html mentions the step of installing a pre-commit hook, but does not talk at all about the pyupgrade solution that is implemented.

This is potentially confusing for community contributors. Pyupgrade will add py2->3 code to any file they touch. The contributors will see a bunch of changes to salt code that they did not actually touch, as part of their commit.

@danielrobbins
Copy link
Author

@danielrobbins danielrobbins commented Mar 20, 2021

It seems like there is a Python 2 deprecation FAQ: https://docs.saltproject.io/en/latest/topics/development/faq-py2-deprecation.html

But this doesn't seem to address community contributor impact of these decisions, such as use of pyupgrade. So, bigger picture, as part of python2 deprecation process, we are planning to drop py2 support from the tree. However, we have an interim solution in place which is quite complex and should be documented in our community contribution documentation.

@OrangeDog
Copy link
Collaborator

@OrangeDog OrangeDog commented Mar 22, 2021

Py2 support was already dropped with 3001 (Sodium). The deprecation process is finished.

Rather than pyupgrade the entire tree in one go it was decided it would be less disruptive to simply do it incrementally with the hook. Compare the mess that blacking the whole tree caused to pending (and needing ports from develop) PRs.

@sagetherage sagetherage added this to the Approved milestone Mar 23, 2021
@sagetherage sagetherage added this to To do in Salt Docs via automation Mar 23, 2021
@sagetherage sagetherage moved this from To do to In progress in Salt Docs Mar 23, 2021
@sagetherage sagetherage moved this from In progress to To do in Salt Docs Mar 25, 2021
@ScriptAutomate ScriptAutomate linked a pull request that will close this issue Apr 29, 2021
@sagetherage sagetherage removed their assignment Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants