-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
gh-98763: Prefer "python" over "python3" for command line examples in docs. #98761
Conversation
Thanks! We generally create issues for everything except the most trivial changes, to ensure visibility -- would you mind creating an issue for this? |
9ef0759
to
81e0988
Compare
Created 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
I'm in favour of merging, given:
- the https://peps.python.org/pep-0394/#for-end-users-of-python section that you link
- the fact that three years on, Python 2 is finally mostly dead
- that any eventual Python 4 is unlikely to break any of these examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree but it's probably good to get some more opinions. @warsaw as one of the authors of PEP 394, what do you think?
Gah! GH lost the long comment I was composing. I think it's worth revisiting PEP 394 in light of Python 2's EOL, but I am not involved in distro maintenance these days. @doko42 and @encukou might have relevant input here. On modern macOS, there's no 3 years on, I think it's time to reclaim |
In Django docs, we have a custom extension for the I could prepare a similar solution for Python docs and the |
@felixxm That's nice, although the distinction between the tab labels may not always be correct (i.e. install |
Apple dropped Python from the macOS install, so the closest you get to Python being automatically installed now on an OS is some Linux distros and Windows and it's |
As a Windows user, I'd personally much prefer "python" in the docs to "python3". I tried installing it from the Windows Store once, and it didn't work (can't remember why not, I don't think I ever dug too deeply). Since then I've always installed it from python.org because, well, it's never not worked. Unfortunately, because I installed it from python.org rather than the Windows Store, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't speak for all Linux distros, let alone other platforms, but as far as I know it'd be best to follow the ”For end users of Python” section of PEP 394:
While far from being universally available,
python
remains the preferred spelling for explicitly invoking Python.
While a lot of the PEP's reasoning is outdated nowadays, I think the actual recommendations have aged pretty well.
@encukou Does that mean that the modern Fedora ecosystem provides (I haven't been a user or contributor to Debuntu in years so I haven't kept up.) |
Yes. Back in 2019 we updated PEP 394 so we could do that :) The “unversioned” |
81e0988
to
cb27624
Compare
cb27624
to
d89202c
Compare
As far as I'm aware, we reached a consensus to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, time to get this in!
Currently docs are not consistent in using
python
vs.python3
for command line examples. As far as I'm aware, we should preferpython
, see https://peps.python.org/pep-0394/#for-end-users-of-pythonI can create a new issue, if required for such cleanup.