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 9258B6DE0C66 for ; Sun, 17 Nov 2019 09:14:59 -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 u_zlisNd9OY5 for ; Sun, 17 Nov 2019 09:14:58 -0800 (PST) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by arlo.cworth.org (Postfix) with ESMTPS id E4A356DE0BA2 for ; Sun, 17 Nov 2019 09:14:58 -0800 (PST) Received: by mail-wr1-f53.google.com with SMTP id w9so16738437wrr.0 for ; Sun, 17 Nov 2019 09:14:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=MUIGdHvEfaM6ywslIRBoAveLV+OXUiLI0j/BEu0Kopg=; b=rlCtBOW8ZOItLL0CguVsx9sAUINHPs3ouomcxW7Q5vosHs7xf22A8sZBZBuoy2zXlN djujTbDvyy+KOYzxgWqAb57pIaN0+3xbkqcxJuWRBPBARU0aBKSZLvEjDDHprwp8ru0x cr+rKsbP565hAeNqfia9vaHbr/8deI0nawrDG6iu/bi3UR+Ycexnp2ziL7uU6N2rlZqY zTkVJxhvNfudoUQTZHHW3vM0gHHMQwCrYEyH/KrhtYw/aSeBzim3ST/7QaiPqLH7N8DZ 7+O0l74mo4PbJSK97Ox7dgK7s8etanKuBtDknqRReD2OFzEqfvt/kzX+WXar1J6LbnJ1 zO+w== 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:cc:subject:in-reply-to:references :date:message-id:mime-version; bh=MUIGdHvEfaM6ywslIRBoAveLV+OXUiLI0j/BEu0Kopg=; b=nP8X6otJcRfQF80mj/46SGIc92JqumxpFxdm1lyaosbNPWB7qRSzU971qW55nfDP2O okZROsvcEt1hkAc+fpcef6q/+vaPIFf2Vywa4AcOYat1nqKakEQoePDwa6ij5GAZTSVp fxcj+Q5oxOPvbvcvyNLH0D2i1ukA09rTNbK+S1cm7jrTHTg0f8bCabw3VCgrqa63nAy1 MwCJWG8XNpmwjaPo4zuadyafqmYb9SAx/ZS/zFBwZsNiIOvcLfEsPaQb+3gWrF+EUHFM iAxpUJpNHvFbRPisUa1gQJ23kbywRD6RCyStVC0ezQ6rD5zTLQVtK78a77KinaXSO4xf iUZQ== X-Gm-Message-State: APjAAAWxTNP+Qc2jOsf39bCpEVK3jNOHACt49t/WMR+mRIeuTCoqBLMP VhTiWXtYAu0rS+wDpN+HfRjRj+z4 X-Google-Smtp-Source: APXvYqwgGvh4aN11TMEzmSjJrHIPuhz7TmIffXZkBHok6NSIlvVuqBWzdqnnp+NOdRDTQb9jdQl+fA== X-Received: by 2002:adf:f607:: with SMTP id t7mr25774060wrp.390.1574010897243; Sun, 17 Nov 2019 09:14:57 -0800 (PST) Received: from powell.devork.be ([2a02:168:58d0::7a3]) by smtp.gmail.com with ESMTPSA id h140sm18852613wme.22.2019.11.17.09.14.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Nov 2019 09:14:56 -0800 (PST) Sender: Floris Bruynooghe Received: (nullmailer pid 222236 invoked by uid 1000); Sun, 17 Nov 2019 17:14:55 -0000 From: Floris Bruynooghe To: Gaute Hope Cc: notmuch Subject: Re: Python3 cffi bindings In-Reply-To: References: <20191008210312.20685-1-flub@devork.be> Date: Sun, 17 Nov 2019 18:14:55 +0100 Message-ID: <87y2wepgq8.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: Sun, 17 Nov 2019 17:14:59 -0000 Hi Gaute, Thanks for trying this out! On Mon 04 Nov 2019 at 11:27 +0100, Gaute Hope wrote: > I just checked out the wip/cffi branch on git.notmuch.org with the > purpose of porting Lieer (https://github.com/gauteh/lieer). There > seems to be some missing functionality: `Database.get_directory()` > specifically. Yeah, I didn't add that yet because I don't fully understand how it should be used. Specifically I don't know where one might get a pathname from to pass to .get_directory() and thus whether the API would be cleaner to just return a reasonable directory object from whatever location that might be. Maybe notmuch_database_get_path() is the only entrypoint here and you can get further by listing files and directories from it? But maybe people then use the filesystem directly to find a directory and create the directories ad-hoc. I grepped lieer but I think you only use it in one place? And if I understand it correctly you only do this to check if your mailstore/cwd is inside the notmuch database. I.e. this is equivalent to checking if your mailstore/cwd has notmuch2.Database.path as prefix which you could easily do directly rather than using the FileError exception from .get_directory(). So is anyone else aware of some code which uses db.get_directory() to give an idea of how and why this is used? > I also ran into a couple of warning when building > (included below). Thanks for pointing these out. I guess if the bindings are in the main repo only the latest library version can be supported without any further concerns. > By the way, it does not seem that the API is very far from the > previous python API. If it is close enough, perhaps it is possible to > get away with a bug version bump in the bindings rather than creating > a new package. I understand the need for a new package, but it would > be nice if we could avoid the future confusion of two python binding > packages (if at all possible). While I'm glad to hear that you think a migration wouldn't be to painful for you I am very weary of knowingly breaking APIs. I'd rather have people have an easy migration rather than unexpected breakage after an upgrade. Cheers, Floris