summaryrefslogtreecommitdiff
path: root/bindings/python
AgeCommit message (Collapse)Author
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
2018-05-03move more http -> httpsDaniel Kahn Gillmor
Correct URLs that have crept into the notmuch codebase with http:// when https:// is possible. As part of this conversion, this changeset also indicates the current preferred upstream URLs for both gmime and sup. the new URLs are https-enabled, the old ones are not. This also fixes T310-emacs.sh, thanks to Bremner for catching it.
2018-05-02python: add bindings for notmuch_message_get_propert(y/ies)Ruben Pollan
Message.get_property (prop) returns a string with the value of the property and Message.get_properties (prop, exact=False) yields key, value pairs
2018-04-26Merge branch 'release'David Bremner
minimal mset fix, for 0.26.2
2018-04-26version: bump to 0.26.2David Bremner
2018-04-07Merge branch 'release'David Bremner
2018-04-02version: bump to 0.26.10.26.1David Bremner
2018-03-24Fix typos as found by codespellGeorg Faerber
Signed-off-by: Georg Faerber <georg@riseup.net>
2018-01-09Merge tag '0.26'David Bremner
notmuch 0.26 release
2018-01-09version: bump to 0.26David Bremner
2018-01-06version: bump to 0.26~rc2debian/0.26_rc2-10.26_rc2David Bremner
Update debian version to follow.
2018-01-04fix typosDaniel Kahn Gillmor
2017-12-29version: bump 0.26~rc1David Bremner
2017-12-28version: bump to 0.26~rc0David Bremner
2017-12-27python: remove obsolete debian directoryDavid Bremner
It is unlikely this still works since it has not been updated since 2010. The python packages for debian are now built by the top level debian/ packaging.
2017-12-24python: add decrypt_policy argument to Database.index_file()Daniel Kahn Gillmor
We adopt a pythonic idiom here with an optional argument, rather than exposing the user to the C indexopts object directly. This now includes a simple test to ensure that the decrypt_policy argument works as expected.
2017-12-24python: Fix method name in docsl-m-h@web.de
Fix a method rename in the docs that was overlooked in 3444c731d27fd42bbbdaae00af6ca48b4525b03b.
2017-12-19python: Rename get_config_list to get_configsl-m-h@web.de
The old name has a bit of a feeling of hungarian notation. Also many generators in the core are named with the suffix "s" to indicate iterables: dict.items, dict.keys for example.
2017-12-19python: turn get_config_list into a generatorl-m-h@web.de
This mimics the behaviour of the underlying C function more closely as it also does not store all values in memory.
2017-12-19python: add default arg to get_config_listl-m-h@web.de
It makes the function a little more intuitive to use and does not diverge much from the original function signature. Also an example is added to the docstring.
2017-12-19python: add bindings to access configl-m-h@web.de
The C functions notmuch_database_get_config, notmuch_database_get_config_list and notmuch_database_set_config are part of the official C bindings. So there should also be some python bindings for them. Also they are the only way to access the named queries introduced in b9bf3f44. The interface of the python functions is designed to be close to the C functions.
2017-12-08Merge branch 'release'David Bremner
Conflicts: NEWS Add in NEWS from point release
2017-12-08version: bump to 0.25.3David Bremner
2017-11-05Merge branch 'release'David Bremner
Changes from 0.25.2 release
2017-11-05version: bump to 0.25.2David Bremner
2017-10-02python: open messages in binary modeFlorian Klink
currently, notmuch's get_message_parts() opens the file in text mode and passes the file object to email.message_from_file(fp). In case the email contains UTF-8 characters, reading might fail inside email.parser with the following exception: File "/usr/lib/python3.6/site-packages/notmuch/message.py", line 591, in get_message_parts email_msg = email.message_from_binary_file(fp) File "/usr/lib/python3.6/email/__init__.py", line 62, in message_from_binary_file return BytesParser(*args, **kws).parse(fp) File "/usr/lib/python3.6/email/parser.py", line 110, in parse return self.parser.parse(fp, headersonly) File "/usr/lib/python3.6/email/parser.py", line 54, in parse data = fp.read(8192) File "/usr/lib/python3.6/codecs.py", line 321, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 1865: invalid continuation byte To fix this, read file in binary mode and pass to email.message_from_binary_file(fp). Unfortunately, Python 2 doesn't support email.message_from_binary_file(fp), so keep using email.message_from_file(fp) there. Signed-off-by: Florian Klink <flokli@flokli.de>
2017-09-12python: deprecated add_message calls index_file correctly and returns resultGaute Hope
The deprecated Database.add_message now calls the new index_file with correct number of arguments (without an extra `self`), and returns the tuple from index_file - as it used to do before. This change also adds a DeprecationWarning to the function.
2017-09-11Merge tag '0.25.1'David Bremner
notmuch 0.25.1 release (bugfix for emacs bug 28350)
2017-09-11version: bump to 0.25.1David Bremner
2017-08-23database: add n_d_index_file (deprecates n_d_add_message)Daniel Kahn Gillmor
We need a way to pass parameters to the indexing functionality on the first index, not just on reindexing. The obvious place is in notmuch_database_add_message. But since modifying the argument list would break both API and ABI, we needed a new name. I considered notmuch_database_add_message_with_params(), but the functionality we're talking about doesn't always add a message. It tries to index a specific file, possibly adding a message, but possibly doing other things, like adding terms to an existing message, or failing to deal with message objects entirely (e.g. because the file didn't contain a message). So i chose the function name notmuch_database_index_file. I confess i'm a little concerned about confusing future notmuch developers with the new name, since we already have a private _notmuch_message_index_file function, and the two do rather different things. But i think the added clarity for people linking against the future libnotmuch and the capacity for using index parameters makes this a worthwhile tradeoff. (that said, if anyone has another name that they strongly prefer, i'd be happy to go with it) This changeset also adjusts the tests so that we test whether the new, preferred function returns bad values (since the deprecated function just calls the new one). We can keep the deprecated n_d_add_message function around as long as we like, but at the next place where we're forced to break API or ABI we can probably choose to drop the name relatively safely. NOTE: there is probably more cleanup to do in the ruby and go bindings to complete the deprecation directly. I don't know those languages well enough to attempt a fix; i don't know how to test them; and i don't know the culture around those languages about API additions or deprecations.
2017-08-18fix typoDaniel Kahn Gillmor
2017-08-18Use rooted paths in .gitignore filesVladimir Panteleev
A leading / in paths in a .gitignore file matches the beginning of the path, meaning that for patterns without slashes, git will match files only in the current directory as opposed to in any subdirectory. Prefix relevant paths with / in .gitignore files, to prevent accidentally ignoring files in subdirectories and possibly slightly improve the performance of "git status".
2017-07-25version: bump to 0.25David Bremner
2017-07-18version: bump to 0.25~rc1David Bremner
2017-07-18Fix orthographyDaniel Kahn Gillmor
2017-07-16version: bump version to 0.25~rc0David Bremner
2017-06-01Merge branch 'release'David Bremner
2017-06-01version: bump to 0.24.2David Bremner
2017-03-25Merge branch 'release'David Bremner
wildcard search fixes, plus release busywork
2017-03-25version: bump to 0.24.1David Bremner
The release is not yet finalized, but start the busywork needed.
2017-03-22python: bump SOVERSION to 5David Bremner
Otherwise hilarity ensues when the python bindings try to use the new API against the old shared library.
2017-03-22lib: replace deprecated n_q_count_threads with status returning versionDavid Bremner
This function was deprecated in notmuch 0.21. We re-use the name for a status returning version, and deprecate the _st name.
2017-03-22lib: replace deprecated n_q_count_messages with status returning versionDavid Bremner
This function was deprecated in notmuch 0.21. We re-use the name for a status returning version, and deprecate the _st name. One or two remaining uses of the (removed) non-status returning version fixed at the same time
2017-03-22lib: replace deprecated n_q_search_messages with status returning versionDavid Bremner
This function was deprecated in notmuch 0.21. We re-use the name for a status returning version, and deprecate the _st name.
2017-03-22lib: replace n_query_search_threads with status returning versionDavid Bremner
This function was deprecated in notmuch 0.21. We finally remove the deprecated API, and rename the status returning version to the simpler name. The status returning is kept as a deprecated alias.
2017-03-12Merge branch 'release'David Bremner
final 0.24 release
2017-03-12version: bump to 0.24David Bremner
2017-03-09bindings/python: add bindings for notmuch_database_get_revisionGaute Hope
Database.get_revision () returns a tuple with the current database revision and the UUID string representing the database.
2017-03-08version: bump version to 0.24~rc1David Bremner