Michael Gundlach <gundl...@gmail.com> added the comment: I recently started getting what appears to be this bug in 2.6.6 and 2.7.3 when connecting to Google.
My script does this: while True: get an IMAP connection to Google, if our old one timed out fetch unread messages. if any: make an SMTP connection to Google and send some emails mark the unread messages as read sleep 10 seconds It used to run fine on 2.6. I'm assuming something changed at Google, because it started hanging, whether in 2.6 or 2.7. Here's the stack trace when I eventually press Ctrl-C: File "./main.py", line 21, in loop the_emails = list(emails.messages('(UNSEEN)')) File "./emails.py", line 129, in messages for chunk in chunks_of_length(32, messages): File "./chunks.py", line 9, in chunks_of_length for item in iterable: File "./emails.py", line 90, in email_messages m = open_mailbox(label, readonly=True) File "./emails.py", line 30, in open_mailbox m = imaplib.IMAP4_SSL('imap.gmail.com', 993) File "/usr/lib64/python2.6/imaplib.py", line 1138, in __init__ IMAP4.__init__(self, host, port) File "/usr/lib64/python2.6/imaplib.py", line 163, in __init__ self.open(host, port) File "/usr/lib64/python2.6/imaplib.py", line 1150, in open self.sslobj = ssl.wrap_socket(self.sock, self.keyfile, self.certfile) File "/usr/lib64/python2.6/ssl.py", line 338, in wrap_socket suppress_ragged_eofs=suppress_ragged_eofs) File "/usr/lib64/python2.6/ssl.py", line 120, in __init__ self.do_handshake() File "/usr/lib64/python2.6/ssl.py", line 279, in do_handshake self._sslobj.do_handshake() KeyboardInterrupt FWIW, for the last couple of days my script is *not* hanging, so perhaps Google changed something on their end, avoiding the Python bug. Should this Issue be reopened or should I file a new Issue? ---------- nosy: +gundlach _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1251> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com