Skip to content

Commit 829f7ac

Browse files
authored
Add Python 3.12 to the test matrix, drop Django 4.1 (#242)
* GitHub Actions: Add Python 3.12 to the testing As discussed at #236 (review) * tox.ini: Add py312 * Stop testing Django v4.1
1 parent 5efd3a0 commit 829f7ac

File tree

4 files changed

+71
-73
lines changed

4 files changed

+71
-73
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
- run: pipx install "poetry>=1.1.12,<2"
1313
- uses: actions/setup-python@v5
1414
with:
15-
python-version: "3.11"
15+
python-version: "3.12"
1616
cache: 'poetry'
1717
- run: pip install tox
18-
- run: tox -e lint,py311-dj50
18+
- run: tox -e lint,py312-dj50
1919
test_compatibility:
2020
needs: test
2121
runs-on: ubuntu-latest
@@ -24,21 +24,18 @@ jobs:
2424
matrix:
2525
include:
2626
# Test with all supported Django versions, for all compatible Python versions.
27-
# See https://docs.djangoproject.com/en/4.0/faq/install/#what-python-version-can-i-use-with-django for the official matrix.
27+
# See https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django for the official matrix.
2828
# Additionally test on Django’s main branch with the most recent Python version.
2929
- python: "3.8"
30-
toxenv: py38-dj32,py38-dj41,py38-dj42
30+
toxenv: py38-dj32,py38-dj42
3131
- python: "3.9"
32-
toxenv: py39-dj32,py39-dj41,py39-dj42
32+
toxenv: py39-dj32,py39-dj42
3333
- python: "3.10"
34-
# Skip testing Django 4.0, already tested in previous workflow job.
35-
toxenv: py310-dj32,py310-dj41,py310-dj42,py310-djmain
34+
toxenv: py310-dj32,py310-dj42,py310-dj50,py310-djmain
3635
- python: "3.11"
37-
toxenv: py311-dj41,py311-dj42,py311-djmain
38-
# Tentative support for next Python pre-release.
39-
# When django supports the version, uncomment this
40-
# - python: "3.12"
41-
# toxenv: py312-dj41
36+
toxenv: py311-dj42,py311-dj50,py311-djmain
37+
- python: "3.12"
38+
toxenv: py312-dj42,py312-djmain
4239
steps:
4340
- uses: actions/checkout@v4
4441
- run: pipx install "poetry>=1.1.12,<2"
@@ -68,7 +65,7 @@ jobs:
6865
run: npm ci --no-audit
6966
- run: npm run build
7067
- run: pipx install "poetry>=1.1.12,<2"
71-
- uses: actions/setup-python@v4
68+
- uses: actions/setup-python@v5
7269
with:
7370
python-version-file: pyproject.toml
7471
cache: 'poetry'

poetry.lock

Lines changed: 55 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Markdown = "^3.1"
5050

5151
[tool.poetry.dev-dependencies]
5252
beautifulsoup4 = "^4.8"
53-
coverage = "^6.2"
53+
coverage = "^7.4"
5454
flake8 = {version = "^7.0", python = ">=3.8.1,<4.0"}
5555
isort = "^5.10.1"
5656
mkdocs = "^1.1.2"

tox.ini

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
[tox]
22
envlist =
33
py{38,39,310}-dj32
4-
py{38,39,310,311}-dj41
5-
py{38,39,310,311}-dj42
6-
py{38,39,310,311}-dj50
7-
py{310,311}-djmain
4+
py{38,39,310,311,312}-dj42
5+
py{310,311,312}-dj50
6+
py{310,311,312}-djmain
87
lint
98
skipsdist = true
109

@@ -19,7 +18,6 @@ commands =
1918
poetry run django-admin render_patterns --settings=tests.settings.dev --pythonpath=. --dry-run
2019
deps =
2120
dj32: Django>=3.2,<3.3
22-
dj41: Django>=4.1,<4.2
2321
dj42: Django>=4.2,<5.0
2422
dj50: Django>=5.0,<5.1
2523
djmain: https://github.com/django/django/archive/main.zip
@@ -32,7 +30,8 @@ commands =
3230
poetry run black --check --diff .
3331

3432
[flake8]
35-
ignore = C901,W503
33+
ignore = W503
34+
max-complexity = 13
3635
max-line-length = 120
3736
exclude = .tox,venv,migrations,node_modules
3837

0 commit comments

Comments
 (0)