-
Notifications
You must be signed in to change notification settings - Fork 4
[ci] ensure correct Python version is used in CI, fix compatibility with older pre-3.12 patch versions #355
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c5d99fa
[ci] ensure correct Python version is used in CI, other small CI fixes
jameslamb 55b72a4
where is Python
jameslamb 6312c25
use correct version
jameslamb 746fb4d
more logs
jameslamb 50df4f1
check PATH
jameslamb ce5a86c
what is modifying PATH
jameslamb c1ee176
stop using login shell
jameslamb c059392
fix Python 3.19-3.11 compatibility
jameslamb de78fe2
fix patch
jameslamb 47974e9
add a test
jameslamb daecaa5
fix tests
jameslamb d901fd9
activate environment
jameslamb a22854f
docs might need a login shell
jameslamb 31378cf
just do not touch check-docs
jameslamb 56b0bc9
'remove debugging stuff
jameslamb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 was an attempt to fix something weird I'm seeing, but it didn't work.
On the
unit-tests (macOS-15-intel, Python-CPython 3.9)job, it looks like the correct Python is getting installed:But
pytestis picking up the Python 3.14 from the hostFor the
unit-tests (windows-latest, Python-CPython 3.9)job, it appears to picking up the correct Python ANDpytestis choosing the right version.(build link)
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.
Welp, seeing all these Python 3.14 paths in the "install" step of that Python 3.9 macOS job looks like a problem:
(build link)
I honestly don't understand what's happening here. According to https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#using-update-environment-flag, the Python installed by
actions/seutp-pythonshould be added to PATH by default.Maybe it's added to the end and therefore not being found? But if that's what is happening, I don't know how to reconcile that with
which pip/pip --versionlooking like this: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 it is!
/Library/Frameworks/Python.framework/Versions/Current/binshows up earlier inPATHthan any of the stuff added bysetup-python.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.
So it does look like
setup-pythonis sticking its own paths on the beginning ofPATHas expectedAnd even immediately before the "install" step
I think I see the problem... the
installstep is usingshell: bash - l {0}.-l(login shell) is reloading.bashrcand that updates PATH with stuff, putting more of the GitHub Actions paths at the beginning ofPATHThe default shell GitHub uses is
bash -e {0}, orbash --noprofile --norc -eo pipefail {0}if you set it tobash... notice that--noprofile --norc!!docs: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_iddefaultsrunshell
Honestly, there's no reason CI is using
bash -lhere. I'm certain I just copied that from somewhere else when I set up this repo. I'm gonna remove that everywhere.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 pushed commits removing the
-land saw the correct Python versions being used!