Skip to content

Commit f2490ba

Browse files
sevdogauvipy
authored andcommitted
Drop python 2.x and django before 2.2
1 parent 847f964 commit f2490ba

File tree

6 files changed

+13
-23
lines changed

6 files changed

+13
-23
lines changed

push_notifications/api/rest_framework.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def has_object_permission(self, request, view, obj):
132132

133133

134134
# Mixins
135-
class DeviceViewSetMixin(object):
135+
class DeviceViewSetMixin:
136136
lookup_field = "registration_id"
137137

138138
def create(self, request, *args, **kwargs):
@@ -168,7 +168,7 @@ def perform_update(self, serializer):
168168
return super(DeviceViewSetMixin, self).perform_update(serializer)
169169

170170

171-
class AuthorizedMixin(object):
171+
class AuthorizedMixin:
172172
permission_classes = (permissions.IsAuthenticated, IsOwner)
173173

174174
def get_queryset(self):

push_notifications/compat.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
# flake8:noqa
2-
3-
try:
4-
from urllib.error import HTTPError
5-
from urllib.parse import urlencode
6-
from urllib.request import Request, urlopen
7-
except ImportError:
8-
# Python 2 support
9-
from urllib2 import HTTPError, Request, urlopen
10-
from urllib import urlencode
2+
from urllib.error import HTTPError
3+
from urllib.parse import urlencode
4+
from urllib.request import Request, urlopen

push_notifications/conf/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from django.core.exceptions import ImproperlyConfigured
22

33

4-
class BaseConfig(object):
4+
class BaseConfig:
55
def has_auth_token_creds(self, application_id=None):
66
raise NotImplementedError
77

push_notifications/conf/legacy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
]
1010

1111

12-
class empty(object):
12+
class empty:
1313
pass
1414

1515

setup.cfg

+3-5
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,17 @@ classifiers =
1010
Development Status :: 5 - Production/Stable
1111
Environment :: Web Environment
1212
Framework :: Django
13-
Framework :: Django :: 1.11
14-
Framework :: Django :: 2.0
15-
Framework :: Django :: 2.1
1613
Framework :: Django :: 2.2
1714
Framework :: Django :: 3.0
15+
Framework :: Django :: 3.1
1816
Intended Audience :: Developers
1917
License :: OSI Approved :: MIT License
2018
Programming Language :: Python
2119
Programming Language :: Python :: 3
22-
Programming Language :: Python :: 3.5
2320
Programming Language :: Python :: 3.6
2421
Programming Language :: Python :: 3.7
2522
Programming Language :: Python :: 3.8
23+
Programming Language :: Python :: 3.9
2624
Topic :: Internet :: WWW/HTTP
2725
Topic :: System :: Networking
2826

@@ -32,7 +30,7 @@ install_requires =
3230
apns2>=0.3.0,<0.6.0;python_version<"3.5"
3331
apns2>=0.3.0;python_version>="3.5"
3432
pywebpush>=1.3.0
35-
Django>=1.11
33+
Django>=2.2
3634

3735
[options.packages.find]
3836
exclude = tests

tox.ini

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
envlist =
3-
py{35,36,37,38,39}-django{111,20,21,22}-apns{030,060}
4-
py{36,37,38,39}-django30-apns{030,060}
3+
py{36,37,38,39}-django{22}-apns{030,060}
4+
py{36,37,38,39}-django{30,31}-apns{030,060}
55
py37-flake8
66

77
[testenv]
@@ -18,11 +18,9 @@ deps =
1818
mock
1919
pywebpush
2020
djangorestframework==3.11.0
21-
django111: Django>=1.11,<2.0
22-
django20: Django>=2.0,<2.1
23-
django21: Django>=2.1,<2.2
2421
django22: Django>=2.2,<3.0
2522
django30: Django>=3.0,<3.1
23+
django31: Django>=3.1,<3.2
2624
apns030: apns2>=0.3.0,<0.6.0
2725
apns060: apns2>=0.6.0
2826

0 commit comments

Comments
 (0)