Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wagtail 5 support #59

Merged
merged 6 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand All @@ -54,7 +54,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11"]
database: ["postgres"]

services:
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@
"Programming Language :: Python :: 3.11",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Wagtail",
"Framework :: Wagtail :: 4",
"Framework :: Wagtail :: 5",
"Topic :: Internet :: WWW/HTTP :: Site Management",
],
install_requires=["wagtail>=4.1", "python-docx>=0.8.10"],
Expand Down
15 changes: 7 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ skipsdist = True
usedevelop = True

envlist =
python{3.7}-django{3.2}-wagtail{4.1,4.2,master}-{sqlite,postgres}
python{3.8,3.9,3.10}-django{3.2}-wagtail{4.1,4.2,master}-{sqlite,postgres}
python{3.8,3.9,3.10}-django{4.0,4.1}-wagtail{4.1,4.2,master}-{sqlite,postgres}
python{3.11}-django{4.1}-wagtail{4.1,4.2,master}-{sqlite,postgres}
python{3.8,3.9,3.10}-django3.2-wagtail{4.1,4.2,5.0,5.1,main}-{sqlite,postgres}
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion: drop Wagtail 4.2 as it has EOLed - https://endoflife.date/wagtail. This will simplify the matrix considerably

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, reshuffled this a bit in f45bfef, it's a little easier on the eyes/brain.

python{3.8,3.9,3.10,3.11}-django4.1-wagtail{4.1,4.2,5.0,5.1,main}-{sqlite,postgres}
python{3.8,3.9,3.10,3.11}-django4.2-wagtail{5.0,5.1,main}-{sqlite,postgres}

[gh-actions]
python =
3.7: python3.7
3.8: python3.8
3.9: python3.9
3.10: python3.10
Expand All @@ -36,15 +34,16 @@ deps =
django3.2: Django>=3.2,<3.3
django4.0: Django>=4.0,<4.1
django4.1: Django>=4.1,<4.2
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
django4.0: Django>=4.0,<4.1
django4.1: Django>=4.1,<4.2
django4.1: Django>=4.1,<4.2
django4.2: Django>=4.2,<5.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 92e62bd

Copy link
Member

Choose a reason for hiding this comment

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

Nitpick - the commit message says 4.1 (which isn't EOL yet as it's an LTS release), although it is indeed removing 4.2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, reworded.

djangomaster: git+https://github.com/django/django.git@master#egg=Django

wagtail4.1: wagtail>=4.1,<4.2
wagtail4.2: wagtail>=4.1,<5.0
wagtailmaster: git+https://github.com/wagtail/wagtail.git
wagtail5.0: wagtail>=5.0,<5.1
wagtail5.1: wagtail>=5.1,<5.2
wagtailmain: git+https://github.com/wagtail/wagtail.git

postgres: psycopg2

[testenv:flake8]
basepython=python3.7
basepython=python3.8
deps=flake8>=2.2.0
commands=flake8 wagtail_content_import
6 changes: 3 additions & 3 deletions wagtail_content_import/admin_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
def confirm_dialog(request):
return render_modal_workflow(
request,
'wagtail_content_import/confirm_dialog.html',
None,
{},
html_template='wagtail_content_import/confirm_dialog.html',
js_template=None,
template_vars={},
Comment on lines +7 to +9
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated change, just improves readability.

json_data={'step': 'dialog'}
)