Skip to content

Commit 5b76cdd

Browse files
authored
Fix the CI after setuptools 75.6 change (#3452)
Signed-off-by: Bernát Gábor <[email protected]>
1 parent 9200e11 commit 5b76cdd

File tree

7 files changed

+35
-26
lines changed

7 files changed

+35
-26
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
rev: v2.3.0
1414
hooks:
1515
- id: codespell
16-
additional_dependencies: ["tomli>=2.0.1"]
16+
additional_dependencies: ["tomli>=2.1"]
1717
- repo: https://github.com/tox-dev/pyproject-fmt
1818
rev: "v2.5.0"
1919
hooks:
@@ -32,7 +32,7 @@ repos:
3232
rev: 1.19.1
3333
hooks:
3434
- id: blacken-docs
35-
additional_dependencies: [black==24.8]
35+
additional_dependencies: [black==24.10]
3636
- repo: https://github.com/pre-commit/pygrep-hooks
3737
rev: v1.10.0
3838
hooks:

pyproject.toml

Lines changed: 17 additions & 16 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.25",
5+
"hatchling>=1.26.3",
66
]
77

88
[project]
@@ -54,13 +54,13 @@ dependencies = [
5454
"chardet>=5.2",
5555
"colorama>=0.4.6",
5656
"filelock>=3.16.1",
57-
"packaging>=24.1",
57+
"packaging>=24.2",
5858
"platformdirs>=4.3.6",
5959
"pluggy>=1.5",
6060
"pyproject-api>=1.8",
61-
"tomli>=2.0.1; python_version<'3.11'",
61+
"tomli>=2.1; python_version<'3.11'",
6262
"typing-extensions>=4.12.2; python_version<'3.11'",
63-
"virtualenv>=20.26.6",
63+
"virtualenv>=20.27.1",
6464
]
6565
optional-dependencies.test = [
6666
"devpi-process>=1.0.2",
@@ -81,52 +81,53 @@ dev = [
8181
{ include-group = "type" },
8282
]
8383
test = [
84-
"build[virtualenv]>=1.2.2",
84+
"build[virtualenv]>=1.2.2.post1",
8585
"covdefaults>=2.3",
8686
"detect-test-pollution>=1.2",
8787
"devpi-process>=1.0.2",
8888
"diff-cover>=9.2",
89-
"distlib>=0.3.8",
89+
"distlib>=0.3.9",
9090
"flaky>=3.8.1",
9191
"hatch-vcs>=0.4",
92-
"hatchling>=1.25",
93-
"psutil>=6",
92+
"hatchling>=1.26.3",
93+
"psutil>=6.1",
9494
"pytest>=8.3.3",
9595
"pytest-cov>=5",
9696
"pytest-mock>=3.14",
9797
"pytest-xdist>=3.6.1",
9898
"re-assert>=1.1",
99-
"setuptools>=75.1",
99+
"setuptools>=75.1; python_version<='3.8'",
100+
"setuptools>=75.6; python_version>'3.8'",
100101
"time-machine>=2.15; implementation_name!='pypy'",
101-
"wheel>=0.44",
102+
"wheel>=0.45",
102103
]
103104
type = [
104-
"mypy==1.11.2",
105+
"mypy==1.13",
105106
"types-cachetools>=5.5.0.20240820",
106107
"types-chardet>=5.0.4.6",
107108
{ include-group = "test" },
108109
]
109110
docs = [
110111
"furo>=2024.8.6",
111-
"sphinx>=8.0.2",
112+
"sphinx>=8.1.3",
112113
"sphinx-argparse-cli>=1.18.2",
113-
"sphinx-autodoc-typehints>=2.4.4",
114+
"sphinx-autodoc-typehints>=2.5",
114115
"sphinx-copybutton>=0.5.2",
115116
"sphinx-inline-tabs>=2023.4.21",
116117
"sphinxcontrib-towncrier>=0.2.1a0",
117118
"towncrier>=24.8",
118119
]
119120
fix = [
120-
"pre-commit-uv>=4.1.3",
121+
"pre-commit-uv>=4.1.4",
121122
]
122123
pkg-meta = [
123124
"check-wheel-contents>=0.6",
124125
"twine>=5.1.1",
125-
"uv>=0.4.17",
126+
"uv>=0.5.3",
126127
]
127128
release = [
128129
"gitpython>=3.1.43",
129-
"packaging>=24.1",
130+
"packaging>=24.2",
130131
"towncrier>=24.8",
131132
]
132133

src/tox/execute/api.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,15 @@ def call(
125125
try:
126126
# collector is what forwards the content from the file streams to the standard streams
127127
out, err = out_err[0].buffer, out_err[1].buffer
128-
out_sync = SyncWrite(out.name, out if show else None)
129-
err_sync = SyncWrite(err.name, err if show else None, Fore.RED if self._colored else None)
128+
out_sync = SyncWrite(
129+
out.name,
130+
out if show else None, # type: ignore[arg-type]
131+
)
132+
err_sync = SyncWrite(
133+
err.name,
134+
err if show else None, # type: ignore[arg-type]
135+
Fore.RED if self._colored else None,
136+
)
130137
with out_sync, err_sync:
131138
instance = self.build_instance(request, self._option_class(env), out_sync, err_sync)
132139
with instance as status:

src/tox/session/cmd/run/parallel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def parallel_flags(
6262
help="run tox environments in parallel, the argument controls limit: all,"
6363
" auto - cpu count, some positive number, zero is turn off",
6464
action="store",
65-
type=parse_num_processes, # type: ignore[arg-type] # nargs confuses it
65+
type=parse_num_processes,
6666
default=default_parallel,
6767
metavar="VAL",
6868
**({"nargs": "?"} if no_args else {}), # type: ignore[arg-type] # type checker can't unroll it

tests/execute/local_subprocess/test_local_subprocess.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ def __init__(self) -> None:
4040
)
4141

4242
def read_out_err(self) -> tuple[str, str]:
43-
out_got = self.out_err[0].buffer.getvalue().decode(self.out_err[0].encoding) # type: ignore[attr-defined]
44-
err_got = self.out_err[1].buffer.getvalue().decode(self.out_err[1].encoding) # type: ignore[attr-defined]
43+
out_got = self.out_err[0].buffer.getvalue().decode(self.out_err[0].encoding)
44+
err_got = self.out_err[1].buffer.getvalue().decode(self.out_err[1].encoding)
4545
return out_got, err_got
4646

4747

tests/tox_env/python/virtual_env/package/test_python_package_util.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,14 @@ def test_load_dependency_many_extra(pkg_with_extras: PathDistribution) -> None:
3939
requires = pkg_with_extras.requires
4040
assert requires is not None
4141
result = dependencies_with_extras([Requirement(i) for i in requires], {"docs", "testing"}, "")
42+
sphinx = [Requirement("sphinx>=3"), Requirement("sphinx-rtd-theme<1,>=0.4.3")]
4243
exp = [
4344
Requirement("platformdirs>=2.1"),
4445
Requirement("colorama>=0.4.3"),
45-
Requirement("sphinx>=3"),
46-
Requirement("sphinx-rtd-theme<1,>=0.4.3"),
46+
*(sphinx if sys.version_info[0:2] <= (3, 8) else []),
4747
Requirement(f'covdefaults>=1.2; python_version == "2.7" or python_version == "{py_ver}"'),
4848
Requirement(f'pytest>=5.4.1; python_version == "{py_ver}"'),
49+
*(sphinx if sys.version_info[0:2] > (3, 8) else []),
4950
]
5051
for left, right in zip_longest(result, exp):
5152
assert isinstance(right, Requirement)

tox.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
requires = ["tox>=4.21"]
1+
requires = ["tox>=4.23.2"]
22
env_list = ["fix", "3.13", "3.12", "3.11", "3.10", "3.9", "3.8", "cov", "type", "docs", "pkg_meta"]
33
skip_missing_interpreters = true
44

0 commit comments

Comments
 (0)