Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-98763: Prefer "python" over "python3" for command line examples in docs.#98761
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
felixxm commented Oct 27, 2022 • edited by bedevere-bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-bot
Uh oh!
There was an error while loading. Please reload this page.
AlexWaygood commented Oct 27, 2022
Thanks! We generally create issues for everything except the most trivial changes, to ensure visibility -- would you mind creating an issue for this? |
felixxm commented Oct 27, 2022
Created 👍 |
hauntsaninja left a comment
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
JelleZijlstra left a comment
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?
warsaw commented Dec 23, 2022
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 |
felixxm commented Dec 23, 2022
In Django docs, we have a custom extension for the I could prepare a similar solution for Python docs and the |
warsaw commented Dec 23, 2022
@felixxm That's nice, although the distinction between the tab labels may not always be correct (i.e. install |
brettcannon commented Dec 23, 2022
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 |
AlexWaygood commented Dec 23, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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, |
encukou left a comment
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,
pythonremains 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.
warsaw commented Jan 2, 2023
@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.) |
encukou commented Jan 3, 2023
Yes. Back in 2019 we updated PEP 394 so we could do that :) The “unversioned” |
felixxm commented Jan 11, 2023
As far as I'm aware, we reached a consensus to use |
kumaraditya303 left a comment
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
pythonvs.python3for 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.