unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* python notmuch2 bindings exclude_tags not added correctly to query
@ 2020-12-23  1:34 Johannes Larsen
  2020-12-24 16:08 ` Floris Bruynooghe
  2020-12-25 18:36 ` David Bremner
  0 siblings, 2 replies; 3+ messages in thread
From: Johannes Larsen @ 2020-12-23  1:34 UTC (permalink / raw)
  To: notmuch


[-- Attachment #1.1: Type: text/plain, Size: 611 bytes --]

A typo in Database._create_query loses the exclude_tag names during the
string to utf-8 conversion.


The problem is fixed by this patch applied to current master (ced341e8):

diff --git i/bindings/python-cffi/notmuch2/_database.py w/bindings/python-cffi/notmuch2/_database.py
index 5ab0f20a..868f4408 100644
--- i/bindings/python-cffi/notmuch2/_database.py
+++ w/bindings/python-cffi/notmuch2/_database.py
@@ -581 +581 @@ class Database(base.NotmuchObject):
-                    tag = str.encode('utf-8')
+                    tag = tag.encode('utf-8')

-- 
johs (Johannes Larsen), (+47) 41435451

[-- Attachment #1.2: signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEpTer3kqGU3pr882G07zxebJvqyYFAl/inp0ACgkQ07zxebJv
qybIKQ//doa6TOk3jEfQ6UVO4potklF9klyPr0d9C/JwB7H/i4lCXosvdN/QK12P
IxyQUbje0LM4Y8ccZaEfd4fdq+HtY4jb4+8Fodpmmt9T6l3iGXels42lsP1GlYYo
lwG3O7lWPjjxyLf6kLVR+Tg2NMs62OBHJBwU/YotlZAn4aAldZhOjXvjpoEb1wx8
DGUGQiJm3iwQWbl+sPN9rRmGGHF53R3tsqpe8ffRUT/GUsbCoD//W/sHxKWu6W0l
jTW9kl/0rTg26mvuQZkD183ttIWD6iFAQzS50eb0wRmKg111I9ymF57d41SJ8pDG
8uYbmQ/wFrR84cuIZoMKGJozAUzLzaHKnh2HrNpd2sV0KHGus3CFfVyo38IxUewV
+wlBJJiZWY1yQ/2yzH8GzwFX2GSfcZTjERnq3mMtl80uVap6ukpYvJ8L2U8NnZK1
0RNLbF6aT7wgrNJdZTekHhysX/6VVUzmvIyx3MRcfvtMivsApxktQ+EkFCC1Ryy3
G7j1/wxEQRCCC8uKdjpgetXTm0GvruuCJTaWJaB8wKfEc7r7hKtP4U7F45NModeX
5+l6+N/JT57Twd6b1gmScYbnnNMMMLWp4sCa+1DARGWAXmXj9n3TYf9fgw5pkbb1
Jexuk/3egiJEZuxOwfoJh/C9rsBbWyWYAiNdKHjEsmoMY8qI7QY=
=OhfP
-----END PGP SIGNATURE-----

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: python notmuch2 bindings exclude_tags not added correctly to query
  2020-12-23  1:34 python notmuch2 bindings exclude_tags not added correctly to query Johannes Larsen
@ 2020-12-24 16:08 ` Floris Bruynooghe
  2020-12-25 18:36 ` David Bremner
  1 sibling, 0 replies; 3+ messages in thread
From: Floris Bruynooghe @ 2020-12-24 16:08 UTC (permalink / raw)
  To: Johannes Larsen, notmuch

Hi Johannes,

On Wed 23 Dec 2020 at 02:34 +0100, Johannes Larsen wrote:

> A typo in Database._create_query loses the exclude_tag names during the
> string to utf-8 conversion.
>
>
> The problem is fixed by this patch applied to current master (ced341e8):
>
> diff --git i/bindings/python-cffi/notmuch2/_database.py w/bindings/python-cffi/notmuch2/_database.py
> index 5ab0f20a..868f4408 100644
> --- i/bindings/python-cffi/notmuch2/_database.py
> +++ w/bindings/python-cffi/notmuch2/_database.py
> @@ -581 +581 @@ class Database(base.NotmuchObject):
> -                    tag = str.encode('utf-8')
> +                    tag = tag.encode('utf-8')

Oops yes, someone else found this a while ago and I started working on a
patch but that ended up in some yak shaving when the tests I wrote for
it ended up accidentally unearthing other unrelated bugs and then I lost
track of this...  Apologies.

Anyway, this fix LGTM even if I do prefer fixes to come with tests :)  But that
shouldn't stop a fix from being merged I guess.

Cheers
Floris

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: python notmuch2 bindings exclude_tags not added correctly to query
  2020-12-23  1:34 python notmuch2 bindings exclude_tags not added correctly to query Johannes Larsen
  2020-12-24 16:08 ` Floris Bruynooghe
@ 2020-12-25 18:36 ` David Bremner
  1 sibling, 0 replies; 3+ messages in thread
From: David Bremner @ 2020-12-25 18:36 UTC (permalink / raw)
  To: Johannes Larsen, notmuch

Johannes Larsen <mail@johslarsen.net> writes:

> A typo in Database._create_query loses the exclude_tag names during the
> string to utf-8 conversion.
>
>
> The problem is fixed by this patch applied to current master (ced341e8):
>
> diff --git i/bindings/python-cffi/notmuch2/_database.py w/bindings/python-cffi/notmuch2/_database.py
> index 5ab0f20a..868f4408 100644
> --- i/bindings/python-cffi/notmuch2/_database.py
> +++ w/bindings/python-cffi/notmuch2/_database.py
> @@ -581 +581 @@ class Database(base.NotmuchObject):
> -                    tag = str.encode('utf-8')
> +                    tag = tag.encode('utf-8')
>
> -- 

Thanks for the fix. I've included it in release 0.31.3.

If you could use "git send-email" (or at least "git format-patch") for
future contributions, that would decrease that chance if my bungling
things.

Thanks again,

David

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-25 18:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-23  1:34 python notmuch2 bindings exclude_tags not added correctly to query Johannes Larsen
2020-12-24 16:08 ` Floris Bruynooghe
2020-12-25 18:36 ` David Bremner

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).