Skip to content

Commit

Permalink
Remove EOL Python, Django and DRF versions (#754)
Browse files Browse the repository at this point in the history
* Replace deprecated pkg_resources method
  • Loading branch information
KOliver94 authored Oct 30, 2023
1 parent faf92e8 commit 19cf38e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 22 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions rest_framework_simplejwt/__init__.py
Original file line number Diff line number Diff line change
@@ -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
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
author_email="[email protected]",
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,
Expand All @@ -69,15 +69,13 @@
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"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",
Expand Down
11 changes: 2 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 19cf38e

Please sign in to comment.