[issue31958] UUID versions are not validated to lie in the documented range

Richard Neumann report at bugs.python.org
Wed Sep 19 09:06:25 EDT 2018


Richard Neumann <mail at richard-neumann.de> added the comment:

@xtreak Indeed. It fails on _windll_getnode().

======================================================================
ERROR: test_windll_getnode (test.test_uuid.TestInternalsWithoutExtModule)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\test_uuid.py", line 748, in test_windll_getnode
    node = self.uuid._windll_getnode()
  File "C:\projects\cpython\lib\uuid.py", line 659, in _windll_getnode
    return UUID(bytes=bytes_(_buffer.raw)).node
  File "C:\projects\cpython\lib\uuid.py", line 208, in __init__
    raise ValueError('illegal version number')
ValueError: illegal version number
----------------------------------------------------------------------

Apparently on Windows systems, there are UUIDs of type RFC_4122 being used which have versions not in 1..5, which actually makes them non-RFC 4122 compliant.
Unfortunately I cannot investigate this further, since I do not have a windows machine available right now.

----------
nosy: +conqp

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


More information about the Python-bugs-list mailing list