-
Notifications
You must be signed in to change notification settings - Fork 188
BUG: use /usr/bin/env python3 #440
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
base: main
Are you sure you want to change the base?
Conversation
|
Considering that Python v2 is long past it's EOL date, I'm wondering how much of an issue this is in practice, and would moving from "python" to "python3" end up creating more problems? Is there a Python requirement that systems have a working "python3" binary/link in addition to just "python"? |
|
Python 3 itself installs For example on Ubuntu/Debian, |
It seems to be distro dependent. On my Arch system it appears the "python" package supplies both It seems like there should be a PEP, or something similar, that defines a best practices for Python scripts. Digging a bit it seems like PEP-394 is relevant (see the "For Python runtime distributors" section). Anyway, this looks fine to me and seems to be in keeping with the official Python guidance. |
Ooops, one more thing @haampie, could you provide a sign-off line in your commit? |
Only the python3 executable is guaranteed Signed-off-by: Harmen Stoppels <me@harmenstoppels.nl>
|
done, also updated the other shebangs |
| @@ -1,4 +1,4 @@ | |||
| #!/usr/bin/env python | |||
| #!/usr/bin/env/python3 | |||
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.
Should this be #!/usr/bin/env python3 instead? I see a few others with similar problems.
If it helps, I expect one could write a fairly minimal sed script to automate the change.
python may not exist, or could be the python 2 interpreter.
same should happen for tests.
Feel free to take over this PR, I just noticed this in passing.