Re: [Python-Dev] [Python-checkins] cpython (3.5): Fix os.urandom() using getrandom() on Linux

2016-06-14 Thread Larry Hastings
On 06/14/2016 08:07 AM, Steven D'Aprano wrote: Is this right? I thought we had decided that os.urandom should *not* fall back on getrandom on Linux? We decided that os.urandom() should not *block* on Linux. Which it doesn't; we now strictly call getrandom(GRND_NONBLOCK), which will never

Re: [Python-Dev] [Python-checkins] cpython (3.5): Fix os.urandom() using getrandom() on Linux

2016-06-14 Thread Victor Stinner
Le 14 juin 2016 5:28 PM, "Jelle Zijlstra" a écrit : >The problem isn't that os.urandom() uses getrandom(), it's that it calls it in a mode that may block. Except if it changed very recently, os.urandom() doesn't block anymore thanks to my previous change ;-) Victor

Re: [Python-Dev] [Python-checkins] cpython (3.5): Fix os.urandom() using getrandom() on Linux

2016-06-14 Thread Victor Stinner
Sorry, I don't hve the bandwith to follow the huge discussion around random in Python. If you want my help, please write a PEP to summarize the discussion. My change fixes an obvious bug. Even if the Python API changes, I don't expect that all the C code will be removed. Victor Le 14 juin 2016

Re: [Python-Dev] [Python-checkins] cpython (3.5): Fix os.urandom() using getrandom() on Linux

2016-06-14 Thread Jelle Zijlstra
I think this is an issue unrelated to the big discussion from a little while ago. The problem isn't that os.urandom() uses getrandom(), it's that it calls it in a mode that may block. 2016-06-14 8:07 GMT-07:00 Steven D'Aprano : > Is this right? I thought we had decided that

Re: [Python-Dev] [Python-checkins] cpython (3.5): Fix os.urandom() using getrandom() on Linux

2016-06-14 Thread Steven D'Aprano
Is this right? I thought we had decided that os.urandom should *not* fall back on getrandom on Linux? On Tue, Jun 14, 2016 at 02:36:27PM +, victor. stinner wrote: > https://hg.python.org/cpython/rev/e028e86a5b73 > changeset: 102033:e028e86a5b73 > branch: 3.5 > parent: