PEP 691: Fix minor nits with headers and reST syntax (#2603)

This commit is contained in:
CAM Gerlach 2022-05-13 16:12:47 -06:00 committed by GitHub
parent 91116788af
commit 703362a544
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 12 deletions

View File

@ -4,11 +4,11 @@ Author: Donald Stufft <donald@stufft.io>,
Pradyun Gedam <pradyunsg@gmail.com>, Pradyun Gedam <pradyunsg@gmail.com>,
Cooper Lees <me@cooperlees.com>, Cooper Lees <me@cooperlees.com>,
Dustin Ingram <di@python.org> Dustin Ingram <di@python.org>
PEP-Delegate: Brett Cannon <brett@python.org>
Discussions-To: https://discuss.python.org/t/pep-691-json-based-simple-api-for-python-package-indexes/15553
Status: Draft Status: Draft
Type: Standards Track Type: Standards Track
Content-Type: text/x-rst Content-Type: text/x-rst
PEP-Delegate: Brett Cannon <brett@python.org>
Discussions-To: https://discuss.python.org/t/pep-691-json-based-simple-api-for-python-package-indexes/15553
Created: 04-May-2022 Created: 04-May-2022
Post-History: `05-May-2022 <https://discuss.python.org/t/pep-691-json-based-simple-api-for-python-package-indexes/15553>`__ Post-History: `05-May-2022 <https://discuss.python.org/t/pep-691-json-based-simple-api-for-python-package-indexes/15553>`__
@ -290,9 +290,11 @@ This PEP proposes that all responses from the Simple API will have a standard
content type that describes what the response is (a Simple API response), what content type that describes what the response is (a Simple API response), what
version of the API it represents, and what serialization format has been used. version of the API it represents, and what serialization format has been used.
The structure of this content type will be:: The structure of this content type will be:
application/vnd.pypi.simple.$version+format .. code-block:: text
application/vnd.pypi.simple.$version+format
Since only major versions should be disruptive to clients attempting to Since only major versions should be disruptive to clients attempting to
understand one of these API responses, only the major version will be included understand one of these API responses, only the major version will be included
@ -403,7 +405,7 @@ so the risks for actual breakages is low.
An example of how a client can operate would look like: An example of how a client can operate would look like:
.. code-block:: python3 .. code-block:: python
import cgi import cgi
import requests import requests
@ -839,10 +841,10 @@ how they use the Simple + JSON APIs today:
- List of all files for a particular release - List of all files for a particular release
- Metadata of each individual artifact: - Metadata of each individual artifact:
- was it yanked? (`data-yanked`) - was it yanked? (``data-yanked``)
- what's the python-requires? (`data-python-requires`) - what's the python-requires? (``data-python-requires``)
- what's the hash of this file? (currently, hash in URL) - what's the hash of this file? (currently, hash in URL)
- Full metadata (`data-dist-info-metadata`) - Full metadata (``data-dist-info-metadata``)
- [Bonus] what are the declared dependencies, if available (list-of-strings, null if unavailable)? - [Bonus] what are the declared dependencies, if available (list-of-strings, null if unavailable)?
- ``bandersnatch`` - Only uses legacy JSON API + XMLRPC today: - ``bandersnatch`` - Only uses legacy JSON API + XMLRPC today:
@ -859,11 +861,12 @@ how they use the Simple + JSON APIs today:
- Write out the JSON to mirror storage today (disk/S3) - Write out the JSON to mirror storage today (disk/S3)
- Required metadata used (via Package class - https://github.com/pypa/bandersnatch/blob/main/src/bandersnatch/package.py): - Required metadata used
(via `Package class <https://github.com/pypa/bandersnatch/blob/main/src/bandersnatch/package.py>`__):
- metadata["info"] - ``metadata["info"]``
- metadata["last_serial"] - ``metadata["last_serial"]``
- metadata["releases"] - ``metadata["releases"]``
- digests - digests
- URL - URL