STINNER Victor <victor.stin...@gmail.com> added the comment: > Found on Python 3.6 on a low-resource platform (NI RoboRIO), ...
Hum, it looks like an "embedded device", likely with no entropy source. To check if os.urandom() will block, try to call the following function in your main script: >>> import os; os.getrandom(1, flags=os.GRND_NONBLOCK) b'\xd1' os.urandom() blocks at system startup until the entropy pool is initialized with 128 bytes of entropy. Once it's initialized, os.urandom() will never block again. You may also check the number of entropy bytes available to /dev/random (Python uses /dev/urandom which is different): $ cat /proc/sys/kernel/random/entropy_avail 3748 For a longer explanation, see the PEP 524. ---------- nosy: +vstinner _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue29877> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com