]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-89083: add support for UUID version 6 (RFC 9562) (#120650)
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>
Sun, 2 Mar 2025 11:41:56 +0000 (12:41 +0100)
committerGitHub <noreply@github.com>
Sun, 2 Mar 2025 11:41:56 +0000 (12:41 +0100)
commit990ad272f66fe6a50087ad044725bb0f9f8e181d
tree13f7c73ae675cbdee8ad1bcab76161680bcf2ee3
parent214562ed4ddc248b007f718ed92ebcc0c3669611
gh-89083: add support for UUID version 6 (RFC 9562) (#120650)

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>
Doc/library/uuid.rst
Doc/whatsnew/3.14.rst
Lib/test/test_uuid.py
Lib/uuid.py
Misc/NEWS.d/next/Library/2024-06-17-17-31-27.gh-issue-89083.nW00Yq.rst [new file with mode: 0644]