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.