Author vstinner
Recipients altendky, ammar2, brett.cannon, dstufft, eryksun, nedbat, paul.moore, python-dev, rhettinger, steve.dower, tim.golden, vstinner, zach.ware
Date 2017-01-09.10:08:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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. */

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:17vstinnersetrecipients: + vstinner, brett.cannon, rhettinger, paul.moore, nedbat, tim.golden, python-dev, zach.ware, eryksun, steve.dower, dstufft, ammar2, altendky
2017-01-09 10:08:17vstinnersetmessageid: <>
2017-01-09 10:08:17vstinnerlinkissue29085 messages
2017-01-09 10:08:16vstinnercreate