Skip to content

Commit 19cf38e

Browse files
authored
Remove EOL Python, Django and DRF versions (#754)
* Replace deprecated pkg_resources method
1 parent faf92e8 commit 19cf38e

File tree

6 files changed

+13
-22
lines changed

6 files changed

+13
-22
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
fail-fast: false
1616
max-parallel: 5
1717
matrix:
18-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
19-
django-version: ['3.2', '4.0', '4.1', '4.2']
20-
drf-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
18+
python-version: [ '3.8', '3.9', '3.10', '3.11']
19+
django-version: ['3.2', '4.1', '4.2']
20+
drf-version: ['3.12', '3.13', '3.14']
2121
exclude:
2222
# DRF 3.13 is not compatible with Django 4.2.
2323
- django-version: '4.2'

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ repos:
5151
rev: 'v3.7.0'
5252
hooks:
5353
- id: pyupgrade
54-
args: ['--py37-plus', '--keep-mock']
54+
args: ['--py38-plus', '--keep-mock']
5555

5656
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
5757
rev: v1.0.1

docs/getting_started.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Requirements
77
------------
88

99
* Python (3.8, 3.9, 3.10, 3.11)
10-
* Django (3.2, 4.0, 4.1, 4.2)
11-
* Django REST Framework (3.10, 3.11, 3.12, 3.13, 3.14)
10+
* Django (3.2, 4.1, 4.2)
11+
* Django REST Framework (3.12, 3.13, 3.14)
1212

1313
These are the officially supported python and package versions. Other versions
1414
will probably work. You're free to modify the tox config and see what is

rest_framework_simplejwt/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from pkg_resources import DistributionNotFound, get_distribution
1+
from importlib.metadata import PackageNotFoundError, version
22

33
try:
4-
__version__ = get_distribution("djangorestframework_simplejwt").version
5-
except DistributionNotFound:
4+
__version__ = version("djangorestframework_simplejwt")
5+
except PackageNotFoundError:
66
# package is not installed
77
__version__ = None

setup.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@
5656
author_email="[email protected]",
5757
install_requires=[
5858
"django>=3.2",
59-
"djangorestframework>=3.10",
59+
"djangorestframework>=3.12",
6060
"pyjwt>=1.7.1,<3",
6161
],
62-
python_requires=">=3.7",
62+
python_requires=">=3.8",
6363
extras_require=extras_require,
6464
packages=find_packages(exclude=["tests", "tests.*", "licenses", "requirements"]),
6565
include_package_data=True,
@@ -69,15 +69,13 @@
6969
"Environment :: Web Environment",
7070
"Framework :: Django",
7171
"Framework :: Django :: 3.2",
72-
"Framework :: Django :: 4.0",
7372
"Framework :: Django :: 4.1",
7473
"Framework :: Django :: 4.2",
7574
"Intended Audience :: Developers",
7675
"License :: OSI Approved :: MIT License",
7776
"Operating System :: OS Independent",
7877
"Programming Language :: Python",
7978
"Programming Language :: Python :: 3",
80-
"Programming Language :: Python :: 3.7",
8179
"Programming Language :: Python :: 3.8",
8280
"Programming Language :: Python :: 3.9",
8381
"Programming Language :: Python :: 3.10",

tox.ini

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
[tox]
22
envlist=
3-
py{37,38,39,310}-dj{32}-drf{311,312,313}-pyjwt{171,2}-tests
4-
py{38,39,310}-dj{40,41,42}-drf313-pyjwt{171,2}-tests
3+
py{38,39,310}-dj{32}-drf{312,313}-pyjwt{171,2}-tests
4+
py{38,39,310}-dj{41,42}-drf313-pyjwt{171,2}-tests
55
py311-dj{41,42}-drf{313,314}-pyjwt{171,2}-tests
66
docs
77

88
[gh-actions]
99
python=
10-
3.7: py37
1110
3.8: py38, docs
1211
3.9: py39
1312
3.10: py310
@@ -16,12 +15,9 @@ python=
1615
[gh-actions:env]
1716
DJANGO=
1817
3.2: dj32
19-
4.0: dj40
2018
4.1: dj41
2119
4.2: dj42
2220
DRF=
23-
3.10: drf310
24-
3.11: drf311
2521
3.12: drf312
2622
3.13: drf313
2723
3.14: drf314
@@ -35,11 +31,8 @@ setenv=
3531
PYTHONDONTWRITEBYTECODE=1
3632
deps=
3733
dj32: Django>=3.2,<3.3
38-
dj40: Django>=4.0,<4.1
3934
dj41: Django>=4.1,<4.2
4035
dj42: Django>=4.2,<4.3
41-
drf310: djangorestframework>=3.10,<3.11
42-
drf311: djangorestframework>=3.11,<3.12
4336
drf312: djangorestframework>=3.12,<3.13
4437
drf313: djangorestframework>=3.13,<3.14
4538
drf314: djangorestframework>=3.14,<3.15

0 commit comments

Comments
 (0)