Marc-Andre Lemburg added the comment:

As mentioned on the other issue #25420, this is a regression and a change in 
documented behavior of os.urandom(), which is expected to be non-blocking, 
regardless of whether entropy is available or not.

The fix should be easy (from reading the man page 
http://man7.org/linux/man-pages/man2/getrandom.2.html): set the GRND_NONBLOCK 
flag on getrandom(); then, if the function returns -1 and sets EAGAIN, fallback 
to reading from /dev/urandom directly.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26839>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to