Time for another round of PEP 694 updates. This version just closes some gaps that were less than clear in specification. The Change History section has all the details. Summary below.
The previous Round 3 thread should be considered closed.
Changes
- Clarify that publication is atomic with respect to the release’s filenames. This closes a race condition where two stages containing the same filenames and are published at different times.
- Clarify that it’s up to the index how long it retains session statuses for published or canceled publishing session. Also clarify that file upload statuses are tied to the parent publishing session status, so when an index chooses to purge the session status, it will also purge all associated file upload statuses.
- For first-publication sessions, where a client intends to claim a project name upon publication, clarify that the name MUST be temporarily reserved while the publishing session is open[1]. If the session gets published, the name becomes owned by the publisher. If the session gets canceled or times out, the name gets released for others to claim. This closes a race condition in first-to-publish name claims.
- Expanded on the FAQ entry “Why is the project name required”.
- Define that if a session publication is requested while file uploads are still in-flight, the index MUST return a
409 Conflict. This closes some previously undefined behavior[2]. - Clarify that a publication session MUST always be cancelable, regardless of the state of its file upload sessions. Also clarify that it’s up to the index how to handle in-flight file uploads for canceled publication sessions.
- The file upload session’s
completestate was renamed tocompletedfor clarity. - Removed
canceledfrom the list of valid values of the publication session’sfilesmappingstatuskey. There was a contradiction about the reporting of this state in the text of the PEP.