Skip to content
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
4 changes: 2 additions & 2 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
changelog:
exclude:
authors:
- dependabot
- pre-commit-ci
- dependabot[bot]
- pre-commit-ci[bot]
6 changes: 3 additions & 3 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
fail-fast: false
matrix:
env:
- "3.14"
- "3.13"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- type
- dev
- pkg_meta
Expand All @@ -51,9 +51,9 @@ jobs:
shell: bash
run: echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH
- name: Install tox
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
run: uv tool install --python-preference only-managed --python 3.14 tox --with tox-uv
- name: Install Python
if: startsWith(matrix.env, '3.') && matrix.env != '3.13'
if: startsWith(matrix.env, '3.') && matrix.env != '3.14'
run: uv python install --python-preference only-managed ${{ matrix.env }}
- name: Setup test suite
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.env }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
cache-dependency-glob: "pyproject.toml"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build package
run: uv build --python 3.13 --python-preference only-managed --sdist --wheel . --out-dir dist
run: uv build --python 3.14 --python-preference only-managed --sdist --wheel . --out-dir dist
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ repos:
rev: v2.4.1
hooks:
- id: codespell
additional_dependencies: ["tomli>=2.2.1"]
additional_dependencies: ["tomli>=2.3"]
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "1.6.0"
hooks:
- id: tox-ini-fmt
args: ["-p", "fix"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.7.0"
rev: "v2.10.0"
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.13.3"
rev: "v0.14.0"
hooks:
- id: ruff-format
- id: ruff
Expand Down
15 changes: 6 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ maintainers = [
authors = [
{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" },
]
requires-python = ">=3.9"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: tox",
Expand All @@ -33,11 +33,11 @@ classifiers = [
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python :: 3 :: Only",
"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 :: 3.14",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Testing",
"Topic :: Utilities",
Expand All @@ -47,17 +47,17 @@ dynamic = [
]
dependencies = [
"packaging>=25",
"tomli>=2.2.1; python_version<'3.11'",
"tomli>=2.3; python_version<'3.11'",
]
optional-dependencies.docs = [
"furo>=2025.7.19",
"sphinx-autodoc-typehints>=3.2",
"furo>=2025.9.25",
"sphinx-autodoc-typehints>=3.5.1",
]
optional-dependencies.testing = [
"covdefaults>=2.3",
"pytest>=8.4.2",
"pytest-cov>=7",
"pytest-mock>=3.15",
"pytest-mock>=3.15.1",
"setuptools>=80.9",
]
urls.Changelog = "https://github.com/tox-dev/pyproject-api/releases"
Expand Down Expand Up @@ -121,9 +121,6 @@ builtin = "clear,usage,en-GB_to_en-US"
write-changes = true
count = true

[tool.pyproject-fmt]
max_supported_python = "3.13"

[tool.coverage]
html.show_contexts = true
html.skip_covered = false
Expand Down
4 changes: 2 additions & 2 deletions src/pyproject_api/_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pathlib import Path
from tempfile import NamedTemporaryFile, TemporaryDirectory
from time import sleep
from typing import TYPE_CHECKING, Any, Literal, NamedTuple, NoReturn, Optional, TypedDict, cast
from typing import TYPE_CHECKING, Any, Literal, NamedTuple, NoReturn, TypedDict, cast
from zipfile import ZipFile

from packaging.requirements import Requirement
Expand All @@ -25,7 +25,7 @@
import tomli as tomllib

_HERE = Path(__file__).parent
ConfigSettings = Optional[dict[str, Any]]
ConfigSettings = dict[str, Any] | None


class OptionalHooks(TypedDict, total=True):
Expand Down
9 changes: 6 additions & 3 deletions tests/test_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

from pathlib import Path
from textwrap import dedent
from typing import Callable, Literal
from typing import TYPE_CHECKING, Literal

import pytest
from packaging.requirements import Requirement

from pyproject_api._frontend import BackendFailed
from pyproject_api._via_fresh_subprocess import SubprocessFrontend

if TYPE_CHECKING:
from collections.abc import Callable


@pytest.fixture
def local_builder(tmp_path: Path) -> Callable[[str], Path]:
Expand Down Expand Up @@ -55,7 +58,7 @@ def test_empty_pyproject(tmp_path: Path) -> None:
assert backend_paths == ()
assert backend_module == "setuptools.build_meta"
assert backend_obj == "__legacy__"
for left, right in zip(requires, (Requirement("setuptools>=40.8.0"), Requirement("wheel"))):
for left, right in zip(requires, (Requirement("setuptools>=40.8.0"), Requirement("wheel")), strict=False):
assert isinstance(left, Requirement)
assert str(left) == str(right)

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

Expand Down
10 changes: 5 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[tox]
requires =
tox>=4.30.2
tox-uv>=1.28
tox>=4.31
tox-uv>=1.28.1
env_list =
fix
3.14
3.13
3.12
3.11
3.10
3.9
docs
type
pkg_meta
Expand Down Expand Up @@ -57,7 +57,7 @@ commands =
[testenv:type]
description = run type check on code base
deps =
mypy==1.17.1
mypy==1.18.2
set_env =
{tty:MYPY_FORCE_COLOR = 1}
commands =
Expand All @@ -70,7 +70,7 @@ skip_install = true
deps =
check-wheel-contents>=0.6.3
twine>=6.2
uv>=0.8.16
uv>=0.9
commands =
uv build --sdist --wheel --out-dir {env_tmp_dir} .
twine check {env_tmp_dir}{/}*
Expand Down