Skip to content

Commit fba18e9

Browse files
committed
Add support for Django 4.2, 5.0 and Python 3.11, 3.12
Drop support for Django 2.2, 4.0 and Python 3.7
1 parent 2b49fa1 commit fba18e9

File tree

6 files changed

+58
-37
lines changed

6 files changed

+58
-37
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,22 @@ jobs:
2828

2929
strategy:
3030
matrix:
31-
python-version: ["3.7", "3.8", "3.9", "3.10"]
31+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.10"]
32+
django-version: ["3.2", "4.2", "5.0"]
3233
experimental: [false]
33-
toxenv: ["py"]
3434
include:
35-
- python-version: "3.x"
36-
toxenv: "packaging"
35+
- python-version: "3.12"
36+
django-version: "packaging"
3737
experimental: false
38-
- python-version: "3.x"
39-
toxenv: "djangomain"
38+
- python-version: "3.12"
39+
django-version: "main"
4040
experimental: true
41-
- python-version: "pypy-3.9"
42-
toxenv: "PyPy"
43-
experimental: false
41+
exclude:
42+
# Unsupported Python versions for Django 5.0
43+
- python-version: 3.8
44+
django-version: 5.0
45+
- python-version: 3.9
46+
django-version: 5.0
4447

4548
steps:
4649
- uses: actions/checkout@v3
@@ -52,24 +55,16 @@ jobs:
5255
- name: Install dependencies
5356
run: |
5457
python -m pip install --upgrade pip setuptools wheel
55-
python -m pip install --upgrade coveralls tox tox-py tox-venv
56-
57-
- name: Run tox targets for Python ${{ matrix.python-version }}
58-
if: ${{ matrix.toxenv == 'py' }}
59-
continue-on-error: ${{ matrix.experimental }}
60-
run: tox --py current
58+
python -m pip install --upgrade coveralls tox tox-py tox-venv tox-gh-actions
6159
62-
- name: Run '${{ matrix.toxenv }}' tox targets
63-
if: ${{ matrix.toxenv != 'py' && matrix.toxenv != 'PyPy' }}
60+
- name: Tox tests
61+
run: tox -v
6462
continue-on-error: ${{ matrix.experimental }}
65-
run: tox -e ${{ matrix.toxenv }}
66-
67-
- name: Run tox targets for Python ${{ matrix.python-version }}
68-
if: ${{ matrix.toxenv == 'PyPy' }}
69-
continue-on-error: ${{ matrix.experimental }}
70-
run: tox -e pypy3-django22,pypy3-django32
63+
env:
64+
DJANGO: ${{ matrix.django-version }}
7165

7266
- name: Upload coverage data to coveralls.io
67+
if: ${{ matrix.python-version != 'pypy-3.10' }}
7368
env:
7469
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7570
COVERALLS_FLAG_NAME: run-${{ matrix.python-version }}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Changelog
22
=========
33

4+
## Unreleased
5+
6+
- Add support for Django 4.2 and 5.0
7+
- Add support for Python 3.11 and 3.12
8+
- Drop support for EOL Python 3.7
9+
- Drop support for EOL Django 2.2 and 4.0
10+
411
## v3.3.0 - 2022/03/23
512

613
- Introduce type annotations for common APIs

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ Table of Contents
8585
Requirements
8686
============
8787

88-
``rules`` requires Python 3.7 or newer. The last version to support Python 2.7
88+
``rules`` requires Python 3.8 or newer. The last version to support Python 2.7
8989
is ``rules`` 2.2. It can optionally integrate with Django, in which case
90-
requires Django 2.2 or newer.
90+
requires Django 3.2 or newer.
9191

9292
*Note*: At any given moment in time, ``rules`` will maintain support for all
9393
currently supported Django versions, while dropping support for those versions

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.black]
2-
target-version = ['py36']
2+
target-version = ['py38', 'py39', 'py310']
33

44
[tool.isort]
55
profile = "black"

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,10 @@ def get_version(version):
5757
"Operating System :: OS Independent",
5858
"Programming Language :: Python",
5959
"Programming Language :: Python :: 3",
60-
"Programming Language :: Python :: 3.7",
6160
"Programming Language :: Python :: 3.8",
6261
"Programming Language :: Python :: 3.9",
6362
"Programming Language :: Python :: 3.10",
63+
"Programming Language :: Python :: 3.11",
64+
"Programming Language :: Python :: 3.12",
6465
],
6566
)

tox.ini

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,48 @@
11
[tox]
22
envlist =
3-
py{37,38,39,310}-django{22,32},
4-
py{38,39,310}-django40,
5-
packaging,
3+
py{38,39,310,311,312,py3}-dj{32,42}
4+
py{310,311,312,py3}-dj{50}
5+
py312-packaging
6+
7+
[gh-actions]
8+
python =
9+
3.8: py38
10+
3.9: py39
11+
3.10: py310
12+
3.11: py311
13+
3.12: py312
14+
pypy-3.10: pypy3
15+
16+
[gh-actions:env]
17+
DJANGO =
18+
3.2: dj32
19+
4.2: dj42
20+
5.0: dj50
21+
main: djmain
22+
packaging: packaging
623

724
[testenv]
825
usedevelop = true
926
deps =
1027
coverage
1128
djangorestframework
12-
django22: Django~=2.2
13-
django32: Django~=3.2
14-
django40: Django~=4.0
29+
dj32: Django~=3.2.0
30+
dj42: Django~=4.2.0
31+
dj50: Django~=5.0.0
1532
commands =
16-
py{37,38,39,310},pypy3: coverage run tests/manage.py test testsuite {posargs: -v 2}
17-
py{37,38,39,310},pypy3: coverage report -m
33+
py{38,39,310,311,312}: coverage run tests/manage.py test testsuite {posargs: -v 2}
34+
py{38,39,310,311,312}: coverage report -m
35+
pypy3: {envpython} tests/manage.py test testsuite {posargs: -v 2}
1836

19-
[testenv:packaging]
37+
[testenv:py312-packaging]
2038
usedevelop = false
2139
deps =
2240
django
2341
djangorestframework
2442
commands =
2543
{envpython} tests/manage.py test testsuite {posargs: -v 2}
2644

27-
[testenv:djangomain]
45+
[testenv:py312-djmain]
2846
deps =
2947
https://github.com/django/django/archive/main.tar.gz#egg=django
3048
djangorestframework

0 commit comments

Comments
 (0)