[New-bugs-announce] [issue34732] uuid returns version more than 5

jophine antony report at bugs.python.org
Wed Sep 19 02:33:06 EDT 2018


New submission from jophine antony <jophinep at gmail.com>:

When I validate the invalid uuid (RFC 4122 variant) for example '481a8de5-f0d1-f211-b425-e41f134196da'. It returns version number as 15 which is invalid. We need to retrun None in this case as we do for invalid UUIDs  based on RFC 4122.

------snip snip-------
from uuid import UUID
test_uuid_str = '481a8de5-f0d1-f211-b425-e41f134196da'
print("UUID version: {}".format(UUID(test_uuid_str).version))
print("UUID variant: {}".format(UUID(test_uuid_str).variant))
------snip snip-------

------Result----------
UUID version: 15
UUID variant: specified in RFC 4122
------Result----------

----------
messages: 325707
nosy: jophine pranjal
priority: normal
severity: normal
status: open
title: uuid returns version more than 5
versions: Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34732>
_______________________________________


More information about the New-bugs-announce mailing list