[issue27266] Add block keyword-only optional parameter to os.urandom()

2016-06-08 Thread STINNER Victor
STINNER Victor added the comment: Ah, there is maybe a solution for BSD? msg267810: "it looks like we can use sysctl to fetch the seed state from kern.random.sys.seeded" -- ___ Python tracker

[issue27266] Add block keyword-only optional parameter to os.urandom()

2016-06-08 Thread Donald Stufft
Donald Stufft added the comment: I'm pretty sure that getentropy on OpenBSD will block until the pool is initialized. -- nosy: +dstufft ___ Python tracker ___ __

[issue27266] Add block keyword-only optional parameter to os.urandom()

2016-06-08 Thread STINNER Victor
STINNER Victor added the comment: > Is there a way to read from /dev/urandom without blocking? If not, > _PyOS_URandom() may use arc4random() on FreeBSD if block is false. I suggest > to enhance _PyOS_URandom() after the Python 3.5.2 release. See the issue #22542 "Use arc4random under OpenBSD

[issue27266] Add block keyword-only optional parameter to os.urandom()

2016-06-08 Thread STINNER Victor
STINNER Victor added the comment: This issue is the opposite of the issue #27250 "Add os.urandom_block()". -- ___ Python tracker ___ _

[issue27266] Add block keyword-only optional parameter to os.urandom()

2016-06-08 Thread STINNER Victor
STINNER Victor added the comment: Larry Hastings (msg267818, on the issue #26839): > What is the default value of the "block" parameter? False > If called with block=False on FreeBSD, where /dev/urandom may block > sometimes, what does the function do? The function blocks. In which case Free

[issue27266] Add block keyword-only optional parameter to os.urandom()

2016-06-08 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +larry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue27266] Add block keyword-only optional parameter to os.urandom()

2016-06-08 Thread STINNER Victor
New submission from STINNER Victor: Follow-up of the issue #26839: I propose to add a "block" keyword-only optional parameter to os.urandom(). I chose to make the parameter a keyword-only to avoid suprises and backward incompatible change and because I want to make this change in Python 3.5.2.