Skip to content
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
21 changes: 11 additions & 10 deletions peps/pep-0694.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Post-History: `27-Jun-2022 <https://discuss.python.org/t/pep-694-upload-2-0-api-
`27-Sep-2025 <https://discuss.python.org/t/pep-694-pypi-upload-api-2-0-round-2/101483/31>`__
`07-Dec-2025 <https://discuss.python.org/t/pep-694-pypi-upload-api-2-0-round-2/101483/35>`__
`26-Jun-2026 <https://discuss.python.org/t/pep-694-pypi-upload-api-2-0-round-3/107923>`__
`29-Jul-2026 <https://discuss.python.org/t/pep-694-pypi-upload-api-2-0-round-4/108320>`__


Abstract
Expand Down Expand Up @@ -1846,7 +1847,7 @@ as experience is gained operating Upload 2.0.
Change History
==============

* TBD
* `29-Jul-2026 <https://discuss.python.org/t/pep-694-pypi-upload-api-2-0-round-4/108320>`__

* Add an **Atomic Publication and Conflicts** section. Specify that publication is atomic with respect to
the release's filename namespace: the server reserves the session's filenames for the duration of a
Expand All @@ -1871,23 +1872,23 @@ Change History
* Expand the "Why is the project name required" FAQ to note that single-project sessions still improve
multi-project releases (all projects can be fully staged before a final step publishes each one) and lay a
foundation for a possible future "publish multiple projects" endpoint.
* Define what happens when a publish is requested while file uploads are still in flight, which
was previously unspecified. Publication now has an explicit precondition: every entry in the
session's ``files`` mapping **MUST** be in the ``completed`` state, otherwise the server
**MUST** reject the publish request with a ``409 Conflict`` identifying the offending file(s)
and leave the session editable. The rule is written as an allow-list so that files in
* Define what happens when a session publication is requested while file uploads are still in
flight, which was previously unspecified. Publication now has an explicit precondition: every
entry in the session's ``files`` mapping **MUST** be in the ``completed`` state, otherwise the
server **MUST** reject the publish request with a ``409 Conflict`` identifying the offending
file(s) and leave the session editable. The rule is written as an allow-list so that files in
``error``, and any file states added by future revisions, block publication rather than being
silently included or dropped. Add a corresponding row to the publishing session transition
table and scope the filename reservation to the fully uploaded files the session will publish.
* Rename the file upload session ``complete`` status to ``completed``. This matches the
past-participle form of the other settled statuses (``canceled``, and the publishing session's
``published``), and disambiguates the *state* from the ``complete`` *action* and its
``links.complete`` endpoint, which keep their names.
* Specify that a publishing session **MUST** be cancelable regardless of the states of its files, and in
particular **MUST NOT** be refused cancellation because a file upload session is ``processing``. Because
canceling guarantees nothing will be published, no in-flight validation outcome can affect the result, so
unlike an individual file deletion there is no race to protect against; the server **MAY** let in-flight
processing finish and discard the result rather than interrupting it.
* Rename the file upload session ``complete`` status to ``completed``. This matches the
past-participle form of the other settled statuses (``canceled``, and the publishing session's
``published``), and disambiguates the *state* from the ``complete`` *action* and its
``links.complete`` endpoint, which keep their names.
* Remove ``canceled`` from the valid values of the publishing session ``files`` mapping ``status`` key,
resolving a contradiction with the existing rule that canceling or deleting a file removes its entry from
that mapping. The file's own file upload session status URL continues to report ``canceled``.
Expand Down
Loading