]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-128150: Improve performances of `uuid.uuid*` constructor functions. (#128151)
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>
Mon, 13 Jan 2025 11:46:13 +0000 (12:46 +0100)
committerGitHub <noreply@github.com>
Mon, 13 Jan 2025 11:46:13 +0000 (12:46 +0100)
commit6ff8f82f92a8af363b2bdd8bbaba5845eef430fc
treed9a62cfb08820f8bd5c329b95882fb0392371c7b
parent39fc7ef4fe211e8f7d3b5a6e392e475ecdfbce72
gh-128150: Improve performances of `uuid.uuid*` constructor functions. (#128151)

We introduce a private constructor `UUID._from_int()` for RFC 4122/9562 UUIDs,
which takes the integral UUID value as input. The latter must have correctly set
its variant and version bits. We also make `UUID.__init__()` slightly more efficient.
Doc/whatsnew/3.14.rst
Lib/uuid.py
Misc/NEWS.d/next/Library/2024-12-21-11-12-50.gh-issue-128151.aq7vpG.rst [new file with mode: 0644]