[ python-Bugs-977680 ] IMAP4_SSL() class incompatible with socket.timeout

SourceForge.net noreply at sourceforge.net
Tue Jun 22 14:13:40 EDT 2004


Bugs item #977680, was opened at 2004-06-22 12:13
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=977680&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Charles (melicertes)
Assigned to: Nobody/Anonymous (nobody)
Summary: IMAP4_SSL() class incompatible with socket.timeout

Initial Comment:
If you do socket.setdefaulttimeout(X) before trying to
instantiate imaplib.IMAP4_SSL(), the connection hangs
partway through the SSL negotiation.

The cause is that socket.ssl() is actually incompatible
with timeouts (not sure why) and IMAP4_SSL() doesn't do
anything to guard against it.  It should do
.setblocking(1) on the socket.socket object before
passing it to socket.ssl().

The documentation should also clarify timeouts not
working with socket.ssl.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=977680&group_id=5470



More information about the Python-bugs-list mailing list