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 76CE16DE0EC7 for ; Mon, 4 Nov 2019 02:27:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.045 X-Spam-Level: X-Spam-Status: No, score=-0.045 tagged_above=-999 required=5 tests=[AWL=-0.044, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-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 H1JvRKw232PV for ; Mon, 4 Nov 2019 02:27:34 -0800 (PST) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by arlo.cworth.org (Postfix) with ESMTPS id 532EE6DE0C6D for ; Mon, 4 Nov 2019 02:27:34 -0800 (PST) Received: by mail-wr1-f65.google.com with SMTP id n1so16378795wra.10 for ; Mon, 04 Nov 2019 02:27:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gaute-vetsj-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=4/9pC1D8bDWWHAxQJ3kRlUeMVCC5nQB5rMS6zaVR4lI=; b=e4MzsRQinO1pCcEb4sx4fex5VlkKZRrfRQWUFB5w1gM4R1b2D9A9+LKAl3QiHQ1guK XpSAewksZ8mnRLIJiBwSQXO1uyVRSCnyguvDxZqVn4A6yqmXaQa8piI3NolaH2lWblgJ FY4Z173ipf3YEYrXVsGdEl8OHC68MX8Ibzo7cKJm4GkJMC4cs9geJ0Y34AX3cLgVBfB3 qpCSR3A+Pd01lfXXzrJjf2u/K8NPoKlY/7pKUHWZMofj08d7YXK1OPv3oM/r9MfmMgm0 lhiFoQlOkse4NW9/F1LD98gw6TrNhXgkOvhCTRJ1giABi3lmiGKJnyEUsm7SvTJyj0TC yn8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=4/9pC1D8bDWWHAxQJ3kRlUeMVCC5nQB5rMS6zaVR4lI=; b=sb4VBxSymZeW5XKAHHxA1scJb7EvAjjNkMTPQzsHYJ1Uwx8oUeNy8ZOXfZz+8o/jTi 4QglrkP30ANkvNte1lF+KluqRANQY5f7p62j45wO/Xw13xoTNvBrKfy4gIP7If7ADpej dgEaSIYFHskWXNFYTUH3/DrOHIPg7CCO8gTa3Jqc1rfx/cU2mI1QRWS6KdMVBtjaDxKj FD2BsSh/CkHI6Ac74LhLNEqh1AkvgxMbrhLUV11MUmWgHFdK13sRA7//KMpGdeXflgAt 8g7iFf+YPVFgmKUyngzrrCHS6/FNzH71tZ2te1KNkTHZTUOP2TTun7BrID/ByLpca6Px mS4g== X-Gm-Message-State: APjAAAVkRGVoKJPLP1VqyIUN67Li/v/WgbNnU/xpUuN7M1fpNujmVNG+ EDq2FlJAWhX2S8uO4qw03/FDgzYBYMYu1KHzcx1hQw== X-Google-Smtp-Source: APXvYqy7JgeDifJPsLKdF7Rwmz/NTt0MJY+eS8j0KdDmuwdFJl/Q74UfpXPl6klrcT3XkiegcPWk2iijV6dDCsLeJuI= X-Received: by 2002:adf:f343:: with SMTP id e3mr22144395wrp.315.1572863251029; Mon, 04 Nov 2019 02:27:31 -0800 (PST) MIME-Version: 1.0 References: <20191008210312.20685-1-flub@devork.be> In-Reply-To: <20191008210312.20685-1-flub@devork.be> From: Gaute Hope Date: Mon, 4 Nov 2019 11:27:20 +0100 Message-ID: Subject: Re: Python3 cffi bindings To: Floris Bruynooghe Cc: notmuch Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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: Mon, 04 Nov 2019 10:27:36 -0000 Hi, 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. I also ran into a couple of warning when building (included below). Thanks for your work. 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). Regards, Gaute ~/dev/notm/notmuch/bindings/python-cffi wip/cffi notm =E2=9D=AF python setup.py build warning: no previously-included files found matching 'setup.pyc' warning: no previously-included files matching 'yacctab.*' found under directory 'tests' warning: no previously-included files matching 'lextab.*' found under directory 'tests' warning: no previously-included files matching 'yacctab.*' found under directory 'examples' warning: no previously-included files matching 'lextab.*' found under directory 'examples' zip_safe flag not set; analyzing archive contents... pycparser.ply.__pycache__.lex.cpython-37: module references __file__ pycparser.ply.__pycache__.lex.cpython-37: module MAY be using inspect.getsourcefile pycparser.ply.__pycache__.yacc.cpython-37: module references __file__ pycparser.ply.__pycache__.yacc.cpython-37: module MAY be using inspect.getsourcefile pycparser.ply.__pycache__.yacc.cpython-37: module MAY be using inspect.stac= k pycparser.ply.__pycache__.ygen.cpython-37: module references __file__ Installed /home/gauteh/dev/notm/notmuch/bindings/python-cffi/.eggs/pycparse= r-2.19-py3.7.egg running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/notdb copying notdb/_message.py -> build/lib.linux-x86_64-3.7/notdb copying notdb/__init__.py -> build/lib.linux-x86_64-3.7/notdb copying notdb/_database.py -> build/lib.linux-x86_64-3.7/notdb copying notdb/_errors.py -> build/lib.linux-x86_64-3.7/notdb copying notdb/_tags.py -> build/lib.linux-x86_64-3.7/notdb copying notdb/_thread.py -> build/lib.linux-x86_64-3.7/notdb copying notdb/_query.py -> build/lib.linux-x86_64-3.7/notdb copying notdb/_build.py -> build/lib.linux-x86_64-3.7/notdb copying notdb/_base.py -> build/lib.linux-x86_64-3.7/notdb running build_ext generating cffi module 'build/temp.linux-x86_64-3.7/notdb._capi.c' creating build/temp.linux-x86_64-3.7 building 'notdb._capi' extension creating build/temp.linux-x86_64-3.7/build creating build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7 gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I../../lib -I/home/gauteh/.pyenv/versions/3.7.4/envs/notm/include -I/home/gauteh/.pyenv/versions/3.7.4/include/python3.7m -c build/temp.linux-x86_64-3.7/notdb._capi.c -o build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7/notdb._capi.o build/temp.linux-x86_64-3.7/notdb._capi.c: In function =E2=80=98_cffi_d_notmuch_database_add_message=E2=80=99: build/temp.linux-x86_64-3.7/notdb._capi.c:980:3: warning: =E2=80=98notmuch_database_add_message=E2=80=99 is deprecated: function depr= ecated as of libnotmuch 5.1 [-Wdeprecated-declarations] return notmuch_database_add_message(x0, x1, x2); ^~~~~~ In file included from build/temp.linux-x86_64-3.7/notdb._capi.c:495:0: ../../lib/notmuch.h:637:1: note: declared here notmuch_database_add_message (notmuch_database_t *database, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ build/temp.linux-x86_64-3.7/notdb._capi.c: In function =E2=80=98_cffi_f_notmuch_database_add_message=E2=80=99: build/temp.linux-x86_64-3.7/notdb._capi.c:1033:3: warning: =E2=80=98notmuch_database_add_message=E2=80=99 is deprecated: function depr= ecated as of libnotmuch 5.1 [-Wdeprecated-declarations] { result =3D notmuch_database_add_message(x0, x1, x2); } ^ In file included from build/temp.linux-x86_64-3.7/notdb._capi.c:495:0: ../../lib/notmuch.h:637:1: note: declared here notmuch_database_add_message (notmuch_database_t *database, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ gcc -pthread -shared -L/home/gauteh/.pyenv/versions/3.7.4/lib -L/home/gauteh/.pyenv/versions/3.7.4/lib build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7/notdb._capi.o -L../../lib -lnotmuch -o build/lib.linux-x86_64-3.7/notdb/_capi.abi3.so On Tue, Oct 8, 2019 at 11:03 PM Floris Bruynooghe wrote: > > Hi all, > > IIRC there was a thread in August about another attempt at bringing > the CFFI-based bindings on board as a Python3-only version. I > believe there was a desire to re-name things but my searching-fu is > failing me and I can no longer find the email thread. > > Anyway, I found the code, checked things work, updated tests on new > python versions, added a very basic intergration with the test > framework and squashed the commits. Otherwise the attached patch > is just a plain dump of the current state so interested people have > at least a copy of the code again which can be made to work. > > IIRC this probably wants to be renamed to "notmuch2" instead of > "notdb". Otherwise I'm pretty sure this doesn't cover all the > current features either. > > So maybe this can be used as a start to figure out how to merge > this if there's still an interest in this. > > Cheers, > Floris > > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch