aboutsummaryrefslogtreecommitdiff
path: root/bindings
AgeCommit message (Collapse)Author
2021-05-17ruby: simplify data get helperFelipe Contreras
Data_Get_Struct is nothing but a macro that calls rb_data_object_get with a cast (unnecessary in C). #define Data_Get_Struct(obj, type, sval) \ ((sval) = RBIMPL_CAST((type*)rb_data_object_get(obj))) We can use rb_data_object_get directly, and this way we don't need to pass the type, which is unnecessary information. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-15Merge branch 'release'David Bremner
2021-05-15version: bump to 0.32.1David Bremner
2021-05-12ruby: improve general data get helperFelipe Contreras
There's no need to do Check_Type, Data_Get_Struct calls rb_data_object_get(), which already does that. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-12ruby: improve all Data_Get_Notmuch_* helpersFelipe Contreras
There's no need to repeat the same code over and over. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-12ruby: add missing Data_Get_Notmuch helpersFelipe Contreras
Apparently commit 5c9e3855 (ruby: Don't barf if an object is destroyed more than once, 2010-05-26) missed these two. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-02version: bump to 0.32David Bremner
2021-04-28version: bump to 0.32~rc2David Bremner
2021-04-24version: bump to 0.32~rc1David Bremner
2021-04-24update version to 0.32~rc0David Bremner
2021-04-18ruby: fix ruby 3.1 warningsFelipe Contreras
init.c:214:5: warning: ‘rb_cData’ is deprecated: by: rb_cObject. Will be removed in 3.1. [-Wdeprecated-declarations] Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-03-27lib: add NOTMUCH_STATUS_NO_DATABASEDavid Bremner
This will allow more precise return values from various open related functions.
2021-02-18Merge tag '0.31.4'David Bremner
notmuch 0.31.4 release
2021-02-18version: update to 0.31.4David Bremner
2021-02-15python: convert shebangs to python3Daniel Kahn Gillmor
This is the last bit of "python" left in the notmuch codebase. https://www.python.org/dev/peps/pep-0394/#recommendation encourages "third-party distributors" to use more-specific shebang lines. I'm not certain that the notmuch project itself is a "third-party contributor" but I think this is a safe way to encourage people to use python3 when they're developing notmuch. We already have python3 explicitly elsewhere in the codebase for developers (in nmbug). Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2021-02-06lib: introduce notmuch_database_create_with_configDavid Bremner
This takes a config path parameter, and can use that to decide the new database location.
2021-02-06lib: add NOTMUCH_STATUS_DATABASE_EXISTSDavid Bremner
It is desirable to distinguish between attempting to create a database that already exists, and more fatal errors like permission problems.
2021-02-06lib: add NOTMUCH_STATUS_NO_CONFIGDavid Bremner
This will allow client code to provide more meaningful diagnostics. In particular it will enable "notmuch new" to continue suggsting the user run "notmuch setup" to create a config after "notmuch new" is transitioned to the new configuration framework.
2021-02-06bindings/notmuch2: add missing crypto error status codesDavid Bremner
These are needed so that the later codes line up numerically.
2020-12-25version: bump 0.31.3David Bremner
2020-12-25python/notmuch2: fix exclude tag handlingJohannes Larsen
A typo in Database._create_query lost the exclude_tag names during the string to utf-8 conversion. Amended by DB: fixed patch format and updated commit message.
2020-11-08version: bump to 0.31.2David Bremner
2020-11-08update versionsDavid Bremner
2020-10-30Rename version to version.txtRalph Seichter
Building Notmuch on macOS is known to cause problems because the Notmuch distribution archive contains two files named "version". These names clash with the <version> header as defined in C++20. Therefore, the existing naming will likely become a problem on other platforms as well, once compilers adopt the new standard. Signed-off-by: Ralph Seichter <github@seichter.de> Amended-by: db s/keyword/header/ in commit message.
2020-09-05version: bump to 0.31David Bremner
2020-08-29version: bump to 0.31~rc2David Bremner
2020-08-17version: bump to 0.31~rc1David Bremner
2020-08-16version: bump to 0.31~rc0David Bremner
Start the release process for 0.31
2020-08-09Fix typosJonas Bernoulli
2020-08-09emacs: Use makefile-gmake-mode in Makefile*sJonas Bernoulli
Use `makefile-gmake-mode' instead of `makefile-mode' because the former also highlights ifdef et al. while the latter does not. "./Makefile.global" and one "Makefile.local" failed to specify any major mode at all but doing so is necessary because Emacs does not automatically figure out that these are Makefiles (of any flavor).
2020-07-18bindings/ruby: replacy use of deprecated notmuch_message_get_flagDavid Bremner
Depending on the flag, this actually can return an errror, so raise a ruby exception if so.
2020-07-10version: set to 0.30David Bremner
2020-07-03version: bump to 0.30~rc3David Bremner
2020-07-03bindings/python-cffi: copy version file into bindings dirDavid Bremner
Attempt to avoid breaking "pip install ." As far as I can tell, we need to have a copy (not just a relative symlink) of the version file.
2020-06-19python-cffi: read version from notmuch version fileFloris Bruynooghe
This keeps it in sync with the main notmuch version which is less confusing to users.
2020-06-16version: update to 0.30~rc2David Bremner
2020-06-16Support aborting the atomic contextFloris Bruynooghe
Since it is possible to use an atomic context to abort a number of changes support this usage. Because the only way to actually abort the transaction is to close the database this must also do so. Amended by db: Note the limitation requiring close is a limitation of the underlying notmuch API, which should be fixed in a future notmuch release.
2020-06-16Make messages returned by Thread objects ownedFloris Bruynooghe
This reverses the logic of StandaloneMessage to instead create a OwnedMessage. Only the Thread class allows retrieving messages more then once so it can explicitly create such messages. The added test fails with SIGABRT without the fix for the message re-use in threads being present.
2020-06-16python/notmuch2: do not destroy messages owned by a queryAnton Khirnov
Any messages retrieved from a query - either directly via search_messages() or indirectly via thread objects - are owned by that query. Retrieving the same message (i.e. corresponding to the same message ID / database object) several times will always yield the same C object. The caller is allowed to destroy message objects owned by a query before the query itself - which can save memory for long-lived queries. However, that message must then never be retrieved again from that query. The python-notmuch2 bindings will currently destroy every message object in Message._destroy(), which will lead to an invalid free if the same message is then retrieved again. E.g. the following python program leads to libtalloc abort()ing: import notmuch2 db = notmuch2.Database(mode = notmuch2.Database.MODE.READ_ONLY) t = next(db.threads('*')) msgs = list(zip(t.toplevel(), t.toplevel())) msgs = list(zip(t.toplevel(), t.toplevel())) Fix this issue by creating a subclass of Message, which is used for "standalone" message which have to be freed by the caller. Message class is then used only for messages descended from a query, which do not need to be freed by the caller.
2020-06-15python config access: fix style and KeyError bugFloris Bruynooghe
This fixes some minor style/pep8 things and adds tests for the new config support. Also fixes a bug where KeyError was never raised on a missing key.
2020-06-15python/notmuch2: add bindings for the database config stringsAnton Khirnov
2020-06-15Update tox.ini for python3.8 and fix pypy3.6Floris Bruynooghe
Python 3.8 has been released for a while now, make sure we keep supporting it correctly. PyPy 3.6 wasn not configured correctly.
2020-06-15Add missing set methods to tagsetsFloris Bruynooghe
Even though we use collections.abc.Set which implements all these methods under their operator names, the actual named variations of these methods are shockingly missing. So let's add them manually.
2020-06-06version: bump to 0.30~rc1David Bremner
2020-06-01version: bump to 0.30~rc0David Bremner
2020-02-19Drop deprecated/unused crypto.gpg_pathDaniel Kahn Gillmor
crypto.gpg_path was only used when we built against gmime versions before 3.0. Since we now depend on gmime 3.0.3 or later, it is meaningless. The removal of the field from the _notmuch_config struct would be an ABI change if that struct were externally exposed, but it is not, so it's safe to unilaterally remove it. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-12-24python/notmuch2: fix typo for "destroyed"Daniel Kahn Gillmor
Another fix to the docstrings, this time for the English part of the docstrings, not the Python class name. No functional changes here. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-12-24python/notmuch2: fix typo for ObjectDestroyedErrorDaniel Kahn Gillmor
There is no functional change here, just a fix to a typo in the docstrings. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-12-03python-cffi: use shutil.whichDavid Bremner
I was supposed to amend the original patch that added this function, but somehow I botched that. The original version runs, so make an extra commit for the tidying.
2019-12-03Move from _add_message to _index_file APIFloris Bruynooghe
This moves away from the deprecated notmuch_database_add_message API and instead uses the notmuch_database_index_file API. This means instroducing a class to manage the index options and bumping the library version requirement to 5.1.