Ticket #49 (closed defect: fixed)
Work around imaplib SSL bug
| Reported by: | menno | Owned by: | menno |
|---|---|---|---|
| Priority: | major | Milestone: | 0.6.1 |
| Version: | Keywords: | ||
| Cc: |
Description
Details from Mark:
In short, there is a bug in imaplib when dealing with ssl connections
which terminate early - the SSL readline() method in imaplib gets into
a loop reading empty strings from the socket and appending them to a
list, chewing lots of memory and causing some consternation :)
The bug seems to be http://bugs.python.org/issue5949 and it has been
fixed in various versions, although I hit it in 2.6.3.
It was fixed in 2.6 in:
http://svn.python.org/view/python/branches/release26-maint/Lib/imaplib.py?r1=76761&r2=76760&pathrev=76761
But note that it has not been back-ported to 2.5 or earlier.
The bug report above includes a patch to imaplib's readline. It should
be possible to monkeypatch in the fixed version if a buggy imaplib
version is detected.
