[Imaplib2-devel] Two patches to improve compatibility with Python 2.6

Piers Lauder piers at janeelix.com
Tue Apr 3 04:19:33 BST 2012


On Mon, 02 Apr 2012 23:53:02 +0200, Sebastian Spaeth wrote:
  > 
  > > Good day.
  > >
  > > I have two patches that will improve the compatibility of OfflineIMAP
  > > with Python 2.6.  The first one cures Curses.py,
  > >   http://codelabs.ru/patches/offlineimap/6.5.2.1-fix-super-usage.diff
  > 
  > Hi Eygene,
  > 
  > thanks for the patches and very sorry for my non-response time. I kind
  > of suffered an email breakdown for a few weeks, but I should be back
  > now and am in the process of catching up.
  > 
  > I have applied the first patch. Thanks.
  > 
  > > The second one works around the old bug in Python that was fixed
  > > in the early versions of 2.6, but since OfflineIMAP documentation
  > > says that 2.6 is supported, it will be good to have it really fully
  > > supported,
  > http://codelabs.ru/patches/offlineimap/6.5.2.1-imaplib2-bug-3473-workaround.diff
  > for this one, I would suggest that you send it directly to the imaplib2
  > list, because I would prefer to bundle an unmodified upstream version if
  > possible at all. I'm copying in the imaplib2 list in this reply, so
  > let's see if the imaplib2 maintainer takes it.

As far as I'm aware, this has been fixed for some time in imaplib2.

The fix was to put the keyword arguments before the *args. Please let
me know if it doesn't, in fact, work.

(In imaplib2 version 2.33, those lines are:-

    if 'callback' in kw:
        # Note: old calling sequence for back-compat with python <2.6
        self._command(name, callback=self._command_completer, cb_arg=kw, cb_self=True, *args)
        return (None, None)
)

Piers Lauder.






More information about the OfflineIMAP-project mailing list