From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sBgFADJ+9V8yUwAA0tVLHw (envelope-from ) for ; Wed, 06 Jan 2021 09:09:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id ODSENzF+9V8WEgAA1q6Kng (envelope-from ) for ; Wed, 06 Jan 2021 09:09:05 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A70A59401C0 for ; Wed, 6 Jan 2021 09:09:05 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 7B56729D4A; Wed, 6 Jan 2021 04:08:52 -0500 (EST) Received: from mailproxy03.manitu.net (mailproxy03.manitu.net [217.11.48.67]) by mail.notmuchmail.org (Postfix) with ESMTPS id F1BDD29D3B for ; Wed, 6 Jan 2021 04:08:46 -0500 (EST) Received: from localhost (200116b86027b40061b67b8d208c5aed.dip.versatel-1u1.de [IPv6:2001:16b8:6027:b400:61b6:7b8d:208c:5aed]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: michael@grubix.eu) by mailproxy03.manitu.net (Postfix) with ESMTPSA id 04CC9D46E62; Wed, 6 Jan 2021 10:08:42 +0100 (CET) From: Michael J Gruber 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 Message-Id: X-Mailer: git-send-email 2.30.0.287.g27f67507f7 MIME-Version: 1.0 Message-ID-Hash: EF7T6O4DXZRHL5ZAXBCQFAF3GWR3PROE X-Message-ID-Hash: EF7T6O4DXZRHL5ZAXBCQFAF3GWR3PROE X-MailFrom: git@grubix.eu X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 0.42 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: A70A59401C0 X-Spam-Score: 0.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: pMsWtN0D6swf 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