Skip to content

fix: resolve version ranges for each target Python - #275

Merged
patrickballard merged 3 commits into
wheelgap:mainfrom
Swarneil1905:fix/84-per-python-resolution
Nov 13, 2026
Merged

patrickballard merged 3 commits into
wheelgap:mainfrom
Swarneil1905:fix/84-per-python-resolution

Conversation

@Swarneil1905

@Swarneil1905 Swarneil1905 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Closes #84

What this changes

Completes the multi-Python follow-up to #156. Version ranges now select the newest matching release whose Requires-Python permits each target Python major/minor, using one index response per package.

Distinct resolutions appear as separate rows in text, Markdown, JSON, and the check_lockfile() API. Each retains its selected version, eligible files, and any error, with n/a for targets using another resolution. Identical resolutions share a row, and the existing JSON keys and scalar version remain unchanged.

Regular and free-threaded targets share release selection for the same Python major/minor while checking their own wheel tags. This works with both the PyPI JSON API and simple indexes. Exact pins and bare package names retain their existing behavior.

Adds offline regression coverage for release selection, file filtering, markers, free-threaded targets, failed lookups, refreshes, and report output. Updates the README and documentation.

Validation on Windows:

  • Ruff formatting, lint, mypy, and git diff --check passed.
  • Full test suite: 3,203 passed, 61 skipped.
  • 17 regression cases failed against the original source and passed with the fix.
  • Windows timer warnings in existing build-info tests also reproduced on the unchanged base.

These checks were run through the existing virtual environment because the agent environment could not access its uv cache.

AI tools used (if any): OpenAI Codex assisted with implementation, tests, documentation, and validation.

Checklist

@patrickballard

Copy link
Copy Markdown
Collaborator

Thanks for finishing this off, @Swarneil1905. The overall shape looks good: one index response per package, a resolution per Python major/minor, identical answers sharing a row, and offline tests covering both the JSON API and simple indexes.

This one changes src/wheelgap/pypi.py and is for a help wanted issue, so Patrick will review and merge it himself rather than us doing it in the usual pass. Two things he'll likely look at, no action needed from you yet:

  • the pinned-lookup cache write moved out of _fill_json_data and now saves _files(data["urls"]) instead of urls, so what lands in the cache has changed shape;
  • CHANGELOG.md still needs its line under ## Unreleased, ending (#275, thanks [@Swarneil1905](https://github.com/Swarneil1905)). We can add that when it goes in.

(Review assisted by Claude.)

@patrickballard

Copy link
Copy Markdown
Collaborator

Thanks for adding the changelog line, @Swarneil1905. I've seen the new commit: the bullet is in the right place and format, and CI is green on it. Nothing else changes from the note above: because this touches src/wheelgap/pypi.py and is for a help wanted issue, Patrick will review and merge it himself. No action needed from you.

(Review assisted by Claude.)

Drop wheelgap#84 from the README roadmap, stop saying ranges ignore Requires-Python with
several -p versions, and say that a range resolving to different releases gets
one row (and one JSON entry) per release, counted per row in the summary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@patrickballard
patrickballard merged commit eb9d97a into wheelgap:main Nov 13, 2026
13 checks passed
@patrickballard

Copy link
Copy Markdown
Collaborator

Merged, thanks @Swarneil1905! This closes #84, which has been on the roadmap since the start. Sharing one index response and keeping identical answers on a single row kept it tidy.

I pushed one docs commit before merging. It drops #84 from the README roadmap, stops docs/inputs.md saying ranges ignore Requires-Python with several -p versions, and notes in the output docs and JSON schema that a range resolving to different releases gets one row per release.

If you'd like another, #262 (don't send a name to an outside service when another input in the same run puts it on a private index) is open and builds on the provenance maps you just extended.

(Review 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.

Version ranges: pick the newest release that supports each target's Python

2 participants