[PATCH 4/4] Re: Another way of locating UID of just saved message

Nicolas Sebrecht nicolas.s-dev at laposte.net
Wed Jul 27 17:38:56 BST 2011


On Wed, Jul 27, 2011 at 06:10:02PM +0200, Knut Anders Hatlen wrote:
> Vladimir.Marek at oracle.com writes:
> 
> > --- a/offlineimap/imaplib2.py
> > +++ b/offlineimap/imaplib2.py
> > @@ -185,6 +185,20 @@ class Request(object):
> >  
> >  
> >  
> > +class UnquotedString(object):
> > +    """ String which will not be quoted when passed to IMAP4 command. It works
> > +    because IMAP._checkquote skips anything which is not of a 'basestring'
> > +    type.
> > +    Fro example: 
> > +        imapobj.uid('FETCH', UnquotedString('*:*'), 'rfc822.header')"""
> > +    t=""
> > +
> > +    def __init__(self, text):
> > +            self.t=text
> > +
> > +    def __repr__(self):
> > +            return self.t
> > +
> >  
> >  class IMAP4(object):
> 
> I'm not familiar with the internals of OfflineIMAP, but I'm under the
> impression that imaplib2 is a third-party library bundled with
> OfflineIMAP. If so, it's probably better not to change that file, so
> that it doesn't diverge from the upstream sources. (Don't take my word
> for it. Someone who actually knows the code should comment on it, but I
> thought I should raise the issue.)

You're right.

We need to split this changeset out and send it to the imaplib2 mailing
list. Once merged in imaplib2 and merged back from it, we could merge
the rest of the patch.

-- 
Nicolas Sebrecht




More information about the OfflineIMAP-project mailing list