Repository: OfflineIMAP/offlineimap

Issue #363: GMail repository fails to synchronize on python 2.7
Created: 2016-07-30T00:25:37Z
Relevant error which appears to be caused by removing inheritance from object in BaseRepository (88e8a48):
Thread 'Account sync Gmail' terminated with exception:
Traceback (most recent call last):
  File "/usr/share/python2.7/site-packages/offlineimap/threadutil.py", line 163, in run
  File "/usr/lib64/python2.7/threading.py", line 754, in run
  File "/usr/share/python2.7/site-packages/offlineimap/accounts.py", line 256, in syncrunner
  File "/usr/share/python2.7/site-packages/offlineimap/repository/__init__.py", line 84, in __new__
  File "/usr/share/python2.7/site-packages/offlineimap/repository/Gmail.py", line 39, in __init__
  File "/usr/share/python2.7/site-packages/offlineimap/repository/IMAP.py", line 41, in __init__
  File "/usr/share/python2.7/site-packages/offlineimap/imapserver.py", line 96, in __init__
  File "/usr/share/python2.7/site-packages/offlineimap/repository/Gmail.py", line 48, in gethost
TypeError: must be type, not classobj


Last 2 debug messages logged for Account sync Gmail prior to exception:

Duplicate issue #364: offlineimap 7.0.3 thread terminated with exception
Created: 2016-07-30T14:01:50Z
I'm getting a thread-related error on offlineimap 7.0.3 that I wasn't getting with offlineimap 7.0.2:
OfflineIMAP 7.0.3
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
Thread 'Account sync Gmail' terminated with exception:
Traceback (most recent call last):
  File "/usr/local/Cellar/offlineimap/7.0.3/libexec/offlineimap/threadutil.py", line 163, in run
    Thread.run(self)
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/Cellar/offlineimap/7.0.3/libexec/offlineimap/accounts.py", line 256, in syncrunner
    self.remoterepos = Repository(self, 'remote')
  File "/usr/local/Cellar/offlineimap/7.0.3/libexec/offlineimap/repository/__init__.py", line 84, in __new__
    return repo(name, account)
  File "/usr/local/Cellar/offlineimap/7.0.3/libexec/offlineimap/repository/Gmail.py", line 39, in __init__
    IMAPRepository.__init__(self, reposname, account)
  File "/usr/local/Cellar/offlineimap/7.0.3/libexec/offlineimap/repository/IMAP.py", line 41, in __init__
    self.imapserver = imapserver.IMAPServer(self)
  File "/usr/local/Cellar/offlineimap/7.0.3/libexec/offlineimap/imapserver.py", line 96, in __init__
    None if self.preauth_tunnel else repos.gethost()
  File "/usr/local/Cellar/offlineimap/7.0.3/libexec/offlineimap/repository/Gmail.py", line 48, in gethost
    return super(GmailRepository, self).gethost()
TypeError: super() argument 1 must be type, not classobj

I took a look at the commit 44a8cf3, but I didn't see anything obvious that could have caused this.  Then again, I'm not a python programmer.
I reverted to offlineimap 7.0.2 and I can confirm that works without the thread exception on the same configuration files.

Closing comment (2016-07-30T14:37:41Z): The fix is in the next branch. This duplicates #363 but I agree the title of this issue is not specific enough to find it.
Thanks for the report!