Skip to content

Commit

Permalink
Add Django 5 and python 3.12 and 3.13 test support
Browse files Browse the repository at this point in the history
  • Loading branch information
dancergraham authored Nov 6, 2024
1 parent 53ac908 commit 42d456e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 31 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.8, 3.9, '3.10', '3.11' ]
python-version: [ 3.9, '3.10', 3.11, 3.12, 3.13 ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}
Expand All @@ -43,9 +43,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}
Expand All @@ -67,9 +67,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}
Expand All @@ -88,9 +88,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}
Expand All @@ -117,8 +117,8 @@ jobs:
needs: [test, lint, i18n]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
- uses: casperdcl/deploy-pypi@v2
with:
password: ${{ secrets.PYPI_API_TOKEN }}
Expand Down
16 changes: 9 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,22 @@ classifiers = [
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Framework :: Django :: 5.2",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.8"
dependencies = ["django>=3.2"]
requires-python = ">=3.9"
dependencies = ["django>=4.2"]

[project.urls]
Homepage = "http://github.com/django-waffle/django-waffle"
Expand All @@ -50,7 +52,7 @@ namespaces = false
waffle = ["py.typed"]

[tool.mypy]
python_version = "3.8"
python_version = "3.9"
exclude = "waffle/tests"
disallow_incomplete_defs = true
disallow_untyped_calls = true
Expand Down
18 changes: 9 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
[tox]
envlist =
py{38,39,310}-django{32}
py{38,39,310}-django{40,41,42}
py{311}-django{41,42}
py{39,310}-django{42}
py{311,312,313}-django{42,50,51}
isolated_build = True

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313

[testenv]
allowlist_externals = ./run.sh
deps =
django32: Django>=3.2,<3.3
django40: Django>=4.0,<4.1
django41: Django>=4.1,<4.2
django42: Django>=4.2,<4.3
django50: Django>=5.0,<5.1
django51: Django>=5.1,<5.2

djangomain: https://github.com/django/django/archive/main.tar.gz
-r{toxinidir}/requirements.txt
commands =
./run.sh test

[testenv:i18n]
deps =
Django>=3.2,<4.2
Django>=4.2,<5.2
-r{toxinidir}/requirements.txt
commands =
./run.sh makemessages
Expand All @@ -35,7 +35,7 @@ commands =

[testenv:typecheck]
deps =
Django>=3.2,<4.3
Django>=4.2,<5.2
-r{toxinidir}/requirements.txt
commands =
./run.sh typecheck

0 comments on commit 42d456e

Please sign in to comment.