From 41d6b6aec47b1dea50fc50152ebb48a226e903f7 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Mon, 16 Jun 2025 10:03:37 -0400 Subject: [PATCH 1/3] PEP 792: use MUST instead of SHALL Signed-off-by: William Woodruff --- peps/pep-0792.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peps/pep-0792.rst b/peps/pep-0792.rst index 04f7b737254..4f1a5a3161d 100644 --- a/peps/pep-0792.rst +++ b/peps/pep-0792.rst @@ -189,7 +189,7 @@ HTML index The following changes are made to the :ref:`simple repository API `: -* The per-project index **SHALL** define the ``pypi:repository-version`` as ``1.4``. +* The per-project index **MUST** define the ``pypi:repository-version`` as ``1.4``. * The per-project index **SHOULD** add an appropriate ``pypi:project-status`` meta tag, with a ``content`` of the project's status marker. The index **MAY** choose to omit the ``pypi:project-status`` meta tag if the project is marked as ``active``. @@ -221,7 +221,7 @@ JSON index The following changes are made to the :ref:`JSON simple index `: -* The per-project index **SHALL** define the ``meta.api-version`` as ``1.4``. +* The per-project index **MUST** define the ``meta.api-version`` as ``1.4``. * The per-project index **SHOULD** include a ``project-status`` key in the JSON response, with a value of the project's status marker. The index **MAY** choose to omit the ``project-status`` key if the project is marked as ``active``. From b3b094d43c1606a14c0263455a1a4b250ee7266d Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Mon, 16 Jun 2025 10:32:43 -0400 Subject: [PATCH 2/3] PEP 792: add project status reason Signed-off-by: William Woodruff --- peps/pep-0792.rst | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/peps/pep-0792.rst b/peps/pep-0792.rst index 4f1a5a3161d..cbfe5132d10 100644 --- a/peps/pep-0792.rst +++ b/peps/pep-0792.rst @@ -193,6 +193,10 @@ The following changes are made to the * The per-project index **SHOULD** add an appropriate ``pypi:project-status`` meta tag, with a ``content`` of the project's status marker. The index **MAY** choose to omit the ``pypi:project-status`` meta tag if the project is marked as ``active``. +* The per-project index **MAY** include a ``pypi:project-status-reason`` meta tag, + with a ``content`` of free-form text contextualizing the project's status. + The index **MAY** choose to omit the ``pypi:project-status-reason`` meta tag + if the project is marked as ``active`` or if no reason is provided. For example, the following would be a valid HTML index response for ``sampleproject`` after is has been marked as ``quarantined``: @@ -205,6 +209,7 @@ For example, the following would be a valid HTML index response for + Links for sampleproject @@ -222,9 +227,13 @@ The following changes are made to the :ref:`JSON simple index `: * The per-project index **MUST** define the ``meta.api-version`` as ``1.4``. -* The per-project index **SHOULD** include a ``project-status`` key in the JSON response, +* The per-project index **SHOULD** include a ``project-status.state`` key in the JSON response, with a value of the project's status marker. The index **MAY** choose to omit - the ``project-status`` key if the project is marked as ``active``. + the ``project-status.state`` key if the project is marked as ``active``. +* The per-project index **MAY** include a ``project-status.reason`` key in the JSON response, + with a value of free-form text contextualizing the project's status. + The index **MAY** choose to omit the ``project-status.reason`` key + if the project is marked as ``active`` or if no reason is provided. For example, the following would be a valid JSON index response for ``sampleproject`` after is has been marked as ``quarantined``: @@ -236,7 +245,10 @@ For example, the following would be a valid JSON index response for "meta": { "api-version": "1.4" }, - "project-status": "quarantined", + "project-status": { + "status": "quarantined", + "reason": "the project is haunted" + }, "alternate-locations": [], "files": [], "name": "sampleproject", From 8554b1854fed53faf3aad6ae6392acb6af90a5d1 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Mon, 16 Jun 2025 10:38:55 -0400 Subject: [PATCH 3/3] PEP 792: don't dangle a sentence Signed-off-by: William Woodruff --- peps/pep-0792.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peps/pep-0792.rst b/peps/pep-0792.rst index cbfe5132d10..dcb984689d8 100644 --- a/peps/pep-0792.rst +++ b/peps/pep-0792.rst @@ -108,7 +108,7 @@ A project always has exactly one status. If no status is explicitly noted, then the project is considered to be in the ``active`` state. Indices **MAY** implement any subset of the status markers specified in this -PEP, as applicable. +PEP, as applicable to their needs. This PEP does not prescribe *which* principals (i.e. project maintainers, index administrators, etc.) are allowed to set and unset which statuses.