[PATCH 0/3] python/notmuch2: a few docstrings and collect_tags()

Subject: [PATCH 0/3] python/notmuch2: a few docstrings and collect_tags()

Date: Wed, 6 Jan 2021 10:08:39 +0100

To: notmuch@notmuchmail.org

Cc:

From: Michael J Gruber


collect_tags() (collecting all tags from messages in a query) is
available in the legacy bindings. Patch 3/3 provides it in the cffi
bindings. Patch 1 and 2 are doctsrings clean-ups/amends.

On 3/3: The tag iterator returned by the underlying library function is
short lived. If I simply return the ImmutableTagSet then it is empty
after one call. The way I make it long lived is nothing that I am proud
of - there may be much better ways. But it feels wrong to return an
"ImmutableTagSet" which survives only one call; it's not an iterator.

Not exposing queries nor "messages objects" seems to be a design
decision of the cffi bindings, and this patch follows it.

[resent since this didn't show up on the ml archive in a week]
[resent again after subscribing; maybe the list config changed, though
doc did not]

Michael J Gruber (3):
  python/notmuch2: correct docstring for Database.count_messages()
  python/notmuch2: docstrings for Database.threads(),
    Database.count_threads()
  python/notmuch2: provide binding for collect_tags()

 bindings/python-cffi/notmuch2/_database.py | 41 ++++++++++++++++++++--
 bindings/python-cffi/notmuch2/_query.py    | 12 +++++++
 2 files changed, 50 insertions(+), 3 deletions(-)

-- 
2.30.0.rc0.297.gbcca948854
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: