aboutsummaryrefslogtreecommitdiff
path: root/bindings
AgeCommit message (Collapse)Author
2025-09-14bindings/python-cffi: handle NOTMUCH_STATUS_OPERATION_INVALIDATEDAnton Khirnov
Raise it as a newly added OperationInvalidatedError exception.
2025-09-14bindings/python-cffi: allow reopening a databaseAnton Khirnov
This will be useful for handling NOTMUCH_STATUS_OPERATION_INVALIDATED errors that will be exposed through the bindings in a following commit.
2025-07-04python/doc: fix link to notmuch-config manpageDavid Bremner
This docstring has been like this a long time, but recently I noticed sphinx-doc complaining about :man:. This :any: link seems to work, and is consistent with the other links to the notmuch-config man page.
2025-06-16bindings/python-cffi: fix typosJakub Wilk
2025-03-29python: make IndexOptions publicJakub Wilk
Database docstrings refer to IndexOptions, so the latter should be public too.
2025-03-18Merge branch 'release'David Bremner
2025-03-18doc/python: correct wording around container complexity.David Bremner
Based on a suggestion from Jakub Wilk.
2025-03-13Merge branch 'release'David Bremner
2025-03-13bindings/python-cffi: fix docstring for message.header()Michael J Gruber
The cffi bindings raise a LookupError in case a header is not present. Adjust the docstring to say so. The legacy bindings behaved differently, and this is one of the things to be aware of when migrating to the cffi bindings.
2025-03-08Merge branch 'release'David Bremner
2025-03-08ruby: fix "undefining the allocator of T_DATA" warningsJohannes Larsen
Ruby 3.2 introduced a warning when C-extensions use structs without redefining the allocation default allocation routine meant for objects. See https://bugs.ruby-lang.org/issues/18007 for details. In the Ruby bindings this happens at `Data_Wrap_Notmuch_Object` call sites, so the object types used there needed to update their allocation. This ruby code (given a database at the hardcoded path with messages matching `tag:tmp`) exercise all the ruby objects: require 'notmuch' Notmuch::Database.open File.expand_path("~/mail") do |db| db.get_directory("/tmp") db.query("tag:tmp").search_threads.each do |t| t.messages.each do |m| puts m.header("Subject") end end end Before these changes with ruby 3.2.5 and notmuch 0.38.3 it outputs: notmuch.rb:5: warning: undefining the allocator of T_DATA class Notmuch::Query notmuch.rb:5: warning: undefining the allocator of T_DATA class Notmuch::Threads notmuch.rb:5: warning: undefining the allocator of T_DATA class Notmuch::Thread notmuch.rb:6: warning: undefining the allocator of T_DATA class Notmuch::Messages notmuch.rb:6: warning: undefining the allocator of T_DATA class Notmuch::Message notmuch release 0.38.3 now available (the last line is the message I tagged with tmp), and after the changes: notmuch release 0.38.3 now available
2025-03-01ruby: trivial build cleanupFelipe Contreras
2025-03-01ruby: use proper talloc flagsFelipe Contreras
This way talloc doesn't need to be installed in /usr.
2025-03-01ruby: simplify buildFelipe Contreras
We can just always add EXTRA_INCFLAGS and EXTRA_LDFLAGS.
2025-02-28python: Fix message ID docstringFloris Bruynooghe
The messageidb attribute does not exist. The returned BinString type already allows use as both strings and binary. Presumably this was written before that type was adopted.
2025-02-22bindings/python: strip ~ from python versionDavid Bremner
Inspired by a suggestion of Xiyue Deng, this change ensures that the python bindings have a version that recent setuptools is happy with. This will have the unfortunate side effect of the python view of the version number differing from the rest of notmuch for the pre-releases. The alternative would be to transform the version numbers for the Debian packages for the pre-releases, as there is now no version scheme that works for both, since setuptools started rejecting versions with "~" in them. If we decide to go the latter way in the future, this change is easy to revert.
2025-02-22python: move legacy python bindings to contrib.David Bremner
This forces us to verify the build and test suite completes without the legacy python bindings. As of this commit the legacy python bindings are unsupported by notmuch. They are provided in contrib/ for now, but will most likely eventually be removed from there as well. We recommend that downstream/distro packagers phase out their packages for the legacy python bindings.
2025-02-22python: fix documentation typoDavid Bremner
The method is actually called 'getall'.
2025-02-07fix segfaults in Python cFFI API and add testsLars Kotthoff
Several iterators in the Python cFFI API destroyed the objects they iterated over too early (when the iterator was exhausted), causing subsequent segfaults in common cases like creating a list from the iterator. This patch fixes the segfaults and add tests to ensure that they don't happen again.
2025-01-26Revert "bump versions to 0.39~rc0"David Bremner
This reverts commit deea909993513ec6fd800b7571649582d994dcbc.
2025-01-26bump versions to 0.39~rc0David Bremner
Prepare to release a snapshot for testing
2024-12-08docs: Update intersphinx_mappingFredrik Lönnegren
Running `make dirhtml` in bindings/python/docs generates the following error: ``` sphinx-build -b dirhtml -d build/doctrees source build/dirhtml Running Sphinx v8.0.2 loading translations [en]... done making output directory... done Converting `source_suffix = '.rst'` to `source_suffix = {'.rst': 'restructuredtext'}`. ERROR: Invalid value `None` in intersphinx_mapping['https://docs.python.org/']. Expected a two-element tuple or list. ``` This commit updates intersphinx_mapping to follow the latest docs [1] [1] https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html Signed-off-by: Fredrik Lönnegren <fredrik@frelon.se>
2024-03-09version: bump to 0.38.30.38.3David Bremner
2023-12-01version: bump to 0.38.2David Bremner
2023-10-26version: bump to 0.38.1David Bremner
No changes from 0.38.1~rc1
2023-10-12version: update to 0.38.1~rc1David Bremner
2023-09-23version: update to 0.38.1~pre0David Bremner
Start preparations for point release
2023-09-12bindings/python-cffi: clean up notmuch2.egg-infodebian/0.38-1archive/debian/0.38-10.38David Bremner
This is created (at least) by the Debian build, but there seems no harm in cleaning it for everyone.
2023-09-12build: clean up __pycache__ directoriesDavid Bremner
These are generated indirectly by certain uses of python in the build.
2023-09-12bindings/python-cffi: clean up _notmuch_config.pyDavid Bremner
_notmuch_config.py is generated by configure, and cannot be cleaned up by the current python build system, since it is imported as a module by that same build system. Use DISTCLEAN rather than CLEAN for consistency with other configure related things.
2023-09-11version: bump to 0.38David Bremner
2023-09-03version: bump to 0.31~rc2David Bremner
2023-08-26version: bump to 0.38~rc1David Bremner
2023-08-24version: set up 0.38~rc0David Bremner
2023-07-09python: adjust legacy bindings to py 3.12Michael J Gruber
Py 3.12 finally pulled the plug on the `SafeConfigParser` class which has been deprecated since py 3.2. We use it in the legacy bindings only, so take the easy route of importing `ConfigParser` as `SafeConfigParser` and monkey-patching so that the class has the expected interface.
2023-05-29ruby: db: reorganize initializerFelipe Contreras
In order to make it more extensible. No functional changes. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-05-25ruby: query: fix get sortFelipe Contreras
The order was wrong, right now `query.sort` doesn't return a number. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-04-12ruby: remove FileNames objectFelipe Contreras
Not used anymore now that we return an array of strings directly. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-04-12ruby: filenames: return string array directlyFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-04-12ruby: add filenames helperFelipe Contreras
Right now it doesn't do much, but it will help for further reorganization. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-04-02ruby: remove Tags objectFelipe Contreras
Not used anymore now that we return an array of strings directly. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-04-02ruby: tags: return string array directlyFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-04-02ruby: add tags helperFelipe Contreras
Right now it doesn't do much, but it will help for further reorganization. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-31ruby: database: make path arg optionalFelipe Contreras
It can be automatically loaded from the configuration now. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-31ruby: use database_open_with_configFelipe Contreras
Fixes warning: warning: ‘notmuch_database_open’ is deprecated: function deprecated as of libnotmuch 5.4 Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2022-08-21version: update to 0.37David Bremner
2022-08-16test: increase cffi timeoutMichael J Gruber
By default, the test suite uses 2min for other tests and 5s for cffi tests. Sporadically, this leads to test failures caused by the timeout on slower or loaded test infrastructure (as seen on ppc64le in Fedora's infrastructure during branch time). Increase the cffi timeout to the same 2m=120s. Signed-off-by: Michael J Gruber <git@grubix.eu>
2022-08-14version: update to 0.37~rc0David Bremner
2022-07-05bindings/python-cffi: fix docstringDavid Bremner
the method Database.get_message does exist any more (if it ever did). This makes the docstring unhelpful as an example.
2022-06-25lib: add NOTMUCH_STATUS_CLOSED_DATABASE, use in _n_d_ensure_writableDavid Bremner
In order for a database to actually be writeable, it must be the case that it is open, not just the correct type of Xapian object. By explicitely checking, we are able to provide better error reporting, in particular for the previously broken test in T566-lib-message.