feat: implement PEP 792 project status markers #18422
Open
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.
This adds PEP 792 status markers to the HTML and JSON simple APIs.
The approach I went with here is to add a new
ProjectStatusMarker
enum that maps fromLifecycleStatus
-- I figured that would easier to follow/maintain than trying to shoehorn these statuses more deeply into PyPI's concept of "lifecycle," which is a behavioral superset of what PEP 792 intends to model.I've also gone ahead and unconditionally rendered the project status in both APIs, instead of omitting it in the
active
case (which the PEP permits) -- this makes the implementation a bit shorter and (IMO) easier to follow. But I'm happy to tweak this as well, of course 🙂I'll also include some updates to the API docs as part of this PR.
Closes #18415.