| Age | Commit message (Collapse) | Author |
|
|
|
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
|
|
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
|
|
|
|
The python exception class was incorrectly loading the error message
which resulted in unprintable exception objects.
|
|
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
|
|
These generate warnings from sphinx doc, which makes it harder to
debug documentation changes. They also corrupt the output.
|
|
|
|
|
|
Start release process for 0.34.
|
|
notmuch 0.33.2 release
|
|
|
|
notmuch 0.33.1 release
|
|
|
|
This will help provide more meaningful error messages without special
casing on the client side.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This will allow more precise return values from various open related functions.
|
|
notmuch 0.31.4 release
|
|
|
|
This takes a config path parameter, and can use that to decide the
new database location.
|
|
It is desirable to distinguish between attempting to create a database
that already exists, and more fatal errors like permission problems.
|
|
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.
|
|
These are needed so that the later codes line up numerically.
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
Start the release process for 0.31
|
|
|
|
|
|
|
|
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.
|
|
This keeps it in sync with the main notmuch version which is less
confusing to users.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
|