Skip to content

Commit 0a41076

Browse files
authored
Bump and fix CI for new setuptools (#140)
1 parent d7add0e commit 0a41076

File tree

5 files changed

+24
-26
lines changed

5 files changed

+24
-26
lines changed

.github/workflows/check.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
py:
23+
- "3.13.0-beta.2"
2324
- "3.12"
2425
- "3.11"
2526
- "3.10"
@@ -37,8 +38,8 @@ jobs:
3738
- uses: actions/checkout@v4
3839
with:
3940
fetch-depth: 0
40-
- name: Install tox
41-
run: python -m pip install tox
41+
- name: Install tox-uv
42+
run: python -m pip install tox-uv
4243
- name: Setup python for test ${{ matrix.py }}
4344
uses: actions/setup-python@v5
4445
with:
@@ -84,8 +85,8 @@ jobs:
8485
uses: actions/setup-python@v5
8586
with:
8687
python-version: "3.12"
87-
- name: Install tox
88-
run: python -m pip install tox
88+
- name: Install tox-uv
89+
run: python -m pip install tox-uv
8990
- name: Run check for ${{ matrix.tox_env }}
9091
run: tox -e ${{ matrix.tox_env }}
9192
env:

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ repos:
2323
rev: "2.1.3"
2424
hooks:
2525
- id: pyproject-fmt
26-
additional_dependencies: ["tox>=4.12.1"]
26+
additional_dependencies: ["tox>=4.15.1"]
2727
- repo: https://github.com/astral-sh/ruff-pre-commit
28-
rev: "v0.4.9"
28+
rev: "v0.4.10"
2929
hooks:
3030
- id: ruff-format
3131
- id: ruff

pyproject.toml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
build-backend = "hatchling.build"
33
requires = [
44
"hatch-vcs>=0.4",
5-
"hatchling>=1.18",
5+
"hatchling>=1.24.2",
66
]
77

88
[project]
@@ -46,23 +46,21 @@ dynamic = [
4646
"version",
4747
]
4848
dependencies = [
49-
"packaging>=23.2",
49+
"packaging>=24.1",
5050
"tomli>=2.0.1; python_version<'3.11'",
5151
]
5252
optional-dependencies.docs = [
53-
"furo>=2023.9.10",
54-
"sphinx<7.2",
55-
"sphinx-autodoc-typehints>=1.25.2",
53+
"furo>=2024.5.6",
54+
"sphinx-autodoc-typehints>=2.2.1",
5655
]
5756
optional-dependencies.testing = [
5857
"covdefaults>=2.3",
59-
"pytest>=7.4.3",
60-
"pytest-cov>=4.1",
61-
"pytest-mock>=3.12",
62-
"setuptools>=69.0.2",
63-
"wheel>=0.42",
58+
"pytest>=8.2.2",
59+
"pytest-cov>=5",
60+
"pytest-mock>=3.14",
61+
"setuptools>=70.1",
6462
]
65-
urls.Homepage = "http://pyproject-api.readthedocs.io"
63+
urls.Homepage = "https://pyproject-api.readthedocs.io"
6664
urls.Source = "https://github.com/tox-dev/pyproject-api"
6765
urls.Tracker = "https://github.com/tox-dev/pyproject-api/issues"
6866

@@ -81,7 +79,7 @@ lint.select = [
8179
]
8280
lint.ignore = [
8381
"ANN101", # Missing type annotation for `self` in method
84-
"ANN102", # Missing type annotation for `cls` in classmethod"
82+
"ANN102", # Missing type annotation for `cls` in classmethod
8583
"ANN401", # Dynamically typed expressions
8684
"COM812", # Conflict with formatter
8785
"CPY", # No copyright statements

tests/test_frontend_setuptools.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from typing import TYPE_CHECKING, Iterator, NamedTuple
77

88
import pytest
9-
from packaging.requirements import Requirement
109

1110
from pyproject_api._frontend import BackendFailed
1211
from pyproject_api._via_fresh_subprocess import SubprocessFrontend
@@ -59,9 +58,7 @@ def test_setuptools_get_requires_for_build_sdist(frontend_setuptools: Subprocess
5958

6059
def test_setuptools_get_requires_for_build_wheel(frontend_setuptools: SubprocessFrontend) -> None:
6160
result = frontend_setuptools.get_requires_for_build_wheel()
62-
for left, right in zip(result.requires, (Requirement("wheel"),)):
63-
assert isinstance(left, Requirement)
64-
assert str(left) == str(right)
61+
assert not result.requires
6562
assert isinstance(result.out, str)
6663
assert isinstance(result.err, str)
6764

tox.ini

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ requires =
33
tox>=4.2
44
env_list =
55
fix
6+
py313
67
py312
78
py311
89
py310
@@ -37,7 +38,7 @@ labels = test
3738
description = run formatter and linters
3839
skip_install = true
3940
deps =
40-
pre-commit>=3.5
41+
pre-commit>=3.7.1
4142
pass_env =
4243
{[testenv]passenv}
4344
PROGRAMDATA
@@ -47,7 +48,7 @@ commands =
4748
[testenv:type]
4849
description = run type check on code base
4950
deps =
50-
mypy==1.7.1
51+
mypy==1.10
5152
set_env =
5253
{tty:MYPY_FORCE_COLOR = 1}
5354
commands =
@@ -66,9 +67,9 @@ commands =
6667
description = check that the long description is valid
6768
skip_install = true
6869
deps =
69-
build[virtualenv]>=1.0.3
70+
build[virtualenv]>=1.2.1
7071
check-wheel-contents>=0.6
71-
twine>=4.0.2
72+
twine>=5.1
7273
commands =
7374
python -m build -o {envtmpdir} -s -w .
7475
twine check --strict {envtmpdir}{/}*
@@ -83,3 +84,4 @@ extras =
8384
commands =
8485
python -m pip list --format=columns
8586
python -c "print(r'{envpython}')"
87+
uv_seed = true

0 commit comments

Comments
 (0)