From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id AJU8H60VtF6iNgAA0tVLHw (envelope-from ) for ; Thu, 07 May 2020 14:05:33 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id +CVhK7kVtF7gbQAAbx9fmQ (envelope-from ) for ; Thu, 07 May 2020 14:05:45 +0000 Received: from arlo.cworth.org (arlo.cworth.org [50.126.95.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5FE86940E99 for ; Thu, 7 May 2020 14:05:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 26C9F6DE139E; Thu, 7 May 2020 07:05:39 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NAd9A9I-wTMj; Thu, 7 May 2020 07:05:38 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id E0DA46DE0A77; Thu, 7 May 2020 07:05:37 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 17FC96DE0A77 for ; Thu, 7 May 2020 07:05:36 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NuV10fV9Ah5o for ; Thu, 7 May 2020 07:05:34 -0700 (PDT) X-Greylist: delayed 465 seconds by postgrey-1.36 at arlo; Thu, 07 May 2020 07:05:33 PDT Received: from mail.red.khirnov.net (red.khirnov.net [176.97.15.12]) by arlo.cworth.org (Postfix) with ESMTPS id E89556DE0A42 for ; Thu, 7 May 2020 07:05:33 -0700 (PDT) Received: from localhost (localhost [IPv6:::1]) by mail.red.khirnov.net (Postfix) with ESMTP id 68406289F08 for ; Thu, 7 May 2020 15:57:40 +0200 (CEST) Received: from mail.red.khirnov.net ([IPv6:::1]) by localhost (mail.red.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id JIbUklZSKxqh for ; Thu, 7 May 2020 15:57:40 +0200 (CEST) Received: from lain.khirnov.net (lain.red.khirnov.net [IPv6:2001:67c:1138:4306::3]) by mail.red.khirnov.net (Postfix) with ESMTP id 0686B289E5B for ; Thu, 7 May 2020 15:57:40 +0200 (CEST) Received: by lain.khirnov.net (Postfix, from userid 1000) id E4398160085; Thu, 7 May 2020 15:57:39 +0200 (CEST) MIME-Version: 1.0 From: Anton Khirnov To: Notmuch Mail Subject: status of the new python bindings Date: Thu, 07 May 2020 15:57:39 +0200 Message-ID: <158885985981.5773.4257129906401430063@lain.red.khirnov.net> User-Agent: alot/0.8.1 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: notmuch-bounces@notmuchmail.org Sender: "notmuch" X-Scanner: scn0 X-Spam-Score: -1.01 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 50.126.95.6 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Scan-Result: default: False [-1.01 / 13.00]; RCVD_TLS_LAST(0.00)[]; GENERIC_REPUTATION(0.00)[-0.45833025891358]; URIBL_BLOCKED(0.00)[notmuchmail.org:email]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_FAIL(0.00)[50.126.95.6:server fail]; IP_REPUTATION_HAM(0.00)[asn: 27017(-0.18), country: US(-0.00), ip: 50.126.95.6(-0.46)]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[notmuch@notmuchmail.org]; ARC_NA(0.00)[]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; SPF_REPUTATION_HAM(0.00)[-0.4365427113833]; DMARC_NA(0.00)[khirnov.net]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.50)[cached: notmuchmail.org]; FORGED_SENDER_MAILLIST(0.00)[]; MAILLIST(-0.20)[mailman]; RCVD_IN_DNSWL_FAIL(0.00)[50.126.95.6:server fail]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:27017, ipnet:50.126.64.0/18, country:US]; FROM_NEQ_ENVFROM(0.00)[anton@khirnov.net,notmuch-bounces@notmuchmail.org]; RCVD_COUNT_SEVEN(0.00)[10] X-TUID: m3RNL1dpuQCQ Hi, I've started tinkering with the "new" Python bindings (python-cffi / python-notmuch2) and have a couple questions/comments about them: 1) What is the logic behind choosing whether something is exported as a property or as a method? E.g. Database.needs_upgrade is a property, while Database.revision() is a method. In my own python code, I tend to use @property for things that are "cheap" - i.e. do not involve (significant) IO or heavy computation and methods for those that do. But both of the above attributes involve library calls, presumably(?) of similar complexity. Would be nice if this was consistent. 2) Atomic transactions are now exported as a context manager, which is nice and convenient for the usual use cases, but AFAIU does not have the same power. E.g. my tagging script does the tagging as a single atomic transaction and has a "dry-run" mode in which it omits the end_atomic() call, which is documented to throw away all the changes. This seems to not be possible with the new bindings. Would it be okay to add bindings for explicitly calling start/end_atomic()? Or is my approach considered invalid? 3) There seem to be no bindings for notmuch_database_set_config(). 4) The setup for building the documentation seems to be missing. Anything else of note that remains to be implemented? -- Anton Khirnov