Re: [PATCH 2/2] Rename package to notmuch2

2019-11-20 Thread David Bremner
Floris Bruynooghe  writes:

> This is based on a previous discussion on the list where this was more
> or less seen as the least-bad option.

pushed to wip/cffi, along with the other patch switching away from the
deprecated API.

I still need to review the discussion and see if there is any
outstanding review comments from Tomi (or other people).

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 2/2] Rename package to notmuch2

2019-11-17 Thread Floris Bruynooghe
This is based on a previous discussion on the list where this was more
or less seen as the least-bad option.
---
 .../{notdb => notmuch2}/__init__.py| 14 +++---
 .../python-cffi/{notdb => notmuch2}/_base.py   |  4 ++--
 .../python-cffi/{notdb => notmuch2}/_build.py  |  4 ++--
 .../{notdb => notmuch2}/_database.py   | 12 ++--
 .../python-cffi/{notdb => notmuch2}/_errors.py |  2 +-
 .../{notdb => notmuch2}/_message.py|  8 
 .../python-cffi/{notdb => notmuch2}/_query.py  | 10 +-
 .../python-cffi/{notdb => notmuch2}/_tags.py   |  6 +++---
 .../python-cffi/{notdb => notmuch2}/_thread.py | 10 +-
 bindings/python-cffi/setup.py  |  4 ++--
 bindings/python-cffi/tests/test_base.py|  4 ++--
 bindings/python-cffi/tests/test_database.py| 14 +++---
 bindings/python-cffi/tests/test_message.py | 14 +++---
 bindings/python-cffi/tests/test_tags.py|  4 ++--
 bindings/python-cffi/tests/test_thread.py  | 18 +-
 bindings/python-cffi/tox.ini   |  4 ++--
 16 files changed, 66 insertions(+), 66 deletions(-)
 rename bindings/python-cffi/{notdb => notmuch2}/__init__.py (90%)
 rename bindings/python-cffi/{notdb => notmuch2}/_base.py (99%)
 rename bindings/python-cffi/{notdb => notmuch2}/_build.py (99%)
 rename bindings/python-cffi/{notdb => notmuch2}/_database.py (99%)
 rename bindings/python-cffi/{notdb => notmuch2}/_errors.py (99%)
 rename bindings/python-cffi/{notdb => notmuch2}/_message.py (99%)
 rename bindings/python-cffi/{notdb => notmuch2}/_query.py (93%)
 rename bindings/python-cffi/{notdb => notmuch2}/_tags.py (99%)
 rename bindings/python-cffi/{notdb => notmuch2}/_thread.py (97%)

diff --git a/bindings/python-cffi/notdb/__init__.py 
b/bindings/python-cffi/notmuch2/__init__.py
similarity index 90%
rename from bindings/python-cffi/notdb/__init__.py
rename to bindings/python-cffi/notmuch2/__init__.py
index 67051df5..4d76ec15 100644
--- a/bindings/python-cffi/notdb/__init__.py
+++ b/bindings/python-cffi/notmuch2/__init__.py
@@ -42,13 +42,13 @@ usually more and essentially O(n) rather than O(1) as you 
might
 usually expect from Python containers.
 """
 
-from notdb import _capi
-from notdb._base import *
-from notdb._database import *
-from notdb._errors import *
-from notdb._message import *
-from notdb._tags import *
-from notdb._thread import *
+from notmuch2 import _capi
+from notmuch2._base import *
+from notmuch2._database import *
+from notmuch2._errors import *
+from notmuch2._message import *
+from notmuch2._tags import *
+from notmuch2._thread import *
 
 
 NOTMUCH_TAG_MAX = _capi.lib.NOTMUCH_TAG_MAX
diff --git a/bindings/python-cffi/notdb/_base.py 
b/bindings/python-cffi/notmuch2/_base.py
similarity index 99%
rename from bindings/python-cffi/notdb/_base.py
rename to bindings/python-cffi/notmuch2/_base.py
index acb64413..31258149 100644
--- a/bindings/python-cffi/notdb/_base.py
+++ b/bindings/python-cffi/notmuch2/_base.py
@@ -1,8 +1,8 @@
 import abc
 import collections.abc
 
-from notdb import _capi as capi
-from notdb import _errors as errors
+from notmuch2 import _capi as capi
+from notmuch2 import _errors as errors
 
 
 __all__ = ['NotmuchObject', 'BinString']
diff --git a/bindings/python-cffi/notdb/_build.py 
b/bindings/python-cffi/notmuch2/_build.py
similarity index 99%
rename from bindings/python-cffi/notdb/_build.py
rename to bindings/python-cffi/notmuch2/_build.py
index 6be7e5b1..3ba3e558 100644
--- a/bindings/python-cffi/notdb/_build.py
+++ b/bindings/python-cffi/notmuch2/_build.py
@@ -3,14 +3,14 @@ import cffi
 
 ffibuilder = cffi.FFI()
 ffibuilder.set_source(
-'notdb._capi',
+'notmuch2._capi',
 r"""
 #include 
 #include 
 #include 
 
 #if LIBNOTMUCH_MAJOR_VERSION < 5
-#error libnotmuch version not supported by notdb
+#error libnotmuch version not supported by notmuch2 python bindings
 #endif
 """,
 include_dirs=['../../lib'],
diff --git a/bindings/python-cffi/notdb/_database.py 
b/bindings/python-cffi/notmuch2/_database.py
similarity index 99%
rename from bindings/python-cffi/notdb/_database.py
rename to bindings/python-cffi/notmuch2/_database.py
index d414082a..a15c4d03 100644
--- a/bindings/python-cffi/notdb/_database.py
+++ b/bindings/python-cffi/notmuch2/_database.py
@@ -6,12 +6,12 @@ import os
 import pathlib
 import weakref
 
-import notdb._base as base
-import notdb._capi as capi
-import notdb._errors as errors
-import notdb._message as message
-import notdb._query as querymod
-import notdb._tags as tags
+import notmuch2._base as base
+import notmuch2._capi as capi
+import notmuch2._errors as errors
+import notmuch2._message as message
+import notmuch2._query as querymod
+import notmuch2._tags as tags
 
 
 __all__ = ['Database', 'AtomicContext', 'DbRevision']
diff --git a/bindings/python-cffi/notdb/_errors.py 
b/bindings/python-cffi/notmuch2/_errors.py
similarity index 99%
rename