Generate a random UUID.
()
| 773 | return UUID._from_int(int_uuid_3) |
| 774 | |
| 775 | def uuid4(): |
| 776 | """Generate a random UUID.""" |
| 777 | int_uuid_4 = int.from_bytes(os.urandom(16)) |
| 778 | int_uuid_4 &= _RFC_4122_CLEARFLAGS_MASK |
| 779 | int_uuid_4 |= _RFC_4122_VERSION_4_FLAGS |
| 780 | return UUID._from_int(int_uuid_4) |
| 781 | |
| 782 | def uuid5(namespace, name): |
| 783 | """Generate a UUID from the SHA-1 hash of a namespace UUID and a name.""" |
nothing calls this directly
no test coverage detected
searching dependent graphs…