I consider the random module still broken in its current form (1.66). It tries to invoke random.urandom(1) in order to find out whether urandom works. Instead, it should defer that determination until urandom is actually used; i.e. instead of
if _urandom is None: import time a = long(time.time() * 256) # use fractional seconds else: a = long(_hexlify(_urandom(16)), 16)
it should read
try: a = long(_hexlify(os.urandom(16)), 16) except NotImplementedError: import time a = long(time.time() * 256) # use fractional seconds
IMO the patch to random.py should not have been applied without a review.
Regards, Martin