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

Update supported versions and dependencies #509

Merged
merged 10 commits into from
Jan 26, 2022

Conversation

zerolab
Copy link
Collaborator

@zerolab zerolab commented Jan 21, 2022

This PR:

  • allows installing wagtail-localize wtih Wagtail 2.16 (currently off its main branch)
  • Fixes a number of deprecations in prep for Django 4.0 support
  • Fixes test failures with Wagtail 2.16 (reference
  • Bumps the black version to the latest
  • regenerates the package-lock.json file after the addition of .nvmrc

@zerolab zerolab requested a review from kaedroho January 21, 2022 11:03
@zerolab zerolab force-pushed the chore/wagtail-216-and-deps branch from b94f6fe to b17a653 Compare January 21, 2022 17:15
@zerolab zerolab force-pushed the chore/wagtail-216-and-deps branch 3 times, most recently from cd6a213 to 7b3d91e Compare January 21, 2022 17:30
as of 2.16 `wagtail.admin.views.generic.DeleteView` has been updated to match the Django 4.0 `DeleteView` implementation which uses `FormMixin` so the action happens in `form_valid`

https://github.com/wagtail/wagtail/blob/main/docs/releases/2.16.md#wagtailadminviewsgenericdeleteview-follows-django-40-conventions
uses new lockfile version
@zerolab zerolab force-pushed the chore/wagtail-216-and-deps branch from 067acab to 7941c63 Compare January 21, 2022 22:09
@codecov-commenter
Copy link

codecov-commenter commented Jan 21, 2022

Codecov Report

Merging #509 (b7a63b3) into main (7b4788a) will decrease coverage by 0.55%.
The diff coverage is 56.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #509      +/-   ##
==========================================
- Coverage   92.92%   92.37%   -0.56%     
==========================================
  Files          36       36              
  Lines        3025     3055      +30     
  Branches      478      486       +8     
==========================================
+ Hits         2811     2822      +11     
- Misses        114      126      +12     
- Partials      100      107       +7     
Impacted Files Coverage Δ
wagtail_localize/locales/__init__.py 50.00% <50.00%> (-50.00%) ⬇️
wagtail_localize/locales/views.py 93.37% <50.00%> (-3.85%) ⬇️
wagtail_localize/test/__init__.py 50.00% <50.00%> (-50.00%) ⬇️
wagtail_localize/wagtail_hooks.py 84.84% <57.14%> (-3.59%) ⬇️
wagtail_localize/__init__.py 60.00% <60.00%> (-40.00%) ⬇️
wagtail_localize/test/settings.py 97.05% <66.66%> (-2.95%) ⬇️
wagtail_localize/version.py 75.00% <100.00%> (+2.77%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b4788a...b7a63b3. Read the comment docs.

@zerolab zerolab force-pushed the chore/wagtail-216-and-deps branch from 7941c63 to 659b8fc Compare January 21, 2022 22:18
Copy link
Member

@Stormheg Stormheg left a comment

Choose a reason for hiding this comment

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

Thanks so much for your work @zerolab ❤️

All looks good, but I do have one minor question about Django 3.0 and 3.1 missing from the tox dependencies. Perhaps you removed these by accident?

One other this I noticed is that we have some invalid dependency matrix combinations in Tox, we should probably clean that up (see comment for details). Not necessarily to be done in this PR but if you're up to it 🙂

polib>=1.1,<2.0

django2.2: Django~=2.2
django3.2: Django~=3.2
Copy link
Member

Choose a reason for hiding this comment

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

Question: shouldn't Django 3.0 and 3.1 be listed here as they are still listed in envlist?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

3.0 and 3.1 are no longer supported, so doing some tidyup there

Copy link
Member

Choose a reason for hiding this comment

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

Gotcha! That makes sense.

wagtail2.13: wagtail>=2.13,<2.14
wagtail2.14: wagtail>=2.14,<2.15
wagtail2.15: wagtail>=2.15rc1,<2.16
wagtail2.11: wagtail~=2.11
Copy link
Member

Choose a reason for hiding this comment

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

Praise: didn't know about the tilde equals ~= in pip and looked it up, it has the same result as >=2.11,<2.12 but much shorter. Nicely done! 👍 😄

tox.ini Outdated
@@ -2,7 +2,7 @@
skipsdist = True
usedevelop = True

envlist = python{3.7,3.8,3.9}-django{2.2,3.0,3.1,3.2,main}-wagtail{2.11,2.12,2.13,2.14,2.15,main}-{sqlite,postgres}
envlist = python{3.7,3.8,3.9}-django{2.2,3.0,3.1,3.2,main}-wagtail{2.11,2.12,2.13,2.14,2.15,2.16,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.

Issue (non-blocking): this envlist is very large and contains some invalid combinations like python3.8-django2.2-wagtailmain-postgres. These can't be tested because the Wagtail/Python/Django versions are not compatible.

Suggestion: we should clean this up (in a follow-up PR?) to remove invalid combinations. I've done something similar in the past for wagtail-live by splitting the envlist over multiple lines. See https://github.com/wagtail/wagtail-live/blob/main/tox.ini#L4

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

great suggestion. was thinking the same last night.
we're doing that in wagtailmedia - https://github.com/torchbox/wagtailmedia/blob/main/tox.ini#L5-L8

will get on it. may move the version definition in own include as I did in torchbox/wagtailmedia@0317d44 - should be cleaner than explicitly installing the testing requirements in tox

Copy link
Member

Choose a reason for hiding this comment

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

Thanks! Happy to re-review if needed 🙂

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated in 2a35212 + 170f17a

@zerolab zerolab force-pushed the chore/wagtail-216-and-deps branch from 659b8fc to 170f17a Compare January 24, 2022 16:42
@zerolab zerolab force-pushed the chore/wagtail-216-and-deps branch from 170f17a to 9f36f7e Compare January 25, 2022 11:45
@zerolab zerolab requested a review from Stormheg January 25, 2022 11:51
Copy link
Member

@Stormheg Stormheg left a comment

Choose a reason for hiding this comment

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

Thanks again @zerolab

Some small changes to be made to tox.ini and setup.py. Everything else looks fabulous!

tox.ini Outdated
py{3.7,3.8,3.9}-django{2.2}-wagtail{2.11,2.12,2.13}-{sqlite,postgres}
py{3.7,3.8,3.9}-django{3.2}-wagtail{2.14,2.15,2.16}-{sqlite,postgres}
py{3.7,3.8,3.9}-django{4.0}-wagtail2.16-{sqlite,postgres}
py{310}-dj{3.2,main}-wagtail{2.15,2.16,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.

Adding the dots to the i, so to speak 😉

Suggested change
py{310}-dj{3.2,main}-wagtail{2.15,2.16,main}-{sqlite,postgres}
py{3.10}-dj{3.2,main}-wagtail{2.15,2.16,main}-{sqlite,postgres}

tox.ini Outdated
@@ -2,7 +2,11 @@
skipsdist = True
usedevelop = True

envlist = python{3.7,3.8,3.9}-django{2.2,3.0,3.1,3.2,main}-wagtail{2.11,2.12,2.13,2.14,2.15,main}-{sqlite,postgres}
envlist =
py{3.7,3.8,3.9}-django{2.2}-wagtail{2.11,2.12,2.13}-{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: the basepython section should be updated to match. Tox doesn't know what py3.7 means, since you've changed it from python3.7

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I should not do this type of changes while travelling on a bus :)
good spot. updated to use python as previously, and dotted the 3.10 as well as added the definition in the basepython section

@@ -41,9 +44,9 @@
"Framework :: Wagtail",
Copy link
Member

@Stormheg Stormheg Jan 25, 2022

Choose a reason for hiding this comment

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

chore: did not note this in my previous review: but since we don't support Django 3.0 and 3.1 anymore, those classifiers should be removed from this section.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@zerolab zerolab requested a review from Stormheg January 25, 2022 12:20
Copy link
Member

@Stormheg Stormheg left a comment

Choose a reason for hiding this comment

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

TY ❤️

@zerolab zerolab force-pushed the chore/wagtail-216-and-deps branch from b7a63b3 to 5cc1748 Compare January 26, 2022 14:18
@zerolab zerolab merged commit 58c1e0b into wagtail:main Jan 26, 2022
@zerolab zerolab deleted the chore/wagtail-216-and-deps branch January 26, 2022 14:45
zerolab added a commit that referenced this pull request Jan 26, 2022
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