From 43bead88b5d88b7b7da582db29d8128164a22b82 Mon Sep 17 00:00:00 2001 From: johnthagen Date: Sat, 14 Jun 2025 15:14:42 -0400 Subject: [PATCH] Drop support for end-of-life Python 3.7 and 3.8 --- .github/workflows/build.yml | 9 +++------ .pre-commit-config.yaml | 2 +- docs/changelog.rst | 1 + pyproject.toml | 2 +- setup.py | 4 +--- tox.ini | 4 +--- 6 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f7d6dcfb..f403144c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,11 +9,11 @@ on: jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: python-version: - ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -25,10 +25,7 @@ jobs: python -m pip install --upgrade pip python -m pip install -r requirements/tests.txt python -m pip install -r requirements.txt - # TODO: Remove this conditional when Python 3.7 is dropped and Flake8 executes on - # all Python versions in matrix. - - if: matrix.python-version == '3.8' - name: Linting + - name: Linting run: flake8 # Environments are selected using tox-gh-actions configuration in tox.ini. - name: Test with tox diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fb665731..4826173e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -45,7 +45,7 @@ repos: rev: "v3.20.0" hooks: - id: pyupgrade - args: ["--py37-plus", "--keep-mock"] + args: ["--py39-plus", "--keep-mock"] - repo: https://github.com/hhatto/autopep8 rev: "v2.3.2" hooks: diff --git a/docs/changelog.rst b/docs/changelog.rst index 5e38a25d..8a3ebcb8 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -6,6 +6,7 @@ Unreleased * Use environment variable for PostgreSQL password to prevent password leakage in logs/emails * This repository has been transferred out of Jazzband due to logistical concerns. +* Drop support for end-of-life Python 3.7 and 3.8. 4.3.0 (2025-05-09) ---------- diff --git a/pyproject.toml b/pyproject.toml index c7bbe844..06d746d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.black] -target-version = ['py37'] +target-version = ['py39'] extend-exclude = 'migrations' [tool.isort] diff --git a/setup.py b/setup.py index 4535007c..e341b0ab 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ def get_test_requirements(): author_email="archiethemonger@gmail.com", long_description=(root_dir / "README.rst").read_text(encoding="utf-8"), long_description_content_type="text/x-rst", - python_requires=">=3.7", + python_requires=">=3.9", install_requires=get_requirements(), tests_require=get_test_requirements(), include_package_data=True, @@ -61,8 +61,6 @@ def get_test_requirements(): "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", diff --git a/tox.ini b/tox.ini index 764ac70d..f330fa59 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{37,38,39,310,311,312,313}-django{32,42,50,51,52,master},lint,docs,functional +envlist = py{39,310,311,312,313}-django{32,42,50,51,52,master},lint,docs,functional [testenv] passenv = * @@ -18,8 +18,6 @@ commands = {posargs:coverage run runtests.py} # Configure which test environments are run for each Github Actions Python version. [gh-actions] python = - 3.7: py37-django{32},functional - 3.8: py38-django{32,42},functional 3.9: py39-django{32,42},functional 3.10: py310-django{32,42,50,51,52},functional 3.11: py311-django{42,50,51,52},functional