Re: Hi all
[notmuch-archives.git] / d2 / 11f1c9c0ae73474fa0c8b93377e97eee6f9a13
1 Return-Path: <tomi.ollila@iki.fi>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 0E5C5431FBC\r
6         for <notmuch@notmuchmail.org>; Tue,  4 Feb 2014 02:30:48 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id 8xBzQmuTLf2P for <notmuch@notmuchmail.org>;\r
16         Tue,  4 Feb 2014 02:30:40 -0800 (PST)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 9D17B431FAF\r
19         for <notmuch@notmuchmail.org>; Tue,  4 Feb 2014 02:30:40 -0800 (PST)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id 4E55B100033;\r
22         Tue,  4 Feb 2014 12:30:31 +0200 (EET)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: "W. Trevor King" <wking@tremily.us>\r
25 Subject: Re: [PATCH 00/17] nmbug-status: Python-3-compabitility and general\r
26         refactoring\r
27 In-Reply-To: <20140204005331.GQ14197@odin.tremily.us>\r
28 References: <cover.1391424512.git.wking@tremily.us>\r
29         <m2ha8frjgg.fsf@guru.guru-group.fi>\r
30         <20140204005331.GQ14197@odin.tremily.us>\r
31 User-Agent: Notmuch/0.17+55~g4397960 (http://notmuchmail.org) Emacs/24.3.1\r
32         (x86_64-unknown-linux-gnu)\r
33 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
34         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
35         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
36 Date: Tue, 04 Feb 2014 12:30:30 +0200\r
37 Message-ID: <m2fvnzp3uh.fsf@guru.guru-group.fi>\r
38 MIME-Version: 1.0\r
39 Content-Type: text/plain; charset=utf-8\r
40 Content-Transfer-Encoding: quoted-printable\r
41 Cc: notmuch@notmuchmail.org\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46         <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Tue, 04 Feb 2014 10:30:48 -0000\r
55 \r
56 On Tue, Feb 04 2014, "W. Trevor King" <wking@tremily.us> wrote:\r
57 \r
58 > On Mon, Feb 03, 2014 at 11:10:23PM +0200, Tomi Ollila wrote:\r
59 >>     data['message-id-term'] =3D 'id:"{}"'.format(value)\r
60 >> ValueError: zero length field name in format\r
61 >\r
62 > Oops, Python 2.6 still needs explicit indexes ('{0}', not '{}').  It's\r
63 > an easy fix, so I'll queue it for v2.  You're still going to need\r
64 > Python 2.7 or greater for collections.OrderedDict().  We could word\r
65 > around that too, but do we really care about 2.6?  I don't expect that\r
66 > the installed nmbug-status userbase is so large and backward that\r
67 > upgrading to 2.7 will be that hard ;).  2.6 isn't even getting\r
68 > security fixes anymore [1], so I think it's time to migrate :p.\r
69 \r
70 Probably not many cares about 2.6; I already use argparse and I can add\r
71 that OrderedDict() too. Still {0} is easy enough to do :D. I am running\r
72 this notmuch & nmbug in Scientific Linux 6.2 machine which has python 2.6\r
73 -- and this is the only machine where I can review your nmbug-status\r
74 changes ;)\r
75 \r
76 >>   File "devel/nmbug/nmbug-status", line 197, in _write_threads\r
77 >>     ).format(**message_display_data))\r
78 >>   File "/usr/lib64/python2.6/codecs.py", line 351, in write\r
79 >>     data, consumed =3D self.encode(object, self.errors)\r
80 >> UnicodeEncodeError: 'ascii' codec can't encode character u'\u017b' in\r
81 >>   position 176: ordinal not in range(128)\r
82 >\r
83 > Hmm.  __future__'s unicode_literals should be giving us a Unicode\r
84 > target, so I'm not sure why we'd have trouble injecting Unicode.  This\r
85 > works fine for me on Python 2.7 and 3.3.  Maybe you just have a funky\r
86 > encoding?  What is your:\r
87 >\r
88 >   $ locale\r
89 >   LANG=3Den_US.UTF-8\r
90 >   =E2=80=A6\r
91 >   $ python -c 'import locale, sys; print(locale.getpreferredencoding() or=\r
92  sys.getdefaultencoding())'\r
93 >   UTF-8\r
94 \r
95 LANG=3Den_US.UTF-8\r
96 all other LC_* variables en_US.UTF-8 except\r
97 LC_TIME=3Den_GB.utf8\r
98 LC_ALL empty (naturally)\r
99 \r
100 python -c 'import locale; print(locale.getpreferredencoding())'\r
101 UTF-8\r
102 python -c 'import sys; print(sys.getdefaultencoding())'\r
103 ascii\r
104 \r
105 \r
106 anyway, if this doesn't resolve out and there is no resistance to require\r
107 python 2.7 (that means from David) I can hack around this to get this\r
108 reviewed.\r
109 \r
110 >\r
111 > Cheers,\r
112 > Trevor\r
113 \r
114 Tomi\r
115 \r
116 >\r
117 > [1]: http://www.python.org/download/releases/2.6.9/\r