Gregory P. Smith added the comment:

The error does not happen when running the same code under 2.7, despite the 
same default bufsize=0 subprocess behavior.  This is likely due to differences 
in the Python 2.x old style io library when os.fdopen(fd, 'rb', bufsize) is 
used vs 3.x when io.open(fd, 'rb', bufsize) is used for  Popen.stdout.

One workaround is to add a non-zero bufsize to the subprocess.Popen call in 
imaplib.IMAP4_stream.

I'm not sure if subprocess should be updated or if subprocess's docs on what it 
means for a pipe to be unbuffered (read(n) is a single syscall rather than a 
loop until n bytes or EOF) should be updated.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17443>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to