From 95c359e0bdba1a815b2dd489ca851c8705a346af Mon Sep 17 00:00:00 2001 From: "C.A.M. Gerlach" Date: Fri, 13 May 2022 13:07:39 -0500 Subject: [PATCH] PEP 691: Fix minor nits with headers and reST syntax --- pep-0691.rst | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/pep-0691.rst b/pep-0691.rst index d8ceb5e0b06..58c3540201e 100644 --- a/pep-0691.rst +++ b/pep-0691.rst @@ -4,11 +4,11 @@ Author: Donald Stufft , Pradyun Gedam , Cooper Lees , Dustin Ingram +PEP-Delegate: Brett Cannon +Discussions-To: https://discuss.python.org/t/pep-691-json-based-simple-api-for-python-package-indexes/15553 Status: Draft Type: Standards Track Content-Type: text/x-rst -PEP-Delegate: Brett Cannon -Discussions-To: https://discuss.python.org/t/pep-691-json-based-simple-api-for-python-package-indexes/15553 Created: 04-May-2022 Post-History: `05-May-2022 `__ @@ -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 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: + +.. code-block:: text - application/vnd.pypi.simple.$version+format + application/vnd.pypi.simple.$version+format Since only major versions should be disruptive to clients attempting to 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: -.. code-block:: python3 +.. code-block:: python import cgi import requests @@ -839,10 +841,10 @@ how they use the Simple + JSON APIs today: - List of all files for a particular release - Metadata of each individual artifact: - - was it yanked? (`data-yanked`) - - what's the python-requires? (`data-python-requires`) + - was it yanked? (``data-yanked``) + - what's the python-requires? (``data-python-requires``) - 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)? - ``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) - - Required metadata used (via Package class - https://github.com/pypa/bandersnatch/blob/main/src/bandersnatch/package.py): + - Required metadata used + (via `Package class `__): - - metadata["info"] - - metadata["last_serial"] - - metadata["releases"] + - ``metadata["info"]`` + - ``metadata["last_serial"]`` + - ``metadata["releases"]`` - digests - URL