diff -r 406c6fd7e753 Lib/imaplib.py --- a/Lib/imaplib.py Sun Mar 17 21:53:48 2013 -0400 +++ b/Lib/imaplib.py Mon Mar 18 21:49:09 2013 -0700 @@ -24,6 +24,7 @@ import binascii, errno, random, re, socket, subprocess, sys, time, calendar from datetime import datetime, timezone, timedelta +from io import DEFAULT_BUFFER_SIZE try: import ssl HAVE_SSL = True @@ -1244,6 +1245,7 @@ self.sock = None self.file = None self.process = subprocess.Popen(self.command, + bufsize=DEFAULT_BUFFER_SIZE, stdin=subprocess.PIPE, stdout=subprocess.PIPE, shell=True, close_fds=True) self.writefile = self.process.stdin