Skip to content

Commit 06dcad4

Browse files
authored
Wagtail 7.4 Maintenance (#276)
* Add locale to page fixtures for Wagtail 7.3+ compatibility Wagtail 7.3 (migration `wagtailcore.0094_alter_page_locale`) tightened `Page.locale_id` to `NOT NULL` without a default, so fixtures that omit the locale fail to load with an `IntegrityError`. Point each page at the default Locale row created by wagtailcore migrations. * Drop Wagtail < 7.0; add Wagtail 7.3 and 7.4 LTS support Update the supported Wagtail range to 7.0–7.4 LTS following the current Wagtail support window, and add Django 6.0 to the matrix. - Bump Wagtail lower bound to 7.0; drop the Wagtail 6 classifier - Expand tox matrix to cover Wagtail 7.0/7.1/7.2/7.3/7.4 and Django 6.0 - Remove legacy file/thumbnail templates and the `wagtail_version_gte` template tag, which only existed to support Wagtail < 6.0 - Inline now-always-true `WAGTAIL_VERSION` guards in tests * Update dev dependencies and CI action versions - Bump pre-commit-hooks to v6.0.0 and ruff to 0.15.13 - Bump testing/linting extras lower bounds (coverage, tox, pre-commit) - Bump actions/setup-python to v6 and actions/upload-artifact to v5 across workflows; align actions/checkout to v5 in nightly tests * Update README
1 parent 5473f09 commit 06dcad4

20 files changed

Lines changed: 66 additions & 230 deletions

.github/workflows/nightly-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ jobs:
2626
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
2727

2828
steps:
29-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v5
3030
with:
3131
persist-credentials: false
3232
- name: Set up Python
33-
uses: actions/setup-python@v5
33+
uses: actions/setup-python@v6
3434
with:
3535
python-version: "3.13"
3636
- name: Install dependencies

.github/workflows/ruff.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
persist-credentials: false
2222

23-
- run: python -Im pip install --user ruff==0.12.9
23+
- run: python -Im pip install --user ruff==0.15.13
2424

2525
- name: Run ruff
2626
working-directory: ./src

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
with:
4747
persist-credentials: false
4848
- name: 🐍 Set up Python ${{ matrix.python-version }}
49-
uses: actions/setup-python@v5
49+
uses: actions/setup-python@v6
5050
with:
5151
python-version: ${{ matrix.python-version }}
5252

@@ -62,7 +62,7 @@ jobs:
6262
run: tox --installpkg ./dist/*.whl
6363

6464
- name: ⬆️ Upload coverage data
65-
uses: actions/upload-artifact@v4
65+
uses: actions/upload-artifact@v5
6666
with:
6767
name: coverage-data-${{ matrix.python-version }}
6868
path: .coverage.*
@@ -110,7 +110,7 @@ jobs:
110110
echo "## Coverage summary" >> $GITHUB_STEP_SUMMARY
111111
python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
112112
- name: 📈 Upload HTML report if check failed.
113-
uses: actions/upload-artifact@v4
113+
uses: actions/upload-artifact@v5
114114
with:
115115
name: html-report
116116
path: htmlcov

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ default_language_version:
77

88
repos:
99
- repo: https://github.com/pre-commit/pre-commit-hooks
10-
rev: v5.0.0
10+
rev: v6.0.0
1111
hooks:
1212
- id: check-added-large-files
1313
- id: check-case-conflict
@@ -19,7 +19,7 @@ repos:
1919
- id: end-of-file-fixer
2020
- id: trailing-whitespace
2121
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: 'v0.12.9' # keep in sync with .github/workflows/ruff.yml
22+
rev: 'v0.15.13' # keep in sync with .github/workflows/ruff.yml
2323
hooks:
2424
- id: ruff-check
2525
args: [--fix]

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@
22

33
## [Unreleased]
44

5-
- Support for Wagtail 7.2
6-
- Support for Python 3.14
5+
### Added
6+
7+
- Support for Wagtail 7.2, 7.3, and 7.4 LTS, Django 6.0, and Python 3.14
8+
9+
### Removed
10+
11+
- Drop support for Wagtail < 7.0 (6.3, 6.4 are out of the supported Wagtail range)
12+
- Remove the legacy `_file_field_legacy.html` and `_thumbnail_field_legacy.html` templates and the `wagtail_version_gte` template tag, no longer required now that Wagtail 7.0 is the minimum supported version
13+
714

815
## [0.17.2] - 2025-10-18
916

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ but for audio and video files.
1414
wagtailmedia requires the following:
1515

1616
- Python (3.10, 3.11, 3.12, 3.13, 3.14)
17-
- Django (4.2, 5.1, 5.2)
18-
- Wagtail (6.3, 7.0, 7.2)
17+
- Django (5.2, 6.0)
18+
- Wagtail (7.0, 7.1, 7.2, 7.3, 7.4)
1919

2020
## Install
2121

@@ -25,7 +25,7 @@ Install using pip:
2525
pip install wagtailmedia
2626
```
2727

28-
`wagtailmedia` is compatible with Wagtail 4.1 and above. Check out older releases for compatibility with older versions of Wagtail.
28+
`wagtailmedia` is compatible with Wagtail 7.0 and above. Check out older releases for compatibility with older versions of Wagtail.
2929

3030
### Settings
3131

pyproject.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,23 @@ classifiers = [
2121
"Programming Language :: Python :: 3.13",
2222
"Programming Language :: Python :: 3.14",
2323
"Framework :: Wagtail",
24-
"Framework :: Wagtail :: 6",
2524
"Framework :: Wagtail :: 7",
2625
]
2726

2827
dynamic = ["version"]
2928
requires-python = ">=3.10"
3029
dependencies = [
31-
"Wagtail>=6.3",
32-
"Django>=4.2",
30+
"Wagtail>=7.0",
31+
"Django>=5.2",
3332
]
3433

3534
[project.optional-dependencies]
3635
testing = [
37-
"coverage>=7.10.0",
38-
"tox>=4.28.4",
36+
"coverage>=7.14.0",
37+
"tox>=4.54.0",
3938
]
4039
linting = [
41-
"pre-commit>=4.3.0",
40+
"pre-commit>=4.6.0",
4241
]
4342

4443
[project.urls]
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
{% load wagtailadmin_tags media_tags %}
2-
3-
{% wagtail_version_gte "6.0" as wagtail_gte_60 %}
1+
{% load wagtailadmin_tags %}
42

53
<li class="{% if field.field.required %}required{% endif %} {{ wrapper_classes }} {{ li_classes }} {% if field.errors %}error{% endif %}">
6-
{% if wagtail_gte_60 %}
7-
{% include "wagtailmedia/media/_file_field.html" %}
8-
{% else %}
9-
{% include "wagtailmedia/media/_file_field_legacy.html" %}
10-
{% endif %}
4+
{% include "wagtailmedia/media/_file_field.html" %}
115
</li>

src/wagtailmedia/templates/wagtailmedia/media/_file_field_legacy.html

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
{% load wagtailadmin_tags media_tags %}
2-
3-
{% wagtail_version_gte "6.0" as wagtail_gte_60 %}
1+
{% load wagtailadmin_tags %}
42

53
<li class="{% if field.field.required %}required{% endif %} {{ wrapper_classes }} {{ li_classes }} {% if field.errors %}error{% endif %}">
6-
{% if wagtail_gte_60 %}
7-
{% include "wagtailmedia/media/_thumbnail_field.html" %}
8-
{% else %}
9-
{% include "wagtailmedia/media/_thumbnail_field_legacy.html" %}
10-
{% endif %}
4+
{% include "wagtailmedia/media/_thumbnail_field.html" %}
115
</li>

0 commit comments

Comments
 (0)