[issue17443] imaplib.IMAP4_stream subprocess is opened unbuffered but ignores short reads

2013-03-18 Thread Diane Trout

Diane Trout added the comment:

After bumping into r.david.murray in the elevator I got the impression setting 
the bufsize argument to the Popen call would be a better idea.

I found that BufferedReader/Writer were using a DEFAULT_BUFFER_SIZE set 
somewhere in the c part of io. To cut down on magic numbers, this imaplib patch 
imports that constant and uses it on the Popen call. 

It doesn't seem to introduce test failures and still fixes the imap 
desynchronization problem seen at the porting clinic.

--
Added file: http://bugs.python.org/file29473/imaplib-bufsize.patch

___
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



[issue17443] imaplib.IMAP4_stream subprocess is opened unbuffered but ignores short reads

2013-03-17 Thread Diane Trout

Diane Trout added the comment:

So as a first stab at fixing this. I modified imaplib to wrap the process.stdin 
/ process.stdout from with io.BufferedWriter / io.BufferedReader. I didn't use 
the TextIOWrapper as the imaplib wanted to work with the raw \r\n. 

The change seems to have fixed the problem I was having, I also checked out 
82724:ef8ea052bcc4 and tried running ./python -m test -j3  before and after 
the buffer wrapping and it didn't seem to trigger any test case failures.

--
keywords: +patch
Added file: http://bugs.python.org/file29434/imaplib-buff.patch

___
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



[issue17443] imaplib.IMAP4_stream subprocess is opened unbuffered but ignores short reads

2013-03-16 Thread Diane Trout

Changes by Diane Trout di...@ghic.org:


--
nosy: +detrout

___
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