From: meskio <meskio@sindominio.net>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: [PATCH] python: add bindings for notmuch_message_get_propert(y/ies)
Date: Tue, 01 May 2018 17:24:30 +0200 [thread overview]
Message-ID: <152518827012.10626.6946716348121434660@localhost> (raw)
In-Reply-To: <87o9hzfrtt.fsf@tethera.net>
[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]
Quoting David Bremner (2018-05-01 15:06:38)
> running the test below, I get
>
> Traceback (most recent call last):
> File "<stdin>", line 4, in <module>
> File "/home/bremner/software/upstream/notmuch/bindings/python/notmuch/message.py", line 480, in get_property
> value = c_char_p("")
> TypeError: bytes or integer address expected instead of str instance
Ups, I was using python2 to test it. I see it doesn't work with python three.
I'll send an update.
> diff --git a/test/T610-message-property.sh b/test/T610-message-property.sh
> index 74b3f5a1..f7220565 100755
> --- a/test/T610-message-property.sh
> +++ b/test/T610-message-property.sh
> @@ -89,6 +89,18 @@ testkey2 = NULL
> EOF
> test_expect_equal_file EXPECTED OUTPUT
>
> +test_begin_subtest "msg.get_property (python)"
> +test_python <<'EOF'
> +import notmuch
> +db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE)
> +msg = db.find_message("4EFC743A.3060609@april.org")
> +print("testkey1[1] = %s\n".format(msg.get_property("testkey1")))
I think this should be (notice the {0} instead of %s):
print("testkey1[1] = {0}".format(msg.get_property("testkey1")))
--
meskio | http://meskio.net/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
My contact info: http://meskio.net/crypto.txt
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Nos vamos a Croatan.
[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEs7M6f/ZpXzXMAQR+Urj1rJei2oYFAlrohqkACgkQUrj1rJei
2oaJSxAAj7r1lJFPzrqGy34PATiosUFOpVn61LhAPiaVUEddEAnLF9SsLGnRChcF
3QJsrE59SOQ7BwuXEOnjt4rf1s8GeG/SbhOsOec7rsCCGujCBWBjk5+pW4GLU47G
4/mdJ60IF6PMoSGhcRlQ4WgOkewcXLswWOEOvcMkQE+qfWTRb9RVa7WiqYOdYy/k
JkDFJ46mr0VbO04rydk3JHQuw5XcVdJSsGTFZmwgAGE+xR1IdD6gSCSmT7K2DTLH
TiWTxwe4AIO5HOiWWBTDGHGI8OaJe0ysDeEyRoBmIzAHK7EVeYYntPWuhxBKSsQG
vKcTiNVR551D+2othRl28V+CLEpbOWH7wtEnV46nKQcZyyX0rU/VEu17NfcrKFOs
GjpKjhJs8T3ySeooGyGYfw4//dSQ76Y8qw2tYHSFaFCNQ7BbFdEAKUcpQQOPcOEK
EzpksG0Zs7fHOJpYxbVLYpqulfubfn7JpDbdyverhNF3qU9BnKBbN8dbuBGgMtu+
NIt2Dd/QAAueVnESNxXLSsfTZTBUHERvc5aGggxknMUxBjtC5k6o2POzDxbm6ly0
Kq8hH1IGnYGncRPWyVhPLuA/nJRAaU3EcSlu+hAuXL6t7DTC7zrNEB05bM+0kYpc
k6z+/ociG7a2+MijllDqdwsdRu1U2bQhk17qNr40YcsMT82Ozms=
=7Xp3
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2018-05-01 15:24 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-15 22:29 [PATCH] python: add bindings for notmuch_message_get_property Ruben Pollan
2017-11-15 22:48 ` meskio
2017-11-17 9:03 ` Daniel Kahn Gillmor
2017-11-28 22:46 ` [PATCH] python: add bindings for notmuch_message_get_propert(y/ies) Ruben Pollan
2017-11-28 22:51 ` meskio
2017-11-29 1:57 ` Daniel Kahn Gillmor
2017-11-29 8:02 ` meskio
2017-11-29 8:03 ` Ruben Pollan
2017-12-23 15:59 ` David Bremner
2018-04-27 19:12 ` meskio
2018-04-27 19:15 ` Ruben Pollan
2018-05-01 13:06 ` David Bremner
2018-05-01 15:24 ` meskio [this message]
2018-05-01 15:28 ` Ruben Pollan
2018-05-02 0:08 ` David Bremner
2018-05-02 17:00 ` meskio
2018-05-02 17:01 ` Ruben Pollan
2018-05-02 23:50 ` David Bremner
2017-11-29 21:40 ` Floris Bruynooghe
2017-11-30 13:44 ` David Bremner
2017-11-30 14:19 ` Daniel Kahn Gillmor
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=152518827012.10626.6946716348121434660@localhost \
--to=meskio@sindominio.net \
--cc=david@tethera.net \
--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).