New submission from mael arnaud <[email protected]>:
The docs stipulates:
UUID.version
The UUID version number (1 through 5, meaningful only when the variant is
RFC_4122).
But you can absolutely do:
>>> uuid.UUID("25cdb2ef-3764-bb01-9b17-433defc74464")
which yields:
>>> uuid.UUID("25cdb2ef-3764-bb01-9b17-433defc74464").variant
'specified in RFC 4122'
>>> uuid.UUID("25cdb2ef-3764-bb01-9b17-433defc74464").version
11
Since versions above 5 are not defined in the RFC 4122, is it relevant to allow
such UUIDs to exist?
Every other tool on the internet seem to reject them (but I guess they are
regex based). At the very least, maybe the docs should mention something about
it, since I'm not sure anyone expects a UUID to be valid and have a version
above 5?
----------
components: Library (Lib)
messages: 350546
nosy: Erawpalassalg
priority: normal
severity: normal
status: open
title: UUID authorize version 6+ with variant RFC 4122
type: behavior
versions: Python 3.7
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37956>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com