Repository navigation
Conversation
pycodestyle reports E501 on django_filters/backends.py line 25 (82 > 79), introduced with the standardised count parameters in izimobil#150. Without it the new lint job would be red on arrival.
The env list stopped at Django 5.0 and pinned DRF to 3.14, so it described
a world two years gone. Rebuilt it around the Django versions that are in
support now, with the Python versions each of them supports:
py310, py311 django 4.2, 5.2
py312 django 4.2, 5.2, 6.0, 6.1
py313, py314 django 5.2, 6.0, 6.1
Only Django is pinned; djangorestframework and django-filter resolve to
whatever suits it, which is how DRF 3.18 gets picked for Django 6.1 (3.17
and earlier import django.utils.cache.cc_delim_re, which 6.1 removed) and
3.17 for Django 4.2. A separate oldestdeps env holds the floors setup.py
actually declares - DRF 3.14.0 and django-filter 22.1 - so raising them
becomes a decision rather than an accident.
The djangomain env stays out of the env list and is run weekly instead.
The lint env is no longer tied to a Python version. Each env writes its
own coverage data file so the matrix can be combined.
Travis has not run since the migration off travis-ci.org: the last merged pull request (izimobil#150) and the newest open one (izimobil#156) both report no checks at all, so the badge in the README has been decorative for some time and nothing has verified a contribution in two years. The new workflow runs the tox matrix across Python 3.10 to 3.14 (one job per interpreter, tox picks the Django versions), runs pycodestyle, and combines coverage from every job with --fail-under=100 so the coverage the project already has cannot quietly slip. Actions are pinned to commit SHAs, jobs get no token permissions beyond contents: read, and checkout does not persist credentials.
tox has carried a djangomain factor for years, but nothing ever ran it. This runs it on a schedule rather than on every push, because a break in Django main is not a break in this package and should not turn a contributor's pull request red; the job is advisory (continue-on-error) for the same reason. The suite passes against Django main (6.2.dev) today, so the first red run will be a real signal.
The settings have carried a DRFDT_TEST_TYPE=postgres switch since izimobil#113, and the docs explain how to use it, but it has only ever been run by hand. A search backend that leans on icontains, distinct and count deserves to be exercised on the database people deploy on, not only on SQLite - the two disagree about collation, about how DISTINCT interacts with ORDER BY, and about what a LIKE plan costs. One job, one service container, the tox env doing the work so it can be reproduced locally with the same command. The example compose file moves to the same PostgreSQL version, having been left on 10, which reached end of life in 2022. All 80 tests pass on PostgreSQL 17.
The README and the classifiers advertised Python 3.8 to 3.12 and Django 3.2, 4.1 and 4.2, which no longer matched either what CI covers or what the package runs on. They now say what the matrix in the previous commits proves, and python_requires stops a release installing on an interpreter nothing tests. This is the only commit here that changes what a user can install, so it is the one to drop if the intention is to keep supporting Python 3.8 and 3.9 - both past end of life - or Django 3.2 and 4.1. The suite does still pass on all of them; nothing verifies that it will keep doing so.
The test database was pinned to one file, example/test.sqlite3, so two environments running at once fought over it and lost: `tox run-parallel` failed 13 of 16 environments with "attempt to write a readonly database". Dropping the override lets Django use its default in-memory database for SQLite, which is both isolated and quicker - the full matrix now passes in parallel in 9 seconds. The db.sqlite3 file the example site serves from is untouched.
Owner
Author
|
Proving run captured and linked from the upstream PR; closing. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Opened on the fork purely to make the new workflow execute, so the upstream PR can link a real run. Not for merge.