Skip to content

Commit 7b50a8c

Browse files
committed
requirements: Drop Django 2.2 support
Signed-off-by: Stephen Finucane <[email protected]>
1 parent ac18b11 commit 7b50a8c

File tree

4 files changed

+9
-16
lines changed

4 files changed

+9
-16
lines changed

patchwork/tests/api/test_event.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import unittest
77

8-
import django
98
from django.conf import settings
109
from django.urls import reverse
1110

@@ -194,10 +193,7 @@ def test_list_bug_335(self):
194193
for _ in range(3):
195194
self._create_events()
196195

197-
# TODO(stephenfin): Remove when we drop support for Django < 3.2
198-
num_queries = 28 if django.VERSION < (3, 2) else 27
199-
200-
with self.assertNumQueries(num_queries):
196+
with self.assertNumQueries(27):
201197
self.client.get(self.api_url())
202198

203199
def test_order_by_date_default(self):

patchwork/tests/api/test_patch.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from email.utils import make_msgid
88
import unittest
99

10-
import django
1110
from django.conf import settings
1211
from django.urls import NoReverseMatch
1312
from django.urls import reverse
@@ -229,10 +228,7 @@ def test_list_bug_335(self):
229228
series = create_series()
230229
create_patches(5, series=series)
231230

232-
# TODO(stephenfin): Remove when we drop support for Django < 3.2
233-
num_queries = 7 if django.VERSION < (3, 2) else 5
234-
235-
with self.assertNumQueries(num_queries):
231+
with self.assertNumQueries(5):
236232
self.client.get(self.api_url())
237233

238234
@utils.store_samples('patch-detail')
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
upgrade:
3+
- |
4+
Django 2.2 is no longer supported. Is is no longer supported upstream and
5+
most distributions provide a newer version.

tox.ini

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
[tox]
22
minversion = 3.2
3-
envlist = pep8,docs,py{37,38,39}-django{22,32},py{38,39,310}-django{40}
3+
envlist = pep8,docs,py{37,38,39}-django32,py{38,39,310}-django{40}
44
skipsdist = true
55
ignore_basepython_conflict = true
66

77
[testenv]
88
basepython = python3
99
deps =
1010
-r{toxinidir}/requirements-test.txt
11-
django22: django~=2.2.0
12-
django22: djangorestframework~=3.13.0
13-
django22: django-filter~=21.1.0
1411
django32: django~=3.2.0
1512
django32: djangorestframework~=3.13.0
1613
django32: django-filter~=21.1.0
@@ -21,8 +18,7 @@ setenv =
2118
DJANGO_SETTINGS_MODULE = patchwork.settings.dev
2219
PYTHONDONTWRITEBYTECODE = 1
2320
PYTHONDEVMODE = 1
24-
py36: PYTHONWARNINGS = once,ignore::ImportWarning:backports
25-
py{37,38,39,310}: PYTHONWARNINGS = once
21+
PYTHONWARNINGS = once
2622
passenv =
2723
http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
2824
DATABASE_TYPE DATABASE_USER DATABASE_PASSWORD DATABASE_HOST

0 commit comments

Comments
 (0)