msg57735 - (view) |
Author: Christian Heimes (christian.heimes) *  |
Date: 2007-11-21 09:27 |
The SSL version of the imap4 client isnt' working under 3.0. After I applied the patch from http://bugs.python.org/issue1210 I tried to connect to an IMAP server over SSL. The connection hangs. import imaplib conn = imaplib.IMAP4_SSL("mailbox.rwth-aachen.de", 993) After a while I stopped the attempt with CTRL+C Traceback (most recent call last): File "", line 1, in File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 1137, in __init__ IMAP4.__init__(self, host, port) File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 184, in __init__ self.welcome = self._get_response() File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 907, in _get_response resp = self._get_line() File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 1000, in _get_line line = self.readline() File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 1170, in readline char = self.sslobj.read(1) File "/home/heimes/dev/python/py3k/Lib/ssl.py", line 160, in read return self._sslobj.read(len) KeyboardInterrupt |
|
|
msg57744 - (view) |
Author: Bill Janssen (janssen) *  |
Date: 2007-11-21 23:07 |
I'll take a look at it this weekend. Bill On Nov 21, 2007 1:27 AM, Christian Heimes <report@bugs.python.org> wrote: > > New submission from Christian Heimes: > > The SSL version of the imap4 client isnt' working under 3.0. After I > applied the patch from http://bugs.python.org/issue1210 I tried to > connect to an IMAP server over SSL. The connection hangs. > > import imaplib > conn = imaplib.IMAP4_SSL("mailbox.rwth-aachen.de", 993) > > After a while I stopped the attempt with CTRL+C > Traceback (most recent call last): > File "", line 1, in > File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 1137, in __init__ > IMAP4.__init__(self, host, port) > File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 184, in __init__ > self.welcome = self._get_response() > File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 907, in > _get_response > resp = self._get_line() > File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 1000, in > _get_line > line = self.readline() > File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 1170, in readline > char = self.sslobj.read(1) > File "/home/heimes/dev/python/py3k/Lib/ssl.py", line 160, in read > return self._sslobj.read(len) > KeyboardInterrupt > > ---------- > assignee: janssen > components: Library (Lib) > keywords: py3k > messages: 57735 > nosy: janssen, tiran > priority: normal > severity: normal > status: open > title: IMAP4 SSL isn't working > versions: Python 3.0 > > __________________________________ > Tracker <report@bugs.python.org> > <http://bugs.python.org/issue1482> > __________________________________ > |
|
|
msg58408 - (view) |
Author: Bill Janssen (janssen) *  |
Date: 2007-12-11 03:01 |
I'm still getting this with the latest SSL module fixes. I'm guessing this is a problem with the implementation of imaplib, but I haven't looked into it yet. |
|
|
msg58409 - (view) |
Author: Bill Janssen (janssen) *  |
Date: 2007-12-11 03:10 |
Here's a fix for the 3K branch. |
|
|
msg61897 - (view) |
Author: David Binger (dbinger) |
Date: 2008-01-31 12:17 |
Bill's patch does appear to fix the ssl-related problem. imaplib is still broken in py3k, though, due to bytes/str issues. |
|
|
msg61913 - (view) |
Author: Bill Janssen (janssen) *  |
Date: 2008-01-31 17:42 |
But that's issue 1210, which is still open. David, do you want to submit a patch for 1210? Meanwhile, do we still need this issue to be open? |
|
|
msg61923 - (view) |
Author: David Binger (dbinger) |
Date: 2008-01-31 18:48 |
On Jan 31, 2008, at 12:42 PM, Bill Janssen wrote: > > Bill Janssen added the comment: > > But that's issue 1210, which is still open. David, do you want to > submit a patch for 1210? I see that you are correct that 1210 is the bytes/str issue. I regret it, but I won't be able to supply a patch. > > Meanwhile, do we still need this issue to be open? Unless I'm missing something, the patch "b" that you posted has not been checked in. I think the issue should remain open until that happens. |
|
|
msg61942 - (view) |
Author: Bill Janssen (janssen) *  |
Date: 2008-02-01 02:14 |
I guess I'll check it in. There's no effective test case for the imaplib module, though. So if it's broken, we won't know. When I try connecting to my local IMAP server, I get >>> c = imaplib.IMAP4("127.0.0.1") Traceback (most recent call last): File "", line 1, in File "/local/python/3k/src/Lib/imaplib.py", line 190, in __init__ raise self.error(self.welcome) imaplib.error: b'* OK [CAPABILITY IMAP4rev1 LOGINDISABLED STARTTLS] UpLib IMAP Server (V4r1) ready.' >>> I think this is bug 1210. However, it is able to connect to an SSL-protected server (not the one above) and get the same error message, so I think the SSL patch works. |
|
|
msg61943 - (view) |
Author: Bill Janssen (janssen) *  |
Date: 2008-02-01 02:17 |
I've committed the patch. |
|
|