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 ULDgMpBeh1/XbQAA0tVLHw (envelope-from ) for ; Wed, 14 Oct 2020 20:24:48 +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 MOqOLpBeh19abAAAB5/wlQ (envelope-from ) for ; Wed, 14 Oct 2020 20:24:48 +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 159859402AF for ; Wed, 14 Oct 2020 20:24:47 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 415081FFC8; Wed, 14 Oct 2020 16:24:34 -0400 (EDT) Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by mail.notmuchmail.org (Postfix) with ESMTPS id D07011FFA8 for ; Wed, 14 Oct 2020 16:24:31 -0400 (EDT) Received: by mail-ej1-x642.google.com with SMTP id qp15so388223ejb.3 for ; Wed, 14 Oct 2020 13:24:31 -0700 (PDT) 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=QKs/wdxn6K2VfjY+SqOie2sy1Ge18MOcfUaICYNemhM=; b=WsIdjfCeYBcVP3cPnDmdPtH051qtCBSvLqpf8ikmvybk/dYopSXZucwStw62kgXIsp wUfEnFNbjy4s8Y2DYM3k7tFuhrvkWx1rIM/HdbcSbgWYuUDcrJctkIJSvKGznxIjtKBC zivb8N+BNdORgkdDxgf7ixNtF3ZFK6Tz2GRbTiC0hL8Stx48MZezGFnSOsjyexn3STEc BGmr+nRXiwP8YHF9MP8Qyn+U4jfSvb1xvYbJJ5q7znhmQhi/dYtp+cFFhkuI79UJqXIo FIBS1HywD868jXXJosF66AjA0mHH66z0zgCOPCoHA2iVSDS59OfOdK54UaBS7sA4yNaQ MxRA== 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=QKs/wdxn6K2VfjY+SqOie2sy1Ge18MOcfUaICYNemhM=; b=fU7qNx1M6Q9rbRE30RbUWQGzXtQ/tAeLidd/gLxpHtcdhzGjOxElU6MGGF3lRq+DQT crxVP3OHtwzIc+kO2fJv0JCaxd+wUEZjlA+6oREgM5DX0NeuOEwXJOIwVeJmBSJjrIrA hQo9+7LnZ84HZLUWZJNCeblKRQFMpXjt7U5wXzNGtKhQ6kuOcOJa8hJyo97VQazqCEjr G0VrKX+MvK/Nn2Kj7qmKxmpDxQN5bJBjZNCy01xfW/F0sr2OUEr5fnPgPvsK8vOkNp3S hpQmRYT8HIPuXLKJd4VuddHegUItn7L8+JhraSgTN8ZhlTg+fjhsMSxIWZGFM1g+Xp7R LdCg== X-Gm-Message-State: AOAM5336FTFIBqAmgJS/UR8TFMlEqS4IYaczOkBsLgKftAntUpnI9vrC AuGqWV9UpjVOz2JI1Zmnt2k= X-Google-Smtp-Source: ABdhPJyrb+wx5H4Es73lRNuxLEzpwFU/1ZV+zsyjDdOugRTthPPw8OBA8sfT8uRX6pBKoYdNLDTwNA== X-Received: by 2002:a17:906:5a82:: with SMTP id l2mr918329ejq.240.1602707065562; Wed, 14 Oct 2020 13:24:25 -0700 (PDT) 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 x2sm303561edr.65.2020.10.14.13.23.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 13:24:07 -0700 (PDT) Sender: Floris Bruynooghe Received: (nullmailer pid 620656 invoked by uid 1000); Wed, 14 Oct 2020 20:23:56 -0000 From: Floris Bruynooghe To: Gaute Hope Subject: Re: Python3 cffi bindings In-Reply-To: References: <20191008210312.20685-1-flub@devork.be> <87y2wepgq8.fsf@powell.devork.be> Date: Wed, 14 Oct 2020 22:23:56 +0200 Message-ID: <87r1q0d09v.fsf@powell.devork.be> MIME-Version: 1.0 Message-ID-Hash: XNQBL7SN7B3AH25DQXABJUJ3YIQQEUKE X-Message-ID-Hash: XNQBL7SN7B3AH25DQXABJUJ3YIQQEUKE 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 CC: notmuch 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=gmail.com header.s=20161025 header.b=WsIdjfCe; 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-Spam-Score: 1.53 X-TUID: ttzyzP0aj8BF Hi Gaute, On Thu 08 Oct 2020 at 10:13 +0200, Gaute Hope wrote: > I made another attempt at porting lieer to notmuch2, but I am missing the > get_directory method still. Any plans to look at it? Would indeed be good to add this sometime. I'm still curious to how you use it though to make sure we make a good API. I only found https://github.com/gauteh/lieer/blob/394d8c1a574fd57e63390e92a6e73363808ebac5/lieer/local.py#L280 and it seems you only use the `.path` attribute. Is this correct or did I miss anything? Cheers, Floris > > Regards, Gaute > > On Sun, Nov 17, 2019 at 6:14 PM Floris Bruynooghe wrote: > >> 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 >>