Repository navigation
ci: add ten more projects to the downstream matrix - #1261
Merged
Merged
Conversation
Probe-tested the downstream consumers from pypa#1250 against this packaging and add the ones that exercise it directly, install cleanly, and run their suites in well under five minutes: dependency-groups, dep-logic, twine, cibuildwheel, hatchling, virtualenv, pdm, and tox. Projects that vendor packaging (pipenv, poetry-core, pex), do not import it (installer), or are too slow/network-bound (grayskull, pip-audit) were left out, as were ones whose suites are too environment-sensitive to run from a release tarball (flit, scikit-build-core, importlib_metadata). Two harness details the newer releases need: - Scope SETUPTOOLS_SCM_PRETEND_VERSION / PDM_BUILD_SCM_VERSION to the build step. GitHub tag tarballs ship no .git, so the version backends need a pretend version; leaving it set during the test run breaks hatchling's version-detection tests. - Point the test TMPDIR outside this checkout. nox's create_tmp() places it inside the repo, so tools that walk up the tree (hatchling's VCS sdist builder, tox/pdm config discovery) find packaging's own repo metadata. The original five projects predate pytest 9.1.0 and keep their pytest<9.1.0 pin; the newer ones support 9.1.0 and must not get it. Assisted-by: ClaudeCode:claude-opus-4.8
These vendor packaging, so installing them normally would exercise their bundled copy, not this one. Reuse the trick the pip branch already uses: after the editable install, replace the vendored packaging directory with the current source. packaging's modules import relatively, so the dropped-in copy is self-contained under any vendor namespace (poetry-core injects its _vendor onto sys.path; pipenv keeps two copies, its own vendor tree and the patched pip). Verified at runtime that the swapped copy reports the dev version. poetry-core needs setuptools for its C-extension masonry build fixtures, and pipenv's --no-cov addopts is dropped since pytest-cov is not in its test extra. Assisted-by: ClaudeCode:claude-opus-4.8
GitHub Actions sets CI=true, which makes tox append a pip-freeze line to command output. Several of tox's own tests assert exact output and do not expect it, so they failed only on CI. Unset CI for the tox test run. Assisted-by: ClaudeCode:claude-opus-4.8
…ng pytest The original pinned projects break under pytest 9.1.0 (2026-06-13), whose parametrize handling turns their test collection into errors. Instead of hand-pinning pytest<9.1.0 (which only constrains pytest and relies on install ordering), cap dependency resolution at the day before via UV_EXCLUDE_NEWER and PIP_UPLOADED_PRIOR_TO. They resolve pytest 9.0.x with otherwise-current deps, on whichever backend nox uses, and the install-order workaround goes away. Assisted-by: ClaudeCode:claude-opus-4.8
Replace the ~170-line if/elif chain with a frozen Project dataclass and a table of entries. Each project declares its url, install args, optional build-only install env (scoped SCM version overrides), vendored packaging dirs to swap, pytest args, extra test env, and a date_limit flag; sensible defaults keep most entries to a line or two. One generic body then drives every project: apply the date cap, build a test env with TMPDIR outside the checkout, install, swap any vendored copies, and run pytest. pip keeps the only special case -- it pre-builds its common test wheels before the swap. No behavior change: all fifteen downstream projects were re-run and pass. Assisted-by: ClaudeCode:claude-opus-4.8
tox's is_ci() (tox/util/ci.py) checks several variables, and GitHub Actions sets both CI and GITHUB_ACTIONS. Unsetting only CI still left is_ci() true on CI, so the pip-freeze line reappeared in command output and the output-asserting tests failed there while passing locally. Unset GITHUB_ACTIONS too. Assisted-by: ClaudeCode:claude-opus-4.8
henryiii
marked this pull request as ready for review
June 15, 2026 13:12
notatallshaw
approved these changes
Jun 15, 2026
notatallshaw
left a comment
Member
There was a problem hiding this comment.
Just need to update the cutoff value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
Inspired by the downstream survey in #1250, this expands the
downstreamjob to cover more of the ecosystem.What's added
Ten projects, each verified green by running its real suite against this
packagingthrough the actualnoxsession on a regular CPython 3.14 (matching CI).Imported directly (not vendored):
Vendored — tested via the copytree swap (the same trick the
pipbranch already uses: after the editable install, replace the vendoredpackagingdir with the current source;packaging's relative imports make the dropped-in copy self-contained under any vendor namespace). The swap is runtime-verified to report the dev version.src/poetry/core/_vendor/packagingpipenv/vendor/packaging,pipenv/patched/pip/_vendor/packagingtests/unit)¹ Test-run wall time (plus ~15–20s install each); every project runs on its own matrix runner.
What was deliberately left out
packagingand the swap is feasible (its import hook even tolerates the new_ranges.py), but its full suite is integration/network-heavy — only a thin ~24-test subset is runnable, so the signal isn't worth the matrix slot.packagingat all.testmodule).Harness details worth a look in review
.git, so setuptools-scm / pdm-backend need a pretend version to build — but leavingSETUPTOOLS_SCM_PRETEND_VERSIONset during the test run breaks hatchling's version-detection tests, so it's passed only toinstall().TMPDIRis pointed outside the checkout.nox'screate_tmp()places the temp dir inside this git repo, so downstream tools that walk up the tree (hatchling's VCS sdist builder, tox/pdm config discovery) find packaging's own repo metadata and misbehave.setuptools, and pipenv's--no-covaddopts is dropped sincepytest-covisn't in its test extra.While probing, unearth's tests failed against current
mainon a genuine bug —SpecifierSet.contains()no longer applies implicit pre-release exclusion:.filter()still excludes them correctly, socontains()andfilter()now disagree. It's correct on 25.0 but broken on 26.1, 26.2, andmain(came in with the range-engine work in_ranges.py; predates #1259). Tracking separately — flagging here since this PR's job is what surfaces it.Opened as a draft pending maintainer decision on the project set and the regression.