From 429198dac5ac100f7b5f9413b6d742a4b7db736d Mon Sep 17 00:00:00 2001 From: Ian Meigh Date: Tue, 18 Mar 2025 10:42:02 +0000 Subject: [PATCH 1/8] Update text matrix --- tox.ini | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tox.ini b/tox.ini index 6b66acf..8625f95 100644 --- a/tox.ini +++ b/tox.ini @@ -2,8 +2,8 @@ min_version = 4.11 envlist = - py{3.11,3.12}-django{4.2,5.0}-wagtail{5.2,6.1,6.2,6.3} - py3.13-django5.1-wagtail6.3 + py{3.11,3.12}-django{4.2,5.0}-wagtail{5.2,6.3,6.4} + py3.13-django5.1-wagtail{6.3,6.4} [gh-actions] python = @@ -36,11 +36,9 @@ deps = django4.2: Django>=4.2,<4.3 django5.0: Django>=5.0,<5.1 django5.1: Django>=5.1,<5.2 - wagtail5.2: wagtail>=5.2,<5.3 - wagtail6.1: wagtail>=6.1,<6.2 - wagtail6.2: wagtail>=6.2,<6.3 wagtail6.3: wagtail>=6.3,<6.4 + wagtail6.4: wagtail>=6.4,<6.5 wagtailmain: git+https://github.com/wagtail/wagtail.git postgres: psycopg2>=2.9 From 9e7001ddc2bdf86b8d83cca9677239e1e12f0aca Mon Sep 17 00:00:00 2001 From: Ian Meigh Date: Tue, 18 Mar 2025 10:42:32 +0000 Subject: [PATCH 2/8] Update latest and legacy tests --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3378b1a..6456589 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,7 @@ jobs: matrix: python-version: ["3.13"] django: ["5.1"] - wagtail: ["6.3"] + wagtail: ["6.4"] db: ["postgres"] services: @@ -77,7 +77,7 @@ jobs: matrix: python-version: ["3.11", "3.12"] django: ["4.2"] - wagtail: ["5.2", "6.1", "6.2"] + wagtail: ["5.2", "6.3"] db: ["sqlite"] steps: - uses: actions/checkout@v4 From bb6ca2d8ebc29ac0756c72aad55013bba5860db3 Mon Sep 17 00:00:00 2001 From: Ian Meigh Date: Tue, 18 Mar 2025 10:43:48 +0000 Subject: [PATCH 3/8] Update image chooser tests to include default_alt_text property --- tests/test_image_chooser_views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_image_chooser_views.py b/tests/test_image_chooser_views.py index 22d1797..996dcba 100644 --- a/tests/test_image_chooser_views.py +++ b/tests/test_image_chooser_views.py @@ -30,7 +30,9 @@ def setUp(self): def test_creates_image_if_asset_id_not_recognised(self): # For expediency and predictability, have create_object() # return a test image instead of creating its own + image = CustomImageFactory.create() + print(image) with mock.patch( "wagtail_bynder.views.image.ImageChosenView.create_object", return_value=image, @@ -49,6 +51,7 @@ def test_creates_image_if_asset_id_not_recognised(self): "title": image.title, "preview": mock.ANY, "edit_url": reverse("wagtailimages:edit", args=[image.id]), + "default_alt_text": image.title, }, }, ) @@ -76,6 +79,7 @@ def test_uses_existing_image_without_updating(self, update_object_mock): "title": image.title, "preview": mock.ANY, "edit_url": reverse("wagtailimages:edit", args=[image.id]), + "default_alt_text": image.title, }, }, ) @@ -103,6 +107,7 @@ def test_uses_existing_image_and_updates_it(self, update_object_mock): "title": image.title, "preview": mock.ANY, "edit_url": reverse("wagtailimages:edit", args=[image.id]), + "default_alt_text": image.title, }, }, ) From 95b3682facafaddcaf92225856ff23c387c640ac Mon Sep 17 00:00:00 2001 From: Ian Meigh Date: Tue, 18 Mar 2025 10:45:00 +0000 Subject: [PATCH 4/8] Add python 3.13 trove classifier --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 11b694b..20c0470 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,7 @@ classifiers = [ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Framework :: Django", "Framework :: Django :: 4.2", "Framework :: Django :: 5.0", From d63ce3fb3a4c86bb8c02ef87eb08775f55091dfb Mon Sep 17 00:00:00 2001 From: Ian Meigh Date: Tue, 18 Mar 2025 10:45:27 +0000 Subject: [PATCH 5/8] Update supported versions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7a8494f..4c408bf 100644 --- a/README.md +++ b/README.md @@ -366,4 +366,4 @@ Supported versions: - Python 3.11, 3.12, 3.13 - Django 4.2, 5.0, 5.1 -- Wagtail 5.2 (LTS), 6.0, 6.1, 6.2, 6.3 (LTS) +- Wagtail 5.2 (LTS), 6.3 (LTS), 6.4 From eaf409fcb9e3e22d5303f02f64ed28494e56ef89 Mon Sep 17 00:00:00 2001 From: Ian Meigh Date: Tue, 18 Mar 2025 10:45:55 +0000 Subject: [PATCH 6/8] Update changelog unreleased section --- CHANGELOG.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7672069..8bb8474 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.7] - unreleased +## Unreleased + +### Added + +- Support for Wagtail 6.4 + +### Changed + +- Image chooser tests now include new `default_alt_text` property + +## Removed + +- Wagtail versions (6.0-6.2) from tox testing matrix + +## [0.7] - 2025-01-15 ### Added From 4d6bdfbd4c636ddb5916fc66a82407e1d3fc12ca Mon Sep 17 00:00:00 2001 From: Ian Meigh Date: Tue, 18 Mar 2025 12:16:36 +0000 Subject: [PATCH 7/8] Remove print statement --- tests/test_image_chooser_views.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_image_chooser_views.py b/tests/test_image_chooser_views.py index 996dcba..86440ba 100644 --- a/tests/test_image_chooser_views.py +++ b/tests/test_image_chooser_views.py @@ -32,7 +32,6 @@ def test_creates_image_if_asset_id_not_recognised(self): # return a test image instead of creating its own image = CustomImageFactory.create() - print(image) with mock.patch( "wagtail_bynder.views.image.ImageChosenView.create_object", return_value=image, From 8af66bd7840bb1bbce3d420f607f78dab5ed31c4 Mon Sep 17 00:00:00 2001 From: Jakub Mastalerz Date: Fri, 30 May 2025 15:27:32 +0100 Subject: [PATCH 8/8] update tox for wagtail 7 --- tox.ini | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index 8625f95..da11af6 100644 --- a/tox.ini +++ b/tox.ini @@ -2,8 +2,9 @@ min_version = 4.11 envlist = - py{3.11,3.12}-django{4.2,5.0}-wagtail{5.2,6.3,6.4} - py3.13-django5.1-wagtail{6.3,6.4} + py{3.11,3.12}-django4.2-wagtail{5.2,6.3,6.4} + py3.13-django5.1-wagtail{6.3,6.4,7.0} + py3.13-django5.2-wagtail{6.3,6.4,7.0} [gh-actions] python = @@ -34,11 +35,11 @@ extras = testing deps = django4.2: Django>=4.2,<4.3 - django5.0: Django>=5.0,<5.1 django5.1: Django>=5.1,<5.2 - wagtail5.2: wagtail>=5.2,<5.3 + django5.2: Django>=5.2,<5.3 wagtail6.3: wagtail>=6.3,<6.4 wagtail6.4: wagtail>=6.4,<6.5 + wagtail7.0: wagtail>=7.0,<7.1 wagtailmain: git+https://github.com/wagtail/wagtail.git postgres: psycopg2>=2.9