New submission from jophine antony <jophi...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue34732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to