Comment by shakna
6 days ago
Uh... Come again?
def uuid4():
"""Generate a random UUID."""
return UUID(bytes=os.urandom(16), version=4)
6 days ago
Uh... Come again?
def uuid4():
"""Generate a random UUID."""
return UUID(bytes=os.urandom(16), version=4)
Nice. Looks like I was looking at an old version of the file. https://github.com/python/cpython/commit/09ba98436444d2a4e11...
Yeah, Python went through a big shakeup around secure randomness when they put together the "secrets" library, around a decade ago. A lot of that also got backported on most OSs.
So there really shouldn't be anyone using that today, thankfully.
[dead]