diff --git a/.github/release.yml b/.github/release.yml index 9d1e098..5f89818 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -1,5 +1,5 @@ changelog: exclude: authors: - - dependabot - - pre-commit-ci + - dependabot[bot] + - pre-commit-ci[bot] diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index ed7d3f6..ec66e39 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -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 @@ -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 }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5a55661..5a30099 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a5dbf72..837d1f5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/pyproject.toml b/pyproject.toml index e9ba542..e44738d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", @@ -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", @@ -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" @@ -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 diff --git a/src/pyproject_api/_frontend.py b/src/pyproject_api/_frontend.py index 15fbfea..c19361f 100644 --- a/src/pyproject_api/_frontend.py +++ b/src/pyproject_api/_frontend.py @@ -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 @@ -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): diff --git a/tests/test_frontend.py b/tests/test_frontend.py index ee7898f..b93dd9e 100644 --- a/tests/test_frontend.py +++ b/tests/test_frontend.py @@ -2,7 +2,7 @@ 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 @@ -10,6 +10,9 @@ 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]: @@ -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) @@ -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) diff --git a/tox.ini b/tox.ini index 3e7f25a..14be21d 100644 --- a/tox.ini +++ b/tox.ini @@ -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 @@ -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 = @@ -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}{/}*