From: Stephen Finucane Date: Fri, 6 May 2022 14:38:13 +0000 (+0100) Subject: requirements: Drop Django 2.2 support X-Git-Tag: v3.1.0~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b50a8cf66b117ffbf77c90bf13ddfba9edcd4dc;p=thirdparty%2Fpatchwork.git requirements: Drop Django 2.2 support Signed-off-by: Stephen Finucane --- diff --git a/patchwork/tests/api/test_event.py b/patchwork/tests/api/test_event.py index 832cf0ba..e5b5e925 100644 --- a/patchwork/tests/api/test_event.py +++ b/patchwork/tests/api/test_event.py @@ -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): diff --git a/patchwork/tests/api/test_patch.py b/patchwork/tests/api/test_patch.py index 36c3e5f9..2fda7bb1 100644 --- a/patchwork/tests/api/test_patch.py +++ b/patchwork/tests/api/test_patch.py @@ -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 index 00000000..09e27a08 --- /dev/null +++ b/releasenotes/notes/remove-django-2-2-support-21a6894ab0b81741.yaml @@ -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 fe42ab4d..0033c4dc 100644 --- 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