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

Use 'python3' to access Python #608

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sebrowne
Copy link
Contributor

@sebrowne sebrowne commented Jun 6, 2024

As per https://peps.python.org/pep-0394, it is best practice to not use python in shebangs. Use the explicit python3 entry point instead.

Closes #607

I did not test this manually, I was planning on seeing how it works within the automated tests.

This is technically a break in backwards compatibility, but may not be experienced given how long Python 2 has been out of support.

As per https://peps.python.org/pep-0394, it is best practice to not use
'python' in shebangs. Use the explicit `python3` entry point instead.

Signed-off-by: Samuel E. Browne <[email protected]>
Copy link
Member

@bartlettroscoe bartlettroscoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were a couple of replacements of python3 with python33. We should fix those before merging?

P.S. Clearly string-replace.py and token-replace.py don't have automated tests in TriBITS or the full TriBITS test suite would not have passed using the GHA builds. But those are tiny little utilities that are easy to check the results after they run, so those might just meet the criteria for not needing tests as per When NOT to Write Automated Tests?.

@@ -1,4 +1,4 @@
#!/bin/env python3
#!/bin/env python33
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be 'python3', no?

@@ -1,4 +1,4 @@
#!/bin/env python3
#!/bin/env python33
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, this should be python3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TriBITS Python scripts do not work on some modern Linux distributions
2 participants