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 1FB0C6DE0230 for ; Wed, 2 May 2018 10:00:25 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.006 X-Spam-Level: X-Spam-Status: No, score=-0.006 tagged_above=-999 required=5 tests=[AWL=0.005, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 XdewaUN31Vl9 for ; Wed, 2 May 2018 10:00:24 -0700 (PDT) Received: from anarres.sindominio.net (anarres.sindominio.net [88.99.208.38]) by arlo.cworth.org (Postfix) with ESMTPS id A71696DE022F for ; Wed, 2 May 2018 10:00:23 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by lesnaus.sindominio.net (Postfix) with ESMTP id 6F3501E43CE4; Wed, 2 May 2018 19:00:19 +0200 (CEST) Received: from anarres.sindominio.net ([127.0.0.1]) by localhost (lesnaus.sindominio.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 276q6l8BFSWC; Wed, 2 May 2018 19:00:17 +0200 (CEST) Received: from localhost (localhost.localdomain [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lesnaus.sindominio.net (Postfix) with ESMTPSA id AAE861E43CAB; Wed, 2 May 2018 19:00:15 +0200 (CEST) Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha512"; boundary="===============8894688953760134069==" MIME-Version: 1.0 Content-Disposition: inline From: meskio To: David Bremner , notmuch@notmuchmail.org References: <152518827012.10626.6946716348121434660@localhost> <20180501152815.20687-1-meskio@sindominio.net> <87lgd2gbr9.fsf@tethera.net> In-Reply-To: <87lgd2gbr9.fsf@tethera.net> Message-ID: <152528040738.4642.8851426538456852539@localhost> Subject: Re: [PATCH] python: add bindings for notmuch_message_get_propert(y/ies) Date: Wed, 02 May 2018 19:00:07 +0200 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 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: Wed, 02 May 2018 17:00:25 -0000 --===============8894688953760134069== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Quoting David Bremner (2018-05-02 02:08:26) > Ruben Pollan writes: > = > > Message.get_property (prop) returns a string with the value of the prop= erty and > > Message.get_properties (prop, exact=3DFalse) yields key, value pairs > > --- > > bindings/python/docs/source/message.rst | 4 ++ > > bindings/python/notmuch/globals.py | 5 +++ > > bindings/python/notmuch/message.py | 80 +++++++++++++++++++++++++= +++++++- > > 3 files changed, 88 insertions(+), 1 deletion(-) > > > = > This version passes the first test (after fixing the format, as you > noted), but it looks like get_properties is returning pairs of > bytestrings. > = > FAIL [15] msg.get_properties (python) > --- T610-message-property.16.EXPECTED 2018-05-02 00:02:11.16002= 8179 +0000 > +++ T610-message-property.16.OUTPUT 2018-05-02 00:02:11.16402= 8171 +0000 > @@ -1,4 +1,4 @@ > -testkey1 =3D alice > -testkey1 =3D bob > -testkey1 =3D testvalue1 > -testkey1 =3D testvalue2 > +b'testkey1' =3D b'alice' > +b'testkey1' =3D b'bob' > +b'testkey1' =3D b'testvalue1' > +b'testkey1' =3D b'testvalue2' > = > I don't _think_ that's what we want. We had some discussion before and > decided that it was reasonable to only support utf-8 properties, so > converting to strings should be OK? I added the 'decode("utf-8")' to get_property but I didn't to get_propertie= s. = Next patch fixes it. -- = meskio | http://meskio.net/ -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D- My contact info: http://meskio.net/crypto.txt -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D- Nos vamos a Croatan. --===============8894688953760134069== MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Description: signature Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEs7M6f/ZpXzXMAQR+Urj1rJei2oYFAlrp7pYACgkQUrj1rJei 2oY9rg/8DUuYKJtYMWvWht+ghen06bFPKI/Tlf/qOj9XmIve85UKCLGlCiC/Cw8y 0FlCeukUYOXVf6IBdVHDt8weSlB+fQlqcjaeig8Oo/Y+PFgm8eNgCq4ZgyBFTVYa NqsP4bwDWp6oR/yI89b6W6E9Mo/ubycoz/s21tawuipoDzgFZ+/gO9bXaJ2oIlpe XByvXDZ9HRH30nKqKmvZxvw4QtdiRfe6vh+Nm2pCKrQZt/KvbQ9L5h+Vwc7xXQQt PwNf9M6Rf4RO7FQcYij1w9MIXuNEuMI6hw5itmRZBK0hrGx6HWuig5QpNB0xIZyc 3PDUbuQnmHopISdYNg95C9Q180H+zqVCmf+xW6BT7Ccqw9EvjhA9rDmdHyI9SwVk wRBJBHY5PDHvY+K0m++u2bHoi8UiYw4sz6iN3JODwlhka+2yAHny2eU8cw1dGXs3 p6F7zdnLBS+QJoWkWwdKaE0ZwQI7AcpyKZyPb/xosJRaD9Il2LKCxhYUddSt7lql NT+K0WsjNuYov0d3yZHqWFytHjV5ZHEt3gc7hRYgtfT7p0pTFmuAdD3IrqtpUs5+ bVEGXCn4m0yI0XxBDqbjPufH5vdNMcfX1DKUTzFVDq7UxqyIEx6vmrgM2Cvfo3E2 lHYRQlTmLd/cEDsNK1xPsbfGwHf3A/25pTQ+WoiOqJrXQuwsvY0= =LCB1 -----END PGP SIGNATURE----- --===============8894688953760134069==--