This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: UUID authorize version 6+ with variant RFC 4122
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Erawpalassalg
Priority: normal Keywords:

Created on 2019-08-26 16:25 by Erawpalassalg, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg350546 - (view) Author: mael arnaud (Erawpalassalg) Date: 2019-08-26 16:25
The docs stipulates:

  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

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?
Date User Action Args
2022-04-11 14:59:19adminsetgithub: 82137
2019-08-26 16:25:17Erawpalassalgcreate