Message285031
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! |
|
Date |
User |
Action |
Args |
2017-01-09 10:08:17 | vstinner | set | recipients:
+ vstinner, brett.cannon, rhettinger, paul.moore, nedbat, tim.golden, python-dev, zach.ware, eryksun, steve.dower, dstufft, ammar2, altendky |
2017-01-09 10:08:17 | vstinner | set | messageid: <1483956497.31.0.924897863191.issue29085@psf.upfronthosting.co.za> |
2017-01-09 10:08:17 | vstinner | link | issue29085 messages |
2017-01-09 10:08:16 | vstinner | create | |
|