unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/3] python/notmuch2: a few docstrings and collect_tags()
@ 2021-01-06  9:08 Michael J Gruber
  2021-01-06  9:08 ` [PATCH 1/3] python/notmuch2: correct docstring for Database.count_messages() Michael J Gruber
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Michael J Gruber @ 2021-01-06  9:08 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-02-11 17:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-06  9:08 [PATCH 0/3] python/notmuch2: a few docstrings and collect_tags() Michael J Gruber
2021-01-06  9:08 ` [PATCH 1/3] python/notmuch2: correct docstring for Database.count_messages() Michael J Gruber
2021-01-06  9:08 ` [PATCH 2/3] python/notmuch2: docstrings for Database.threads(), Database.count_threads() Michael J Gruber
2021-01-06  9:08 ` [PATCH 3/3] python/notmuch2: provide binding for collect_tags() Michael J Gruber
2021-01-11 20:33   ` Floris Bruynooghe
2021-02-11 17:06     ` Michael J Gruber
2021-01-07 14:35 ` [PATCH 0/3] python/notmuch2: a few docstrings and collect_tags() David Bremner
     [not found]   ` <E1kxYme-0002nO-P1@sphinx.mythic-beasts.com>
2021-01-11 20:47     ` Floris Bruynooghe
2021-01-12  9:13       ` Michael J Gruber

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).