From: Floris Bruynooghe <flub@devork.be>
To: Gaute Hope <eg@gaute.vetsj.com>
Cc: notmuch <notmuch@notmuchmail.org>
Subject: Re: Python3 cffi bindings
Date: Sun, 17 Nov 2019 18:14:55 +0100 [thread overview]
Message-ID: <87y2wepgq8.fsf@powell.devork.be> (raw)
In-Reply-To: <CABKe4MvsEOJkYDCP42y8iZ=bgyL6+jxwPBL9YnRR4RGF3ryKog@mail.gmail.com>
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
next prev parent reply other threads:[~2019-11-17 17:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-08 21:03 Python3 cffi bindings Floris Bruynooghe
2019-10-08 21:03 ` [PATCH] Introduce CFFI-based python bindings Floris Bruynooghe
2019-10-08 22:24 ` Python3 cffi bindings David Bremner
2019-10-09 18:34 ` Floris Bruynooghe
2019-10-14 12:40 ` David Bremner
2019-10-14 12:42 ` David Bremner
2019-10-17 17:35 ` Floris Bruynooghe
2019-10-20 12:22 ` David Bremner
2019-10-22 16:32 ` David Bremner
2019-10-25 9:57 ` Floris Bruynooghe
2019-11-04 10:27 ` Gaute Hope
2019-11-16 16:44 ` David Bremner
2019-12-04 20:18 ` Tomi Ollila
2019-11-17 17:14 ` Floris Bruynooghe [this message]
2019-11-17 18:01 ` Gaute Hope
2020-10-08 8:13 ` Gaute Hope
2020-10-14 20:23 ` Floris Bruynooghe
2020-10-16 7:19 ` Gaute Hope
2020-10-16 7:24 ` Gaute Hope
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y2wepgq8.fsf@powell.devork.be \
--to=flub@devork.be \
--cc=eg@gaute.vetsj.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).