Skip to content

Wagtail 7.4 Maintenance - #45

Merged
zerolab merged 7 commits into
mainfrom
support/wagtail-74-maintenance
Jul 21, 2026
Merged

Wagtail 7.4 Maintenance#45
zerolab merged 7 commits into
mainfrom
support/wagtail-74-maintenance

Conversation

@nickmoreton

@nickmoreton nickmoreton commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Aligns the package with current upstream support windows (as of 2026-05-26): Python 3.11–3.14, Django 5.2 LTS + 6.0, Wagtail 7.0 LTS through 7.4 LTS. Drops Django 4.2/5.0/5.1 (EOL) and Wagtail 5.2/6.1/6.2/6.3 (outside Wagtail's current support window).
  • Removes the now-dead WAGTAIL_VERSION < (6, 3) branches in views/image.py and views/document.py, including the ClassBasedWagtailImageEditView / ClassBasedDocumentEditView shims (the new Wagtail floor is 7.0).
  • Refreshes dev tooling: pre-commit-hooks v4.6.0 → v6.0.0, ruff-pre-commit v0.5.0 → v0.15.14 (with matching pin in .github/workflows/ruff.yml), pre-commit default_language_version → python3.13, coverage>=7.10.
  • Updates TestImageChosenView expectations to allow Wagtail 7's new default_alt_text key in the chooser chosen-step response.

Changes by file

Production

  • pyproject.toml — Django/Wagtail/Python classifiers + deps refreshed; requires-python unchanged at >=3.11.
  • tox.ini — envlist covering the valid Django × Wagtail × Python combos with explicit {sqlite,postgres} factor (required by tox 4.54, which rejects env names not declared in envlist).
  • .github/workflows/test.ymltest-latest now Python 3.14 × Django 6.0 × Wagtail 7.4 (postgres); test-legacytest-matrix with multiple sqlite combos; PYTHON_LATEST bumped to 3.13.
  • .github/workflows/publish.yml — Python pin bumped to 3.13.
  • src/wagtail_bynder/views/image.py, src/wagtail_bynder/views/document.py — dead Wagtail-version guards removed.
  • tests/test_image_chooser_views.pydefault_alt_text: mock.ANY added to the three TestImageChosenView assertions to accommodate Wagtail 7.0's response payload.
  • README.md — added a Compatibility section.
  • CHANGELOG.md[Unreleased] entry; no version bump (release prep left to the maintainer).

Dev tooling

  • .pre-commit-config.yaml, .github/workflows/ruff.yml, pyproject.toml, tox.ini — version bumps as described above.
  • src/wagtail_bynder/management/commands/base.py, tests/test_management_commands.py, tests/test_wagtail_overrides.py — ruff 0.15 auto-fixes (PEP 585 lowercase type, implicit-string-concat collapse, f-string whitespace) + ruff-format pass.
  • src/wagtail_bynder/models.py — added # noqa: SIM115 to the deliberately-open NamedTemporaryFile in BynderSyncedImage.process_downloaded_file (the rest of the method depends on tmp.name after the call site).

Valid matrix combinations

Wagtail Django Python
7.0 LTS 5.2 3.11, 3.12, 3.13
7.4 LTS 5.2 3.11, 3.12, 3.13, 3.14
7.4 LTS 6.0 3.13, 3.14

Out of scope (follow-up)

  • `bynder-sdk` v2.0.2 is upstream but the package is still pinned to `<2.0`. Worth a separate PR with an API diff against the `update_from_asset_data` flows in `models.py`.

Test plan

  • CI green across the new `test-matrix` and `test-latest` jobs.
  • Run `tox -e py3.13-django5.2-wagtail7.0-sqlite` locally.
  • Run `tox -e py3.14-django6.0-wagtail7.4-postgres` locally.
  • Confirm `python -m flit build --format wheel` still produces a valid wheel.
  • Confirm `pre-commit run --all-files` is clean.

🤖 Generated with Claude Code

nickmoreton and others added 2 commits May 26, 2026 14:41
Align the package with current upstream support windows:
- Drop Django 4.2/5.0/5.1 (EOL) and Wagtail 5.2/6.1/6.2/6.3 (outside
  Wagtail's current support window).
- Add Django 5.2 LTS, Django 6.0, Wagtail 7.0 LTS-7.4 LTS, Python 3.13/3.14.
- Refresh the tox envlist and the GitHub Actions test/publish matrices to
  reflect the valid Django x Wagtail x Python combinations.
- Remove the now-dead WAGTAIL_VERSION < (6, 3) branches in views/image.py
  and views/document.py (and the legacy ClassBased*EditView shims) since
  the new Wagtail floor is 7.0.
- Add a Compatibility section to the README and an Unreleased entry to
  the CHANGELOG.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…efault

- Bump pre-commit-hooks v4.6.0 -> v6.0.0 and ruff-pre-commit v0.5.0 -> v0.15.14.
- Bump coverage floor to 7.10 in pyproject.toml and tox.ini.
- Switch pre-commit default_language_version to python3.13.
- Sync the ruff version pinned in .github/workflows/ruff.yml.
- Apply auto-fixes from the new ruff (PEP 585 lowercase generics in test
  helpers, an implicit-string-concat collapse in commands/base.py, and
  f-string whitespace fixes in test_wagtail_overrides) plus ruff-format
  changes.
- Add a noqa: SIM115 to the deliberately-not-context-managed
  NamedTemporaryFile in BynderSyncedImage.process_downloaded_file; the
  surrounding code reads tmp.name after the call site by design.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@nickmoreton
nickmoreton marked this pull request as draft May 26, 2026 13:45
@nickmoreton nickmoreton changed the title Modernise support matrix: Django 5.2/6.0, Wagtail 7.0-7.4, Python 3.11-3.14 Wagtail 7.4 Maintenance May 26, 2026
nickmoreton and others added 3 commits May 26, 2026 14:51
Tox 4.54 rejects env names that aren't declared in envlist, so the CI
matrix was failing with "provided environments not found in
configuration file: py3.11-django5.2-wagtail7.0-sqlite". The GitHub
workflows pass TOXENV with a -sqlite or -postgres suffix to pick up the
psycopg2 factor-conditional dep, so add that factor to every envlist
entry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Wagtail 7.x adds a default_alt_text field to the image chooser chosen-step
response payload (sourced from the new Image.description model field).
The three TestImageChosenView assertions exhaustively compared the JSON
response, so they regressed once Wagtail started emitting the extra key.

Allow the new key with mock.ANY, matching the existing handling of the
preview value.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@nickmoreton
nickmoreton marked this pull request as ready for review May 26, 2026 14:05

@JakubMastalerz JakubMastalerz left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@zerolab zerolab mentioned this pull request Jun 9, 2026
Comment thread .github/workflows/test.yml Outdated
Comment thread .github/workflows/test.yml Outdated
Comment thread .github/workflows/test.yml Outdated
Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
zerolab and others added 2 commits July 21, 2026 11:57
Co-authored-by: Dan Braghiș <31622+zerolab@users.noreply.github.com>
@zerolab
zerolab force-pushed the support/wagtail-74-maintenance branch from d900367 to b95354a Compare July 21, 2026 13:34
@zerolab
zerolab merged commit 9c31e8a into main Jul 21, 2026
8 checks passed
@zerolab
zerolab deleted the support/wagtail-74-maintenance branch July 21, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants