[issue27266] Always use getrandom() in os.random() on Linux and add block=False parameter to os.urandom()
STINNER Victor
report at bugs.python.org
Thu Jun 9 04:02:15 EDT 2016
STINNER Victor added the comment:
> I dislike the “block” term for a different reason: it suggests raising EAGAIN (= BlockingIOError). But the proposal here is actually to generate data with low entropy.
Since os.urandom() is part of the os module, yes, I'm suggesting to raise BlockingIOError. The caller would be responsible to handle this error and make a choice. For example, random.py can reuse its fallback on time.time().
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27266>
_______________________________________
More information about the Python-bugs-list
mailing list