Skip to content

Commit a0d84ce

Browse files
authored
PEP 792: additional review feedback (#4463)
1 parent 15bd7d5 commit a0d84ce

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

peps/pep-0792.rst

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ A project always has exactly one status. If no status is explicitly noted,
108108
then the project is considered to be in the ``active`` state.
109109

110110
Indices **MAY** implement any subset of the status markers specified in this
111-
PEP, as applicable.
111+
PEP, as applicable to their needs.
112112

113113
This PEP does not prescribe *which* principals (i.e. project maintainers,
114114
index administrators, etc.) are allowed to set and unset which statuses.
@@ -189,10 +189,14 @@ HTML index
189189
The following changes are made to the
190190
:ref:`simple repository API <packaging:simple-repository-api-base>`:
191191

192-
* The per-project index **SHALL** define the ``pypi:repository-version`` as ``1.4``.
192+
* The per-project index **MUST** define the ``pypi:repository-version`` as ``1.4``.
193193
* The per-project index **SHOULD** add an appropriate ``pypi:project-status`` meta tag, with
194194
a ``content`` of the project's status marker. The index **MAY** choose to omit
195195
the ``pypi:project-status`` meta tag if the project is marked as ``active``.
196+
* The per-project index **MAY** include a ``pypi:project-status-reason`` meta tag,
197+
with a ``content`` of free-form text contextualizing the project's status.
198+
The index **MAY** choose to omit the ``pypi:project-status-reason`` meta tag
199+
if the project is marked as ``active`` or if no reason is provided.
196200

197201
For example, the following would be a valid HTML index response for
198202
``sampleproject`` after is has been marked as ``quarantined``:
@@ -205,6 +209,7 @@ For example, the following would be a valid HTML index response for
205209
<head>
206210
<meta name="pypi:repository-version" content="1.4">
207211
<meta name="pypi:project-status" content="quarantined">
212+
<meta name="pypi:project-status-reason" content="the project is haunted">
208213
<title>Links for sampleproject</title>
209214
</head>
210215
<body>
@@ -221,10 +226,14 @@ JSON index
221226
The following changes are made to the
222227
:ref:`JSON simple index <packaging:simple-repository-api-json>`:
223228

224-
* The per-project index **SHALL** define the ``meta.api-version`` as ``1.4``.
225-
* The per-project index **SHOULD** include a ``project-status`` key in the JSON response,
229+
* The per-project index **MUST** define the ``meta.api-version`` as ``1.4``.
230+
* The per-project index **SHOULD** include a ``project-status.state`` key in the JSON response,
226231
with a value of the project's status marker. The index **MAY** choose to omit
227-
the ``project-status`` key if the project is marked as ``active``.
232+
the ``project-status.state`` key if the project is marked as ``active``.
233+
* The per-project index **MAY** include a ``project-status.reason`` key in the JSON response,
234+
with a value of free-form text contextualizing the project's status.
235+
The index **MAY** choose to omit the ``project-status.reason`` key
236+
if the project is marked as ``active`` or if no reason is provided.
228237

229238
For example, the following would be a valid JSON index response for
230239
``sampleproject`` after is has been marked as ``quarantined``:
@@ -236,7 +245,10 @@ For example, the following would be a valid JSON index response for
236245
"meta": {
237246
"api-version": "1.4"
238247
},
239-
"project-status": "quarantined",
248+
"project-status": {
249+
"status": "quarantined",
250+
"reason": "the project is haunted"
251+
},
240252
"alternate-locations": [],
241253
"files": [],
242254
"name": "sampleproject",

0 commit comments

Comments
 (0)