[issue4972] let's equip ftplib.FTP with __enter__ and __exit__

Tarek Ziadé report at bugs.python.org
Tue Jan 20 22:07:54 CET 2009


Tarek Ziadé <ziade.tarek at gmail.com> added the comment:

> so you will never see a socket error from quit().

It did happen but on the close() call inside the quit() call.
I couldn't reproduce it in the tests yet, still working on it.

I have changed the patch and took car of the return code.

I have also commited a first version of the imaplib one. This one
required to write a dummy imap server in the tests, and I am not fully
happy with it yet (the returns are based on trials-errors, and I am not
fully understanding this protocol yet)

but imaplib is undertested, this fake server might be a good start for
more tests in test_imaplib imho.

Added file: http://bugs.python.org/file12811/smtplib.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4972>
_______________________________________


More information about the Python-bugs-list mailing list