Skip to content

Commit 0e36653

Browse files
committed
Minor updates
1 parent d406b6e commit 0e36653

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

peps/pep-0694.rst

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,12 @@ methods.
137137
Upload 2.0 API Specification
138138
============================
139139

140-
This PEP traces the root cause of most of the issues with the existing API to be
141-
roughly two things:
140+
This PEP draws inspiration from the `Resumable Uploads for HTTP <ietf-draft>`_ internet draft,
141+
however it has some significant differences. This is largely due to the unique nature of Python
142+
package releases (i.e. metadata, multiple related artifacts, etc.), and the support for an upload
143+
session and release stages. Where it makes sense to adopt details of the draft, this PEP does so.
144+
145+
This PEP traces the root cause of most of the issues with the existing API to be roughly two things:
142146

143147
- The metadata is submitted alongside the file, rather than being parsed from the
144148
file itself. [#fn-metadata]_
@@ -182,8 +186,8 @@ being tested, and will be blessed as permanent after sufficient testing with liv
182186
Create an Upload Session
183187
~~~~~~~~~~~~~~~~~~~~~~~~
184188

185-
To create a new upload session, submit a ``POST`` request to ``/`` (i.e. the root URL), with a
186-
payload that looks like:
189+
To create a new upload session, submit a ``POST`` request to the root URL, with a payload that looks
190+
like:
187191

188192
.. code-block:: json
189193
@@ -230,7 +234,7 @@ requests.
230234

231235
.. _session-response:
232236

233-
Response body
237+
Response Body
234238
+++++++++++++
235239

236240
The successful response includes the following JSON content:
@@ -402,8 +406,8 @@ Besides the standard ``meta`` key, the request JSON has the following additional
402406
If given, this is a string value containing the file's `core metadata
403407
<https://packaging.python.org/en/latest/specifications/core-metadata/>`_.
404408

405-
Servers **MAY** use the data provided in this request to do some sanity checking prior to
406-
allowing the file to be uploaded. These checks may include, but are not limited to:
409+
Servers **MAY** use the data provided in this request to do some sanity checking prior to allowing
410+
the file to be uploaded. These checks may include, but are not limited to:
407411

408412
- Checking if the ``filename`` already exists in a published release
409413
- Checking if the ``size`` would exceed any project or file quota
@@ -838,7 +842,7 @@ It's actually the protocol specified in an `active internet draft <ietf-draft>`_
838842
took what they learned implementing `tus <https://tus.io/>`_ to provide the idea of resumable
839843
uploads in a wholly generic, standards based way.
840844

841-
.. _ietf-draft: https://datatracker.ietf.org/doc/draft-ietf-httpbis-resumable-upload/
845+
.. _ietf-draft: https://www.ietf.org/archive/id/draft-ietf-httpbis-resumable-upload-05.html
842846

843847
The only deviation we've made from that spec is that we don't use the ``104 Upload Resumption
844848
Supported`` informational response in the first ``POST`` request. This decision was made for a few

0 commit comments

Comments
 (0)