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
Specify Python version in CI #1135
Conversation
actions/setup-python starting with version 4 doesn't have a default Python version. Also remove useless conditional in doc_build.
Codecov Report
@@ Coverage Diff @@
## main #1135 +/- ##
=======================================
Coverage 79.48% 79.48%
=======================================
Files 16 16
Lines 2608 2608
Branches 476 476
=======================================
Hits 2073 2073
Misses 385 385
Partials 150 150 Continue to review full report at Codecov.
|
with: | ||
python-version: "*" |
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.
Does * mean latest available?
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 think so, but I can't find any documentation or code that proves this. @hugovk could you confirm as you provided a similar PR to black earlier?
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 don't find *
documented at https://github.com/actions/setup-python. They have:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
For the Black PR, I saw one of the other workflows already had *
so I copied and pasted from there!
That was added in psf/black#2260 in commit psf/black@2fcc183
(#2260), and there's no docs reference. Maybe @felix-hilden remembers where it came from? Lucky guess?
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.
Stuff works so we can merge and make better if we learn :D Thanks!
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.
The doc is linked in the PR! But the gist is: it's a SemVer range, so indeed the latest. 3.x
would not allow Python 4 versions, which obviously is a huge issue 😉
with: | ||
python-version: "*" |
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.
Stuff works so we can merge and make better if we learn :D Thanks!
actions/setup-python starting with version 4 doesn't have a default Python version. Also remove useless conditional in doc_build.
Fixes GH-1134.