Skip to content

Wagtail 7.1 maintenance - #39

Closed
nickmoreton wants to merge 7 commits into
torchbox:mainfrom
torchbox-forks:support/wagtail-71-maintenance
Closed

Wagtail 7.1 maintenance#39
nickmoreton wants to merge 7 commits into
torchbox:mainfrom
torchbox-forks:support/wagtail-71-maintenance

Conversation

@nickmoreton

@nickmoreton nickmoreton commented Sep 15, 2025

Copy link
Copy Markdown
Contributor

This pull request updates the project to support newer versions of Python, Django, and Wagtail, and refactors several views and migrations for improved compatibility and maintainability.

Dependency and compatibility updates:

  • Updated supported versions in .github/workflows/test.yml and pyproject.toml to Python 3.13, Django 5.2, and Wagtail 7.x, and adjusted test matrix accordingly.

View refactoring for Wagtail version support:

  • Refactored src/wagtail_bynder/views/document.py and src/wagtail_bynder/views/image.py to remove legacy support for Wagtail <6.3

Testing improvements:

  • Updated test assertions in tests/test_image_chooser_views.py

Migration and model restructuring:

  • Reworked tests/testapp/migrations/0001_initial.py

One could consider #37 to be not required and #38 to be included.

@nickmoreton
nickmoreton marked this pull request as ready for review September 15, 2025 14:52
@nickmoreton nickmoreton changed the title Wagtail 71 maintenance Wagtail 7.1 maintenance Sep 15, 2025
This was referenced Sep 15, 2025
Comment thread tests/test_image_chooser_views.py Outdated
create_object_mock.assert_called_once()
self.assertEqual(response.status_code, 200)
response_json = response.json()
self.assertEqual(response_json["step"], "chosen")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

question: why not leave the full dict?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No reason why I can't, cursor suggested the code change and I liked the suggestion. Do you prefer it the dict way? Happy to change it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's keept it at full dict. Fewer surprises.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I found that we needed to consider dict differences between 6.3 and 7.0 so there's a little more work here: 78d89dd

…sed on Wagtail version.

Technically this is a wagtail 6.4+ compatibility fix. But as 6.4 isn't a supported or tested version then 7.0+ is OK.
@nickmoreton
nickmoreton requested a review from zerolab September 16, 2025 10:48
@nickmoreton

Copy link
Copy Markdown
Contributor Author

I realised that wagtail.telepath was moved to wagtail.admin.telepath wagtail/wagtail@8f92b1f

So the import here https://github.com/torchbox/wagtail-bynder/blob/main/src/wagtail_bynder/widgets.py#L7 will need to be updated. This may or may not need a conditional import but I think not.

@zerolab

zerolab commented Jun 9, 2026

Copy link
Copy Markdown
Member

closing in favour of #45

@zerolab zerolab closed this Jun 9, 2026
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.

2 participants