]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
requirements: Drop Django 2.2 support
authorStephen Finucane <stephen@that.guru>
Fri, 6 May 2022 14:38:13 +0000 (15:38 +0100)
committerStephen Finucane <stephen@that.guru>
Fri, 6 May 2022 14:41:12 +0000 (15:41 +0100)
Signed-off-by: Stephen Finucane <stephen@that.guru>
patchwork/tests/api/test_event.py
patchwork/tests/api/test_patch.py
releasenotes/notes/remove-django-2-2-support-21a6894ab0b81741.yaml [new file with mode: 0644]
tox.ini

index 832cf0ba7741cf96982a654bc29cd6a2956682a6..e5b5e92520b7ecdee4acd6d251db4385a76bb3ce 100644 (file)
@@ -5,7 +5,6 @@
 
 import unittest
 
-import django
 from django.conf import settings
 from django.urls import reverse
 
@@ -194,10 +193,7 @@ class TestEventAPI(APITestCase):
         for _ in range(3):
             self._create_events()
 
-        # TODO(stephenfin): Remove when we drop support for Django < 3.2
-        num_queries = 28 if django.VERSION < (3, 2) else 27
-
-        with self.assertNumQueries(num_queries):
+        with self.assertNumQueries(27):
             self.client.get(self.api_url())
 
     def test_order_by_date_default(self):
index 36c3e5f92a1fb6c7fd5b1ac04db60558fae5acbc..2fda7bb19c383523887d7f2a65fbde4b4bd81645 100644 (file)
@@ -7,7 +7,6 @@ import email.parser
 from email.utils import make_msgid
 import unittest
 
-import django
 from django.conf import settings
 from django.urls import NoReverseMatch
 from django.urls import reverse
@@ -229,10 +228,7 @@ class TestPatchAPI(utils.APITestCase):
         series = create_series()
         create_patches(5, series=series)
 
-        # TODO(stephenfin): Remove when we drop support for Django < 3.2
-        num_queries = 7 if django.VERSION < (3, 2) else 5
-
-        with self.assertNumQueries(num_queries):
+        with self.assertNumQueries(5):
             self.client.get(self.api_url())
 
     @utils.store_samples('patch-detail')
diff --git a/releasenotes/notes/remove-django-2-2-support-21a6894ab0b81741.yaml b/releasenotes/notes/remove-django-2-2-support-21a6894ab0b81741.yaml
new file mode 100644 (file)
index 0000000..09e27a0
--- /dev/null
@@ -0,0 +1,5 @@
+---
+upgrade:
+  - |
+    Django 2.2 is no longer supported. Is is no longer supported upstream and
+    most distributions provide a newer version.
diff --git a/tox.ini b/tox.ini
index fe42ab4d7606812a9321ebf71509d2d32b0bf111..0033c4dc810c95fb2165cd4bf68371e2d197d50d 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
 [tox]
 minversion = 3.2
-envlist = pep8,docs,py{37,38,39}-django{22,32},py{38,39,310}-django{40}
+envlist = pep8,docs,py{37,38,39}-django32,py{38,39,310}-django{40}
 skipsdist = true
 ignore_basepython_conflict = true
 
@@ -8,9 +8,6 @@ ignore_basepython_conflict = true
 basepython = python3
 deps =
     -r{toxinidir}/requirements-test.txt
-    django22: django~=2.2.0
-    django22: djangorestframework~=3.13.0
-    django22: django-filter~=21.1.0
     django32: django~=3.2.0
     django32: djangorestframework~=3.13.0
     django32: django-filter~=21.1.0
@@ -21,8 +18,7 @@ setenv =
     DJANGO_SETTINGS_MODULE = patchwork.settings.dev
     PYTHONDONTWRITEBYTECODE = 1
     PYTHONDEVMODE = 1
-    py36: PYTHONWARNINGS = once,ignore::ImportWarning:backports
-    py{37,38,39,310}: PYTHONWARNINGS = once
+    PYTHONWARNINGS = once
 passenv =
     http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
     DATABASE_TYPE DATABASE_USER DATABASE_PASSWORD DATABASE_HOST