-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Pin Python version to 3.12 #5456
Pin Python version to 3.12 #5456
Conversation
4c170d1
to
14c5fcc
Compare
I also noticed that our bare metal tests run on Python 3.10 since we migrated the template to uv: https://github.com/cookiecutter/cookiecutter-django/actions/runs/11194437208/job/31120912239?pr=5356#step:7:609 Previous run was on Python 3.12 (as expected): https://github.com/cookiecutter/cookiecutter-django/actions/runs/11193688349/job/31119292907?pr=5430#step:7:538 |
So the project itself (not the template) is compatible with 3.13? |
No, the template tests were running on 3.13, we don't run any tests in the project itself on that job, just linters. It seems that the project tests were downgraded to python 3.10 in the bare metal tests. |
@@ -98,6 +98,9 @@ jobs: | |||
|
|||
steps: | |||
- uses: actions/checkout@v4 | |||
- uses: actions/setup-python@v5 | |||
with: | |||
python-version: "3.12" |
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.
Is this required? Capping python in pyproject.toml should be sufficient was my expectation.
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.
It doesn't seem to be respecting it because the generated project is not using uv yet. It's for the test_bare.sh
script
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'll remove it to confirm
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 pytest run uses Python 3.10 here platform linux -- Python 3.10.12
:
This is because these lines use the first pip
and pytest
on the PATH, which are not the one from uv:
cookiecutter-django/tests/test_bare.sh
Line 21 in 822c1c0
pip install -r requirements/local.txt |
cookiecutter-django/tests/test_bare.sh
Line 24 in 822c1c0
pytest |
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.
Ah yes, you are right. The problem is clear to me now.
I tried another approach, runing all commands from the script via uv, but that doesn't seem to work. I'll revert back to using actions/setup-python as it seems more straightforward |
Description
Looking at #5450 I noticed that Python 3.13 classifier was added, which promopted me to look at which version of Python was used to run the tests, and it turns out they run using Python 3.13:
Checklist:
Rationale
Run tests on the same Python version as we officially support