Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python 3.13, drop EOL Python 3.8 #245

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ CHANGES

Unreleased
==========
- Drop support for EOL < Python 3.9 and add Python 3.13

4.0b2
=====
Expand Down
6 changes: 3 additions & 3 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
23 changes: 8 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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