Wagtail 74 maintenance#280
Open
nickmoreton wants to merge 21 commits into
Open
Conversation
…s - The `button-longrunning` class usage has been updated to use the newly adopted Stimulus approach
…e direct use of wagtailadmin/shared/field.html
…uests in the django.contrib.auth.views.LogoutView and django.contrib.auth.views.logout_then_login() is removed
- Declare Django>=5.2,<7 and Wagtail>=7.0,<8 (adds Wagtail 7.4 LTS and Django 6.0). - Expand tox matrix to cover Python 3.10/3.11/3.12 (previously claimed in classifiers but never exercised) and Django 6.0 on 3.13/3.14. - Remove unused six install dep and dead Django<4.1 RedirectURLMixin guard. - Note dropped users (Wagtail 7.0 + Django 4.2) in CHANGES; fix Python 3.8 reference in README sandbox section. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop Wagtail 7.1 and 7.2 from the test matrix. 7.0 (LTS), 7.3 (previous current), and 7.4 (current LTS) cover the supported range; 7.1 and 7.2 sit between and don't add meaningful coverage given the package's small surface area. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Bump test-extra floors: coverage>=7.0,<8 (drops legacy ==5.5 pin), pytest>=8.0, pytest-cov>=5.0, pytest-django>=4.8, flake8>=7.0, isort>=5.13, flake8-blind-except>=0.2.1, flake8-debugger>=4.1. - Bump docs-extra floors: sphinx>=7.0, sphinx_rtd_theme>=2.0. - Bump actions/setup-python from v4.9.1 to v6.2.0 (one major behind) in both python-tox.yml and python-release.yml. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Maintenance release adding Wagtail 7.4 (LTS) + Django 6.0 support, dropping legacy compatibility code, and refreshing the test/CI/dev tooling. Targets Wagtail 7.0–7.4 and Django 5.2–6.0; users still on Wagtail 7.0 / Django 4.2 should stay on
wagtail-2fa1.8.x.I realise this is a lot of changes, feel free to push back on this PR and make suggestions. We've been using our own forked branch here: https://github.com/torchbox-forks/wagtail-2fa/tree/stable/1.8.2 for some time and essentially this builds of that work.
Compatibility & packaging (
setup.py)Django>=5.2andWagtail>=7.0(with documented upper boundsDjango<7,Wagtail<8).sixinstall dependency (unused since the Py2 shim was dropped).Application code
wagtail_hooks.py— Replace deprecatedUserListingButtonwithwagtail.admin.widgets.Buttonon Wagtail ≥ 7.1 (falls back toUserListingButtonbelow 7.1). Collapse the dual Wagtail 6.0register_user_listing_buttonsbranches into a single signature. Convertre_pathdevice URLs to modernpath()with<int:...>converters.views.py— Drop theDJANGO_VERSION/WAGTAIL_VERSIONimport guards; importRedirectURLMixindirectly and always use the singleotp_form.htmltemplate (Django < 4.1 and Wagtail < 6.0 branches are now unreachable).middleware.py— Addget_allowed_url_names()so the allowed-URL list is extensible via the newWAGTAIL_2FA_ALLOWED_URL_NAMESsetting.Templates
legacy/otp_form.htmland theotp_form_v6.htmlvariants; consolidate into a singleotp_form.htmlthat extendswagtailadmin/base.html, uses the{% formattedfield %}tag, and replaces the GET "Sign out" link with a POST logout button (Django 5.0 removed GET logout support).device_list.html— Update the "New device" button to the current Wagtail icon/markup pattern.Testing & CI
tox.ini— Expand matrix to Python 3.10–3.14 across Django 5.2/6.0 and Wagtail 7.0/7.3/7.4 (LTS + current + previous).actions/setup-pythonto v6.2.0 in the tox and release workflows.dependabot.yml.Sandbox & docs
sandbox/requirements.txt— Bump toDjango>=5.2,Wagtail>=7.0,django-debug-toolbar==6.2.0.sandbox— Modernize URLs topath()and remove the removedUSE_L10Nsetting.README.rst— Bump sandbox Python guidance to 3.10+.CHANGES— Add an Unreleased section documenting the above.