Repository navigation
Refuse to publish incomplete PHEP 3 schedules - #34
Merged
Merged
Conversation
A failed PyPI fetch left that core package's entry empty in the generated schedule.json, which release.yml publishes and update-schedule.yml commits. The checker then skipped the package's checks silently, so a project with `numpy>=2.3` passed (even with --fail-on-warning) when numpy 2.2 must still be supported. - Schedule generation now raises when any core package has no release data, so both workflows fail and the previous schedule stays in place. Each PyPI request gets 3 attempts (5s, then 10s apart) so a brief outage doesn't fail a release. - The checker warns when a core dependency has no schedule data (missing or empty entry) instead of returning silently. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A later core package failing, by a request error or by yielding no usable X.Y.0 versions, leaves an existing schedule.json byte-for-byte unchanged. - The workflows' `python -c` generation command exits 1 and keeps schedule.json. - The "was not checked" warning also appears for a core dependency in an extra and with --no-adoption-check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
phep3-checkchecks dependencies against a generatedschedule.json. When a PyPI request failed during generation,fetch_package_releases()printed a warning and returned{},fetch_all_core_packages()kept that empty entry, andupdate_schedule_file()saved it.release.ymlpublishes that file as the release asset the Action downloads by default, and the monthlyupdate-schedule.ymlcommits it straight tomain. The checker then returned silently for any core package with no schedule data.So one transient PyPI failure during
release.ymlor the monthlyupdate-schedule.ymlsilently disabled that core package's PHEP 3 checks for every Action user and every local run. For example, withpackages.numpy = {}, a project withrequires-python = ">=3.13"andnumpy>=2.3reportedPASSED(exit 0), even with--fail-on-warning, instead of[ERROR] numpy>=2.3 drops support for numpy 2.2 too early.This came out of a Codex review of #32, which makes local runs download the release
schedule.jsonto match the Action. The weakness predates #32, and fixing it at the generator protects the Action and every local path at once, so it's a separate PR rather than extra validation inside #32.Fix
src/pyhc_actions/phep3/pypi_fetcher.py):fetch_all_core_packages()raises aRuntimeErrornaming every core package with no release data, whether its request failed or it returned no usable X.Y.0 versions.update_schedule_file()therefore writes nothing, and the uncaught error exits the workflows'python -cstep with status 1, sorelease.ymlnever uploads andupdate-schedule.ymlnever commits an incomplete schedule. The previous complete schedule stays in place, and the workflows themselves need no changes.src/pyhc_actions/phep3/checker.py): a core dependency whose schedule entry is missing or empty now gets[WARN] numpy>=2.3 was not checked: schedule has no numpy release data, in base dependencies and extras alike, so--fail-on-warningfails. Dependencies whosepython_versionmarkers exclude every supported Python still produce nothing, as before.Retry
Each PyPI request now gets 3 attempts, 5s and then 10s apart. Since one failed request now fails the whole run, this keeps a brief PyPI hiccup from failing a tag-push release or the unattended monthly job. It costs nothing when PyPI responds and adds about 15s per package only to runs that fail anyway.
Tests
pytest tests/ -v→ 224 passed (211 onmain).tests/test_pypi_fetcher.py(new): a failed request is retried and then succeeds; a package that never responds yields no releases after all attempts; when the last core package fails, either by a request error after all retries or by a response with no usable X.Y.0 versions, an existingschedule.jsonstays byte-for-byte unchanged; and the exactpython -c "...update_schedule_file('schedule.json')"command from both workflows exits 1 without touchingschedule.json.TestMissingScheduleDataintests/test_phep3_checker.py: the empty-numpycase through the CLI (warning with exit 0, exit 1 with--fail-on-warning, also with--no-adoption-check, and with numpy in an extra), a core package missing from the schedule entirely, and a control showing the complete schedule still reports the error.main; the 2 controls pass on both.Release
Today's published release asset (v1.1.3, generated 2026-09-29) and the committed
schedule.json(generated 2026-11-01) both have data for all 10 core packages, so nothing needs regenerating. This should ship in the same release as #32.🤖 Generated with Claude Code