Skip to content

Commit e2fbd8d

Browse files
authored
Preliminary Python 3.14 support. (#299)
1 parent 97a54fa commit e2fbd8d

File tree

7 files changed

+43
-31
lines changed

7 files changed

+43
-31
lines changed

.github/workflows/tests.yml

+13-19
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
- ["3.11", "py311"]
3131
- ["3.12", "py312"]
3232
- ["3.13", "py313"]
33+
- ["3.14", "py314"]
3334
- ["3.11", "docs"]
3435
- ["3.11", "coverage"]
3536
- ["3.11", "py311-datetime"]
@@ -43,33 +44,26 @@ jobs:
4344
name: ${{ matrix.os[0] }}-${{ matrix.config[1] }}
4445
steps:
4546
- uses: actions/checkout@v4
46-
- name: Set up Python
47-
uses: actions/setup-python@v5
4847
with:
49-
python-version: ${{ matrix.config[0] }}
50-
allow-prereleases: true
51-
- name: Pip cache
52-
uses: actions/cache@v4
48+
persist-credentials: false
49+
- name: Install uv + caching
50+
uses: astral-sh/setup-uv@v5
5351
with:
54-
path: ~/.cache/pip
55-
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
56-
restore-keys: |
57-
${{ runner.os }}-pip-${{ matrix.config[0] }}-
58-
${{ runner.os }}-pip-
59-
- name: Install dependencies
60-
run: |
61-
python -m pip install --upgrade pip
62-
pip install tox
52+
enable-cache: true
53+
cache-dependency-glob: |
54+
setup.*
55+
tox.ini
56+
python-version: ${{ matrix.matrix.config[0] }}
57+
github-token: ${{ secrets.GITHUB_TOKEN }}
6358
- name: Test
6459
if: ${{ !startsWith(runner.os, 'Mac') }}
65-
run: tox -e ${{ matrix.config[1] }}
60+
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}
6661
- name: Test (macOS)
6762
if: ${{ startsWith(runner.os, 'Mac') }}
68-
run: tox -e ${{ matrix.config[1] }}-universal2
63+
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}-universal2
6964
- name: Coverage
7065
if: matrix.config[1] == 'coverage'
7166
run: |
72-
pip install coveralls
73-
coveralls --service=github
67+
uvx coveralls --service=github
7468
env:
7569
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.meta.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
33
[meta]
44
template = "pure-python"
5-
commit-id = "0833c289"
5+
commit-id = "a0de4e93"
66

77
[python]
88
with-pypy = false
99
with-docs = true
1010
with-sphinx-doctests = true
1111
with-windows = true
12-
with-future-python = false
12+
with-future-python = true
1313
with-macos = false
1414

1515
[tox]
@@ -47,7 +47,7 @@ testenv-additional = [
4747
" coverage combine",
4848
" coverage html",
4949
" coverage report -m --fail-under=100",
50-
"depends = py39,py310,py311,py311-datetime,py312,py313,coverage",
50+
"depends = py39,py310,py311,py311-datetime,py312,py313,py314,coverage",
5151
]
5252
coverage-command = "pytest --cov=src --cov=tests --cov-report= tests {posargs}"
5353
coverage-setenv = [

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
minimum_pre_commit_version: '3.6'
44
repos:
55
- repo: https://github.com/pycqa/isort
6-
rev: "5.13.2"
6+
rev: "6.0.1"
77
hooks:
88
- id: isort
99
- repo: https://github.com/hhatto/autopep8
@@ -21,7 +21,7 @@ repos:
2121
hooks:
2222
- id: teyit
2323
- repo: https://github.com/PyCQA/flake8
24-
rev: "7.1.1"
24+
rev: "7.1.2"
2525
hooks:
2626
- id: flake8
2727
additional_dependencies:

CHANGES.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Changes
44
8.1 (unreleased)
55
----------------
66

7-
- Nothing changed yet.
7+
- Allow to use the package with Python 3.14 -- Caution: No security
8+
audit has been done so far.
89

910

1011
8.0 (2025-01-23)

pyproject.toml

+14-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
44

55
[build-system]
6-
requires = ["setuptools <= 75.6.0"]
6+
requires = [
7+
"setuptools == 75.8.2",
8+
"wheel",
9+
]
710
build-backend = "setuptools.build_meta"
811

912
[tool.coverage.run]
@@ -15,7 +18,16 @@ fail_under = 97.3
1518
precision = 2
1619
ignore_errors = true
1720
show_missing = true
18-
exclude_lines = ["pragma: no cover", "pragma: nocover", "except ImportError:", "raise NotImplementedError", "if __name__ == '__main__':", "self.fail", "raise AssertionError", "raise unittest.Skip"]
21+
exclude_lines = [
22+
"pragma: no cover",
23+
"pragma: nocover",
24+
"except ImportError:",
25+
"raise NotImplementedError",
26+
"if __name__ == '__main__':",
27+
"self.fail",
28+
"raise AssertionError",
29+
"raise unittest.Skip",
30+
]
1931

2032
[tool.coverage.html]
2133
directory = "parts/htmlcov"

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def read(*rnames):
5959
packages=find_packages('src'),
6060
package_dir={'': 'src'},
6161
install_requires=[],
62-
python_requires=">=3.9, <3.14",
62+
python_requires=">=3.9, <3.15",
6363
extras_require={
6464
'test': ['pytest', 'pytest-mock'],
6565
'docs': ['Sphinx', 'furo'],

tox.ini

+8-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ envlist =
1010
py311
1111
py312
1212
py313
13+
py314
1314
docs
1415
coverage
1516
py311-datetime
@@ -19,11 +20,13 @@ envlist =
1920
usedevelop = true
2021
package = wheel
2122
wheel_build_env = .pkg
23+
pip_pre = py314: true
2224
deps =
23-
setuptools <= 75.6.0
25+
setuptools == 75.8.2
2426
datetime: DateTime
2527
-cconstraints.txt
2628
pytest-cov
29+
Sphinx
2730
setenv =
2831
COVERAGE_FILE=.coverage.{envname}
2932
commands =
@@ -49,7 +52,7 @@ commands =
4952
coverage combine
5053
coverage html
5154
coverage report -m --fail-under=100
52-
depends = py39,py310,py311,py311-datetime,py312,py313,coverage
55+
depends = py39,py310,py311,py311-datetime,py312,py313,py314,coverage
5356

5457
[testenv:setuptools-latest]
5558
basepython = python3
@@ -64,7 +67,8 @@ description = ensure that the distribution is ready to release
6467
basepython = python3
6568
skip_install = true
6669
deps =
67-
setuptools <= 75.6.0
70+
setuptools == 75.8.2
71+
wheel
6872
twine
6973
build
7074
check-manifest
@@ -104,6 +108,7 @@ deps =
104108
datetime: DateTime
105109
-cconstraints.txt
106110
pytest-cov
111+
Sphinx
107112
setenv =
108113
COVERAGE_FILE=.coverage
109114
commands =

0 commit comments

Comments
 (0)