Skip to content

Repo checker: show when a gap wheel fills a gap, with the lines to install it (wheelgap --fix) #187

Closed

Description

@patrickballard

The repo checker finds a repo's gaps and names the newer release that fixes each one (--suggest). When no release fixes it, the Fix column says "no newer wheel" and the page stops there. It does that even when wheelgap's gap wheel index has a verified wheel for that exact release and target. There are 26 today (gap-wheels.json). One example is cchardet 2.4.1 for 3.14 musl-aarch64.

The next wheelgap release adds --fix (wheelgap/wheelgap#472, wheelgap/wheelgap#477, wheelgap/wheelgap#481). wheelgap.gapwheels matches a lock's gap cells against that list: the same canonical name, an equal version, a wheel tag the target accepts, and the wheel's requires_python. Then it prints how to use the wheels: for a uv.lock, the [tool.uv.index] and [tool.uv.sources] lines for pyproject.toml (and which packages to also list as direct dependencies), and for other lockfiles, where to add the index. Package pages already say when a gap wheel exists (#126). The checker is where someone looks at their own repo's gaps, though, so this is where it counts most: find the gap, then fix it, on the same page.

What to do

  • This needs the wheelgap release with --fix, the one after 0.13.0. You can build and test it now against wheelgap's main branch (uvx --python 3.14 --with git+https://github.com/wheelgap/wheelgap [email protected] tests/test_check_driver.py). The PR lands with, or after, the one that moves WHEELGAP in site/check/worker.mjs. Until then, pytest.importorskip("wheelgap.gapwheels") keeps CI's pinned run green.
  • Worker: after a successful check, fetch https://wheelgap.github.io/wheels/data/gap-wheels.json once per page load. That's one request that names no package, as the CLI's is. Refuse a body over 4 MB (pypi.GAP_WHEELS_MAX_BYTES). The file is on the tracker's own origin, so connect-src 'self' covers it on the live site. Also add the URL to the CSP in site/check/index.html, so a local preview can fetch it. If the fetch or the parse fails, the page shows no gap wheels and nothing else changes.
  • Driver: keep the last check's rows and source (the third value _check_lockfile returns, which check() drops with *_ today). Add gap_wheels(list_json), which runs gapwheels.parse() and then gapwheels.fillable(rows, targets, {id(r.package): source for r in rows}, wheels, origin.private_names([source])). It returns the filled cells (gapwheels.to_json(fills, True)) and the CLI's own --fix text (gapwheels.text_lines(fills, True)). Don't match anything in JavaScript: wheelgap's rules decide.
  • Table: under a filled source or missing cell, add a "gap wheel" tag like the build lab's. Its title says it's unofficial (gapwheels.UNOFFICIAL: built by wheelgap from the PyPI sdist, not by the package's maintainers). When the release fix for that row is "no newer wheel" or "only by losing a wheel elsewhere", the Fix column says a gap wheel is available.
  • "Fix it" section: a Gap wheels block with the --fix text in a <pre> and a Copy button, shown only when something is filled.
  • fixPrompt() in check-logic.mjs: add a section for the filled gaps, with the configuration lines and the same "unofficial" wording. A gap that a release bump fixes still gets the bump; the gap wheel is for the ones it doesn't fix.
  • Everything from the list goes in with textContent, as the rest of the page does.

Done when:

  • For a uv.lock that pins a release and target the list has (cchardet 2.4.1, -p 3.14 -t musl-aarch64), the cell shows the gap wheel tag, the Gap wheels block shows the same lines uvx wheelgap uv.lock --fix -p 3.14 -t musl-aarch64 prints, and the copied prompt includes them.
  • Another version, another target, a package not known to be from PyPI, or a malformed list shows nothing. A failed fetch leaves the page as it is today.
  • Tests in tests/test_check_driver.py cover: a match, a version mismatch, a target the wheel's tag doesn't fit, a private-index package, and a malformed entry. A test in tests/site/check-logic.test.mjs covers the new fixPrompt() section.

Activity

  1. added
    enhancement
    help wanted
    high impact
    on Nov 20, 2026
  2. kunalkshah1 commented on Nov 20, 2026

    @kunalkshah1
    Contributor

    I’d like to take #187. I have a patch ready that reuses wheelgap’s --fix logic in the repo checker. I verified the cchardet example against the published index. The checker keeps its current pin and enables the feature once it moves to a wheelgap release with --fix. I used Codex for implementation and validation.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wantedhigh impact

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions