]> git.notmuchmail.org Git - notmuch/commitdiff
Merge tag '0.34.3'
authorDavid Bremner <david@tethera.net>
Sun, 9 Jan 2022 23:34:58 +0000 (19:34 -0400)
committerDavid Bremner <david@tethera.net>
Sun, 9 Jan 2022 23:34:58 +0000 (19:34 -0400)
notmuch 0.34.3 release

NEWS
bindings/python-cffi/notmuch2/_database.py
bindings/python-cffi/tests/test_config.py
bindings/python-cffi/tests/test_database.py
bindings/python-cffi/tests/test_tags.py
bindings/python-cffi/tests/test_thread.py
bindings/python/notmuch/version.py
debian/changelog
doc/conf.py
version.txt

diff --git a/NEWS b/NEWS
index 27e431561717e169ea858295a56251759a5cc5de..e39af3445ee2ad53733599ce869c9d9ad7085de1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,24 @@
+Notmuch 0.34.3 (2022-01-09)
+===========================
+
+Library
+-------
+
+Do not crash when presented with a .notmuch directory without a
+xapian/ subdirectory.
+
+Python Bindings (notmuch2)
+--------------------------
+
+Database constructor now searches for configuration by default. Pass
+`config=Database.CONFIG.EMPTY` to disable.
+
+The `Message.replies()` method now returns OwnedMessage objects, to
+prevent certain memory de-allocation errors.
+
+Fix for importing `notmuch2` module when building bindings
+documentation.
+
 Notmuch 0.34.2 (2021-12-09)
 ===========================
 
index 14a8f15c6b654e0f02da62fff93959cb906f9546..d7485b4d983d8f55efd92b8a8581dac86e415c3a 100644 (file)
@@ -139,7 +139,7 @@ class Database(base.NotmuchObject):
             path = os.fsencode(path)
         return path
 
-    def __init__(self, path=None, mode=MODE.READ_ONLY, config=CONFIG.EMPTY):
+    def __init__(self, path=None, mode=MODE.READ_ONLY, config=CONFIG.SEARCH):
         if isinstance(mode, str):
             mode = self.STR_MODE_MAP[mode]
         self.mode = mode
index 1b2695f51707a9d447c0b3160a1f269d025f0f17..67b0dea44ea99837f91a738b5236661dc7c9f7e3 100644 (file)
@@ -23,9 +23,9 @@ class TestIter:
 
     def test_set_get(self, maildir):
         # Ensure get-set works from different db objects
-        with dbmod.Database.create(maildir.path) as db0:
+        with dbmod.Database.create(maildir.path, config=dbmod.Database.CONFIG.EMPTY) as db0:
             db0.config['spam'] = 'ham'
-        with dbmod.Database(maildir.path) as db1:
+        with dbmod.Database(maildir.path, config=dbmod.Database.CONFIG.EMPTY) as db1:
             assert db1.config['spam'] == 'ham'
 
     def test_get_keyerror(self, db):
index 9b3219c00e634a9e4d91fa6d3c7c329dd8e59aa2..f1d12ea6c2f046186377a7ce48b104d3a5855873 100644 (file)
@@ -13,7 +13,7 @@ import notmuch2._message as message
 
 @pytest.fixture
 def db(maildir):
-    with dbmod.Database.create(maildir.path) as db:
+    with dbmod.Database.create(maildir.path, config=notmuch2.Database.CONFIG.EMPTY) as db:
         yield db
 
 
@@ -293,7 +293,7 @@ class TestQuery:
         maildir.deliver(body='baz',
                         headers=[('In-Reply-To', '<{}>'.format(msgid))])
         notmuch('new')
-        with dbmod.Database(maildir.path, 'rw') as db:
+        with dbmod.Database(maildir.path, 'rw', config=notmuch2.Database.CONFIG.EMPTY) as db:
             yield db
 
     def test_count_messages(self, db):
index faf3947b6090f901a63f5828c962fc64e395591f..f2c6209df437f8fcb0d0d906d781b048de9cc8e9 100644 (file)
@@ -23,7 +23,7 @@ class TestImmutable:
         """
         maildir.deliver()
         notmuch('new')
-        with database.Database(maildir.path) as db:
+        with database.Database(maildir.path, config=database.Database.CONFIG.EMPTY) as db:
             yield db.tags
 
     def test_type(self, tagset):
@@ -33,7 +33,7 @@ class TestImmutable:
     def test_hash(self, tagset, maildir, notmuch):
         h0 = hash(tagset)
         notmuch('tag', '+foo', '*')
-        with database.Database(maildir.path) as db:
+        with database.Database(maildir.path, config=database.Database.CONFIG.EMPTY) as db:
             h1 = hash(db.tags)
         assert h0 != h1
 
@@ -42,7 +42,7 @@ class TestImmutable:
 
     def test_neq(self, tagset, maildir, notmuch):
         notmuch('tag', '+foo', '*')
-        with database.Database(maildir.path) as db:
+        with database.Database(maildir.path, config=database.Database.CONFIG.EMPTY) as db:
             assert tagset != db.tags
 
     def test_contains(self, tagset):
@@ -159,7 +159,8 @@ class TestMutableTagset:
         _, pathname = maildir.deliver()
         notmuch('new')
         with database.Database(maildir.path,
-                               mode=database.Mode.READ_WRITE) as db:
+                               mode=database.Mode.READ_WRITE,
+                               config=database.Database.CONFIG.EMPTY) as db:
             msg = db.get(pathname)
             yield msg.tags
 
@@ -195,7 +196,8 @@ class TestMutableTagset:
         _, pathname = maildir.deliver(flagged=True)
         notmuch('new')
         with database.Database(maildir.path,
-                               mode=database.Mode.READ_WRITE) as db:
+                               mode=database.Mode.READ_WRITE,
+                               config=database.Database.CONFIG.EMPTY) as db:
             msg = db.get(pathname)
             msg.tags.discard('flagged')
             msg.tags.from_maildir_flags()
@@ -205,7 +207,8 @@ class TestMutableTagset:
         _, pathname = maildir.deliver(flagged=True)
         notmuch('new')
         with database.Database(maildir.path,
-                               mode=database.Mode.READ_WRITE) as db:
+                               mode=database.Mode.READ_WRITE,
+                               config=database.Database.CONFIG.EMPTY) as db:
             msg = db.get(pathname)
             flags = msg.path.name.split(',')[-1]
             assert 'F' in flags
index fbef73ac262c960c2196f971b92cff2b5b90c95c..619d2aacfaa255ebfa0a6e775d2bab2575c5c3a3 100644 (file)
@@ -13,7 +13,7 @@ def thread(maildir, notmuch):
     maildir.deliver(body='bar',
                     headers=[('In-Reply-To', '<{}>'.format(msgid))])
     notmuch('new')
-    with notmuch2.Database(maildir.path) as db:
+    with notmuch2.Database(maildir.path, config=notmuch2.Database.CONFIG.EMPTY) as db:
         yield next(db.threads('foo'))
 
 
index 7a872f5f2077a1c237bd8a351eb8b9510217f8fe..d10f96549370085d62faea158e8fc9513a5e2b33 100644 (file)
@@ -1,3 +1,3 @@
 # this file should be kept in sync with ../../../version
-__VERSION__ = '0.34.2'
+__VERSION__ = '0.34.3'
 SOVERSION = '5'
index be7bc3979bae3a4173ca0ed597625a504721939e..3880a00468749c7d1588f852ba42258a01af56e4 100644 (file)
@@ -1,3 +1,10 @@
+notmuch (0.34.3-1) unstable; urgency=medium
+
+  * New upstream bugfix release, with several fixes for the notmuch2
+    python module.
+
+ -- David Bremner <bremner@debian.org>  Sun, 09 Jan 2022 15:30:38 -0400
+
 notmuch (0.34.2-1) unstable; urgency=medium
 
   * New upstream bugfix with release, with fixes database location in
index c7fd8f5acec84807e2738dfae00a0d3c709e8393..e46e1d4e47faa089c45553f747a6f95003dba9a4 100644 (file)
@@ -14,7 +14,7 @@ master_doc = 'index'
 
 # General information about the project.
 project = u'notmuch'
-copyright = u'2009-2021, Carl Worth and many others'
+copyright = u'2009-2022, Carl Worth and many others'
 
 location = os.path.dirname(__file__)
 
index 3f8003cd4c4fdbfa727f3764b19cdf7d8ac046db..0aeaf4133123b166caa716862b52693a5528c734 100644 (file)
@@ -1 +1 @@
-0.34.2
+0.34.3