This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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 <1483956497.31.0.924897863191.issue29085@psf.upfronthosting.co.za>
In-reply-to
Content
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!
History
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: <1483956497.31.0.924897863191.issue29085@psf.upfronthosting.co.za>
2017-01-09 10:08:17vstinnerlinkissue29085 messages
2017-01-09 10:08:16vstinnercreate