wagtail / django-modelcluster

Django extension to allow working with 'clusters' of models as a single unit, independently of the database
BSD 3-Clause "New" or "Revised" License
485 stars 66 forks source link

Add support for Django 4.1 #167

Closed jsma closed 1 year ago

jsma commented 2 years ago

The only actual code change required so far was to remove deprecated uses of django.utils.timezone.utc (to be removed in Django 5), and replace with datetime.timezone.utc from the standard library (available since Python 3.7).

The rest of the changes are with the test configurations. I've got the tests mostly passing* but have some questions:

I've done my best to find the minimum versions that are mutually compatible. E.g. psycopg2>=2.9.2 was the first version to support Python 3.10, PostgreSQL v11 is the oldest version still supported by Django 4.1, etc.

* I do see a test failure when testing against django.git@main, but have not had a chance to investigate yet.

Also, I had to update the Github actions versions to address deprecations.

FYI, django-taggit doesn't "officially" support Django 4.1 but it appears this is mostly cosmetic and does not require a new release.

allcaps commented 2 years ago

@gasman With https://github.com/wagtail/django-modelcluster/commit/8666f16eaf23ca98afc160b0a4729864411c0563 in place, can we close this PR?

laymonage commented 1 year ago

@allcaps The django.utils.timezone.utc -> datetime.timezone.utc change is still necessary in order to support Django 5.0. Either this PR is rebased, or a new one is opened to add that change. See #169.

gasman commented 1 year ago

Thanks @jsma! Merged in a560d9cdb7f3ec408f0845ae42ec4c23c45fa47c, with the Github Actions config for older releases trimmed down a bit further.