docker-offlineimap/offlineimap
Ilias Tsitsimpis e8b79c6bff Import ui before threadutil to resolve circular dependency
The `threadutil` module depends on the `ui` module, which cycle depends
on `threadutil` through the `Curses` module.

The `ui` module had been loaded before the `threadutil` module, breaking
the above circular dependency, but this was changed in a recent code
refactoring, preventing the `Curses` module from being loaded with the
following exception:

  File "./offlineimap.py", line 23, in <module>
    from offlineimap import OfflineImap
  File "offlineimap/offlineimap/__init__.py", line 20, in <module>
    from offlineimap.init import OfflineImap
  File "offlineimap/offlineimap/init.py", line 30, in <module>
    from offlineimap import globals, threadutil, accounts, folder, mbnames
  File "offlineimap/offlineimap/threadutil.py", line 25, in <module>
    from offlineimap.ui import getglobalui
  File "offlineimap/offlineimap/ui/__init__.py", line 28, in <module>
    from offlineimap.ui import Curses
  File "offlineimap/offlineimap/ui/Curses.py", line 27, in <module>
    from offlineimap.threadutil import ExitNotifyThread
ImportError: cannot import name ExitNotifyThread

Fix the above error by ensuring that the `ui` module gets loaded before
the `threadutil` module. Please note that the above fix is temporary,
and we should refactor the modules to not have circular dependencies.

Bug-Debian: https://bugs.debian.org/839862
Reported-by: Neil McGovern <neilm@debian.org>
Signed-off-by: Ilias Tsitsimpis <i.tsitsimpis@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-10-07 08:47:21 +02:00
..
folder Fix implicit call to unicode() from UI functions 2016-09-23 17:40:44 +02:00
repository repository: IMAP: cache the idle folders in memory 2016-09-20 02:36:56 +02:00
ui Fix typo in format string in machineui 2016-08-04 02:20:10 +02:00
utils minor: utils: distro: fix copyright line 2016-09-21 00:51:42 +02:00
__init__.py v7.0.7 2016-09-21 04:03:25 +02:00
accounts.py add the repository name when connecting 2016-07-30 01:44:27 +02:00
bundled_imaplib2.py bump from imaplib2 v2.53 to v2.55 2016-06-11 11:08:02 +02:00
CustomConfig.py ConfigHelperMixin must be new-style class to not break inheritance 2016-07-30 04:26:25 +02:00
emailutil.py Rename email.Parser to email.parser 2016-05-10 02:53:09 +02:00
error.py more consistent style 2015-01-07 21:31:43 +01:00
globals.py fix: when called with -a, mbnames must not erase entries of other accounts 2016-06-25 17:33:42 +02:00
imaplibutil.py improve error message when ssl_version must be set due to the tls_level 2016-07-25 03:29:25 +02:00
imapserver.py imapserver: minor code cleaning: reorder methods 2016-09-23 16:27:22 +02:00
imaputil.py Add workaround for string.split for Python3 2016-05-10 02:53:09 +02:00
init.py Import ui before threadutil to resolve circular dependency 2016-10-07 08:47:21 +02:00
localeval.py minor code enhancements 2016-07-28 00:42:35 +02:00
mbnames.py mbnames: add info output messages in dry run mode 2016-08-26 01:44:15 +02:00
threadutil.py threadutil: use 'with' statements for lock 2016-07-03 20:03:14 +02:00
virtual_imaplib2.py bump from imaplib2 v2.53 to v2.55 2016-06-11 11:08:02 +02:00