Skip to content

Commit 698f1dd

Browse files
authored
Fix tests after new setuptools (#3299)
1 parent cf8db09 commit 698f1dd

File tree

5 files changed

+23
-13
lines changed

5 files changed

+23
-13
lines changed

.github/workflows/check.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,18 @@ jobs:
4343
uses: actions/setup-python@v5
4444
with:
4545
python-version: ${{ matrix.py }}
46+
- name: Pick environment to run
47+
run: |
48+
import os; import platform; import sys; from pathlib import Path
49+
env = f'TOXENV=py{"" if platform.python_implementation() == "CPython" else "py"}3{sys.version_info.minor}'
50+
print(f"Picked: {env} for {sys.version} based of {sys.executable}")
51+
with Path(os.environ["GITHUB_ENV"]).open("ta") as file_handler:
52+
file_handler.write(env)
53+
shell: python
4654
- name: Setup test suite
47-
run: tox r -e py${{ matrix.py }} -vv --notest
55+
run: tox r -vv --notest
4856
- name: Run test suite
49-
run: tox r -e py${{ matrix.py }} --skip-pkg-install
57+
run: tox r --skip-pkg-install
5058
env:
5159
CI_RUN: "yes"
5260
DIFF_AGAINST: HEAD

pyproject.toml

Lines changed: 11 additions & 6 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.24.2",
5+
"hatchling>=1.25",
66
]
77

88
[project]
@@ -41,6 +41,7 @@ classifiers = [
4141
"Programming Language :: Python :: 3.10",
4242
"Programming Language :: Python :: 3.11",
4343
"Programming Language :: Python :: 3.12",
44+
"Programming Language :: Python :: 3.13",
4445
"Topic :: Software Development :: Libraries",
4546
"Topic :: Software Development :: Testing",
4647
"Topic :: Utilities",
@@ -52,21 +53,21 @@ dependencies = [
5253
"cachetools>=5.3.3",
5354
"chardet>=5.2",
5455
"colorama>=0.4.6",
55-
"filelock>=3.15.3",
56+
"filelock>=3.15.4",
5657
"importlib-metadata>=7.2; python_version<'3.8'",
5758
"packaging>=24.1",
5859
"platformdirs>=4.2.2",
5960
"pluggy>=1.5",
60-
"pyproject-api>=1.6.1",
61+
"pyproject-api>=1.7.1",
6162
"tomli>=2.0.1; python_version<'3.11'",
6263
"typing-extensions>=4.12.2; python_version<'3.8'",
63-
"virtualenv>=20.26.2",
64+
"virtualenv>=20.26.3",
6465
]
6566
optional-dependencies.docs = [
6667
"furo>=2024.5.6",
6768
"sphinx>=7.3.7",
6869
"sphinx-argparse-cli>=1.16",
69-
"sphinx-autodoc-typehints!=1.23.4,>=2.2.1",
70+
"sphinx-autodoc-typehints!=1.23.4,>=2.2.2",
7071
"sphinx-copybutton>=0.5.2",
7172
"sphinx-inline-tabs>=2023.4.21",
7273
"sphinxcontrib-towncrier>=0.2.1a0",
@@ -81,13 +82,14 @@ optional-dependencies.testing = [
8182
"distlib>=0.3.8",
8283
"flaky>=3.8.1",
8384
"hatch-vcs>=0.4",
84-
"hatchling>=1.24.2",
85+
"hatchling>=1.25",
8586
"psutil>=6",
8687
"pytest>=8.2.2",
8788
"pytest-cov>=5",
8889
"pytest-mock>=3.14",
8990
"pytest-xdist>=3.6.1",
9091
"re-assert>=1.1",
92+
"setuptools>=70.1",
9193
"time-machine>=2.14.1; implementation_name!='pypy'",
9294
"wheel>=0.43",
9395
]
@@ -158,6 +160,9 @@ skip = "*.svg"
158160
ignore-words = "ignore-words.txt"
159161
count = true
160162

163+
[tool.pyproject-fmt]
164+
max_supported_python = "3.13"
165+
161166
[tool.pytest.ini_options]
162167
testpaths = [
163168
"tests",

tests/session/cmd/test_sequential.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ def test_result_json_sequential(
9898
(0, "install_requires"),
9999
(None, "_optional_hooks"),
100100
(None, "get_requires_for_build_wheel"),
101-
(0, "install_requires_for_build_wheel"),
102101
(0, "freeze"),
103102
]
104103
packaging_test = get_cmd_exit_run_id(log_report, ".pkg", "test")
@@ -299,7 +298,6 @@ def test_skip_develop_mode(tox_project: ToxProjectCreator, demo_pkg_setuptools:
299298
(".pkg", "install_requires"),
300299
(".pkg", "_optional_hooks"),
301300
(".pkg", "get_requires_for_build_editable"),
302-
(".pkg", "install_requires_for_build_editable"),
303301
(".pkg", "build_editable"),
304302
("py", "install_package"),
305303
]

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ def test_tox_install_pkg_sdist(tox_project: ToxProjectCreator, pkg_with_extras_p
6767
(".pkg_external_sdist_meta", "_optional_hooks", []),
6868
(".pkg_external_sdist_meta", "get_requires_for_build_sdist", []),
6969
(".pkg_external_sdist_meta", "get_requires_for_build_wheel", []), # required before prepare_metadata*
70-
(".pkg_external_sdist_meta", "install_requires_for_build_wheel", ["wheel"]),
7170
(".pkg_external_sdist_meta", "prepare_metadata_for_build_wheel", []),
7271
("py", "install_package_deps", deps),
7372
("py", "install_package", ["--force-reinstall", "--no-deps", str(pkg_with_extras_project_sdist)]),

tests/tox_env/python/virtual_env/test_setuptools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ def test_setuptools_package(
5151
assert len(py_messages) == 5, "\n".join(py_messages) # 1 install wheel + 3 command + 1 final report
5252

5353
package_messages = [i for i in result if ".pkg: " in i]
54-
# 1 optional hooks + 1 install requires + 1 build requires + 1 build meta + 1 build isolated
55-
assert len(package_messages) == 5, "\n".join(package_messages)
54+
# 1 optional hooks + 1 install requires + 1 build meta + 1 build isolated
55+
assert len(package_messages) == 4, "\n".join(package_messages)

0 commit comments

Comments
 (0)