Skip to content
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

Update Python and Django versions #65

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

adamchainz
Copy link

This PR does a bunch of updates:

  1. Drop old Python and Django versions.
  2. Add Python 3.11 and 3.12.
  3. Add Django 4.2 and 5.0.
  4. Upgrade the actions on GitHub Actions.
  5. Move flake8 and isort to run with the latest Python.
  6. Upgrade isort.

It also standardizes the testing with other projects a little bit, see comments.

All tests passed locally for me with tox -p 5. The change to use -Werror means there are no warnings even.

Comment on lines +12 to +17
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one per line reduces diff noise for future removals/additions

Comment on lines -22 to -27
basepython =
py36: python3.6
py37: python3.7
py38: python3.8
py39: python3.9
py310: python3.10
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this was ever needed, tox knows how to pick the python version by default. (Maybe a really old tox version needed it?)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is artifact from of old TravisCI or Tox versions.

You've confirmed that py3X automatically maps to python3.X locally?

Comment on lines +5 to +11
flake8
isort
py38-django{32,40,41,42}
py39-django{32,40,41,42}
py310-django{32,40,41,42,50,main}
py311-django{41,42,50,main}
py312-django{42,50,main}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched to the django prefix that other projects use, including my own.

Removed the optional trailing commas.

usedevelop = true
commands =
{envpython} -R -Wonce {envbindir}/coverage run -a -m django test -v2 --settings=tests.settings {posargs}
{envpython} -R -Werror {envbindir}/coverage run -a -m django test -v2 --settings=tests.settings {posargs}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using -Werror means that tests can catch incompatibility issues before releasing them onto users, at least in theory.

@@ -1,6 +1,7 @@
from datetime import date

from django.db import models

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small adjustment from new isort, which is now correctly identifying picklefield as a first-party package.


steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These new versions of actions use new Node versions, so will prevent deprecation warnings in the run logs.

@charettes
Copy link
Collaborator

I unfortunately don't have administrative rights on the repository @adamchainz so I can't grant access for worklows to always run. I'll keep monitoring your pushes until they pass.

@charettes
Copy link
Collaborator

@adamchainz thinks a looking good, I'll keep the PR unmerged for now as a reminder to merge + publish a new version by EOD.

@charettes charettes merged commit aa41a29 into gintas:master Apr 5, 2024
7 checks passed
@charettes
Copy link
Collaborator

I just published 3.2.0. You should be all set.

@coveralls
Copy link

coveralls commented Apr 5, 2024

Coverage Status

coverage: 99.029%. remained the same
when pulling 4727e8d on adamchainz:upgrade_versions
into ea1390f on gintas:master.

@adamchainz adamchainz deleted the upgrade_versions branch April 5, 2024 08:41
@adamchainz
Copy link
Author

Thank you! I realized I missed python_requires, so I made #66 as a follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants