unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Gaute Hope <eg@gaute.vetsj.com>
To: Floris Bruynooghe <flub@devork.be>
Cc: notmuch <notmuch@notmuchmail.org>
Subject: Re: Python3 cffi bindings
Date: Mon, 4 Nov 2019 11:27:20 +0100	[thread overview]
Message-ID: <CABKe4MvsEOJkYDCP42y8iZ=bgyL6+jxwPBL9YnRR4RGF3ryKog@mail.gmail.com> (raw)
In-Reply-To: <20191008210312.20685-1-flub@devork.be>

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 ❯ 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.stack
pycparser.ply.__pycache__.ygen.cpython-37: module references __file__

Installed /home/gauteh/dev/notm/notmuch/bindings/python-cffi/.eggs/pycparser-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
‘_cffi_d_notmuch_database_add_message’:
build/temp.linux-x86_64-3.7/notdb._capi.c:980:3: warning:
‘notmuch_database_add_message’ is deprecated: function deprecated 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
‘_cffi_f_notmuch_database_add_message’:
build/temp.linux-x86_64-3.7/notdb._capi.c:1033:3: warning:
‘notmuch_database_add_message’ is deprecated: function deprecated as
of libnotmuch 5.1 [-Wdeprecated-declarations]
   { result = 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 <flub@devork.be> 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

  parent reply	other threads:[~2019-11-04 10:27 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 [this message]
2019-11-16 16:44   ` David Bremner
2019-12-04 20:18     ` Tomi Ollila
2019-11-17 17:14   ` Floris Bruynooghe
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='CABKe4MvsEOJkYDCP42y8iZ=bgyL6+jxwPBL9YnRR4RGF3ryKog@mail.gmail.com' \
    --to=eg@gaute.vetsj.com \
    --cc=flub@devork.be \
    --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).