summaryrefslogtreecommitdiff
path: root/bindings
AgeCommit message (Collapse)Author
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.
2019-12-03Rename package to notmuch2Floris Bruynooghe
This is based on a previous discussion on the list where this was more or less seen as the least-bad option.
2019-12-03Show which notmuch command and version is being usedFloris Bruynooghe
This add the notmuch version and absolute path of the binary used in the pytest header. This is nice when running the tests interactively as you get confirmation you're testing the version you thought you were testing.
2019-12-03build: optionally build python-cffi bindingsDavid Bremner
Put the build product (and tests) in a well known location so that we can find them e.g. from the tests.
2019-12-03bindings/python-cffi: preserve environment for testsDavid Bremner
We'll need this e.g. to pass PATH to the pytest tests Based on the suggested approach in id:87d0eljggj.fsf@powell.devork.be
2019-12-03Introduce CFFI-based python bindingsFloris Bruynooghe
This introduces CFFI-based Python3-only bindings. The bindings aim at: - Better performance on pypy - Easier to use Python-C interface - More "pythonic" - The API should not allow invalid operations - Use native object protocol where possible - Memory safety; whatever you do from python, it should not coredump.
2019-11-27Merge tag 'debian/0.29.3-1'David Bremner
notmuch release 0.29.3-1 for unstable (sid) [dgit] [dgit distro=debian no-split --quilt=linear]
2019-11-27version: bump to 0.29.3David Bremner
2019-11-20python: make some docstrings rawJakub Wilk
Fixes: notmuch/message.py:57: DeprecationWarning: invalid escape sequence \s notmuch/query.py:155: DeprecationWarning: invalid escape sequence \. notmuch/messages.py:89: DeprecationWarning: invalid escape sequence \s with Python >= 3.6.
2019-10-19bump versionDavid Bremner
2019-06-11version: bump to 0.29.1David Bremner
2019-06-07version: bump to 0.29David Bremner
2019-06-03version: bump to 0.29~rc1David Bremner
2019-05-31version: bump to 0.29~rc0David Bremner
2019-05-05Merge tag 0.28.4David Bremner
No functionality changes merged, since the bug in question was already fixed on master.
2019-05-05version: bump to 0.28.4David Bremner
2019-04-24python: support relative path in default databaseDoan Tran Cong Danh
From notmuch 0.28, notmuch support relative database path in notmuch-config(1), but python binding haven't taught this yet. afew denied to work with a perfectly fine notmuch-config due to this.
2019-03-31python: fix set_sort/add_tag_exclude restype/argtypes typoshydrargyrum
2019-03-06Merge branch 'release'David Bremner
Changes from 0.28.3
2019-03-05bump version to 0.28.3David Bremner
2019-02-21python: fix get_property error when property doesn't existVincent A
In Python bindings, Message.get_property fails with an AttributeError when trying to fetch a property that doesn't exist. From d712832ba982085975c27b23bb502af82e638b39 Mon Sep 17 00:00:00 2001 From: hydrargyrum <dev@indigo.re> Date: Sun, 6 Jan 2019 16:08:55 +0100 Subject: [PATCH] python: fix get_property error when property doesn't exist
2019-02-17bump versiondebian/0.28.2-10.28.2David Bremner
2019-02-16python: fix threads.__str__ automethod documentationJani Nikula
Indent the directive properly to attach it to Threads autoclass documentation. Fixes: WARNING: don't know which module to import for autodocumenting '__str__' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
2019-02-16python: fix documentation title underlineJani Nikula
Fix documentation build sphinx warning: filesystem.rst:18: WARNING: Title underline too short.
2019-02-16python: fix documentation build with python 3.7Jani Nikula
The simplistic mocking in conf.py falls short on python 3.7. Just use unittest.mock instead. Fixes: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/sphinx/config.py", line 368, in eval_config_file execfile_(filename, namespace) File "/usr/lib/python3/dist-packages/sphinx/util/pycompat.py", line 150, in execfile_ exec_(code, _globals) File "/path/to/notmuch/bindings/python/docs/source/conf.py", line 39, in <module> from notmuch import __VERSION__,__AUTHOR__ File "/path/to/notmuch/bindings/python/notmuch/__init__.py", line 54, in <module> from .database import Database File "/path/to/notmuch/bindings/python/notmuch/database.py", line 25, in <module> from .globals import ( File "/path/to/notmuch/bindings/python/notmuch/globals.py", line 48, in <module> class NotmuchDatabaseS(Structure): TypeError: __mro_entries__ must return a tuple
2019-02-01update version to 0.28.1David Bremner
2018-10-12version: bump to 0.28debian/0.28-1archive/debian/0.28-10.28David Bremner
2018-10-03version: bump to 0.28~rc0David Bremner
2018-09-19python: fix unchecked None access in get_propertyVincent Breitmoser
2018-06-12version: bump to 0.27David Bremner
2018-05-31version: bump to 0.27~rc1David Bremner
2018-05-26bump version to 0.27~rc0David Bremner
Start the busywork for a new release