[PATCH] Syncing gmail labels for gmail accounts

Dima Pasechnik dimpase+olimap at gmail.com
Fri Nov 23 12:51:50 GMT 2012


On 23 November 2012 00:41, Abdó Roig-Maranges <abdo.roig at gmail.com> wrote:
>
> Hi Dima and Tomasz,
>
>> in Python documentation for re.sub() you can find: "Changed in version 3.1:
>> Added the optional flags argument". So the code in this patch will work
>> only with Python 3.1+. I did not look in the code, just the stack trace you
>> posted, but I guess we can do without using the optional "flags" in re.sub,
>> can't we? Then the patch would be compatible with older Python
>> versions.
>
> Thanks! It seems that for python 2 the flags argument for re.sub was
> introduced in 2.7, so post-2.7 users are fine.
>
> I don't want to get rid of the re.MULTILINE, to be able to match
> ^ and $. Now I compile the regexp, which should work on older python's.
>
> Here I attach a patch. You can pull the whole thing from
>
> https://github.com/aroig/offlineimap.git
>
> Let me now if there are other issues. I don't have any pre-2.7 python at
> hand to test...
OK, this seems to fix it for python 2.6, at least I don't get any more errors.

Best,
Dmitrii

>
> Abdó.
>




More information about the OfflineIMAP-project mailing list