I installed Python 2.7RC1 on Mac OS X 10.6.3 and tried my script and it worked for me. Imaplib throws the right exception instead of looping forever:
Shashwat Anand <anand.shashwat@gmail.com> added the comment:
Tried to reproduce this on Python 2.7RC1. Seemed Ok to me. Took some 3 seconds to call f() not only once, but twice, thrice.
"import imaplib
HOST="imap.gmail.com"
PORT=993
USERNAME="username@gmail.com"
PASSWORD="password"
server = imaplib.IMAP4_SSL(host=HOST, port=PORT)
server.login(USERNAME, PASSWORD)
def f():
print server.select("INBOX")
print server.uid("FETCH", "1:*", "(UID FLAGS BODY.PEEK[HEADER.FIELDS (Subject)])")
Call the f() function and then wait about about an hour. Call f() again and server.select() will not return but take all CPU."
----------
nosy: +l0nwlf
_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue9010>
_______________________________________