From a1771d83d9d7f6230b2e7869623b43b23e5fb736 Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Tue, 8 Oct 2024 08:48:12 -0700 Subject: [PATCH] Add Python 3.13, drop EOL Python 3.8 This also tweaks the tox config to take advantage of `extras` to install testing dependencies. --- .github/workflows/ci.yaml | 3 +-- CHANGES.md | 1 + docs/contributing.rst | 6 +++--- pyproject.toml | 2 +- tox.ini | 23 ++++++++--------------- 5 files changed, 14 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3d2c229..15244d6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,12 +13,11 @@ jobs: strategy: matrix: python-version: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' - - 'pypy-3.8' + - '3.13' - 'pypy-3.9' - 'pypy-3.10' diff --git a/CHANGES.md b/CHANGES.md index 8eec4b9..011c66d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,7 @@ CHANGES Unreleased ========== +- Drop support for EOL < Python 3.9 and add Python 3.13 4.0b2 ===== diff --git a/docs/contributing.rst b/docs/contributing.rst index 254287e..9be3601 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -64,8 +64,8 @@ To run the tests like Github Actions does, you'll need pyenv_: .. code-block:: bash - pyenv install 3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10 - pyenv local 3.8 3.9 3.10. 3.11 3.12 pypy3.8 pypy3.9 pypy3.10 + pyenv install 3.9 3.10 3.11 3.12 pypy3.9 pypy3.10 + pyenv local 3.9 3.10. 3.11 3.12 pypy3.9 pypy3.10 pip install -e ".[dev]" # installs tox tox # run sequentially tox run-parallel # run in parallel, may cause issues on coverage step @@ -76,7 +76,7 @@ Type Checking ============= New code should have type annotations and pass mypy_ in strict mode. Use the -typing syntax available in the earliest supported Python version 3.8. +typing syntax available in the earliest supported Python version 3.9. To check types: diff --git a/pyproject.toml b/pyproject.toml index 16d1c1e..1bff982 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,11 +28,11 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python", "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", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules", diff --git a/tox.ini b/tox.ini index 6f4feee..3270743 100644 --- a/tox.ini +++ b/tox.ini @@ -1,42 +1,36 @@ [tox] isolated_build = True envlist = - {3.10,3.11,3.12,pypy310}-dj{4.2,5.0,5.1,main} - {3.8,3.9,3.10,3.11,3.12,pypy38,pypy39,pypy310}-dj4.2 - {3.8,3.9,3.10,3.11,3.12,pypy38,pypy39,pypy310}-types + {3.10,3.11,3.12,3.13,pypy310}-dj{4.2,5.0,5.1,main} + {3.9,3.10,3.11,3.12,3.13,pypy39,pypy310}-dj4.2 + {3.9,3.10,3.11,3.12,3.13,pypy39,pypy310}-types # Don't run coverage when testing with pypy: # see https://github.com/nedbat/coveragepy/issues/1382 -[testenv:pypy{38,39,310}-dj4.2,pypy310-dj{5.0,5.1,main}] +[testenv:pypy{39,310}-dj4.2,pypy310-dj{5.0,5.1,main}] commands = - pip install --upgrade pip - pip install -e .[tests] pytest {toxinidir}/csp -[testenv:{3.8,3.9,3.10,3.11,3.12,pypy38,pypy39,pypy310}-types] +[testenv:{3.9,3.10,3.11,3.12,3.13,pypy39,pypy310}-types] commands = - pip install --upgrade pip - pip install -e .[typing] mypy --cache-dir {temp_dir}/.mypy_cache {toxinidir}/csp [testenv] +extras = dev, tests, typing, jinja2 setenv = PYTHONPATH={toxinidir} PYTHONDONTWRITEBYTECODE=1 commands = - pip install --upgrade pip - pip install -e .[tests] pytest --cov={toxinidir}/csp {toxinidir}/csp basepython = - 3.8: python3.8 3.9: python3.9 3.10: python3.10 3.11: python3.11 3.12: python3.12 - pypy38: pypy3.8 + 3.13: python3.13 pypy39: pypy3.9 pypy310: pypy3.10 @@ -52,11 +46,10 @@ deps = # Running tox in GHA without redefining it all in a GHA matrix: # https://github.com/ymyzk/tox-gh-actions python = - 3.8: 3.8 3.9: 3.9 3.10: 3.10 3.11: 3.11 3.12: 3.12 - pypy-3.8: pypy38 + 3.13: 3.13 pypy-3.9: pypy39 pypy-3.10: pypy310