unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
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: Wed, 02 May 2018 19:00:07 +0200	[thread overview]
Message-ID: <152528040738.4642.8851426538456852539@localhost> (raw)
In-Reply-To: <87lgd2gbr9.fsf@tethera.net>

[-- Attachment #1: Type: text/plain, Size: 1691 bytes --]

Quoting David Bremner (2018-05-02 02:08:26)
> Ruben Pollan <meskio@sindominio.net> writes:
> 
> > Message.get_property (prop) returns a string with the value of the property and
> > Message.get_properties (prop, exact=False) 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.160028179 +0000
>         +++ T610-message-property.16.OUTPUT     2018-05-02 00:02:11.164028171 +0000
>         @@ -1,4 +1,4 @@
>         -testkey1 = alice
>         -testkey1 = bob
>         -testkey1 = testvalue1
>         -testkey1 = testvalue2
>         +b'testkey1' = b'alice'
>         +b'testkey1' = b'bob'
>         +b'testkey1' = b'testvalue1'
>         +b'testkey1' = 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_properties.  
Next patch fixes it.

-- 
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+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-----

  reply	other threads:[~2018-05-02 17:00 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
2018-05-01 15:28                     ` Ruben Pollan
2018-05-02  0:08                       ` David Bremner
2018-05-02 17:00                         ` meskio [this message]
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=152528040738.4642.8851426538456852539@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).