From 74d49d2912df6a1b0c579f5e56656cbcd4c4990d Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Wed, 12 Nov 2025 11:01:03 +0200 Subject: [PATCH 1/6] tox: remove unneeded `xdist: -e .` No reason for it that I can see. --- tox.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/tox.ini b/tox.ini index 8e760e9e2e2..78024db28c3 100644 --- a/tox.ini +++ b/tox.ini @@ -108,7 +108,6 @@ deps = twisted25: twisted>=25 asynctest: asynctest xdist: pytest-xdist>=2.1.0 - xdist: -e . # Can use the same wheel for all environments. package = wheel wheel_build_env = .pkg From 7c581d557afca6c65c4a81db56adb131d9d27e41 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Wed, 12 Nov 2025 11:02:26 +0200 Subject: [PATCH 2/6] tox: remove no longer needed `pip` download=True Whatever pip is used almost certainly has the new resolver by now. --- tox.ini | 3 --- 1 file changed, 3 deletions(-) diff --git a/tox.ini b/tox.ini index 78024db28c3..d143334072a 100644 --- a/tox.ini +++ b/tox.ini @@ -173,9 +173,6 @@ description = run reverse dependency testing against pytest plugins under `{basepython}` # use latest versions of all plugins, including pre-releases pip_pre=true -# use latest pip to get new dependency resolver (#7783) -download=true -install_command=python -m pip install {opts} {packages} changedir = testing/plugins_integration deps = -rtesting/plugins_integration/requirements.txt setenv = From bb20945c4503f0508534955897391318eaabad50 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Wed, 12 Nov 2025 11:32:14 +0200 Subject: [PATCH 3/6] ci,tox: generate coverage xml in tox, not in CI This way CI doesn't need to install coverage on its own just to run the `coverage report xml` command, instead it goes through tox. --- .github/workflows/test.yml | 6 +----- tox.ini | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fbee593f7c2..a3e1eaac993 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -271,7 +271,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install tox coverage + pip install tox - name: Test without coverage if: "! matrix.use_coverage" @@ -283,10 +283,6 @@ jobs: shell: bash run: tox run -e ${{ matrix.tox_env }}-coverage --installpkg `find dist/*.tar.gz` - - name: Generate coverage report - if: "matrix.use_coverage" - run: python -m coverage xml - - name: Upload coverage to Codecov if: "matrix.use_coverage" uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 diff --git a/tox.ini b/tox.ini index d143334072a..2ad59f8225e 100644 --- a/tox.ini +++ b/tox.ini @@ -65,6 +65,8 @@ commands = doctesting: {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --doctest-modules --pyargs _pytest coverage: coverage combine coverage: coverage report -m + # Run `coverage xml` only on CI. + coverage: python -c 'import os; os.environ.get("CI") and os.execlp("coverage", "coverage", "xml")' passenv = COVERAGE_* PYTEST_ADDOPTS From 1afe0ae7e0e1713fd2c141bb03bb4b812299db84 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Wed, 12 Nov 2025 12:15:49 +0200 Subject: [PATCH 4/6] ci: remove unneeded `setuptools` install I don't think it's needed. --- .github/workflows/prepare-release-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prepare-release-pr.yml b/.github/workflows/prepare-release-pr.yml index 9dcfea7bae5..879596ca7d7 100644 --- a/.github/workflows/prepare-release-pr.yml +++ b/.github/workflows/prepare-release-pr.yml @@ -41,7 +41,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install --upgrade setuptools tox + pip install --upgrade tox - name: Prepare release PR (minor/patch release) if: github.event.inputs.major == 'no' From 5bc8de265c047c56e5cd0e9345f316ec9326b77a Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Wed, 12 Nov 2025 12:14:44 +0200 Subject: [PATCH 5/6] ci: be consistent in how we install tox No need to upgrade when it's not already installed. --- .github/workflows/deploy.yml | 2 +- .github/workflows/doc-check-links.yml | 2 +- .github/workflows/prepare-release-pr.yml | 4 ++-- .github/workflows/test.yml | 2 +- .github/workflows/update-plugin-list.yml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ed7de4cc0c5..1a4426af702 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -55,7 +55,7 @@ jobs: - name: Install tox run: | python -m pip install --upgrade pip - pip install --upgrade tox + pip install tox - name: Generate release notes env: diff --git a/.github/workflows/doc-check-links.yml b/.github/workflows/doc-check-links.yml index 497ec73500a..9de20b37cc3 100644 --- a/.github/workflows/doc-check-links.yml +++ b/.github/workflows/doc-check-links.yml @@ -28,7 +28,7 @@ jobs: python-version: "3.13" cache: pip - - name: Install dependencies + - name: Install tox run: | python -m pip install --upgrade pip pip install tox diff --git a/.github/workflows/prepare-release-pr.yml b/.github/workflows/prepare-release-pr.yml index 879596ca7d7..94b3dfc7710 100644 --- a/.github/workflows/prepare-release-pr.yml +++ b/.github/workflows/prepare-release-pr.yml @@ -38,10 +38,10 @@ jobs: with: python-version: "3.13" - - name: Install dependencies + - name: Install tox run: | python -m pip install --upgrade pip - pip install --upgrade tox + pip install tox - name: Prepare release PR (minor/patch release) if: github.event.inputs.major == 'no' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a3e1eaac993..443a1723a0c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -268,7 +268,7 @@ jobs: check-latest: true allow-prereleases: true - - name: Install dependencies + - name: Install tox run: | python -m pip install --upgrade pip pip install tox diff --git a/.github/workflows/update-plugin-list.yml b/.github/workflows/update-plugin-list.yml index b396d6e19d4..c4d3087f285 100644 --- a/.github/workflows/update-plugin-list.yml +++ b/.github/workflows/update-plugin-list.yml @@ -40,7 +40,7 @@ jobs: - name: Install tox run: | python -m pip install --upgrade pip - pip install --upgrade tox + pip install tox - name: Update Plugin List run: tox -e update-plugin-list From 665363abc0624b861a7257df7d9eaab5eb0b018a Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Wed, 12 Nov 2025 12:18:25 +0200 Subject: [PATCH 6/6] ci: replace SETUPTOOLS_SCM_PRETEND_VERSION -> FOR_PYTEST This way it can only affect pytest. Don't think it matters here but only for consistency. --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1a4426af702..f24a1eec200 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,7 +16,7 @@ jobs: package: runs-on: ubuntu-latest env: - SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.version }} + SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST: ${{ github.event.inputs.version }} timeout-minutes: 10 # Required by attest-build-provenance-github.