From cafb014adafa67fa8b485bc84c38913575fa9f02 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Mon, 10 Jul 2023 16:14:43 +0100 Subject: [PATCH] Drop Python 3.7 support (#510) --- .github/workflows/main.yml | 1 - .pre-commit-config.yaml | 4 +-- docs/changelog.rst | 2 ++ docs/index.rst | 4 +-- pyproject.toml | 2 +- requirements/compile.py | 12 -------- requirements/py37-django32.txt | 55 ---------------------------------- tox.ini | 1 - 8 files changed, 7 insertions(+), 74 deletions(-) delete mode 100644 requirements/py37-django32.txt diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ca0dafb9..333f24f7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,6 @@ jobs: - ubuntu-22.04 - windows-2022 python-version: - - '3.7' - '3.8' - '3.9' - '3.10' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b96c2610..42befdb6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,7 +40,7 @@ repos: rev: v3.8.0 hooks: - id: pyupgrade - args: [--py37-plus] + args: [--py38-plus] - repo: https://github.com/adamchainz/django-upgrade rev: 1.14.0 hooks: @@ -61,7 +61,7 @@ repos: hooks: - id: reorder-python-imports args: - - --py37-plus + - --py38-plus - --application-directories - .:example:src - --add-import diff --git a/docs/changelog.rst b/docs/changelog.rst index fec3367b..65e0ef39 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,6 +2,8 @@ Changelog ========= +* Drop Python 3.7 support. + 6.5.0 (2023-06-16) ------------------ diff --git a/docs/index.rst b/docs/index.rst index 86120475..1c52bbea 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -95,9 +95,9 @@ Compatibility ------------- WhiteNoise works with any WSGI-compatible application and is tested on Python -**3.7** – **3.12**, on both Linux and Windows. +**3.8** – **3.12**, on both Linux and Windows. -Django WhiteNoiseMiddleware is tested with Django versions **3.2** --- **4.1** +Django WhiteNoiseMiddleware is tested with Django versions **3.2** --- **4.2** Endorsements diff --git a/pyproject.toml b/pyproject.toml index 385e64d0..70a608eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ requires = [ ] [tool.black] -target-version = ['py37'] +target-version = ['py38'] [tool.pytest.ini_options] addopts = """\ diff --git a/requirements/compile.py b/requirements/compile.py index 5e18de7b..02e07c1b 100755 --- a/requirements/compile.py +++ b/requirements/compile.py @@ -17,18 +17,6 @@ # "--generate-hashes", "--allow-unsafe", ] + sys.argv[1:] - subprocess.run( - [ - "python3.7", - *common_args, - "-P", - "Django>=3.2a1,<3.3", - "-o", - "py37-django32.txt", - ], - check=True, - capture_output=True, - ) subprocess.run( [ "python3.8", diff --git a/requirements/py37-django32.txt b/requirements/py37-django32.txt deleted file mode 100644 index 6f601b4b..00000000 --- a/requirements/py37-django32.txt +++ /dev/null @@ -1,55 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.7 -# by the following command: -# -# requirements/compile.py -# -asgiref==3.7.2 - # via django -brotli==1.0.9 - # via -r requirements.in -certifi==2023.5.7 - # via requests -charset-normalizer==3.1.0 - # via requests -coverage==7.2.7 - # via -r requirements.in -django==3.2.19 - # via -r requirements.in -exceptiongroup==1.1.1 - # via pytest -idna==3.4 - # via requests -importlib-metadata==6.6.0 - # via - # pluggy - # pytest - # pytest-randomly -iniconfig==2.0.0 - # via pytest -packaging==23.1 - # via pytest -pluggy==1.0.0 - # via pytest -pytest==7.3.2 - # via - # -r requirements.in - # pytest-randomly -pytest-randomly==3.12.0 - # via -r requirements.in -pytz==2023.3 - # via django -requests==2.31.0 - # via -r requirements.in -sqlparse==0.4.4 - # via django -tomli==2.0.1 - # via pytest -typing-extensions==4.6.3 - # via - # asgiref - # importlib-metadata -urllib3==2.0.3 - # via requests -zipp==3.15.0 - # via importlib-metadata diff --git a/tox.ini b/tox.ini index cea40d97..88dbd62d 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,6 @@ env_list = py310-django{42, 41, 40, 32} py39-django{42, 41, 40, 32} py38-django{42, 41, 40, 32} - py37-django{32} [testenv] package = wheel