Skip to content

PEP 694: Abstract file upload mechanisms #4431

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

Merged
merged 36 commits into from
Jul 28, 2025
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d569693
PEP 694: Abstract file upload mechanisms
ewdurbin May 21, 2025
8e98c9b
lint
ewdurbin May 21, 2025
daf06f4
no warnings allowed
ewdurbin May 21, 2025
5ef177e
refinements
ewdurbin May 22, 2025
7f1e741
Update peps/pep-0694.rst
ewdurbin May 28, 2025
f8469cf
remove reference to a specific URL for PyPI
ewdurbin May 30, 2025
05d7fc2
clarify that resumable/parallel uploads are supported but not defined…
ewdurbin May 30, 2025
2ef077c
attempt to specify http-post-application-octet-stream mechanism
ewdurbin May 30, 2025
a2bfb56
if attestations are going to be uploaded, do it before completion of …
ewdurbin May 30, 2025
442d37f
i'm in it now
ewdurbin May 30, 2025
924a27d
try to un-wonk content-type per feedback
ewdurbin May 30, 2025
7f0798b
lint
ewdurbin May 30, 2025
3effee2
clarify file upload mechanism details
ewdurbin May 30, 2025
c053242
Fix typo
ewdurbin May 30, 2025
847b2bd
address general content feedback from review
ewdurbin Jun 11, 2025
64fdafc
bubble content-type handling up so that it can be assumed througouth
ewdurbin Jun 11, 2025
2d634d7
restructure document to un-twist Upload Sessions and File Upload Sess…
ewdurbin Jun 11, 2025
6fea5f9
naming things
ewdurbin Jun 11, 2025
86710f1
flatten the `mechanism` value of the file upload session response
ewdurbin Jun 11, 2025
5fbf005
Rename "Upload Session" to "Publishing Session"
ewdurbin Jun 11, 2025
4139377
re-flow the doc into (mostly) lines <100
ewdurbin Jun 11, 2025
b7d8ac5
Merge branch 'main' into file_upload_mechanisms
warsaw Jul 11, 2025
98e7929
Apply suggestions from code review
ewdurbin Jul 11, 2025
1ff2415
re-order response codes in session status
ewdurbin Jul 11, 2025
e946d41
Update peps/pep-0694.rst
warsaw Jul 11, 2025
191c9fe
Update verbiage in rationale section.
ewdurbin Jul 25, 2025
dcb682b
specify that Retry-After header should be used to manage polling of t…
ewdurbin Jul 25, 2025
acbc1b1
stage previews are optionally supported by this PEP, and thus are not…
ewdurbin Jul 25, 2025
fd0e6f5
valid-for -> expires-at
ewdurbin Jul 25, 2025
472a796
clarify who owns what version specifiers
ewdurbin Jul 25, 2025
9010030
lint
ewdurbin Jul 25, 2025
7286ba5
say _something_ about authentication for upload 2.0
ewdurbin Jul 25, 2025
8896963
simplify per code review
ewdurbin Jul 25, 2025
1811f7c
Merge pull request #1 from ewdurbin/file_upload_mechanisms-auth
ewdurbin Jul 25, 2025
eceb7b5
Restore Open Questions section with notes on deferred extensions
ewdurbin Jul 28, 2025
3cbd1ca
Merge branch 'main' into file_upload_mechanisms
ewdurbin Jul 28, 2025
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
Prev Previous commit
Next Next commit
specify that Retry-After header should be used to manage polling of t…
…he file upload session status
  • Loading branch information
ewdurbin committed Jul 25, 2025
commit dcb682b503c397e9b1149f827f3647438eddbc5e
12 changes: 10 additions & 2 deletions peps/pep-0694.rst
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,8 @@ The successful response includes the following:
}
}

A `Retry-After` response header **MUST** be present
to indicate to clients when they should next poll for an updated status.

Besides the ``meta`` key, which has the same format as the request JSON, the success response has
the following keys:
Expand Down Expand Up @@ -731,8 +733,14 @@ request), then it may return a ``202 Accepted`` response
and set the status of the File Upload Session to ``processing``.

In either case, the server should include a ``Location`` header pointing back to the File Upload
Session status URL, and if the server returned a ``202 Accepted``, the client may poll that URL to
watch for the status to change.
Session status URL.

Servers **MUST** allow clients to poll the File Upload Session status URL
to watch for the status to change.
If the server responds with a ``202 Accepted``,
clients may poll the File Upload Session status URL to watch for the status to change.
Clients **SHOULD** respect the `Retry-After` header value
of the File Upload Session status response.

If an error occurs, the appropriate ``4xx`` code should be returned, as described in the
:ref:`session-errors` section.
Expand Down