fix: make update_pythons.py survive GitHub API rate limits #2997
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 365 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.353
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2997"
general
weight: 0.35
glaziermag
The weekly
Update dependenciesjob fails whenever the hosted runner's unauthenticated GitHub API budget (60 requests/hour per IP) is used up:bin/update_pythons.pyfetches the GraalPy and Python-Apple-support release lists with barerequests.get()and raises on the first 403. Scheduled runs 35567370482 (2026-09-21) and 33363160761 (2026-08-31) both died this way in "Run update: python configs", so the 09-21 run produced no update and the 08-31 miss needed manual dispatches on 09-01/09-02.The sibling scripts in the same nox session (
update_virtualenv.py,update_python_build_standalone.py) already usecibuildwheel.extra.github_api_request, which is meant to sleep untilx-ratelimit-resetand retry. That branch has never worked: it computes the wait asreset_time - int(e.headers.get("date", 0)), andDateis an RFC 2822 string, so it raisesValueErroron every rate-limited response (extra.py:78, since 1638641 / #2002).This PR routes both calls in
update_pythons.py(:123, :380) throughgithub_api_request, computes the wait fromtime.time()instead of theDateheader, and adds a unit test for the retry path (it fails onmainwith theValueErrorabove).Reproduction: exhaust the unauthenticated budget from your IP, then run the script.
main:requests.exceptions.HTTPError: 403 Client Error: rate limit exceeded for url: https://api.github.com/repos/beeware/Python-Apple-support/releasesmain+ only theupdate_pythons.pychange:ValueError: invalid literal for int() with base 10: 'Wed, 23 Sep 2026 16:01:43 GMT'atcibuildwheel/extra.py:78Github rate limit exceeded. Waiting for 3209 seconds.and the script continues after the reset.nox -s update_pinson this branch viaworkflow_dispatchon my fork: 35886486982, all steps green.prek -apasses.The release checklist depends on this job (docs/contributing.md: "Autoupdates are run weekly, with a PR being raised with any changes as required, so just make sure the latest one is merged before continuing").
Written with Claude Code; the reproduction, the test and the fork run were executed as described.
🤖 Generated with Claude Code