From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 2DDA06DE0EE3 for ; Thu, 14 Nov 2019 10:53:00 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.203 X-Spam-Level: X-Spam-Status: No, score=-0.203 tagged_above=-999 required=5 tests=[AWL=-0.352, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled 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 6Nn74ixxMHCd for ; Thu, 14 Nov 2019 10:52:57 -0800 (PST) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by arlo.cworth.org (Postfix) with ESMTPS id 78CF06DE0AAB for ; Thu, 14 Nov 2019 10:52:57 -0800 (PST) Received: by mail-wm1-f42.google.com with SMTP id c22so7194079wmd.1 for ; Thu, 14 Nov 2019 10:52:57 -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=B5AgRbhT9Xm1EXMxiq6CAKtAT0ViIKLIxgAH4Ws/XGY=; b=tDeTxt1TT86y5ihVIVIArhZF9iOaJh/hB5MINlui4tJmJbPvX7mQhaQHSiCBdvbAac CQaZsYBCV5ZtljDGRnE6RgZ5i8GQgWbWEp7tkxQeYxQ779DjGa/ses4Y9N3LEe45ptOp UdN6FQmvAr5ESUR01xm6evmoUnbNnnkIVHQ9K5LNYOeEfbcnvqpMpLf7kaz3122WNxLN y3WZEIL1Ez31DHLDPkYLF0Hg3VWpY7LGB02UdI27cvOeIWHuHJjx/rEPjb5XpIikx+JZ CmpMYTIYyjeiF6VhigqigrfNVyzEtxxfLWJZnPDjDstf9lceLRuyuhN6u0qvxbd2ANz/ 6c3g== 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=B5AgRbhT9Xm1EXMxiq6CAKtAT0ViIKLIxgAH4Ws/XGY=; b=dJtfnJficZnltJZ1Dp3dhcto36LkPib+KrROVC7j5tmw0HR2GSVwmdQqi0l7+rxtib 2L3BYT0P2nFLdvGm0mqtpZwrc1o67iAOj+cLUVBwKaV8ts5a9cALEP3g9ZbtR1HG8tJ2 FxuVEUcl1Ap+H0huyoqb+Owex9GdFp8g+/2WdmeH0fktS5AseZiSopP6BZ2S9slWSWhz relw1q3Ssw5rmDRH7BcvpX0doWnFsCRRFMTC5bOZHljiN1/oD5z03GC7M0tMOclBlF6j lr5mLJxl6OD5U0g/CRm8xfrtdQHtorIffwkBffVs0F56ZWVuh8w83oS3I5y+zOZtnEgn eOeg== X-Gm-Message-State: APjAAAXaCAzpyiKhq9eYjcNUt/U7pe/cT/ZD1H3fwtPihTbb0edfiMce F+driqATlefsCaBJfoH2qXc= X-Google-Smtp-Source: APXvYqyD4xptnIxE9UUOjlz86X7OTD74KzJwvj9bsCCiYqIqazI87LbD0rY8PlYkH68REpgdnpTFqA== X-Received: by 2002:a1c:7519:: with SMTP id o25mr9129149wmc.70.1573757574731; Thu, 14 Nov 2019 10:52:54 -0800 (PST) Received: from powell.devork.be ([2a02:168:58d0::7a3]) by smtp.gmail.com with ESMTPSA id 189sm7895388wmc.7.2019.11.14.10.52.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2019 10:52:53 -0800 (PST) Sender: Floris Bruynooghe Received: (nullmailer pid 5217 invoked by uid 1000); Thu, 14 Nov 2019 18:52:52 -0000 From: Floris Bruynooghe To: David Bremner , Tomi Ollila , notmuch@notmuchmail.org Subject: Re: python CFFI bindings integration into notmuch build/test In-Reply-To: <87eeylspzo.fsf@tethera.net> References: <20191104013927.17037-1-david@tethera.net> <87eeylspzo.fsf@tethera.net> Date: Thu, 14 Nov 2019 19:52:52 +0100 Message-ID: <87blte2su3.fsf@powell.devork.be> MIME-Version: 1.0 Content-Type: text/plain 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: , X-List-Received-Date: Thu, 14 Nov 2019 18:53:00 -0000 Hi, Thanks for carrying on with this! I'm a little confused with how to follow this, is the current state of the code somewhere in a repo/branch where I can try things out and make changes from? On Tue 05 Nov 2019 at 22:22 -0400, David Bremner wrote: > Tomi Ollila writes: > > >> alternative: >> >> ... >> print('Invoking: {}'.format(' '.join(cmd))) >> >> def preexec_fn(): os.environ['NOTMUCH_CONFIG'] = str(cfg_fname) >> >> proc = subprocess.run(cmd, timeout=5, preexec_fn=preexec_fn) >> ... >> >> The unix fork ... (here preexec_fn called in child) ... exec model is >> superior to any other alternative ! =D > > I don't consider myself a good judge of python style, so I'll defer to > Floris on that one. I'd have gone with what David wrote to be fair, mostly because it's pretty simple to see what's going on where for the preexec_fn I'd have to look at the docs. Not sure if this has much to do with Python style though, more with how much you like Unix tricks. Cheers, Floris