Skip to content

Commit 9fe2bd8

Browse files
authored
Wagtail 7.2 maintenance (#271)
* Add Wagtail 7.2 and Python 3.14 support * Fix ruff errors * Drop Python 3.9 support
1 parent b39f564 commit 9fe2bd8

7 files changed

Lines changed: 22 additions & 19 deletions

File tree

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919
PIP_DISABLE_PIP_VERSION_CHECK: "1"
2020
PIP_NO_PYTHON_VERSION_WARNING: "1"
2121
# Keep in sync with .pre-commit-config.yaml/default_language_version/python.
22-
PYTHON_LATEST: "3.13" # because harden runner fails on the 3.13 download
22+
PYTHON_LATEST: "3.14" # because harden runner fails on the 3.14 download
2323

2424
jobs:
2525
tests:
@@ -28,7 +28,7 @@ jobs:
2828

2929
strategy:
3030
matrix:
31-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
31+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
3232

3333
steps:
3434
- name: 🔒 Harden Runner

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ci:
33
autoupdate_schedule: 'quarterly'
44

55
default_language_version:
6-
python: python3.13
6+
python: python3.14
77

88
repos:
99
- repo: https://github.com/pre-commit/pre-commit-hooks

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## [Unreleased]
44

5+
- Support for Wagtail 7.2
6+
- Support for Python 3.14
7+
58
## [0.17.2] - 2025-10-18
69

710
### Fixed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ but for audio and video files.
1313

1414
wagtailmedia requires the following:
1515

16-
- Python (3.9, 3.10, 3.11, 3.12, 3.13)
16+
- Python (3.10, 3.11, 3.12, 3.13, 3.14)
1717
- Django (4.2, 5.1, 5.2)
18-
- Wagtail (6.3, 6.4, 7.0)
18+
- Wagtail (6.3, 7.0, 7.2)
1919

2020
## Install
2121

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ classifiers = [
1919
"Programming Language :: Python :: 3.11",
2020
"Programming Language :: Python :: 3.12",
2121
"Programming Language :: Python :: 3.13",
22+
"Programming Language :: Python :: 3.14",
2223
"Framework :: Wagtail",
2324
"Framework :: Wagtail :: 6",
2425
"Framework :: Wagtail :: 7",
2526
]
2627

2728
dynamic = ["version"]
28-
requires-python = ">=3.9"
29+
requires-python = ">=3.10"
2930
dependencies = [
3031
"Wagtail>=6.3",
3132
"Django>=4.2",

tests/utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
import shutil
33
import tempfile
44

5-
from typing import Optional
6-
75
from django.core.files.base import ContentFile
86
from django.test import TestCase
97

@@ -32,8 +30,8 @@ def run(self, result=None):
3230
def create_media(
3331
media_type: str,
3432
title: str,
35-
duration: Optional[int] = 100,
36-
thumbnail: Optional[str] = False,
33+
duration: int | None = 100,
34+
thumbnail: str | None = False,
3735
) -> Media:
3836
filename = re.sub(r"[/:\"\'] ", "_", title).lower()
3937
extension = "mp3" if media_type == MediaType.AUDIO else "mp4"

tox.ini

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
min_version = 4.22
33

44
env_list =
5-
python{3.9,3.10,3.11}-dj42-wagtail{63,70,71}
6-
python{3.12}-dj51-wagtail{63,70,71}
7-
python{3.13}-dj52-wagtail{70,71}
5+
python{3.10,3.12}-dj42-wagtail{63,70,72}
6+
python{3.13}-dj{51,52}-wagtail{63,70,72}
7+
python{3.14}-dj52-wagtail{70,72}
88

99
[gh-actions]
1010
python =
11-
3.9: py3.9
1211
3.10: py3.10
1312
3.11: py3.11
1413
3.12: py3.12
1514
3.13: py3.13
15+
3.14: py3.14
1616

1717
[testenv]
1818
package = wheel
@@ -31,6 +31,7 @@ set_env =
3131

3232
python3.12: COVERAGE_CORE=sysmon
3333
python3.13: COVERAGE_CORE=sysmon
34+
python3.14: COVERAGE_CORE=sysmon
3435

3536
extras = testing
3637

@@ -40,15 +41,15 @@ deps =
4041
dj52: Django>=5.2,<5.3
4142
wagtail63: wagtail>=6.3,<6.4
4243
wagtail70: wagtail>=7.0,<7.1
43-
wagtail71: wagtail>=7.1,<7.2
44+
wagtail72: wagtail>=7.2,<7.3
4445

4546
commands_pre =
4647
python -I {toxinidir}/tests/manage.py migrate
4748
commands =
4849
python -Im coverage run {toxinidir}/tests/manage.py test --deprecation all {posargs: -v 2}
4950

5051
[testenv:coverage-report]
51-
base_python = python3.13
52+
base_python = python3.14
5253
package = skip
5354
deps =
5455
coverage>=7.0,<8.0
@@ -58,17 +59,17 @@ commands =
5859

5960
[testenv:wagtailmain]
6061
description = Test with latest Wagtail main branch
61-
base_python = python3.13
62+
base_python = python3.14
6263
deps =
6364
wagtailmain: git+https://github.com/wagtail/wagtail.git@main#egg=Wagtail
6465

6566
[testenv:interactive]
6667
package = editable
6768
description = An interactive environment for local testing purposes
68-
base_python = python3.13
69+
base_python = python3.14
6970

7071
deps =
71-
wagtail>=6.3,<6.4
72+
wagtail>=7.0,<7.1
7273

7374
commands_pre =
7475
python {toxinidir}/tests/manage.py makemigrations

0 commit comments

Comments
 (0)