-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
gh-89083: add support for UUID version 6 (RFC 9562) #120650
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
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
I am puzzled by the PR title change – can you explain? |
Oh yes, after we discussed the v7 implementation, I preferred splitting the PR into 3 with one PR for each version. The |
«Reference implementation» makes me think that this code is in support or a spec, and maybe not best-written or optimized for production. If this is not the case, just «implementation» or «support» like before has the right connotations 🙂 |
Sure, I can make the change if you want (I'll edit the other title as well) |
Co-authored-by: Victor Stinner <vstinner@python.org>
Ideally, I'd like to wait for @hugovk's review as well (for both UUIDv6 and v7 as he also reviewed UUIDv8) |
I'll hold the merge until we decide on #130461 so that I don't have introduce conflicts in the doc branch. EDIT: We decided to remove the |
@hugovk I'm not sure why the PR is still marked with an "unresolved review". Is it a bot issue? (maybe re-approving the PR would work?) |
Yeah, looks like the draft->ready transition triggers the bot to add the ![]() And the CI check is:
https://github.com/python/cpython/actions/runs/13521458821/job/37782590646?pr=120650 I'll re-approve. |
I'll merge both UUIDv6 and v7 (#121119) by the end of the week, so that other core devs may have a look if they want. I'll also prepare a nice commit message. It's great we managed to land those before the last alpha. Hopefully it will stay during the beta and rc phases as well! |
Thank you all for the reviews and the patience! |
Thank you for the PRs and your patience! 🚀 :) |
) Add support for generating UUIDv6 objects according to RFC 9562, §5.6 [1]. The functionality is provided by the `uuid.uuid6()` function which takes as inputs an optional 48-bit hardware address and an optional 14-bit clock sequence. The UUIDv6 temporal fields are ordered differently than those of UUIDv1, thereby providing improved database locality. [1]: https://www.rfc-editor.org/rfc/rfc9562.html#section-5.6 --------- Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
In light of the discussion in #89083, I decided to remove the previous commits on version 7 and 8 and restrict this specific PR to version 6 only. The previous post can be found in the history of this message.
For version 7, please discuss it on #121119.
For version 8, please discuss it on #123224.
📚 Documentation preview 📚: https://cpython-previews--120650.org.readthedocs.build/