-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
PEP 792: Project status markers in the simple index #4432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: William Woodruff <william@yossarian.net>
PEP 792 is yours. Please wait until this PR is merged & the proper link is online until creating the new Discourse topic. A |
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Signed-off-by: William Woodruff <william@yossarian.net>
Signed-off-by: William Woodruff <william@yossarian.net>
peps/pep-0792.rst
Outdated
This PEP proposes a standardized set of project status markers, as well | ||
as a mechanism for communicating those markers in the HTML and JSON | ||
simple indices. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we disambiguate in the abstract to "distribution project" or the correct term in the context of package indices? I would tend to read "project status" here as relating to the source project, i.e. pyproject.toml
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be my misunderstanding, but I thought "project" was the disambiguating term: the PyPUG glossary defines both "distribution package" and "project," but the former appears to refer to a single instance (i.e. file) while the latter refers to the thing that gets packaged into distribution(s) and appears on PyPI.
Refs:
- https://packaging.python.org/en/latest/glossary/#term-Project
- https://packaging.python.org/en/latest/glossary/#term-Distribution-Package
(Apologies if I'm getting this wrong, though.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My view is that a "project" is nominally tied to a source tree / pyproject.toml
(etc), and so when discussing some form of project status indicator, my expectation would be for it to relate to the project as a collection of sources. Note from the glossary "that is intended to be packaged into a Distribution".
The ideal here would be a term that captures 'project as a collection of distribution packages, as represented on a package index'. I recall some discussion with @pfmoore on the distinction between various types of 'projects' (in the context of PyPI pages & displayed licences), I'm not sure if any clarity was found there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, I see what you mean! Perhaps "index project" or "inside-side project" then, to clarify that this is a state within the index itself, rather than the project's distributions/source tree/etc.?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've gone with "index-supplied" as a stopgap, but happy to change further.
Project status markers | ||
---------------------- | ||
|
||
This PEP proposes the following project status markers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find anywhere in Specification defining state transitions between status markers. E.g. an explicit note that one may un-deprecate a project, etc.
It may also be good to note the expected interface for markers (e.g. project owners or admins can change at any time per-project), though this probably is a little overkill.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find anywhere in Specification defining state transitions between status markers. E.g. an explicit note that one may un-deprecate a project, etc.
One of the follow-on discussions I had with the PyPI folks is that this PEP should probably avoid defining state transitions directly, since that begins to fall into permissions/index-specific behavior. But as a midway point I could note which statuses are conceptually "owner-level" versus "admin-level" (e.g. "archived" vs. "quarantined").
It may also be good to note the expected interface for markers (e.g. project owners or admins can change at any time per-project), though this probably is a little overkill.
Yeah, I think this would push too far into index policy 😅 -- I can see a reasonable scenario in which a non-PyPI index might want admins to be able to archive or deprecate projects, while that's not something that PyPI itself would likely do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My intent here wasn't defining the actor, but just the state -- currently, it is unclear if an archived project can be un-archived, or a deprecated project un-deprecated, etc. I think a line saying that there are no restrictions in the PEP on changing status would help. You could maybe add a further line to note that indices may have further policies on the 'quarrantine' status as a special case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, will do!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to add some language that'll hopefully clarify that states can be set and un-set, but that the PEP leaves it up to the index to determine which "principals" can do what (i.e. whether maintainers or admins can deprecate, archive, etc.)
peps/pep-0792.rst
Outdated
Future PEPs (or PyPA standards processes) may define additional project | ||
status markers, as needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I right in understanding that further status markers would require a change to the metadata version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, yeah (I don't feel confident asserting that as a manner of policy, but that seems to be the norm, and would make intuitive sense here). Do you think that makes sense to say explicitly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps, as it means that the light-touch process can't be used. Thinking again, given this demands behaviour from both indices and installers, it would require a PEP to add a new 'status marker'.
On that note, it might be worth adding a line on the behaviour for encountering an unknown marker. It should never happen given metadata versions, I believe, but an explict 'fail' or 'ignore' might be helpful.
A
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Signed-off-by: William Woodruff <william@yossarian.net>
Title: Project status markers in the simple index | ||
Author: William Woodruff <william@yossarian.net>, | ||
Facundo Tuesca <facundo.tuesca@trailofbits.com>, | ||
Sponsor: Donald Stufft <donald@stufft.io> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dstufft Please can you confirm you are sponsoring this PEP?
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Signed-off-by: William Woodruff <william@yossarian.net>
Signed-off-by: William Woodruff <william@yossarian.net>
Signed-off-by: William Woodruff <william@yossarian.net>
Signed-off-by: William Woodruff <william@yossarian.net>
Signed-off-by: William Woodruff <william@yossarian.net>
Pre-PEP thread: https://discuss.python.org/t/pre-pep-discussion-project-status-markers-in-the-index-apis/79356
Once allocated a number, I'll make the official PEP thread and update here!
Basic requirements (all PEP Types)
pep-NNNN.rst
), PR title (PEP 123: <Title of PEP>
) andPEP
headerAuthor
orSponsor
, and formally confirmed their approvalAuthor
,Status
(Draft
),Type
andCreated
headers filled out correctlyPEP-Delegate
,Topic
,Requires
andReplaces
headers completed if appropriate.github/CODEOWNERS
for the PEPStandards Track requirements
Python-Version
set to valid (pre-beta) future Python version, if relevantDiscussions-To
andPost-History
📚 Documentation preview 📚: https://pep-previews--4432.org.readthedocs.build/pep-0792/