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 ncoghlan
Recipients dstufft, ncoghlan
Date 2016-06-09.17:24:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1465493053.79.0.828569017068.issue27282@psf.upfronthosting.co.za>
In-reply-to
Content
Quoting http://bugs.python.org/issue27266#msg268043:

The key advantage the BlockingIOError model offers is that it's trivial to build a blocking version as a busy loop around the non-blocking version:

    def urandom_wait_for_entropy(num_bytes):
        while True:
            try:
                return os.urandom(num_bytes)
            except BlockingIOError:
                pass

And if you ignore the problem and just call os.urandom(), you'll almost certainly be fine unless you're working with Linux boot scripts or embedded ARM devices (in which case, this point will be minor compared to the other arcana you're dealing with).
History
Date User Action Args
2016-06-09 17:24:13ncoghlansetrecipients: + ncoghlan, dstufft
2016-06-09 17:24:13ncoghlansetmessageid: <1465493053.79.0.828569017068.issue27282@psf.upfronthosting.co.za>
2016-06-09 17:24:13ncoghlanlinkissue27282 messages
2016-06-09 17:24:13ncoghlancreate