Low hanging Python 3.1 issues

Allan Wind allan_wind at lifeintegrity.com
Tue Apr 17 05:17:51 UTC 2012


Not sure what the target is but the README has "OfflineIMAP does not require
additional python dependencies beyond python >=2.6" and there a number of
issues with Python 3.1.3.  Please review this patch for 
correctness (especially the removal of () of arguments, and ``).

Traceback (most recent call last):
  File "./offlineimap.py", line 20, in <module>
    from offlineimap import OfflineImap
  File "/home/allan/src/offlineimap/offlineimap/__init__.py", line 19, in <module>
    from offlineimap.init import OfflineImap
  File "/home/allan/src/offlineimap/offlineimap/init.py", line 21, in <module>
    import offlineimap.imaplib2 as imaplib
  File "/home/allan/src/offlineimap/offlineimap/imaplib2.py", line 376
    raise self.error('unrecognised server welcome message: %s' % `self.welcome`)

then 3 of these:

except socket.error, msg

which per <http://www.python.org/dev/peps/pep-3110/> should be

exception socket.error as msg

Some % `variable`.

print is now print()

Queue was renamed to queue, I think:

  File "/home/allan/src/offlineimap/offlineimap/imaplib2.py", line 47, in <module>
    import binascii, errno, os, Queue, random, re, select, socket, sys, time, threading, zlib

Still seeing this run-time error:

ERROR: While attempting to sync account 'lifeintegrity'
  global name 'basestring' is not defined


/Allan
-- 
Allan Wind
Life Integrity, LLC
<http://lifeintegrity.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Partial-support-for-Python-3.1.patch
Type: text/x-diff
Size: 5320 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/offlineimap-project/attachments/20120417/94aa0e89/attachment.patch>


More information about the OfflineIMAP-project mailing list