8000 gh-89083: support UUID version 7 (monotonous version) (RFC 9562) [abandoned proposal] by picnixz · Pull Request #120830 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-89083: support UUID version 7 (monotonous version) (RFC 9562) [abandoned proposal] #120830

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

Closed
wants to merge 15 commits into from
Prev Previous commit
Next Next commit
remove references to v6 and v8
  • Loading branch information
picnixz committed Jun 22, 2024
commit 90c4f7c257121af9c0dfa7bb49ad785ddfa2754c
7 changes: 1 addition & 6 deletions Doc/whatsnew/3.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,7 @@ symtable
uuid
----

* Add support for UUID versions 6, 7, and 8 as specified by
:rfc:`9562` to the :mod:`uuid` module:

* :func:`~uuid.uuid6`
* :func:`~uuid.uuid7`
* :func:`~uuid.uuid8`
* Add :func:`uuid.uuid7` for UUID version 7 as specified by :rfc:`9562`.

(Contributed by Bénédikt Tran in :gh:`89083`.)

Expand Down
8 changes: 4 additions & 4 deletions Lib/uuid.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
r"""UUID objects (universally unique identifiers) according to RFC 4122.

This module provides immutable UUID objects (class UUID) and the functions
uuid1(), uuid3(), uuid4(), uuid5(), uuid6(), uuid7(), and uuid8() for
generating version 1 to 8 UUIDs as specified in RFC 4122 (superseeded
by RFC 9562 but still referred to as RFC 4122 for compatibility purposes).
uuid1(), uuid3(), uuid4(), uuid5(), and uuid7() for generating version 1 to 7
UUIDs as specified in RFC 4122 (superseeded by RFC 9562 but still referred to
as RFC 4122 for compatibility purposes).

If all you want is a unique ID, you should probably call uuid1() or uuid4().
Note that uuid1() may compromise privacy since it creates a UUID containing
Expand Down Expand Up @@ -130,7 +130,7 @@ class UUID:
variant the UUID variant (one of the constants RESERVED_NCS,
RFC_4122, RESERVED_MICROSOFT, or RESERVED_FUTURE)

version the UUID version number (1 through 8, meaningful only
version the UUID version number (1 through 7, meaningful only
when the variant is RFC_4122)

is_safe An enum indicating whether the UUID has been generated in
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Add :func:`~uuid.uuid6`, :func:`~uuid.uuid7` and :func:`~uuid.uuid8` to the
:mod:`uuid` module as specified by :rfc:`9562`. Patch by Bénédikt Tran.
Add :func:`~uuid.uuid7` to the :mod:`uuid` module as specified by :rfc:`9562`.
Patch by Bénédikt Tran.
0