From: W. Trevor King Date: Tue, 4 Feb 2014 00:53:32 +0000 (+1600) Subject: Re: [PATCH 00/17] nmbug-status: Python-3-compabitility and general refactoring X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d96ebdb51f54fe740be2cd196b6ffd13d05f56f6;p=notmuch-archives.git Re: [PATCH 00/17] nmbug-status: Python-3-compabitility and general refactoring --- diff --git a/92/147dd47012447e0646e7ce2f555375e8329b37 b/92/147dd47012447e0646e7ce2f555375e8329b37 new file mode 100644 index 000000000..a36623a62 --- /dev/null +++ b/92/147dd47012447e0646e7ce2f555375e8329b37 @@ -0,0 +1,146 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 1D595431FBC + for ; Mon, 3 Feb 2014 16:53:43 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.1 +X-Spam-Level: +X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id bjjhF12rmu6S for ; + Mon, 3 Feb 2014 16:53:35 -0800 (PST) +Received: from qmta01.westchester.pa.mail.comcast.net + (qmta01.westchester.pa.mail.comcast.net [76.96.62.16]) + by olra.theworths.org (Postfix) with ESMTP id DB226431FAF + for ; Mon, 3 Feb 2014 16:53:34 -0800 (PST) +Received: from omta04.westchester.pa.mail.comcast.net ([76.96.62.35]) + by qmta01.westchester.pa.mail.comcast.net with comcast + id Mzbo1n0010ldTLk510taXe; Tue, 04 Feb 2014 00:53:34 +0000 +Received: from odin.tremily.us ([24.18.63.50]) + by omta04.westchester.pa.mail.comcast.net with comcast + id N0tY1n017152l3L010tZD8; Tue, 04 Feb 2014 00:53:34 +0000 +Received: by odin.tremily.us (Postfix, from userid 1000) + id 2BDFCFC9943; Mon, 3 Feb 2014 16:53:32 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin; + t=1391475212; bh=7IsEDR+Nf2joDwwc50y4AjrtI+sq0fqW3gBUFnrAF6A=; + h=Date:From:To:Cc:Subject:References:In-Reply-To; + b=hyyO4bQE4ZW3Y1V5zXWmHpd4eT2d0tOZmw+O+f6kI3sBmTYG91zJVO8r3mN3h11vl + RDPb1egwSiKqDAFq0QbhJHfdZ6mLxN7c6UaxzbM0mfamTrBRAxP/18IA9ZstVjhNya + 0S0+RhUae/pQnLghApu/DE9VLOqvI8I+dp9qzWHM= +Date: Mon, 3 Feb 2014 16:53:32 -0800 +From: "W. Trevor King" +To: Tomi Ollila +Subject: Re: [PATCH 00/17] nmbug-status: Python-3-compabitility and general + refactoring +Message-ID: <20140204005331.GQ14197@odin.tremily.us> +References: + +MIME-Version: 1.0 +Content-Type: multipart/signed; micalg=pgp-sha1; + protocol="application/pgp-signature"; boundary="8kevPEUzql0NoPNs" +Content-Disposition: inline +In-Reply-To: +OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8; + url=http://tremily.us/pubkey.txt +User-Agent: Mutt/1.5.22 (2013-10-16) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; + s=q20121106; t=1391475214; + bh=jOjVNSZPqOGVbcsJGzsVnJ4XbJ8x5aLZD7pmoglJFnA=; + h=Received:Received:Received:Date:From:To:Subject:Message-ID: + MIME-Version:Content-Type; + b=ozOVhgNH8CLv1IAbBlOvBL1VEfXp4KYX74JKWeY1jbQNRegHAriBcr4N3PUgnMrDD + cGo1t8f5zhLGnLzQAZHbjfWvfWDVJygIeiLTjVALuFOhf8ugp3JI7tlmjoeKP0UuKd + hgDoSZQOWXx92VSf6CFW9etD6yJ/Jh4A/LZGL815CIRGjV+o6NYNofSEjoqab6QQmM + hnE4hwuUMyGUQPXyuTcax2BwfiVA0XzI14UpjeR2bYF/AjV1p/g1P81ltaDC5A1ny7 + iNaAuqyL+jYY3PxDsa9NdknmO9Oc8+1f1oCagijcaWQBJKJ+U4qc2jq1rio6CwDHRq + svjutWi5eep3Q== +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Tue, 04 Feb 2014 00:53:43 -0000 + + +--8kevPEUzql0NoPNs +Content-Type: text/plain; charset=utf-8 +Content-Disposition: inline +Content-Transfer-Encoding: quoted-printable + +On Mon, Feb 03, 2014 at 11:10:23PM +0200, Tomi Ollila wrote: +> data['message-id-term'] =3D 'id:"{}"'.format(value) +> ValueError: zero length field name in format + +Oops, Python 2.6 still needs explicit indexes ('{0}', not '{}'). It's +an easy fix, so I'll queue it for v2. You're still going to need +Python 2.7 or greater for collections.OrderedDict(). We could word +around that too, but do we really care about 2.6? I don't expect that +the installed nmbug-status userbase is so large and backward that +upgrading to 2.7 will be that hard ;). 2.6 isn't even getting +security fixes anymore [1], so I think it's time to migrate :p. + +> File "devel/nmbug/nmbug-status", line 197, in _write_threads +> ).format(**message_display_data)) +> File "/usr/lib64/python2.6/codecs.py", line 351, in write +> data, consumed =3D self.encode(object, self.errors) +> UnicodeEncodeError: 'ascii' codec can't encode character u'\u017b' in +> position 176: ordinal not in range(128) + +Hmm. __future__'s unicode_literals should be giving us a Unicode +target, so I'm not sure why we'd have trouble injecting Unicode. This +works fine for me on Python 2.7 and 3.3. Maybe you just have a funky +encoding? What is your: + + $ locale + LANG=3Den_US.UTF-8 + =E2=80=A6 + $ python -c 'import locale, sys; print(locale.getpreferredencoding() or s= +ys.getdefaultencoding())' + UTF-8 + +Cheers, +Trevor + +[1]: http://www.python.org/download/releases/2.6.9/ + +--=20 +This email may be signed or encrypted with GnuPG (http://www.gnupg.org). +For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy + +--8kevPEUzql0NoPNs +Content-Type: application/pgp-signature; name="signature.asc" +Content-Description: OpenPGP digital signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.22 (GNU/Linux) + +iQIcBAEBAgAGBQJS8DoJAAoJEKKfehoaNkbtxZoP/i4ZtRiyU9fwCRV3i3sQk6WJ +z7qHSUozUiJqIsT2g5vla/QneeSG7JrTk41xMaj0Tp2D7pYNBvm0Zt2RnSWvq+GM +6tEmytV1sCuJHTcKRKArvEHZMCWcJcOez9TOLFw6IBYMemwzBiY68JhQCEf/n6/c +rY2bidZzXhQXK/+xLiASSJDOEjka3JRCu7VDQcJoyMUnIKkWsTqbvt6IIVLECQXQ +CGU19thF14EPVYKxYrhnPm54J6EIkALkyvVjzoBIHvJ/NOsCtmXvw3yol1YsiG9+ +kGWVBAlGKYOX0hjbkDRvMka8iBEKmAr2twLaBiqFfWNlgqJEIbvBtJuEOyX3p2D2 +EfubvY2hf+u1i0/rCVcYjuAvBsBPQzjRMfYzE0wGQ4fhE+I41n4nODJNVfUR4n9Z +kULjkA95DfrwPRxIVotNL1TwxCFJ7gB0gLcCf3qkiJCVo9wttt+yj087+f9PRtDR +xnJ6StPqn/UKnFRF7YQZ3RafIAZOVa6A2VESmrehLSfbwYj2PbwI+4wYxZr+dVZM +Ji7kChq1UbvrPApGhxrXjDHE4Du6GQAVO3N7DbUohSA+IlLdLFpppS9/KYajaw26 +nJJCHXJGqtFn9aq6QH0fD1E23J02ULi1ABPWDjd23hM15c6xz5gywlQ0isRGTPxI +sYaaioBhx8FYl1qLS0li +=VRms +-----END PGP SIGNATURE----- + +--8kevPEUzql0NoPNs--