-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Bump python app #2639
base: main
Are you sure you want to change the base?
Bump python app #2639
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -19,10 +19,10 @@ jobs: | |||||
|
||||||
steps: | ||||||
- uses: actions/checkout@v4 | ||||||
- name: Set up Python 3.10 | ||||||
uses: actions/setup-python@v3 | ||||||
- name: Set up Python 3.13 | ||||||
uses: actions/setup-python@v5 | ||||||
with: | ||||||
python-version: "3.10" | ||||||
python-version: "3.13" | ||||||
This comment was marked as resolved.
Sorry, something went wrong. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Regarding the variables: Using Python 3.12 instead of 3.13 makes sense and I have changed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
https://devguide.python.org/versions/#supported-versions There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Plea for Pinning an exact versionI'll also re-iterate what I previously marked knitpicky as it now directly applies to this, see below: Consider Python Tip knit-picky or out-of-scope:
In conclusion; pick one (exactly one):
Important This is not to say your rational is wrong, (only the suggested implementation is sub-optimal) To also implement checking for the latest version please refer to this guide or as code: # Rest of config is unchanged
- uses: actions/setup-python@v5
with:
# Version range or exact version of Python or PyPy to use, using SemVer's version range syntax. Reads from .python-version if unset.
python-version: '3.13'
# Check every time for updates?
check-latest: true There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like the idea using a cached Python version by default. So I switched to 3.12. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In python-publish it is given with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Oops 🙊My oversight; Correction: it is a runtime error, not a syntax error. I'll remove the incorrect and confusing phrasing from my previous comment. For those curious, my full rational, TL;DRThis gave me pause, at first, as you are quite correct, many (e.g. name: Python package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
# This is the version of the action for setting up Python, not the Python version.
uses: actions/setup-python@v5
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.x'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'
# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)" which makes sense if you are familiar with Semantic Version range syntax which boils down to almost the same thing as I expected (e.g. PEP-440 and the current Python packaging version spec) so I checked the code which documents the same thing, (albeit without the example placeholder of In conclusion: Informative references
SummaryIn summary: This topic has been thoroughly explored now, I agree with @cclauss that just using the latest stable would be a fine alternative, but not better than the other already mentioned options. @sicheste There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the long analysis and explanation. So, now someone can merge it :) |
||||||
- name: Install dependencies | ||||||
run: | | ||||||
python -m pip install --upgrade pip | ||||||
|
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.
LGTM 👍🏻