[pycrypto] Run test suite with /dev/random

Sebastian Ramacher sebastian+lists at ramacher.at
Fri Feb 3 11:35:20 EST 2012

On 01/31/2012 05:45 AM, Dwayne C. Litzenberger wrote:
> Ok, I'm willing to accept a patch that implements your workaround, if you can
> address a few remaining issues:

Please have a look at the attached patch. It should fix all the remaining
issues. Just let me know if there is something left that I've missed.

> 1. BlockingIOError needs to be handled.  If the signal occurs immediately   
> after the read(2) syscall is invoked, it will set errno=EAGAIN and    Python
> will raise BlockingIOError.  (At least, that's what the    documentation says.)

I think you meant IOError and errno=EINTR. FileIO won't throw a BlockingIOError
in any case. That's BufferedReader. If FileIO.read fails and errno=EAGAIN then
it returns None and otherwise it throws an IOError. At least that's how I
understand the code and the documentation.

> P.S.  Thank you for tracking this down.

You're welcome.

Kind regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-DevURandomRNG-to-work-with-Python3-s-new-I-O-sta.patch
Type: text/x-diff
Size: 2102 bytes
Desc: not available
URL: <http://lists.dlitz.net/pipermail/pycrypto/attachments/20120203/0576251d/attachment.patch>

More information about the pycrypto mailing list