Skip to content

feat(explain): show published unofficial gap wheels per target - #477

Merged
patrickballard merged 21 commits into
wheelgap:mainfrom
AdityaSreevatsaK:feat/455-explain-gap-wheel
Nov 17, 2026
Merged

patrickballard merged 21 commits into
wheelgap:mainfrom
AdityaSreevatsaK:feat/455-explain-gap-wheel

Conversation

@AdityaSreevatsaK

Copy link
Copy Markdown
Contributor

Closes #455

What this changes

  • Extend the existing opt-in --fix functionality so that --explain --fix shows an unofficial published gap-wheel hint beside the matching package and target.
  • Match the canonical package name, exact release and wheel tags accepted by the target.
  • Add an optional per-package gap_wheel mapping to --json --explain --fix, including installation instructions.
  • Cache a validated non-empty publication list for 24 hours, with --no-cache bypass.
  • Handle unavailable or malformed index data without changing PyPI results or exit codes.
  • Update the JSON schema, README, CLI documentation and changelog.

Checklist

  • Tests added or updated (no network access: use fake_pypi or a fixture)
  • uv run --group dev ruff format . and uv run --group dev ruff check . pass
  • uv run --group dev mypy and uv run --group dev pytest pass
  • CHANGELOG.md has a line under ## Unreleased (if users would notice the change)
  • README updated (if there's a new flag, target or input format)

CI: [All nine jobs passed]

AdityaSreevatsaK and others added 7 commits November 17, 2026 14:22
- The gap wheel line under --explain gives the pip command only for inputs
  pip installs from as they are; for lockfiles it points to the --fix
  section. It's shown once per release, naming the targets it fills, and
  says the wheel is built by wheelgap from the PyPI sdist, not by the
  package's maintainers.
- --json gap_wheel entries: install only for pip kinds, no constant index.
- cache.load_gap_wheels/save_gap_wheels take the list URL
  (pypi.GAP_WHEELS_URL) instead of hardcoding it.
- Docs folded into the --fix and --explain entries; README paragraph
  dropped; output.md, how-it-works.md cache list and CHANGELOG updated.
- Tests: uv.lock hint isn't a pip command, one hint per release, a corrupt
  cached list is fetched again, --no-cache saves nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… parses, AGENTS.md cache line

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@patrickballard

Copy link
Copy Markdown
Collaborator

Thanks @AdityaSreevatsaK, this looks good overall: it reuses the existing gap-wheel matching, keeps PyPI results and exit codes untouched when the list can't be read, and the docs and schema are updated alongside the code.

Because #455 is labelled help wanted (and this also adds caching for the gap-wheel list), Patrick will review and merge this one himself.

(Review assisted by Claude.)

@patrickballard
patrickballard merged commit 03110dd into wheelgap:main Nov 17, 2026
13 checks passed
@patrickballard

Copy link
Copy Markdown
Collaborator

Merged, thanks @AdityaSreevatsaK! Before merging I pushed a few commits:

  • the hint gives pip advice only for inputs pip installs from, and points lockfiles at the --fix section in the same run;
  • it's printed once per release;
  • the cache key comes from the list's URL, and a cached list that no longer parses is fetched again;
  • the docs were folded into the existing --fix and --explain entries;
  • tests cover uv.lock inputs, a corrupt cache and --no-cache;
  • the schema test now checks minItems, which your uv.lock test was the first to reach.

Since you know this code now, #467 (making the gap wheel fix stick in the project, design first) is open with nobody on it.

(Reply assisted by Claude.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--explain: point at a published gap wheel when there is one

2 participants