From b6b8bce07717b0b4bb7816b99c33ab9e6907059a Mon Sep 17 00:00:00 2001 From: Kevin Kirsche Date: Thu, 31 Oct 2024 21:20:17 -0400 Subject: [PATCH] Drop support for Python 3.8 (#1007) * Drop support for Python 3.8 * Add missed .pre-commit-config.yaml * Add changelog fragment --------- Co-authored-by: Kevin Kirsche --- .github/workflows/main.yml | 10 +++++----- .pre-commit-config.yaml | 4 ++-- CHANGELOG.rst | 1 + pyproject.toml | 3 +-- ruff.toml | 4 ++-- tox.ini | 12 +++++------- 6 files changed, 16 insertions(+), 18 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b884a687..00c7e356 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,13 +13,13 @@ jobs: name: "Python ${{ matrix.python-version }} on ${{ matrix.platform }}" runs-on: "${{ matrix.platform }}" env: - USING_COVERAGE: '3.8' + USING_COVERAGE: '3.9' strategy: fail-fast: false matrix: platform: ["ubuntu-latest", "windows-latest"] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.8", "pypy3.9"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9"] steps: - uses: "actions/checkout@v4" @@ -43,7 +43,7 @@ jobs: # parsing errors in older versions for modern code. - uses: "actions/setup-python@v5" with: - python-version: "3.8" + python-version: "3.9" - name: "Combine coverage" run: | @@ -70,7 +70,7 @@ jobs: - uses: "actions/setup-python@v5" with: - python-version: "3.8" + python-version: "3.9" - name: "Install pep517 and twine" run: "python -m pip install pep517 twine" @@ -97,7 +97,7 @@ jobs: - uses: "actions/setup-python@v5" with: - python-version: "3.8" + python-version: "3.9" - name: "Install in dev mode" run: "python -m pip install -e .[dev]" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e231d654..3bc7e9d8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,13 +3,13 @@ repos: rev: 24.10.0 hooks: - id: black - args: ["--target-version=py38"] + args: ["--target-version=py39"] - repo: https://github.com/asottile/blacken-docs rev: 1.19.0 hooks: - id: blacken-docs - args: ["--target-version=py38"] + args: ["--target-version=py39"] - repo: https://github.com/PyCQA/isort rev: 5.13.2 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 57f36be1..46275cf2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,6 +10,7 @@ This project adheres to `Semantic Versioning `__. Changed ~~~~~~~ +- Drop support for Python 3.8 (EOL) by @kkirsche in `#1007 `__ - Use ``Sequence`` for parameter types rather than ``List`` where applicable by @imnotjames in `#970 `__ - Remove algorithm requirement from JWT API, instead relying on JWS API for enforcement, by @luhn in `#975 `__ - Add JWK support to JWT encode by @luhn in `#979 `__ diff --git a/pyproject.toml b/pyproject.toml index 7462024f..b49b5f58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,6 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -37,7 +36,7 @@ keywords = [ "web", ] name = "PyJWT" -requires-python = ">=3.8" +requires-python = ">=3.9" [project.license] text = "MIT" diff --git a/ruff.toml b/ruff.toml index 255b6f8b..946d39bf 100644 --- a/ruff.toml +++ b/ruff.toml @@ -32,8 +32,8 @@ exclude = [ line-length = 88 indent-width = 4 -# Assume Python 3.8 -target-version = "py38" +# Assume Python 3.9 +target-version = "py39" [lint] # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. diff --git a/tox.ini b/tox.ini index 44717ffc..9433b1ff 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [flake8] -min_python_version = 3.8 +min_python_version = 3.9 ignore= E501, E203, W503, E704 [pytest] @@ -12,13 +12,11 @@ filterwarnings = [gh-actions] python = - 3.8: py38, typing 3.9: py39 3.10: py310 3.11: py311, docs 3.12: py312 3.13: py313 - pypy3.8: pypy3 pypy3.9: pypy3 @@ -26,7 +24,7 @@ python = envlist = lint typing - py{38,39,310,311,312,313,py3}-{crypto,nocrypto} + py{39,310,311,312,313,py3}-{crypto,nocrypto} docs pypi-description coverage-report @@ -57,14 +55,14 @@ commands = [testenv:lint] -basepython = python3.8 +basepython = python3.9 extras = dev passenv = HOMEPATH # needed on Windows commands = pre-commit run --all-files [testenv:pypi-description] -basepython = python3.8 +basepython = python3.9 skip_install = true deps = twine @@ -75,7 +73,7 @@ commands = [testenv:coverage-report] -basepython = python3.8 +basepython = python3.9 skip_install = true deps = coverage[toml]==5.0.4 commands =