[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing /arguinthe random module on getrandom()
Marc-Andre Lemburg
report at bugs.python.org
Wed Jun 8 17:04:48 EDT 2016
Marc-Andre Lemburg added the comment:
On 08.06.2016 22:49, Larry Hastings wrote:
>
> Third, because the os module is in general a thin wrapper over what the OS provides, I disapprove of "cryptorandom()" and "pseudorandom()" going into the os module. There are no functions with these names on any OS of which I'm aware. This is why I proposed "os.getrandom(n, block=True)". From its signature, the function it calls on your OS will be obvious, and its semantics on your OS will be documented by your OS.
>
> Thus I am completely unwilling to add os.cryptorandom() and os.pseudorandom() in 3.5.2.
That was a sketch for 3.6 to resolve the ambiguity between the
different use cases.
You're right, it's better to move such things to the random
module.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26839>
_______________________________________
More information about the Python-bugs-list
mailing list