diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b41516d59..7ce5e28aa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,9 +15,9 @@ jobs: fail-fast: false max-parallel: 5 matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] - django-version: ['3.2', '4.0', '4.1', '4.2'] - drf-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] + python-version: [ '3.8', '3.9', '3.10', '3.11'] + django-version: ['3.2', '4.1', '4.2'] + drf-version: ['3.12', '3.13', '3.14'] exclude: # DRF 3.13 is not compatible with Django 4.2. - django-version: '4.2' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2a2894302..864f1724a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,7 +51,7 @@ repos: rev: 'v3.7.0' hooks: - id: pyupgrade - args: ['--py37-plus', '--keep-mock'] + args: ['--py38-plus', '--keep-mock'] - repo: https://github.com/Lucas-C/pre-commit-hooks-markup rev: v1.0.1 diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 42e646187..f7db9b7f1 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -7,8 +7,8 @@ Requirements ------------ * Python (3.8, 3.9, 3.10, 3.11) -* Django (3.2, 4.0, 4.1, 4.2) -* Django REST Framework (3.10, 3.11, 3.12, 3.13, 3.14) +* Django (3.2, 4.1, 4.2) +* Django REST Framework (3.12, 3.13, 3.14) These are the officially supported python and package versions. Other versions will probably work. You're free to modify the tox config and see what is diff --git a/rest_framework_simplejwt/__init__.py b/rest_framework_simplejwt/__init__.py index 6929b410c..b001cf5d3 100644 --- a/rest_framework_simplejwt/__init__.py +++ b/rest_framework_simplejwt/__init__.py @@ -1,7 +1,7 @@ -from pkg_resources import DistributionNotFound, get_distribution +from importlib.metadata import PackageNotFoundError, version try: - __version__ = get_distribution("djangorestframework_simplejwt").version -except DistributionNotFound: + __version__ = version("djangorestframework_simplejwt") +except PackageNotFoundError: # package is not installed __version__ = None diff --git a/setup.py b/setup.py index 4fd09303f..60327eeef 100755 --- a/setup.py +++ b/setup.py @@ -56,10 +56,10 @@ author_email="davesque@gmail.com", install_requires=[ "django>=3.2", - "djangorestframework>=3.10", + "djangorestframework>=3.12", "pyjwt>=1.7.1,<3", ], - python_requires=">=3.7", + python_requires=">=3.8", extras_require=extras_require, packages=find_packages(exclude=["tests", "tests.*", "licenses", "requirements"]), include_package_data=True, @@ -69,7 +69,6 @@ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 3.2", - "Framework :: Django :: 4.0", "Framework :: Django :: 4.1", "Framework :: Django :: 4.2", "Intended Audience :: Developers", @@ -77,7 +76,6 @@ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", diff --git a/tox.ini b/tox.ini index 8fb68941b..e127b8b11 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,12 @@ [tox] envlist= - py{37,38,39,310}-dj{32}-drf{311,312,313}-pyjwt{171,2}-tests - py{38,39,310}-dj{40,41,42}-drf313-pyjwt{171,2}-tests + py{38,39,310}-dj{32}-drf{312,313}-pyjwt{171,2}-tests + py{38,39,310}-dj{41,42}-drf313-pyjwt{171,2}-tests py311-dj{41,42}-drf{313,314}-pyjwt{171,2}-tests docs [gh-actions] python= - 3.7: py37 3.8: py38, docs 3.9: py39 3.10: py310 @@ -16,12 +15,9 @@ python= [gh-actions:env] DJANGO= 3.2: dj32 - 4.0: dj40 4.1: dj41 4.2: dj42 DRF= - 3.10: drf310 - 3.11: drf311 3.12: drf312 3.13: drf313 3.14: drf314 @@ -35,11 +31,8 @@ setenv= PYTHONDONTWRITEBYTECODE=1 deps= dj32: Django>=3.2,<3.3 - dj40: Django>=4.0,<4.1 dj41: Django>=4.1,<4.2 dj42: Django>=4.2,<4.3 - drf310: djangorestframework>=3.10,<3.11 - drf311: djangorestframework>=3.11,<3.12 drf312: djangorestframework>=3.12,<3.13 drf313: djangorestframework>=3.13,<3.14 drf314: djangorestframework>=3.14,<3.15