Message267715
I've attached a minimal patch for making it so ``import random`` does not block, it does this by changing what the default instance of Random() is seeded with, from os.urandom() to the time based fallback it currently employs. It does not change the behavior of any documented behavior that I can see (it's documented that calling seed(None) or seed() will use urandom if available).
This could be improved by mixing in id(self) and using SipHash or LCG on the value, but this represents a minimal patch that is already possible in cases where os.urandom doesn't exist. |
|
Date |
User |
Action |
Args |
2016-06-07 18:29:05 | dstufft | set | recipients:
+ dstufft, lemburg, rhettinger, doko, vstinner, larry, christian.heimes, matejcik, ned.deily, alex, skrah, python-dev, martin.panter, ztane, Lukasa, thomas-petazzoni, Colm Buckley |
2016-06-07 18:29:04 | dstufft | set | messageid: <1465324144.64.0.466557905701.issue26839@psf.upfronthosting.co.za> |
2016-06-07 18:29:04 | dstufft | link | issue26839 messages |
2016-06-07 18:29:04 | dstufft | create | |
|