Repost: Notmuch 0.20~rc1

Subject: Repost: Notmuch 0.20~rc1

Date: Thu, 07 May 2015 01:21:47 +0200

To: notmuch@notmuchmail.org

Cc:

From: Lele Gaifax


Hi all,

I notice a small glitch in the latest version. Yesterday I upgraded my Debian
sid and got 0.20~rc1, and while it seems working great, my i3 status bar,
which displays the number of unread emails, didn't work anymore.

A quick look revelead the reason:

    $ python3 status.py 
    Traceback (most recent call last):
      File "status.py", line 11, in <module>
        from notmuch import Query
      File "/usr/lib/python3/dist-packages/notmuch/__init__.py", line 54, in <module>
        from .database import Database
      File "/usr/lib/python3/dist-packages/notmuch/database.py", line 24, in <module>
        from .globals import (
      File "/usr/lib/python3/dist-packages/notmuch/globals.py", line 21, in <module>
        from version import SOVERSION
    ImportError: No module named 'version'

The first lines of globals.py are:

    from ctypes import CDLL, Structure, POINTER
    from version import SOVERSION

but Python3 by default uses "absolute imports" (PEP0328) by default, so I
think that for compatibility between Python2 and Python3 that should read

    from ctypes import CDLL, Structure, POINTER
    from notmuch.version import SOVERSION

Manually tweaking that source fixed the problem for me.

Thank you&bye, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it  |                 -- Fortunato Depero, 1929.


Thread: