Repository navigation
Use cached gap wheel matches for the fix hint - #628
Conversation
|
Thanks @kunalkshah1, this looks good overall: the hint counts the gaps the cached gap wheel list can fill, is dropped when the list fills none, and falls back to the general wording when there is no cache or it's bypassed, all without fetching anything. It touches the same code in CI is green on this commit. #611 is a (Review assisted by Claude.) |
…ched wheelgap#620 removed gapwheels.look_up() and gave the cached gap wheel list a one-hour life. The hint now reads the cached list through look_up_cached(), which never fetches, so cached_list() is gone. Tests count fetches with the gap_wheels fixture and also cover: an expired or corrupt cached list (the plain line again), several filled cells, and no hint from a cached list with -q, --json, --offline, --index-url, a mirror, --no-binary or a private package. docs/output.md says the list is kept for an hour and that no line is not a statement that nothing fits. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…#628's Both PRs added a paragraph at the same spot in docs/output.md, which would conflict whichever merges second. Co-Authored-By: Claude Fable 5.2 <[email protected]>
CHANGELOG conflict only: both bullets kept, this PR first. Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
Thanks @kunalkshah1! A counted hint from the cached list, with no request, is what #611 asked for. #620 merged while this was open and changed the lookup under it, so we've made these changes:
It'll merge once a final review passes. (Review assisted by Claude.) |
CHANGELOG.md conflicted with wheelgap#622's bullet: both kept, this PR's first. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…13.0 The counted hint counts the gap cells the cached list fills, not packages, so it now ends 'for N of these gaps.' docs/output.md implied the plain hint is in 0.13.0; it and the front-page sample note now say the whole line is after 0.13.0. Co-Authored-By: Claude Fable 5.2 <[email protected]>
# Conflicts: # CHANGELOG.md
* Report Dockerfile RUN provenance for installed requirements * Credit PR 630 in the changelog * docs: move the --dockerfile-inputs header paragraph clear of #628's Both PRs added a paragraph at the same spot in docs/output.md, which would conflict whichever merges second. Co-Authored-By: Claude Fable 5.2 <[email protected]> * dockerfile_inputs: give file relative to the build context, with / The file value was the path as wheelgap joined it, so it changed with the working directory, with how --dockerfile-context was given (absolute or not) and with the OS's separator. It is now the path the Dockerfile's COPY names: relative to the build context, with /. The schema describes the three keys. Co-Authored-By: Claude Fable 5.2 <[email protected]> --------- Co-authored-by: Kunal Shah <[email protected]> Co-authored-by: Patrick Ballard <[email protected]> Co-authored-by: Claude Fable 5.2 <[email protected]>
|
Merged, thanks @kunalkshah1! The hint now uses the cached list and never makes a request. The final review added two things: the counted line reads "of these gaps", since it counts gaps and not packages, and the docs no longer say the hint is in 0.13.0. (Reply assisted by Claude.) |
Closes #611
What this changes
Use the cached gap wheel list to count matching gap cells in the text and Markdown hint. Suppress the hint when the cached list covers none. Keep the general hint when the cache is missing or bypassed. The hint reads the cache through a function that cannot fetch the list.
Tests exercise a fitting wheel, a different target, a cache miss, --no-cache and --online in both output formats. The network stub fails if the hint fetches the list. Four regression cases fail against the original code.
AI tools used: Codex
Ruff formatting and lint, mypy, and full pytest on macOS with Python 3.14 (5,190 passed, 3 skipped). The Unreleased entry will be added with the PR number.