Skip to content
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

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

Merged
merged 1 commit into from
May 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions pep-0691.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Author: Donald Stufft <donald@stufft.io>,
Pradyun Gedam <pradyunsg@gmail.com>,
Cooper Lees <me@cooperlees.com>,
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
Type: Standards Track
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
Post-History: `05-May-2022 <https://discuss.python.org/t/pep-691-json-based-simple-api-for-python-package-indexes/15553>`__

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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 <https://github.com/pypa/bandersnatch/blob/main/src/bandersnatch/package.py>`__):

- metadata["info"]
- metadata["last_serial"]
- metadata["releases"]
- ``metadata["info"]``
- ``metadata["last_serial"]``
- ``metadata["releases"]``

- digests
- URL
Expand Down