-
Notifications
You must be signed in to change notification settings - Fork 45
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
Conversation
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.
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?.
refactoring/string-replace.py
Outdated
@@ -1,4 +1,4 @@ | |||
#!/bin/env python3 | |||
#!/bin/env python33 |
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.
This should be 'python3', no?
refactoring/token-replace.py
Outdated
@@ -1,4 +1,4 @@ | |||
#!/bin/env python3 | |||
#!/bin/env python33 |
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.
Again, this should be python3
.
bc0e571
to
eb270d5
Compare
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]>
Signed-off-by: Samuel E. Browne <[email protected]>
eb270d5
to
3dca096
Compare
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 rebased the commits and remove the changes to the refactoring/ scripts that changed python3
to python33
.
This goes well with the recent PRs:
- Transition to find_package(Python3) (#610) #616
- Fixup for change to find_package(Python3) (#610) #617
and think think this resolves #610.
Thanks @sebrowne!
Origin repo remote tracking branch: 'github/master' Origin repo remote repo URL: 'github = [email protected]:TriBITSPub/TriBITS.git' Git describe: tribits_start-3502-g28a36351 At commit: commit 3dca096437acbb7a16b88bee7d9569bccd8e6317 Author: Samuel E. Browne <[email protected]> Date: Thu Jun 6 15:26:15 2024 -0600 Summary: Add Python3 requirement to user guide (#610) Mostly, this was done to brings in the changes for transitioning to find_package(Python3) (see TriBITSPub/TriBITS#610). But the full set of TriBITS PRs merged in were: * TriBITSPub/TriBITS#608 sebrowne/python3 * TriBITSPub/TriBITS#617 TriBITSPub/610-python3-2 * TriBITSPub/TriBITS#616 bartlettroscoe/610-python3 * TriBITSPub/TriBITS#615 bartlettroscoe/enable-disable-doc-update-2024-08-29 * TriBITSPub/TriBITS#611 bartlettroscoe/tril-13133-TriBITS-Update-License-and-Copyright-2 * TriBITSPub/TriBITS#614 bartlettroscoe/tribits-updates-2024-08-01 * TriBITSPub/TriBITS#613 TriBITSPub/612-improve-tribits-version-error * TriBITSPub/TriBITS#609 bartlettroscoe/tril-13133-TriBITS-Update-License-and-Copyright
Origin repo remote tracking branch: 'github/master' Origin repo remote repo URL: 'github = [email protected]:TriBITSPub/TriBITS.git' Git describe: tribits_start-3502-g28a36351 At commit: commit 3dca096437acbb7a16b88bee7d9569bccd8e6317 Author: Samuel E. Browne <[email protected]> Date: Thu Jun 6 15:26:15 2024 -0600 Summary: Add Python3 requirement to user guide (trilinos#610) Mostly, this was done to brings in the changes for transitioning to find_package(Python3) (see TriBITSPub/TriBITS#610). But the full set of TriBITS PRs merged in were: * TriBITSPub/TriBITS#608 sebrowne/python3 * TriBITSPub/TriBITS#617 TriBITSPub/610-python3-2 * TriBITSPub/TriBITS#616 bartlettroscoe/610-python3 * TriBITSPub/TriBITS#615 bartlettroscoe/enable-disable-doc-update-2024-08-29 * TriBITSPub/TriBITS#611 bartlettroscoe/tril-13133-TriBITS-Update-License-and-Copyright-2 * TriBITSPub/TriBITS#614 bartlettroscoe/tribits-updates-2024-08-01 * TriBITSPub/TriBITS#613 TriBITSPub/612-improve-tribits-version-error * TriBITSPub/TriBITS#609 bartlettroscoe/tril-13133-TriBITS-Update-License-and-Copyright Signed-off-by: Roscoe A. Bartlett <[email protected]>
As per https://peps.python.org/pep-0394, it is best practice to not use
python
in shebangs. Use the explicitpython3
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.