<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/bindings/python-cffi/notmuch2/_database.py, branch 0.33</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.33</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.33'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2020-12-25T15:25:25Z</updated>
<entry>
<title>python/notmuch2: fix exclude tag handling</title>
<updated>2020-12-25T15:25:25Z</updated>
<author>
<name>Johannes Larsen</name>
<email>mail@johslarsen.net</email>
</author>
<published>2020-12-25T15:21:45Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f01f6405c962e27de52eb777ac3f19ee655b71ba'/>
<id>urn:sha1:f01f6405c962e27de52eb777ac3f19ee655b71ba</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Fix typos</title>
<updated>2020-08-10T00:14:36Z</updated>
<author>
<name>Jonas Bernoulli</name>
<email>jonas@bernoul.li</email>
</author>
<published>2020-08-08T11:49:55Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=6c84dee53193a78cf797b44d3febcc14488ea6b1'/>
<id>urn:sha1:6c84dee53193a78cf797b44d3febcc14488ea6b1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Support aborting the atomic context</title>
<updated>2020-06-16T11:17:39Z</updated>
<author>
<name>Floris Bruynooghe</name>
<email>flub@devork.be</email>
</author>
<published>2020-06-14T15:23:19Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=776a54a0e437651abd69a03b9f7d591ea1f992cb'/>
<id>urn:sha1:776a54a0e437651abd69a03b9f7d591ea1f992cb</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Make messages returned by Thread objects owned</title>
<updated>2020-06-16T11:02:02Z</updated>
<author>
<name>Floris Bruynooghe</name>
<email>flub@devork.be</email>
</author>
<published>2020-06-15T20:58:50Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=2d895a0119b423b117d10e890c9e0eb5d2a9cdf8'/>
<id>urn:sha1:2d895a0119b423b117d10e890c9e0eb5d2a9cdf8</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>python/notmuch2: do not destroy messages owned by a query</title>
<updated>2020-06-16T11:02:02Z</updated>
<author>
<name>Anton Khirnov</name>
<email>anton@khirnov.net</email>
</author>
<published>2020-06-15T20:58:49Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=131757907907380213b32934d9e73cec942ace43'/>
<id>urn:sha1:131757907907380213b32934d9e73cec942ace43</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>python/notmuch2: add bindings for the database config strings</title>
<updated>2020-06-16T00:50:03Z</updated>
<author>
<name>Anton Khirnov</name>
<email>anton@khirnov.net</email>
</author>
<published>2020-06-15T21:55:52Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=5a58754841f4d3e62d104ad338c8ca2c481dc32e'/>
<id>urn:sha1:5a58754841f4d3e62d104ad338c8ca2c481dc32e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>python/notmuch2: fix typo for "destroyed"</title>
<updated>2019-12-23T22:13:09Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2019-12-23T21:06:48Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=93cc4b99dff2dea1f4af3b39f1864eb976c37648'/>
<id>urn:sha1:93cc4b99dff2dea1f4af3b39f1864eb976c37648</id>
<content type='text'>
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 &lt;dkg@fifthhorseman.net&gt;
</content>
</entry>
<entry>
<title>python/notmuch2: fix typo for ObjectDestroyedError</title>
<updated>2019-12-23T22:12:51Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2019-12-23T21:02:16Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=34c5233894f5143baaf5d4fc94df68fc186409d6'/>
<id>urn:sha1:34c5233894f5143baaf5d4fc94df68fc186409d6</id>
<content type='text'>
There is no functional change here, just a fix to a typo in the
docstrings.

Signed-off-by: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</content>
</entry>
<entry>
<title>Move from _add_message to _index_file API</title>
<updated>2019-12-03T12:12:30Z</updated>
<author>
<name>Floris Bruynooghe</name>
<email>flub@devork.be</email>
</author>
<published>2019-11-17T19:24:46Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=1e072204cd1963fbf684cdc9c92092efb2d44924'/>
<id>urn:sha1:1e072204cd1963fbf684cdc9c92092efb2d44924</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Rename package to notmuch2</title>
<updated>2019-12-03T12:12:30Z</updated>
<author>
<name>Floris Bruynooghe</name>
<email>flub@devork.be</email>
</author>
<published>2019-11-17T16:41:35Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e2df30f7a98f91543d0b3561dbb366eb4b3d812c'/>
<id>urn:sha1:e2df30f7a98f91543d0b3561dbb366eb4b3d812c</id>
<content type='text'>
This is based on a previous discussion on the list where this was more
or less seen as the least-bad option.
</content>
</entry>
</feed>
