Skip to content

Commit 0fc5e3e

Browse files
committed
remove support for python 3.7
1 parent ded2159 commit 0fc5e3e

File tree

11 files changed

+5
-52
lines changed

11 files changed

+5
-52
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ jobs:
1414
strategy:
1515
matrix:
1616
python-version:
17-
- '3.7'
1817
- '3.8'
1918
- '3.9'
2019
- '3.10'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ There is a live example API for testing purposes, [available here][sandbox].
5454

5555
# Requirements
5656

57-
* Python 3.7+
57+
* Python 3.8+
5858
* Django 4.2, 4.1, 4.0, 3.2, 3.1, 3.0
5959

6060
We **highly recommend** and only officially support the latest patch release of

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from setuptools import find_packages, setup
99

1010
CURRENT_PYTHON = sys.version_info[:2]
11-
REQUIRED_PYTHON = (3, 7)
11+
REQUIRED_PYTHON = (3, 8)
1212

1313
# This check and everything above must remain compatible with Python 2.7.
1414
if CURRENT_PYTHON < REQUIRED_PYTHON:
@@ -101,7 +101,6 @@ def get_version(package):
101101
'Operating System :: OS Independent',
102102
'Programming Language :: Python',
103103
'Programming Language :: Python :: 3',
104-
'Programming Language :: Python :: 3.7',
105104
'Programming Language :: Python :: 3.8',
106105
'Programming Language :: Python :: 3.9',
107106
'Programming Language :: Python :: 3.10',

tests/test_fields.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -640,10 +640,6 @@ def test_parent_binding(self):
640640

641641

642642
class TestTyping(TestCase):
643-
@pytest.mark.skipif(
644-
sys.version_info < (3, 7),
645-
reason="subscriptable classes requires Python 3.7 or higher",
646-
)
647643
def test_field_is_subscriptable(self):
648644
assert serializers.Field is serializers.Field["foo"]
649645

tests/test_generics.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import sys
2-
31
import pytest
42
from django.db import models
53
from django.http import Http404
@@ -703,23 +701,11 @@ def list(self, request):
703701

704702

705703
class TestTyping(TestCase):
706-
@pytest.mark.skipif(
707-
sys.version_info < (3, 7),
708-
reason="subscriptable classes requires Python 3.7 or higher",
709-
)
710704
def test_genericview_is_subscriptable(self):
711705
assert generics.GenericAPIView is generics.GenericAPIView["foo"]
712706

713-
@pytest.mark.skipif(
714-
sys.version_info < (3, 7),
715-
reason="subscriptable classes requires Python 3.7 or higher",
716-
)
717707
def test_listview_is_subscriptable(self):
718708
assert generics.ListAPIView is generics.ListAPIView["foo"]
719709

720-
@pytest.mark.skipif(
721-
sys.version_info < (3, 7),
722-
reason="subscriptable classes requires Python 3.7 or higher",
723-
)
724710
def test_instanceview_is_subscriptable(self):
725711
assert generics.RetrieveAPIView is generics.RetrieveAPIView["foo"]

tests/test_model_serializer.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import datetime
99
import decimal
1010
import json # noqa
11-
import sys
1211
import tempfile
1312

1413
import django
@@ -398,10 +397,6 @@ class Meta:
398397
fields = '__all__'
399398

400399
expected = dedent("""
401-
TestSerializer():
402-
id = IntegerField(label='ID', read_only=True)
403-
duration_field = DurationField(max_value=datetime.timedelta(3), min_value=datetime.timedelta(1))
404-
""") if sys.version_info < (3, 7) else dedent("""
405400
TestSerializer():
406401
id = IntegerField(label='ID', read_only=True)
407402
duration_field = DurationField(max_value=datetime.timedelta(days=3), min_value=datetime.timedelta(days=1))

tests/test_request.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"""
44
import copy
55
import os.path
6-
import sys
76
import tempfile
87

98
import pytest
@@ -356,9 +355,5 @@ def test_deepcopy_works(self):
356355

357356

358357
class TestTyping(TestCase):
359-
@pytest.mark.skipif(
360-
sys.version_info < (3, 7),
361-
reason="subscriptable classes requires Python 3.7 or higher",
362-
)
363358
def test_request_is_subscriptable(self):
364359
assert Request is Request["foo"]

tests/test_response.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import sys
2-
3-
import pytest
41
from django.test import TestCase, override_settings
52
from django.urls import include, path, re_path
63

@@ -289,9 +286,5 @@ def test_form_has_label_and_help_text(self):
289286

290287

291288
class TestTyping(TestCase):
292-
@pytest.mark.skipif(
293-
sys.version_info < (3, 7),
294-
reason="subscriptable classes requires Python 3.7 or higher",
295-
)
296289
def test_response_is_subscriptable(self):
297290
assert Response is Response["foo"]

tests/test_serializer.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,6 @@ class ExampleSerializer(serializers.Serializer):
206206
exceptions.ErrorDetail(string='Raised error', code='invalid')
207207
]}
208208

209-
@pytest.mark.skipif(
210-
sys.version_info < (3, 7),
211-
reason="subscriptable classes requires Python 3.7 or higher",
212-
)
213209
def test_serializer_is_subscriptable(self):
214210
assert serializers.Serializer is serializers.Serializer["foo"]
215211

tests/test_serializer_lists.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import sys
2-
31
import pytest
42
from django.http import QueryDict
53
from django.utils.datastructures import MultiValueDict
@@ -60,10 +58,6 @@ def test_validate_html_input(self):
6058
assert serializer.is_valid()
6159
assert serializer.validated_data == expected_output
6260

63-
@pytest.mark.skipif(
64-
sys.version_info < (3, 7),
65-
reason="subscriptable classes requires Python 3.7 or higher",
66-
)
6761
def test_list_serializer_is_subscriptable(self):
6862
assert serializers.ListSerializer is serializers.ListSerializer["foo"]
6963

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[tox]
22
envlist =
3-
{py36,py37,py38,py39}-django30
4-
{py36,py37,py38,py39}-django31
5-
{py36,py37,py38,py39,py310}-django32
3+
{py38,py39}-django30
4+
{py38,py39}-django31
5+
{py38,py39,py310}-django32
66
{py38,py39,py310}-{django40,django41,django42,djangomain}
77
{py311}-{django41,django42,djangomain}
88
base

0 commit comments

Comments
 (0)