[issue9010] Infinite loop in imaplib.IMAP4_SSL when used with Gmail

Shashwat Anand report at bugs.python.org
Wed Jun 16 18:12:45 CEST 2010

Shashwat Anand <anand.shashwat at gmail.com> added the comment:

"import imaplib

USERNAME="username at gmail.com"

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."

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.

nosy: +l0nwlf

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list