[issue27266] Always use getrandom() in os.random() on Linux and add block=False parameter to os.urandom()

Donald Stufft report at bugs.python.org
Wed Jun 8 18:58:18 EDT 2016


Donald Stufft added the comment:

I think a new function is a bad idea TBH, os.urandom provides 99% of the right interface on Linux, and 100% of the right interface on other OSes and there is a lot of code out there using os.urandom for it's security properties, and a lot of people educating users to use os.urandom for security sensitive tasks.

All of a sudden going, "wait! You actually want Y" is not going to make anything more clear, especially since the difference in behavior only matters in an edge case.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27266>
_______________________________________


More information about the Python-bugs-list mailing list