summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-09doc: add 2022 to copyright years.debian/0.34.3-1archive/debian/0.34.3-10.34.3David Bremner
2022-01-09version: bump to 0.34.3David Bremner
2022-01-09debian: changelog for 0.34.3-1David Bremner
2022-01-09NEWS: add NEWS for 0.34.3David Bremner
2022-01-09bindings/python-cffi: search for config by defaultDavid Bremner
The previous (pre-0.34.2) constructor searched for a config file but only if the database path was not specified, and only to retrieve database.path. Neither of the available options (CONFIG.SEARCH or CONFIG.NONE) matches this semantics exactly, but CONFIG.SEARCH causes less breakage for people who relied on the old behaviour to set their database.path [1]. Since it also seems like the friendlier option in the long run, this commit switches to CONFIG.SEARCH as default. This requires a certain amount of updating the pytest tests, but most users will actually have a config file, unlike the test environment. [1]: id:87fsqijx7u.fsf@metapensiero.it
2022-01-08python-cffi: returned OwnedMessage objects from Message.repliesDavid Bremner
If we return regular Message objects, python will try to destroy them, and the underlying notmuch object, causing e.g. the crash [1]. [1]: id:87sfu6utxg.fsf@tethera.net
2022-01-08test: add known broken tests for recursive traversal of replies.David Bremner
This reproduces the bug reported at [1]. The second test hints at the solution, making reply return OwnedMessage objects. [1]: id:87sfu6utxg.fsf@tethera.net
2021-12-29configure: calculate NOTMUCH_BUILDDIR, write to Makefile.configDavid Bremner
This will correct the current use of an undefined variable when setting LD_LIBRARY_PATH in doc/Makefile.local It is tempting to try to replace the use of test/export-dirs.sh, but this is not as simple as it looks, as NOTMUCH_BUILDDIR is used to locate sh.config, so probably cannot also sensibly be used to define it.
2021-12-29lib/open: do not consider .notmuch alone as an existing database.David Bremner
It makes perfect sense for users to want to pre-create .notmuch, e.g. to install hooks, so we should handle the case of a .notmuch directory without an actual xapian database more gracefully.
2021-12-29test/new: add known broken test for missing xapian directory.David Bremner
`notmuch new' should go ahead and create the xapian database if it is missing, even in the case where the parent .notmuch (or equivalent) directory exists.
2021-12-10debian: build only against default python versiondebian/0.34.2-1archive/debian/0.34.2-1David Bremner
This problem will will be solved in the next release of dh-python, but the crude solution is needed for backports anyway.
2021-12-09NEWS: mention fix for unprintable python exception0.34.2David Bremner
2021-12-09debian: changelog for 0.34.2-1David Bremner
2021-12-09version: bump to 0.34.2David Bremner
2021-12-09NEWS: add NEWS for 0.34.2David Bremner
2021-12-05Fix error message when using notmuch_status_to_stringFloris Bruynooghe
The python exception class was incorrectly loading the error message which resulted in unprintable exception objects.
2021-12-04python-cffi: switch to notmuch_database_{open,create}_with_configDavid Bremner
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
2021-12-04test: add known broken tests for python bindings in split configsDavid Bremner
This reproduces the bug(s) reported in id:87h7d4wp6b.fsf@tethera.net
2021-12-04test: add python-cffi bindings to path for test_pythonDavid Bremner
This will allow testing the new python bindings using test_python, in addition to the current invocation of pytest.
2021-12-04python-cffi: fix typos in docstring for Database.default_pathDavid Bremner
These generate warnings from sphinx doc, which makes it harder to debug documentation changes. They also corrupt the output.
2021-12-03lib/config: don't overwrite database.path if the caller passed itDavid Bremner
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.
2021-12-03lib/open: track which parameters are passedDavid Bremner
This will be used to fine tune the loading of configuration for certain special configuration items (initially just "database.path").
2021-12-03test: add known broken test for conflict with database parameterDavid Bremner
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.
2021-12-03test/libconfig: use 'export' for remaining sets of NOTMUCH_CONFIGDavid Bremner
It makes the tests easier to understand if we always use export for environment variables.
2021-12-03doc/python-cffi: import from built bindings, not installed moduleDavid Bremner
Previously the python-cffi bindings either failed to build, or built for the wrong module by using the installed module. The fix requires correction the module path, building the bindings before docs, and helping python find the built libnotmuch. Based on patch / discussion from Micheal Gruber [1] [1]: id:cover.1634808719.git.git@grubix.eu
2021-11-03debian: refinalize changelogdebian/0.34.1-1archive/debian/0.34.1-10.34.1David Bremner
2021-11-03NEWS: finalize release dateDavid Bremner
2021-10-31debian: changelog for 0.34.1-1David Bremner
2021-10-31NEWS: start news for 0.34.1David Bremner
2021-10-31version: bump to 0.34.1David Bremner
2021-10-30lib/load_config: deallocate / NULL database on fatal errorDavid Bremner
This fixes a potential memory leak, and makes the behaviour of notmuch_database_load_config (somewhat) consistent with n_d_{open,create} with config.
2021-10-30lib/load_config: document expectations for db on error, add testsDavid Bremner
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.
2021-10-30lib/create: fix memory leak, ensure *database=NULL on errorDavid Bremner
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.
2021-10-30lib/create: document expectations for db on error, add testsDavid Bremner
It seems sensible to harmonize the behaviour with n_d_open_with_config. In this commit we just assert the desired behaviour.
2021-10-30lib/open: fix potential double-free, ensure *database=NULL on errorDavid Bremner
During refactoring for 0.32, the code that set notmuch=NULL on various errors was moved into _finish_open. This meant that the the code which relied on that to set *database to NULL on error was no longer correct. It also introduced a potential double free, since the notmuch struct was deallocated inside _finish_open (via n_d_destroy). In this commit we revert to "allocator frees", and leave any cleanup to the caller of _finish_open. This allows us to get back the behaviour of setting *database to NULL with a small change. Other callers of _finish_open will need free notmuch on errors.
2021-10-30test: add two known broken tests for missing config filesDavid Bremner
The documentation claims that the database will be set to NULL in this case, but it is currently not happening. Based on a reproducer [1] from Austin Ray. [1]: id:20211021190401.imirxau2ewke6e2m@athena
2021-10-30lib: document n_o_w_config can return NOTMUCH_STATUS_NO_CONFIGDavid Bremner
This should be treated as fatal by callers, since we didn't succeed in opening a Xapian database.
2021-10-27NEWS: fix typo in 0.34 news.David Bremner
Thanks to jrm on IRC for finding the typo.
2021-10-27test/libconfig: use 'export' when restoring NOTMUCH_CONFIGDavid Bremner
This is required when NOTMUCH_CONFIG has been unset, and is harmless otherwise.
2021-10-20NEWS: set datedebian/0.34-1archive/debian/0.34-10.34David Bremner
2021-10-20debian: changelog for 0.34David Bremner
2021-10-20add NEWS for remaining changesDavid Bremner
2021-10-20version: bump to 0.34David Bremner
2021-10-20NEWS: update sexp-query newsDavid Bremner
2021-10-19emacs: fix call to nonexistent notmuch--call-process-shell-commandDoug Woos
Looks like a find/replace error in e722b4f4
2021-10-15debian: add dependency on libsexp-devdebian/0.34_rc0-1archive/debian/0.34_rc0-10.34_rc0David Bremner
Enable the s-expression query parser in Debian.
2021-10-15debian: add changelog for 0.34~rc0David Bremner
2021-10-15INSTALL: document optional dependency on libsfsexpDavid Bremner
For now putting it in the apt-get line will cause complaints about missing packages for too many people.
2021-10-15NEWS: stub news for 0.34~rc0David Bremner
This is mostly to pacify the release checks. NEWS will be filled in during the release process.
2021-10-15lib: bump lib minor version to 5David Bremner
One new function (and an enum) was added to the API/ABI.