From 42d456edc406ded9a389c1396d2308cd4d21c6d1 Mon Sep 17 00:00:00 2001 From: Graham Knapp <32717635+dancergraham@users.noreply.github.com> Date: Wed, 6 Nov 2024 19:04:49 +0100 Subject: [PATCH] Add Django 5 and python 3.12 and 3.13 test support --- .github/workflows/python-package.yml | 30 ++++++++++++++-------------- pyproject.toml | 16 ++++++++------- tox.ini | 18 ++++++++--------- 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 1989bee4..ad953c0e 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -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') }} @@ -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') }} @@ -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') }} @@ -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') }} @@ -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 }} diff --git a/pyproject.toml b/pyproject.toml index 541f237d..89d008e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" @@ -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 diff --git a/tox.ini b/tox.ini index 4e60d680..4983d48d 100644 --- a/tox.ini +++ b/tox.ini @@ -1,24 +1,24 @@ [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 = @@ -26,7 +26,7 @@ commands = [testenv:i18n] deps = - Django>=3.2,<4.2 + Django>=4.2,<5.2 -r{toxinidir}/requirements.txt commands = ./run.sh makemessages @@ -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