[PATCH 2/2] Re: Adapt the code to work with the new imaplib2
Nicolas Sebrecht
nicolas.s-dev at laposte.net
Sun Aug 14 18:43:00 BST 2011
On Sun, Aug 14, 2011 at 01:09:51PM +0200, Sebastian Spaeth wrote:
> imaplib renamed self.sslobj to self.sock and our overriden open()
> functions were failing for that reason when updating imaplib2 to
> v2.28. It turns out that all of our custom initializations are being
> done by stock imaplib2 now anyway, so there is no need to override them
> anymore. This lets us simplify the code we have to worry about.
>
> Move the verifycert() function to the imapserver.py file, it is now a
> callback function that is being handed to imaplib from there, so it
> makes sense to also define it in our imapserver function...
> (this also lets us easily make use of the verifycert function in the
> starttls case in the future)
>
> TODO: we need to examine if and why we still need to override the
> select() function, it is the only reason why we still wrap the IMAP4
> classes.
OK.
> Fix one typo in upstream imaplib2, a patch has been sent upstream too.
Please, don't do that. Wait for upstream release with the needed fix.
--
Nicolas Sebrecht
More information about the OfflineIMAP-project
mailing list