unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Bridge with gmane in trouble?
@ 2015-05-06 15:18 Lele Gaifax
  2015-05-06 23:21 ` Repost: Notmuch 0.20~rc1 Lele Gaifax
  0 siblings, 1 reply; 5+ messages in thread
From: Lele Gaifax @ 2015-05-06 15:18 UTC (permalink / raw)
  To: notmuch

[-- Attachment #1: Type: text/plain, Size: 652 bytes --]

Hi all,

I tried twice to post a message thru the gmane.org NNTP bridge, but got a "not allowed" error message back... This is not my first news message sent to this ML, so something must be out of order...

Anyway, after an upgrade of my Debian sid computer I got version 0.20~rc1 installed; everything seems working great, except my i3 statusbar script: it imports "notmuch.globals", which in turn does a " import local". The latter fails under Python 3, I had to change that to "import notmuch.local" because P3 defaults to absolute imports.

Hope this gets thru,
Thank you & bye, lele.


-- Inviato dal mio cellulare Android con K-9 Mail.

[-- Attachment #2: Type: text/html, Size: 767 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Repost: Notmuch 0.20~rc1
  2015-05-06 15:18 Bridge with gmane in trouble? Lele Gaifax
@ 2015-05-06 23:21 ` Lele Gaifax
  2015-05-09  6:13   ` [PATCH] python: use absolute import for SOVERSION David Bremner
  0 siblings, 1 reply; 5+ messages in thread
From: Lele Gaifax @ 2015-05-06 23:21 UTC (permalink / raw)
  To: notmuch

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] python: use absolute import for SOVERSION
  2015-05-06 23:21 ` Repost: Notmuch 0.20~rc1 Lele Gaifax
@ 2015-05-09  6:13   ` David Bremner
  2015-05-17 13:03     ` David Bremner
  2015-05-23 19:20     ` David Bremner
  0 siblings, 2 replies; 5+ messages in thread
From: David Bremner @ 2015-05-09  6:13 UTC (permalink / raw)
  To: Lele Gaifax, notmuch

Apparently python3 needs this.
---
 bindings/python/notmuch/globals.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bindings/python/notmuch/globals.py b/bindings/python/notmuch/globals.py
index 4c49d51..70cfdc3 100644
--- a/bindings/python/notmuch/globals.py
+++ b/bindings/python/notmuch/globals.py
@@ -18,7 +18,7 @@ Copyright 2010 Sebastian Spaeth <Sebastian@SSpaeth.de>
 """
 
 from ctypes import CDLL, Structure, POINTER
-from version import SOVERSION
+from notmuch.version import SOVERSION
 
 #-----------------------------------------------------------------------------
 #package-global instance of the notmuch library
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] python: use absolute import for SOVERSION
  2015-05-09  6:13   ` [PATCH] python: use absolute import for SOVERSION David Bremner
@ 2015-05-17 13:03     ` David Bremner
  2015-05-23 19:20     ` David Bremner
  1 sibling, 0 replies; 5+ messages in thread
From: David Bremner @ 2015-05-17 13:03 UTC (permalink / raw)
  To: David Bremner, Lele Gaifax, notmuch

Apparently python3 needs this.
---

It seems like the previous sending of this patch didn't make it to the list.

 bindings/python/notmuch/globals.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bindings/python/notmuch/globals.py b/bindings/python/notmuch/globals.py
index 4c49d51..70cfdc3 100644
--- a/bindings/python/notmuch/globals.py
+++ b/bindings/python/notmuch/globals.py
@@ -18,7 +18,7 @@ Copyright 2010 Sebastian Spaeth <Sebastian@SSpaeth.de>
 """
 
 from ctypes import CDLL, Structure, POINTER
-from version import SOVERSION
+from notmuch.version import SOVERSION
 
 #-----------------------------------------------------------------------------
 #package-global instance of the notmuch library
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] python: use absolute import for SOVERSION
  2015-05-09  6:13   ` [PATCH] python: use absolute import for SOVERSION David Bremner
  2015-05-17 13:03     ` David Bremner
@ 2015-05-23 19:20     ` David Bremner
  1 sibling, 0 replies; 5+ messages in thread
From: David Bremner @ 2015-05-23 19:20 UTC (permalink / raw)
  To: notmuch

David Bremner <david@tethera.net> writes:

> Apparently python3 needs this.
> ---
>  bindings/python/notmuch/globals.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I verified this does indeed fix the python bindings. I have a seperate
patch series which allows running the (meager python tests in the) test
suite under python 3.  I'll post that shortly, but in the mean time I've
rolled another release candidate. I have done nothing about
notmuch-emacs-mua since the last RC.

d

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-05-23 19:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-06 15:18 Bridge with gmane in trouble? Lele Gaifax
2015-05-06 23:21 ` Repost: Notmuch 0.20~rc1 Lele Gaifax
2015-05-09  6:13   ` [PATCH] python: use absolute import for SOVERSION David Bremner
2015-05-17 13:03     ` David Bremner
2015-05-23 19:20     ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).