Skip to content

Add upstream shortlist script for unblocked build-lab candidates (#267) - #298

Merged
patrickballard merged 2 commits into
wheelgap:mainfrom
dianatofficial:feat/upstream-shortlist-267
Nov 30, 2026
Merged

patrickballard merged 2 commits into
wheelgap:mainfrom
dianatofficial:feat/upstream-shortlist-267

Conversation

@dianatofficial

Copy link
Copy Markdown
Contributor

Implements scripts/upstream_shortlist.py and offline tests in tests/test_upstream_shortlist.py.

Closes #267.

What it does

  • Collects non-pure-Python packages from data/builds.json that built cleanly (outcome == "built", import == "ok", gil != "re-enabled") whose latest release still lacks a wheel in data/coverage.json, ordered by package rank.
  • Resolves each package's GitHub repository from PyPI version JSON (/pypi/{name}/{version}/json) using build_upstream_fixes.pick_repo.
  • Checks repository activity via closed pulls (GET /repos/{repo}/pulls?state=closed), flagging repos with no merged PRs or no merged PR within the last 6 months as blocked.
  • Searches open issues/PRs on GitHub matching the missing target (win-arm64, musl, freethreaded, 3.15) in 5-term OR chunks, flagging already-tracked targets as blocked.
  • Routes all network calls through default_fetch with a 20s timeout and sends GITHUB_TOKEN/GH_TOKEN strictly to api.github.com.

Live run output (--limit 30)

Evaluated 30 candidates -> 9 ready
  #46 rpds-py (3.14t win-arm64) -> crate-py/rpds [last PR: 2026-11-25]
  #88 greenlet (3.14t win-arm64) -> python-greenlet/greenlet [last PR: 2026-09-14]
  #253 playwright (3.14 musl-aarch64) -> Microsoft/playwright-python [last PR: 2026-11-27]
  #289 watchdog (3.14 musl-aarch64) -> gorakhargosh/watchdog [last PR: 2026-11-29]
  #313 safetensors (3.14t linux-x86_64) -> huggingface/safetensors [last PR: 2026-11-27]
  #313 safetensors (3.14t win-arm64) -> huggingface/safetensors [last PR: 2026-11-27]
  #362 pymongo (3.14 musl-aarch64) -> mongodb/mongo-python-driver [last PR: 2026-11-25]
  #366 duckdb (3.14 musl-aarch64) -> duckdb/duckdb-python [last PR: 2026-11-24]
  #384 hypothesis (3.14t win-arm64) -> HypothesisWorks/hypothesis [last PR: 2026-11-29]

Verification

  • python -m pytest -q tests/test_upstream_shortlist.py tests/test_scripts.py tests/test_assets.py tests/test_star_links.py tests/test_site_metadata.py (55 passed, 27 subtests passed)
  • python scripts/check_notes.py
  • ruff check scripts/upstream_shortlist.py tests/test_upstream_shortlist.py

@patrickballard

Copy link
Copy Markdown
Contributor

Thanks @dianatofficial, this looks good overall: the shortlist rules follow #267 closely, the tests run offline with a fake fetch, and the token only goes to api.github.com. It adds a new script under scripts/ and calls PyPI and the GitHub API, so I'll review and merge this one myself.

- A failed issue search, PyPI lookup or PR listing now blocks the candidate with the reason, rather than reading as 'no existing PR' or 'no merged PRs'.
- Look at the 100 most recently updated closed PRs, not 10, before calling a repo inactive.
- Don't guess when PyPI links several different GitHub repos.
- One failing candidate no longer aborts the run.
- Honour x-ratelimit-reset; space searches 6 s apart without a token.
- Send the token as an unredirected header.
- Ignore the default output file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@patrickballard
patrickballard merged commit 52c6118 into wheelgap:main Nov 30, 2026
1 check passed
@patrickballard

Copy link
Copy Markdown
Contributor

Merged all three (#296, #297 and #298), thanks @dianatofficial! I made a few changes on your branches before merging:

  • the scoreboard now says the PRs add wheels, since none has released yet;
  • the ARM sentence only shows while every picked platform is an ARM one;
  • a failed lookup in the shortlist script blocks a candidate instead of passing it.

If you want another, wheelgap#778 (real screenshots of the CI gate's PR comment in the docs) is open and unclaimed.

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.

Upstream shortlist: rank build-lab candidates and skip ones that are already blocked

2 participants