unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Michael J Gruber <git@grubix.eu>
To: notmuch@notmuchmail.org
Subject: [PATCH 0/3] python/notmuch2: a few docstrings and collect_tags()
Date: Wed,  6 Jan 2021 10:08:39 +0100	[thread overview]
Message-ID: <cover.1609347527.git.git@grubix.eu> (raw)

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

             reply	other threads:[~2021-01-06  9:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06  9:08 Michael J Gruber [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1609347527.git.git@grubix.eu \
    --to=git@grubix.eu \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).