From eebf4e9bedd5ba9fbbc2f065c899ea7ee169d4ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Braghi=C8=99?= Date: Wed, 1 Nov 2023 22:12:26 +0000 Subject: [PATCH] Add Wagtail 5.2/ Python 3.12 (#226) * Add Wagtail 5.2 and Python 3.12 to tox.ini * Drop deprecated versions from tox.ini * Add Python 3.12 classifier * Add Python 3.12 to CI matrix --- .github/workflows/test.yml | 7 ++++--- pyproject.toml | 1 + tox.ini | 19 +++++++++++++------ 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b6abadd..d61d675 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,16 +28,17 @@ jobs: strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: 🔒 Harden Runner - uses: step-security/harden-runner@v2 + uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 with: disable-sudo: true egress-policy: block allowed-endpoints: > files.pythonhosted.org:443 + objects.githubusercontent.com:443 github.com:443 pypi.org:443 api.github.com:443 @@ -73,7 +74,7 @@ jobs: steps: - name: 🔒 Harden Runner - uses: step-security/harden-runner@v2 + uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 with: disable-sudo: true egress-policy: block diff --git a/pyproject.toml b/pyproject.toml index 89fd32e..fa83beb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Framework :: Wagtail", "Framework :: Wagtail :: 4", "Framework :: Wagtail :: 5", diff --git a/tox.ini b/tox.ini index 22ee1f7..30ad788 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,10 @@ [tox] -min_version = 4.0 +min_version = 4.11 envlist = - py{38,39,310}-dj{32,41}-wagtail{41,50,51} - py{311}-dj{41,42}-wagtail{50,51} + py{38,39,310}-dj{32,41}-wagtail{41,51,52} + py{311}-dj{41,42}-wagtail{51,52} + py{312}-dj{42}-wagtail{52} [gh-actions] python = @@ -11,6 +12,7 @@ python = 3.9: py39 3.10: py310 3.11: py311 + 3.12: py312 [testenv] package = wheel @@ -31,9 +33,8 @@ deps = dj41: Django>=4.1,<4.2 dj42: Django>=4.2,<5.0 wagtail41: wagtail>=4.1,<4.2 - wagtail50: wagtail>=5.0,<5.1 wagtail51: wagtail>=5.1,<5.2 - interactive: wagtail>=4.1 + wagtail52: wagtail>=5.2,<5.3 install_command = python -Im pip install -U {opts} {packages} @@ -41,12 +42,18 @@ commands = python -Im coverage run runtests.py {posargs: -v 2} [testenv:coverage-report] +base_python = python3.11 +; a bit of a hack - we want to keep deps to a minimum here +deps = +extras = +install_command = python -Im pip install -U "coverage[toml]>=7.0,<8.0" commands = python -Im coverage combine python -Im coverage report -m [testenv:wagtailmain] description = Test with latest Wagtail main branch +base_python = python3.12 deps = wagtailmain: git+https://github.com/wagtail/wagtail.git@main#egg=Wagtail @@ -56,7 +63,7 @@ description = An interactive environment for local testing purposes base_python = python3.11 deps = - wagtail>=4.1 + wagtail>=5.2 commands_pre = python {toxinidir}/manage.py makemigrations