-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
PEP 694: Address additional feedback #4549
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Require that `name` conform to the normalization rules, and include a link * Require that `version` conform to the version specs, and include a link * RFC 3399 instead of ISO 8601 as the timestamp spec. The RFC is a simpler format that subsets the ISO standard, and is more appropriate to our use case. * Adjust the gentoken() algorithm to be more resistant to tomfoolery. This may still change. * Require `filename` to conform to either the source or binary distribution file name convention, and include links
* The addition of the ``Location`` header is now a **MUST**, and better worded to indicate that it can be polled in the case of a ``202 Accepted``. * Added a couple of **FIXME** tags to address removal of nonce and fleshing out the ``Errors`` section. See URLs in the text. DO NOT PROMOTE FROM DRAFT UNTIL THIS IS DONE. * Reformatted some text.
Based on discussions here: https://discuss.python.org/t/pep-694-pypi-upload-api-2-0-round-2/101483/22 clients no longer supply a nonce to influence the session token and stage URL. The calculation of these is left to the index, but language is added that if provided, they must be cryptographically unguessable, and it must be possible to calculate the stage URL from the session token.
Member
Author
|
I think this branch is ready for review, based on feedback from the DPO thread. |
mgorny
reviewed
Sep 9, 2025
* When an attempt is made to create a second session with the same name-version pair, but the first session is in `pending`, `processing`, or `complete` state, the second session is *not* created and a 409 is returned. * There's nothing special about `0.0.0` as a placeholder version, and it really should be `0.0.0a0`.
Member
Author
mgorny
approved these changes
Sep 24, 2025
Contributor
mgorny
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, no further comments from me.
zklaus
pushed a commit
to zklaus/peps
that referenced
this pull request
Nov 3, 2025
* Begin to address William's feedback. * Require that `name` conform to the normalization rules, and include a link * Require that `version` conform to the version specs, and include a link * RFC 3399 instead of ISO 8601 as the timestamp spec. The RFC is a simpler format that subsets the ISO standard, and is more appropriate to our use case. * Adjust the gentoken() algorithm to be more resistant to tomfoolery. This may still change. * Require `filename` to conform to either the source or binary distribution file name convention, and include links * Further updates based on DPO thread * The addition of the ``Location`` header is now a **MUST**, and better worded to indicate that it can be polled in the case of a ``202 Accepted``. * Added a couple of **FIXME** tags to address removal of nonce and fleshing out the ``Errors`` section. See URLs in the text. DO NOT PROMOTE FROM DRAFT UNTIL THIS IS DONE. * Reformatted some text. * Fix markup * Remove all mention of the nonce Based on discussions here: https://discuss.python.org/t/pep-694-pypi-upload-api-2-0-round-2/101483/22 clients no longer supply a nonce to influence the session token and stage URL. The calculation of these is left to the index, but language is added that if provided, they must be cryptographically unguessable, and it must be possible to calculate the stage URL from the session token. * Move some text around so it flows better * Capitalization consistency * Update the file upload session section * capitalization * Resolve some FIXMEs * Clarifications based on comments from @mgorny * When an attempt is made to create a second session with the same name-version pair, but the first session is in `pending`, `processing`, or `complete` state, the second session is *not* created and a 409 is returned. * There's nothing special about `0.0.0` as a placeholder version, and it really should be `0.0.0a0`. * add a TBD * Define index-specific-metadata * Add Change History section * Add a change history section
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
nonceandgentoken()algorithm. Indexes are now responsible for generatingan cryptographically secure session token and obfuscated stage URL (but only if they support
staged previews).
nameconform to the normalization rules, and include a link.versionconform to the version specs, and include a link.filenameto conform to either the source or binary distribution file name convention, and include links.subsets the ISO standard, and is more appropriate to our use case.
📚 Documentation preview 📚: https://pep-previews--4549.org.readthedocs.build/