Repository navigation
Weekly accuracy check: compare wheelgap with pip on real packages - #252
Merged
Merged
Conversation
scripts/check_against_pip.py checks about 50 packages' latest releases on nine targets with wheelgap and with `pip download --no-deps --only-binary=:all:` given exactly the tags AGENTS.md lists, prints every disagreement with its pip command, and exits 1 on any. A weekly, read-only workflow runs it; CONTRIBUTING.md says how to run it locally. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review fixes for #252: - pip prints "No matching distribution found" when it can't reach the index too, so "no wheel" now needs pip's -vv log to show the project's page was fetched, with no retry and no failed fetch; anything else is an error. pip runs as `install --dry-run --report` (same choice as download, metadata only), isolated from pip.conf and PIP_* variables. - wheelgap is asked about the pinned release, as pip is, so yanked files count the same (PEP 592); a yanked wheel pip takes only because --only-binary hides the sdist isn't compared. - musllinux_1_0 and plain linux_<arch>, which pip and wheelgap accept, are passed too, and AGENTS.md's musl line lists musllinux_1_0. - A crash exits 2; the workflow has a concurrency group and a fence the log can't close. - Tests for run_pip with a faked subprocess.run, main's exit codes, and the guards mutation testing found untested. Co-Authored-By: Claude Opus 5.5 <[email protected]>
patrickballard
added a commit
that referenced
this pull request
Nov 12, 2026
…rdening pixi.lock's PyPI package names now go through package_name like the other lockfiles' (conda names are left alone: they aren't PEP 508 names). Its quoted-scalars test used the name pure'wheel, which is now an input error; it uses purewheel, and test_block_yaml_reads still covers ''. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Closes #226
Made with Claude Code.
What changed
scripts/check_against_pip.py: for 52 packages with interesting wheel sets (numpy, cryptography, pydantic-core, psycopg2-binary, orjson, lxml, grpcio, pyarrow, ruff, psutil, pywin32, mysqlclient, plus a pure wheel and an sdist-only control) and nine targets (3.14 on manylinux and musllinux x86_64/aarch64, win-amd64, win-arm64 and macos-arm64; 3.14t on linux-x86_64; 3.14 on linux-x86_64 with glibc 2.17):check_packages([(name, version)])), so yanked files count as they do for pip (PEP 592);NAME==VERSION:pip install --dry-run --ignore-installed --no-deps --only-binary=:all: --report …with exactly the tags AGENTS.md lists. A dry run picks a file the same waypip downloaddoes, but fetches only the wheel's metadata;wheel. Every disagreement is printed in a table with a pip command that reproduces it, and the script exits 1."No wheel" needs positive evidence. pip prints "No matching distribution found" even when it can't reach the index (connection refused, a dead proxy, retries used up, a 404 or 429 that it skips). So pip runs with
-vv, and "no wheel" counts only if the log hasFetched page https://pypi.org/simple/<name>/and noRetrying (orCould not fetch URLline. Anything else is an error. Errors, failed lookups and crashes are listed as "couldn't compare" and exit 2, so a broken run can't pass as clean. I checked this with real pip as well as in the tests: a deadHTTPS_PROXYand a 404 index both come out as errors.pip is isolated. It runs with
--isolated --no-cache-dir --disable-pip-version-check, everyPIP_*variable is removed from its environment, and its only output is a small report in a temp folder deleted after each run.Tags. musllinux goes down to
musllinux_1_0, and Linux targets also get plainlinux_<arch>, since pip and wheelgap accept both. AGENTS.md's musl line now listsmusllinux_1_0, and the armv7l note says pip acceptslinux_<arch>on every arch. Both are factual fixes; no rules change.One case isn't compared. If the release has a live sdist, a yanked wheel that pip takes only because
--only-binaryhides the sdist is skipped. A normal install builds the sdist, so wheelgap'ssourceis right there..github/workflows/accuracy.yml:workflow_dispatch, with aconcurrencygroup;permissions: contents: read, no secrets andpersist-credentials: false, and uses the same SHA-pinned actions asci.yml;~~~~~~~~~~fence that the log can't close.CI's test job stays offline.
CONTRIBUTING.md: how to run it locally. It only adds how-to text; no rules change.
tests/test_check_against_pip.py, all offline:targets.py's on Linux;run_pipwith a fakedsubprocess.run: a wheel, a real no-wheel, retry-then-no-match,Could not fetch URL, a timeout, a non-zero exit with a wheel in the report, exit 0 without a wheel, and exit 0 with two wheels;PIP_*variables are dropped;missingnot being treated aswheel, and theunknownguard;main's exit codes, and a crash exiting 2.I checked that the main guards are covered by changing each one and seeing a test fail.
No CHANGELOG entry: it's maintainer tooling, so users won't notice.
Why the pip tags are written out instead of taken from
targets.pypip is the referee here. If the script took its
--platformlist fromTarget.platform_tags(), a regression intargets.py's lists (like #79) would reach pip too, and both sides would agree on the wrong answer. Sopip_platforms()follows AGENTS.md on its own. A unit test pins it to AGENTS.md's worked example, and another checks it againsttargets.pyon Linux. The tracker's cross-check (wheelgap/tracker#48) deliberately does the opposite: it takes the tags from the released wheelgap that made the scan, so it has no copy of the tag lists, and this weekly check covers the lists themselves.Verification
pip download(pip 26.3, Python 3.14): 468 checks, 468 agree, 0 disagree.ruff format,ruff check,mypyandpytest(1643 passed) all pass..github/and AGENTS.md changed, so this gets the closer review.🤖 Generated with Claude Code