Skip to content

Commit 08d335e

Browse files
Add support for Python 3.13
This commit adds support for Python 3.13 by: - Updating `setup.py` to include Python 3.13 in the classifiers. - Updating `noxfile.py` to include Python 3.13 in the test matrix. - Adding a constraints file for Python 3.13. - Updating the unit test workflow in `.github/workflows/unittest.yml` to include Python 3.13. - Updating documentation files (`CONTRIBUTING.rst` and `docs/README.rst`) to include Python 3.13.
1 parent 44a5aa2 commit 08d335e

File tree

4 files changed

+36
-7
lines changed

4 files changed

+36
-7
lines changed

.github/workflows/unittest.yml

+31-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-22.04
1212
strategy:
1313
matrix:
14-
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
14+
python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v4
@@ -34,12 +34,40 @@ jobs:
3434
name: coverage-artifact-${{ matrix.python }}
3535
path: .coverage-${{ matrix.python }}
3636
include-hidden-files: true
37+
unit-prerelease:
38+
runs-on: ubuntu-latest
39+
strategy:
40+
matrix:
41+
python: ['3.13']
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
- name: Setup Python
46+
uses: actions/setup-python@v5
47+
with:
48+
python-version: ${{ matrix.python }}
49+
- name: Install nox
50+
run: |
51+
python -m pip install --upgrade setuptools pip wheel
52+
python -m pip install nox
53+
- name: Run unit tests
54+
env:
55+
COVERAGE_FILE: .coverage-prerelease-${{ matrix.python }}
56+
run: |
57+
nox -s unit_prerelease-${{ matrix.python }}
58+
- name: Upload coverage results
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: coverage-artifact-prerelease-${{ matrix.python }}
62+
path: .coverage-prerelease-${{ matrix.python }}
63+
include-hidden-files: true
64+
3765

3866
unit-prerelease:
3967
runs-on: ubuntu-latest
4068
strategy:
4169
matrix:
42-
python: ['3.12']
70+
python: ['3.13']
4371
steps:
4472
- name: Checkout
4573
uses: actions/checkout@v4
@@ -55,7 +83,7 @@ jobs:
5583
env:
5684
COVERAGE_FILE: .coverage-prerelease-${{ matrix.python }}
5785
run: |
58-
nox -s unit_prerelease
86+
nox -s unit_prerelease-${{ matrix.python }}
5987
- name: Upload coverage results
6088
uses: actions/upload-artifact@v4
6189
with:

noxfile.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
DEFAULT_PYTHON_VERSION = "3.8"
3636

37-
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
37+
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
3838
UNIT_TEST_STANDARD_DEPENDENCIES = [
3939
"mock",
4040
"asyncmock",
@@ -270,13 +270,13 @@ def prerelease(session, tests_path):
270270
)
271271

272272

273-
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS[-1])
273+
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)
274274
def compliance(session):
275275
"""Run the compliance test suite."""
276276
default(session, os.path.join("tests", "compliance"))
277277

278278

279-
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS[-1])
279+
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)
280280
def compliance_prerelease(session):
281281
"""Run the compliance test suite with prerelease dependencies."""
282282
prerelease(session, os.path.join("tests", "compliance"))
@@ -288,7 +288,7 @@ def unit(session):
288288
default(session, os.path.join("tests", "unit"))
289289

290290

291-
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS[-1])
291+
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)
292292
def unit_prerelease(session):
293293
"""Run the unit test suite with prerelease dependencies."""
294294
prerelease(session, os.path.join("tests", "unit"))

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def readme():
6969
"Programming Language :: Python :: 3.10",
7070
"Programming Language :: Python :: 3.11",
7171
"Programming Language :: Python :: 3.12",
72+
"Programming Language :: Python :: 3.13",
7273
"Operating System :: OS Independent",
7374
"Topic :: Database :: Front-Ends",
7475
],

testing/constraints-3.13.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)