serhiy-storchaka · GitHub

Bug report

uuid.uuid1() returns a version 4 UUID on OpenBSD, although it is documented to generate a UUID from a host ID, sequence number and the current time:

>>> import uuid
>>> uuid.uuid1()
UUID('29b977a3-bf64-45d3-b7c2-390c12170eca')
>>> uuid.uuid1().version
4

The _uuid extension implements generate_time_safe() with uuid_create(), and uuid_create(3) on OpenBSD says:

uuid_create() generates version 4 UUIDs, specified by section 4.4 of RFC 4122.

This is the same problem as gh-124228 on NetBSD, which was fixed by not using the library there. FreeBSD and DragonFly BSD provide the same function but generate version 1 UUIDs, so only NetBSD and OpenBSD are affected.

test_uuid fails with 6 failures, AssertionError: 4 != 1.

Linked PRs

Read the original on github.com ↗