Skip to content

Notes: add an optional python field so a note can retire per Python - #53

Merged
patrickballard merged 2 commits into
wheelgap:mainfrom
duan-n2d:notes-python-field
Nov 13, 2026
Merged

patrickballard merged 2 commits into
wheelgap:mainfrom
duan-n2d:notes-python-field

Conversation

@duan-n2d

Copy link
Copy Markdown
Contributor

A note lists platforms but no Python, so it only retires when every Python target of its platforms has a wheel. A note about a gap on 3.13 therefore stays up while only 3.14t is missing, and an alternative note sets a package aside on a free-threaded campaign even when the alternative has no free-threaded wheels.

Add an optional python list of scanned Python labels ("3.13", "3.14t", ...) meaning the note applies only to those Pythons:

  • check_notes validates it against the Pythons in coverage.json's targets (non-empty list, each label scanned, no duplicates).
  • check_notes.current() counts only the listed Pythons' targets when deciding that a note has retired.
  • build_campaigns only links a note, or sets a package aside for an alternative note, on a campaign whose Python is listed.
  • The package page shows "for Python ..." on the note's card, and the package JSON carries python for a note that has one.

The JSON leaves python out of a note that has none, rather than writing null as it does for versions. wheelgap parses these notes and rejects any whose keys aren't exactly the ones it knows, so a null on every note would make a released client drop all of them. Notes without the field keep the JSON they had before.

This changes the note format. Fixes #52.

A note lists platforms but no Python, so it only retires when every Python
target of its platforms has a wheel. A note about a gap on 3.13 therefore
stays up while only 3.14t is missing, and an alternative note sets a package
aside on a free-threaded campaign even when the alternative has no
free-threaded wheels.

Add an optional `python` list of scanned Python labels ("3.13", "3.14t", ...)
meaning the note applies only to those Pythons:

- check_notes validates it against the Pythons in coverage.json's targets
  (non-empty list, each label scanned, no duplicates).
- check_notes.current() counts only the listed Pythons' targets when deciding
  that a note has retired.
- build_campaigns only links a note, or sets a package aside for an
  alternative note, on a campaign whose Python is listed.
- The package page shows "for Python ..." on the note's card, and the
  package JSON carries `python` for a note that has one.

The JSON leaves `python` out of a note that has none, rather than writing
null as it does for versions. wheelgap parses these notes and rejects any
whose keys aren't exactly the ones it knows, so a null on every note would
make a released client drop all of them. Notes without the field keep the
JSON they had before.

This changes the note format. Fixes wheelgap#52.
@patrickballard

Copy link
Copy Markdown
Contributor

Thanks for this, @duan-n2d. It covers each step of #52, the tests pin the retire-per-Python behaviour from both directions, and leaving python out of the JSON for notes that don't have one is a thoughtful way to keep released wheelgap clients reading the existing notes.

Because it changes the nightly scan scripts under scripts/ and the note format, Patrick will review and merge this one himself.

(Review assisted by Claude.)

…ned on

pyodide is only scanned on 3.13 and 3.14, so platforms = ["pyodide"] with
python = ["3.14t"] passed the checker but had no target to retire by, and stayed
on the site for good. Check that at least one listed platform has a target for one
of the listed Pythons. Also reword two doc sentences (campaigns are never
free-threaded; notes is [] when there are none).

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

Copy link
Copy Markdown
Contributor

Merged. Welcome to the tracker, @duan-n2d, and thank you!

What I liked most is leaving python out of the JSON for notes that don't use it, so every released wheelgap keeps reading the existing notes. The retire-per-Python tests pin the behaviour from both sides, too.

Before merging I pushed one commit. It refuses a note whose Pythons aren't scanned on any of its platforms: pyodide is only scanned on 3.13 and 3.14, so platforms = ["pyodide"] with python = ["3.14t"] had nothing to retire by and would have stayed on the site for good. It also reworded two doc sentences.

If you'd like another, #51 (stop the pip cross-check early once errors pass 5%, and don't publish when the scan was cancelled) is open with nobody on it.

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

Notes: an optional python field so a note can retire per Python

2 participants