STINNER Victor added the comment:

Oh, sorry, I introduced the bug in Python 3.6 with the PEP 524 (os.urandom() 
now blocks on Linux). Too bad that there is no simple way to write an unit test 
for that.

> ... but only on Windows on Python 3.6

With the bug, or when the fix when _PyOS_URandomNonblock() fails, Random.seed() 
uses:

* Reading system entropy failed, fall back on the worst entropy:
  use the current time and process identifier. */
random_seed_time_pid(self);

It's just that on Windows, the system clock has a resolution around 15 ms, 
whereas it has a resolution better than 1 us on Linux. So it's just that 
calling Random.seed() usually takes longer than the resolution of the system 
clock on Linux :-) Not really that the bug is specific to Windows.

Thanks for the fix Benjamin!

----------
nosy: +haypo

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29085>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to