gh-76760: test that uuid.uuid1() sets the version field (#139033)

This commit is contained in:
Bénédikt Tran 2025-09-17 15:31:51 +02:00 committed by GitHub
parent 2fc7004d54
commit 3a04be986a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

@ -737,6 +737,7 @@ def uuid1(node=None, clock_seq=None):
is_safe = SafeUUID(safely_generated)
except ValueError:
is_safe = SafeUUID.unknown
# The version field is assumed to be handled by _generate_time_safe().
return UUID(bytes=uuid_time, is_safe=is_safe)
global _last_timestamp