Skip to content

Commit 8f9ed33

Browse files
authored
Add support for 3.14 and drop 3.9 (#216)
1 parent 0efdcdd commit 8f9ed33

File tree

8 files changed

+28
-28
lines changed

8 files changed

+28
-28
lines changed

.github/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
changelog:
22
exclude:
33
authors:
4-
- dependabot
5-
- pre-commit-ci
4+
- dependabot[bot]
5+
- pre-commit-ci[bot]

.github/workflows/check.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
env:
23+
- "3.14"
2324
- "3.13"
2425
- "3.12"
2526
- "3.11"
2627
- "3.10"
27-
- "3.9"
2828
- type
2929
- dev
3030
- pkg_meta
@@ -51,9 +51,9 @@ jobs:
5151
shell: bash
5252
run: echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH
5353
- name: Install tox
54-
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
54+
run: uv tool install --python-preference only-managed --python 3.14 tox --with tox-uv
5555
- name: Install Python
56-
if: startsWith(matrix.env, '3.') && matrix.env != '3.13'
56+
if: startsWith(matrix.env, '3.') && matrix.env != '3.14'
5757
run: uv python install --python-preference only-managed ${{ matrix.env }}
5858
- name: Setup test suite
5959
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.env }}

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
cache-dependency-glob: "pyproject.toml"
2121
github-token: ${{ secrets.GITHUB_TOKEN }}
2222
- name: Build package
23-
run: uv build --python 3.13 --python-preference only-managed --sdist --wheel . --out-dir dist
23+
run: uv build --python 3.14 --python-preference only-managed --sdist --wheel . --out-dir dist
2424
- name: Store the distribution packages
2525
uses: actions/upload-artifact@v4
2626
with:

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ repos:
1313
rev: v2.4.1
1414
hooks:
1515
- id: codespell
16-
additional_dependencies: ["tomli>=2.2.1"]
16+
additional_dependencies: ["tomli>=2.3"]
1717
- repo: https://github.com/tox-dev/tox-ini-fmt
1818
rev: "1.6.0"
1919
hooks:
2020
- id: tox-ini-fmt
2121
args: ["-p", "fix"]
2222
- repo: https://github.com/tox-dev/pyproject-fmt
23-
rev: "v2.7.0"
23+
rev: "v2.10.0"
2424
hooks:
2525
- id: pyproject-fmt
2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: "v0.13.3"
27+
rev: "v0.14.0"
2828
hooks:
2929
- id: ruff-format
3030
- id: ruff

pyproject.toml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ maintainers = [
2323
authors = [
2424
{ name = "Bernát Gábor", email = "[email protected]" },
2525
]
26-
requires-python = ">=3.9"
26+
requires-python = ">=3.10"
2727
classifiers = [
2828
"Development Status :: 5 - Production/Stable",
2929
"Framework :: tox",
@@ -33,11 +33,11 @@ classifiers = [
3333
"Operating System :: Microsoft :: Windows",
3434
"Operating System :: POSIX",
3535
"Programming Language :: Python :: 3 :: Only",
36-
"Programming Language :: Python :: 3.9",
3736
"Programming Language :: Python :: 3.10",
3837
"Programming Language :: Python :: 3.11",
3938
"Programming Language :: Python :: 3.12",
4039
"Programming Language :: Python :: 3.13",
40+
"Programming Language :: Python :: 3.14",
4141
"Topic :: Software Development :: Libraries",
4242
"Topic :: Software Development :: Testing",
4343
"Topic :: Utilities",
@@ -47,17 +47,17 @@ dynamic = [
4747
]
4848
dependencies = [
4949
"packaging>=25",
50-
"tomli>=2.2.1; python_version<'3.11'",
50+
"tomli>=2.3; python_version<'3.11'",
5151
]
5252
optional-dependencies.docs = [
53-
"furo>=2025.7.19",
54-
"sphinx-autodoc-typehints>=3.2",
53+
"furo>=2025.9.25",
54+
"sphinx-autodoc-typehints>=3.5.1",
5555
]
5656
optional-dependencies.testing = [
5757
"covdefaults>=2.3",
5858
"pytest>=8.4.2",
5959
"pytest-cov>=7",
60-
"pytest-mock>=3.15",
60+
"pytest-mock>=3.15.1",
6161
"setuptools>=80.9",
6262
]
6363
urls.Changelog = "https://github.com/tox-dev/pyproject-api/releases"
@@ -121,9 +121,6 @@ builtin = "clear,usage,en-GB_to_en-US"
121121
write-changes = true
122122
count = true
123123

124-
[tool.pyproject-fmt]
125-
max_supported_python = "3.13"
126-
127124
[tool.coverage]
128125
html.show_contexts = true
129126
html.skip_covered = false

src/pyproject_api/_frontend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from pathlib import Path
1010
from tempfile import NamedTemporaryFile, TemporaryDirectory
1111
from time import sleep
12-
from typing import TYPE_CHECKING, Any, Literal, NamedTuple, NoReturn, Optional, TypedDict, cast
12+
from typing import TYPE_CHECKING, Any, Literal, NamedTuple, NoReturn, TypedDict, cast
1313
from zipfile import ZipFile
1414

1515
from packaging.requirements import Requirement
@@ -25,7 +25,7 @@
2525
import tomli as tomllib
2626

2727
_HERE = Path(__file__).parent
28-
ConfigSettings = Optional[dict[str, Any]]
28+
ConfigSettings = dict[str, Any] | None
2929

3030

3131
class OptionalHooks(TypedDict, total=True):

tests/test_frontend.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33
from pathlib import Path
44
from textwrap import dedent
5-
from typing import Callable, Literal
5+
from typing import TYPE_CHECKING, Literal
66

77
import pytest
88
from packaging.requirements import Requirement
99

1010
from pyproject_api._frontend import BackendFailed
1111
from pyproject_api._via_fresh_subprocess import SubprocessFrontend
1212

13+
if TYPE_CHECKING:
14+
from collections.abc import Callable
15+
1316

1417
@pytest.fixture
1518
def local_builder(tmp_path: Path) -> Callable[[str], Path]:
@@ -55,7 +58,7 @@ def test_empty_pyproject(tmp_path: Path) -> None:
5558
assert backend_paths == ()
5659
assert backend_module == "setuptools.build_meta"
5760
assert backend_obj == "__legacy__"
58-
for left, right in zip(requires, (Requirement("setuptools>=40.8.0"), Requirement("wheel"))):
61+
for left, right in zip(requires, (Requirement("setuptools>=40.8.0"), Requirement("wheel")), strict=False):
5962
assert isinstance(left, Requirement)
6063
assert str(left) == str(right)
6164

@@ -98,7 +101,7 @@ def get_requires_for_build_sdist(self, config_settings=None):
98101
(build / "api.py").write_text(dedent(api))
99102
frontend = SubprocessFrontend(*SubprocessFrontend.create_args_from_folder(tmp_path)[:-1])
100103
result = frontend.get_requires_for_build_sdist()
101-
for left, right in zip(result.requires, (Requirement("a"),)):
104+
for left, right in zip(result.requires, (Requirement("a"),), strict=False):
102105
assert isinstance(left, Requirement)
103106
assert str(left) == str(right)
104107

tox.ini

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[tox]
22
requires =
3-
tox>=4.30.2
4-
tox-uv>=1.28
3+
tox>=4.31
4+
tox-uv>=1.28.1
55
env_list =
66
fix
7+
3.14
78
3.13
89
3.12
910
3.11
1011
3.10
11-
3.9
1212
docs
1313
type
1414
pkg_meta
@@ -57,7 +57,7 @@ commands =
5757
[testenv:type]
5858
description = run type check on code base
5959
deps =
60-
mypy==1.17.1
60+
mypy==1.18.2
6161
set_env =
6262
{tty:MYPY_FORCE_COLOR = 1}
6363
commands =
@@ -70,7 +70,7 @@ skip_install = true
7070
deps =
7171
check-wheel-contents>=0.6.3
7272
twine>=6.2
73-
uv>=0.8.16
73+
uv>=0.9
7474
commands =
7575
uv build --sdist --wheel --out-dir {env_tmp_dir} .
7676
twine check {env_tmp_dir}{/}*

0 commit comments

Comments
 (0)