From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wE+iFnC5/F+uEwAA0tVLHw (envelope-from ) for ; Mon, 11 Jan 2021 20:47:44 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 8BitEnC5/F/lDAAAB5/wlQ (envelope-from ) for ; Mon, 11 Jan 2021 20:47:44 +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 98D209402A9 for ; Mon, 11 Jan 2021 20:47:43 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 62F0929E60; Mon, 11 Jan 2021 15:47:38 -0500 (EST) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by mail.notmuchmail.org (Postfix) with ESMTPS id 524591FBCC for ; Mon, 11 Jan 2021 15:47:36 -0500 (EST) Received: by mail-ej1-x629.google.com with SMTP id w1so263600ejf.11 for ; Mon, 11 Jan 2021 12:47:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version; bh=G7Ep4Y3rtsUYURJ7qEM5kyZZnIf34IaqtAu7Xgs+mEI=; b=rqRoLroWkd+3b1zkoQYVLMzV5Vjq3s2HgCr6wLj2YpjqR7Pl7uVV+VzWBhmiWNPMEu MKKNVQuGTU2U9kfBZe+65rl9UdS1WoyfHEPMy+PP7roNVkD18YlSF/UdzrrIa7TIBxw8 JuSK91uMxxhuYFukrMtWC6jfh1k5yeNKa4Eu5XSbrrrdbkoss6ytPIAiGXcWbqpGznPy W1rLVoqzJZ+Supcs2Zvx/vPY84Eex3rTzn/EGlltSsg2zUjkrfBj8RwgFgFQmmcIBZ6K RAhSiu++hPs1JaiPQIJX1EeadVVbYKEv8CQGOZOuey5lA5j1FhdmCqAF7iM+tziyYda9 YEkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:in-reply-to:references :date:message-id:mime-version; bh=G7Ep4Y3rtsUYURJ7qEM5kyZZnIf34IaqtAu7Xgs+mEI=; b=KX+il+fxP0mMSWGImWQyAbx4QEeVzQX04cXR+8Upi+qmQ+U79wuBCfgJ4FxK7SUVvu 0bG1wBPdvmjHP1vzBmWTsgnZ+mtjkXrFxZDqVuSejwncGKupEbr61RKYpfuWxjX44c3x L3L03BrNCs14CPm7SWGOraL7Jdlw6DxGk063rAcnGSaF7dFOBtJssV0hJXNbg71QNurM WJbQU389v2PM4gfX1CbVXvQyNynpJKPR354wldQr4HiSUJ5KnL57ClazE9AYzu2Ghjx9 p6S3mhGnu1PBQ/jbnypebqupC5lgFDyFzss1gBRefL4VfOTNo27W3oHxD73MHojwfk2A Of1Q== X-Gm-Message-State: AOAM533nW8h6lO+0Myqw0x6ErklBJ5MNutDcaWRdtU1hsj30HXn+JIN3 Vx8MasDRLp1b2HMjjE61TMO0bM7JBVk= X-Google-Smtp-Source: ABdhPJzX9Xc3+2pxX1pgSuOd5IX9rLycJvDmeWOgHd8KhqBO3kHlZyA0yC4EMfkH4JXs3ssxLy05tA== X-Received: by 2002:a17:906:6448:: with SMTP id l8mr874722ejn.357.1610398055155; Mon, 11 Jan 2021 12:47:35 -0800 (PST) Received: from powell.devork.be (2a02-8388-8480-1180-4c18-fc69-8d8c-22b5.cable.dynamic.v6.surfer.at. [2a02:8388:8480:1180:4c18:fc69:8d8c:22b5]) by smtp.gmail.com with ESMTPSA id ch30sm461779edb.8.2021.01.11.12.47.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 12:47:34 -0800 (PST) Sender: Floris Bruynooghe Received: (nullmailer pid 804481 invoked by uid 1000); Mon, 11 Jan 2021 20:47:33 -0000 From: Floris Bruynooghe To: Michael J Gruber , David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH 0/3] python/notmuch2: a few docstrings and collect_tags() In-Reply-To: References: <87wnwou85n.fsf@tethera.net> Date: Mon, 11 Jan 2021 21:47:33 +0100 Message-ID: <87o8hv42vu.fsf@powell.devork.be> MIME-Version: 1.0 Message-ID-Hash: WVILE7A3QFNATADXUQZGH3LC3TBWMY7V X-Message-ID-Hash: WVILE7A3QFNATADXUQZGH3LC3TBWMY7V X-MailFrom: floris.bruynooghe@gmail.com 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: -1.08 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=gmail.com header.s=20161025 header.b=rqRoLroW; 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: 98D209402A9 X-Spam-Score: -1.08 X-Migadu-Scanner: scn1.migadu.com X-TUID: 5f2hbvWb3Ens On Thu 07 Jan 2021 at 17:09 +0000, Michael J. Gruber wrote: > As for the series: the notmuch based MUA "alot" switched to the new > python bindings recently. collect_tags() is something I used in a > feature PR submitted but not merged yet there (while on the old bindings), > and in my updated feature PR there I directly roll > notmuch2._tags.ImmutableTagSet(msgs, '_iter_p', notmuch2.capi.lib.notmuch_messages_collect_tags). You could do this entirely in the public bindings too could you not? Something like (untested): def collect_tags(db, query): tags = set() for msg in db.messages(query): tags.update(msg.tags) anyway, i guess the internal APIs you use won't change before your patchset here lands so this doesn't matter much. > I don't know whether this will land in alot, but feature parity of the > new bindings with the old ones is a good aim Thanks for contributing this! I never aimed for full parity because I didn't feel like making the API decisions for APIs I had no need to use myself. But it's great when people needing things can add it! Cheers, Floris