Skip to content

Commit a284a7a

Browse files
authored
Merge pull request #132 from binary-butterfly/add-python-313-support
Add support for Python 3.13
2 parents b328b21 + 0659e3d commit a284a7a

4 files changed

Lines changed: 28 additions & 17 deletions

File tree

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
- '3.10'
2323
- '3.11'
2424
- '3.12'
25+
- '3.13'
2526

2627
steps:
2728
- uses: actions/checkout@v4

Makefile

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,9 @@ mypy:
5454
open-coverage:
5555
$(or $(BROWSER),firefox) ./reports/coverage_html/index.html
5656

57-
# Run complete tox test suite in a multi-python Docker container
58-
.PHONY: docker-tox
59-
docker-tox: TOX_ARGS='-e clean,py312,py311,py310,report,flake8,py312-mypy'
60-
docker-tox:
57+
# Base target for running tox in a multi-python Docker container (don't use directly)
58+
.PHONY: _docker-tox
59+
_docker-tox:
6160
docker run --rm --tty \
6261
--user $(DOCKER_USER) \
6362
--mount "type=bind,src=$(shell pwd),target=/code" \
@@ -66,32 +65,42 @@ docker-tox:
6665
$(DOCKER_MULTI_PYTHON_IMAGE) \
6766
tox run --workdir .tox_docker $(TOX_ARGS)
6867

68+
# Run complete tox test suite in a multi-python Docker container
69+
.PHONY: docker-tox
70+
docker-tox: TOX_ARGS='-e clean,py313,py312,py311,py310,report,flake8,py313-mypy'
71+
docker-tox: _docker-tox
72+
6973
# Run partial tox test suites in Docker
70-
.PHONY: docker-tox-py312 docker-tox-py311 docker-tox-py310
74+
.PHONY: docker-tox-py313 docker-tox-py312 docker-tox-py311 docker-tox-py310
75+
docker-test-py313: TOX_ARGS="-e clean,py313,py313-report"
76+
docker-test-py313: _docker-tox
7177
docker-test-py312: TOX_ARGS="-e clean,py312,py312-report"
72-
docker-test-py312: docker-tox
78+
docker-test-py312: _docker-tox
7379
docker-test-py311: TOX_ARGS="-e clean,py311,py311-report"
74-
docker-test-py311: docker-tox
80+
docker-test-py311: _docker-tox
7581
docker-test-py310: TOX_ARGS="-e clean,py310,py310-report"
76-
docker-test-py310: docker-tox
82+
docker-test-py310: _docker-tox
7783

7884
# Run all tox test suites, but separately to check code coverage individually
7985
.PHONY: docker-test-all
8086
docker-test-all:
8187
make docker-test-py310
8288
make docker-test-py311
8389
make docker-test-py312
90+
make docker-test-py313
8491

8592
# Run mypy using all different (or specific) Python versions in Docker
86-
.PHONY: docker-mypy-all docker-mypy-py312 docker-mypy-py311 docker-mypy-py310
87-
docker-mypy-all: TOX_ARGS="-e py312-mypy,py311-mypy,py310-mypy"
88-
docker-mypy-all: docker-tox
93+
.PHONY: docker-mypy-all docker-mypy-py313 docker-mypy-py312 docker-mypy-py311 docker-mypy-py310
94+
docker-mypy-all: TOX_ARGS="-e py313-mypy,py312-mypy,py311-mypy,py310-mypy"
95+
docker-mypy-all: _docker-tox
96+
docker-mypy-py313: TOX_ARGS="-e py313-mypy"
97+
docker-mypy-py313: _docker-tox
8998
docker-mypy-py312: TOX_ARGS="-e py312-mypy"
90-
docker-mypy-py312: docker-tox
99+
docker-mypy-py312: _docker-tox
91100
docker-mypy-py311: TOX_ARGS="-e py311-mypy"
92-
docker-mypy-py311: docker-tox
101+
docker-mypy-py311: _docker-tox
93102
docker-mypy-py310: TOX_ARGS="-e py310-mypy"
94-
docker-mypy-py310: docker-tox
103+
docker-mypy-py310: _docker-tox
95104

96105
# Pull the latest image of the multi-python Docker image
97106
.PHONY: docker-pull

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ classifiers =
2020
Programming Language :: Python :: 3.10
2121
Programming Language :: Python :: 3.11
2222
Programming Language :: Python :: 3.12
23+
Programming Language :: Python :: 3.13
2324
Programming Language :: Python :: Implementation :: CPython
2425
Topic :: Software Development :: Libraries :: Python Modules
2526
Topic :: Utilities

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
minversion = 4.5.1
3-
envlist = clean,py{312,311,310},report,flake8,mypy
3+
envlist = clean,py{313,312,311,310},report,flake8,mypy
44
skip_missing_interpreters = true
55

66
[flake8]
@@ -20,13 +20,13 @@ commands = python -m pytest --cov --cov-append {posargs}
2020
[testenv:flake8]
2121
commands = flake8 src/ tests/
2222

23-
[testenv:mypy,py{312,311,310}-mypy]
23+
[testenv:mypy,py{313,312,311,310}-mypy]
2424
commands = mypy
2525

2626
[testenv:clean]
2727
commands = coverage erase
2828

29-
[testenv:report,py{312,311,310}-report]
29+
[testenv:report,py{313,312,311,310}-report]
3030
commands =
3131
coverage html
3232
coverage report --fail-under=100

0 commit comments

Comments
 (0)