From c9d2f890929397626f9c75d95f911858b870b0c3 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 23 Oct 2023 14:56:58 +0200 Subject: [PATCH 1/2] add allauth middleware to test settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The django-allauth package since 0.56¹ requires setting up its middleware in settings. The same issue² was fixed in dj-rest-auth 5.0.2. [1] https://github.com/pennersr/django-allauth/blob/main/ChangeLog.rst#backwards-incompatible-changes-1 [2] https://github.com/iMerica/dj-rest-auth/pull/561 --- requirements/optionals.txt | 4 ++-- tests/conftest.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/requirements/optionals.txt b/requirements/optionals.txt index 7ce28e34..d64df878 100644 --- a/requirements/optionals.txt +++ b/requirements/optionals.txt @@ -1,6 +1,6 @@ -django-allauth<0.55.0 # breaking change breaking dj-rest-auth +django-allauth>=0.56.0 drf-jwt>=0.13.0 -dj-rest-auth>=1.0.0 +dj-rest-auth>=5.0.2 djangorestframework-simplejwt>=4.4.0 django-polymorphic>=2.1 django-rest-polymorphic>=0.1.8 diff --git a/tests/conftest.py b/tests/conftest.py index c46e4892..c4d53a89 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -70,6 +70,7 @@ def pytest_configure(config): 'django.middleware.common.CommonMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.locale.LocaleMiddleware', + 'allauth.account.middleware.AccountMiddleware', ), INSTALLED_APPS=( 'django.contrib.auth', From 43892c3d0a70e8081a7bc11b0fa86542ea65a563 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 21 Nov 2023 00:55:23 +0100 Subject: [PATCH 2/2] drop py36 from tox environments Python 3.6 is not supported by django-allauth>=0.54.0, which is now the below the minimum required version. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 46153116..287c6560 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = py39-lint,py39-docs, - {py36,py37,py38}-django{2.2}-drf{3.10,3.11}, + {py37,py38}-django{2.2}-drf{3.10,3.11}, {py37,py38,py39}-django{3.2}-drf{3.11,3.12}, {py38,py39,py310}-django{4.0,4.1}-drf{3.13,3.14}, {py311}-django{4.1, 4.2}-drf{3.14},