<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/test, branch 0.34.2</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.34.2</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.34.2'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2021-12-04T12:42:31Z</updated>
<entry>
<title>python-cffi: switch to notmuch_database_{open,create}_with_config</title>
<updated>2021-12-04T12:42:31Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-30T16:22:35Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d7f95724132bf658fd151630185899737e2ed829'/>
<id>urn:sha1:d7f95724132bf658fd151630185899737e2ed829</id>
<content type='text'>
Since release 0.32, libnotmuch provides searching for database and
configuration paths. This commit changes the python module notmuch2 to
use those facilities.

This fixes the bug reported in [1], along with a couple of the
deprecation warnings in the python bindings.

Database.default_path is deprecated, since it no longer faithfully
reflects what libnotmuch is doing, and it is also no longer used in
the bindings themselves.

This commit choose the default of config=CONFIG.EMPTY (equivalent to
passing "" to notmuch_database_open_with_config).  This makes the
change upward compatible API-wise (at least as far as the test suite
verifies), but changing the default to CONFIG.SEARCH would probably be
more convenient for bindings users.

[1]: id:87h7d4wp6b.fsf@tethera.net
</content>
</entry>
<entry>
<title>test: add known broken tests for python bindings in split configs</title>
<updated>2021-12-04T12:36:41Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-30T16:22:34Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=caafab01a4409fd2a1a5d31b3d05815bf587d8e0'/>
<id>urn:sha1:caafab01a4409fd2a1a5d31b3d05815bf587d8e0</id>
<content type='text'>
This reproduces the bug(s) reported in id:87h7d4wp6b.fsf@tethera.net
</content>
</entry>
<entry>
<title>test: add python-cffi bindings to path for test_python</title>
<updated>2021-12-04T12:36:23Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-30T16:22:33Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=5f077bef37462267258f95f7400596a157878b14'/>
<id>urn:sha1:5f077bef37462267258f95f7400596a157878b14</id>
<content type='text'>
This will allow testing the new python bindings using test_python, in
addition to the current invocation of pytest.
</content>
</entry>
<entry>
<title>lib/config: don't overwrite database.path if the caller passed it</title>
<updated>2021-12-04T00:52:11Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-28T01:34:19Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=59aac9cef37a9937bdf2265078d063673111f80b'/>
<id>urn:sha1:59aac9cef37a9937bdf2265078d063673111f80b</id>
<content type='text'>
If the user passed a path, and we opened it, then we consider that
definitive definition of "database.path". This makes libnotmuch
respond more gracefully to certain erroneous combinations of
NOTMUCH_CONFIG settings and config file contents.
</content>
</entry>
<entry>
<title>test: add known broken test for conflict with database parameter</title>
<updated>2021-12-04T00:49:36Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-28T01:34:17Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=378415a55762ff0222e3de6a2e20a9823ce1d07e'/>
<id>urn:sha1:378415a55762ff0222e3de6a2e20a9823ce1d07e</id>
<content type='text'>
This is arguably user error: having configuration file with bad
settings in it (and/or having a bad NOTMUCH_CONFIG environment
variable).  On the other hand returning a different path than was
actually opened is definitely a bug.
</content>
</entry>
<entry>
<title>test/libconfig: use 'export' for remaining sets of NOTMUCH_CONFIG</title>
<updated>2021-12-04T00:47:05Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-12-04T00:47:05Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=59a778ae4bae182101c43f1acde08452a6542299'/>
<id>urn:sha1:59a778ae4bae182101c43f1acde08452a6542299</id>
<content type='text'>
It makes the tests easier to understand if we always use export for
environment variables.
</content>
</entry>
<entry>
<title>lib/load_config: deallocate / NULL database on fatal error</title>
<updated>2021-10-30T16:51:50Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:38Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=fe51c275fcd7107d92b40de511086300ba4060ed'/>
<id>urn:sha1:fe51c275fcd7107d92b40de511086300ba4060ed</id>
<content type='text'>
This fixes a potential memory leak, and makes the behaviour of
notmuch_database_load_config (somewhat) consistent with
n_d_{open,create} with config.
</content>
</entry>
<entry>
<title>lib/load_config: document expectations for db on error, add tests</title>
<updated>2021-10-30T16:49:37Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:37Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=8f0b84789d4fda0182e073b68b73160c9b94a4b7'/>
<id>urn:sha1:8f0b84789d4fda0182e073b68b73160c9b94a4b7</id>
<content type='text'>
This is a bit different than n_d_{open,create}_with_config, since
there are several non-zero status codes where we do want to return a
non-NULL database structure.
</content>
</entry>
<entry>
<title>lib/create: fix memory leak, ensure *database=NULL on error</title>
<updated>2021-10-30T16:47:47Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:36Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=2ba50b52302dce08068843e0029f9ee935a0d7f3'/>
<id>urn:sha1:2ba50b52302dce08068843e0029f9ee935a0d7f3</id>
<content type='text'>
This code previously relied on _finish_open to free the notmuch struct
on errors (except for the case of database == NULL, which was a
potential double free). When we removed those frees from _finish_open,
we introduced a (small) memory leak.

In this commit, fix the memory leak, and harmonize the on-error
behaviour with n_d_open_with_config.
</content>
</entry>
<entry>
<title>lib/create: document expectations for db on error, add tests</title>
<updated>2021-10-30T16:45:40Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:35Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f3fcdd2ddac2384c0c1daeffa495ad3ec01bc1af'/>
<id>urn:sha1:f3fcdd2ddac2384c0c1daeffa495ad3ec01bc1af</id>
<content type='text'>
It seems sensible to harmonize the behaviour with
n_d_open_with_config. In this commit we just assert the desired
behaviour.
</content>
</entry>
</feed>
