[v2 2/3] test-lib: Add dummy subject to force empty subject
[notmuch-archives.git] / 4d / 1610adf8532b6faa7aff965896e404b5675d89
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 1621B431FBC\r
6         for <notmuch@notmuchmail.org>; Mon,  3 Feb 2014 13:10:37 -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 I+BqKRVaaZhb for <notmuch@notmuchmail.org>;\r
16         Mon,  3 Feb 2014 13:10:29 -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 7C2B2431FAF\r
19         for <notmuch@notmuchmail.org>; Mon,  3 Feb 2014 13:10:29 -0800 (PST)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id 573E4100033;\r
22         Mon,  3 Feb 2014 23:10:23 +0200 (EET)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: "W. Trevor King" <wking@tremily.us>, notmuch@notmuchmail.org\r
25 Subject: Re: [PATCH 00/17] nmbug-status: Python-3-compabitility and general\r
26         refactoring\r
27 In-Reply-To: <cover.1391424512.git.wking@tremily.us>\r
28 References: <cover.1391424512.git.wking@tremily.us>\r
29 User-Agent: Notmuch/0.17+55~g4397960 (http://notmuchmail.org) Emacs/24.3.1\r
30         (x86_64-unknown-linux-gnu)\r
31 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
32         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
33         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
34 Date: Mon, 03 Feb 2014 23:10:23 +0200\r
35 Message-ID: <m2ha8frjgg.fsf@guru.guru-group.fi>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Mon, 03 Feb 2014 21:10:37 -0000\r
51 \r
52 On Mon, Feb 03 2014, "W. Trevor King" <wking@tremily.us> wrote:\r
53 \r
54 > I noticed that nmbug-status was written in Python :), but not\r
55 > compatible with Python 3 :(.  I started cleaning up a few print\r
56 > statements, but this quickly turned into a more general refactoring.\r
57 > Let me know if this is too much to bite off at once.  I tried to keep\r
58 > each patch fairly contained, but the Page / HtmlPage addition is still\r
59 > pretty big.  Despite increasing the size of this module by almost 50%,\r
60 > I think my final version is more readable.  However, it's always\r
61 > easier to read your own code, so feel free to tell me that this is a\r
62 > step in the completely wrong direction ;).\r
63 >\r
64 > Also anyone with asthetic sensibilities is free to pick nicer colors\r
65 > in the final patch.  I'm too partial to the EFF permutation symmetry\r
66 > to be able to pick other colors myself ;).\r
67 \r
68 Nice series. One problem with python 2.6 though:\r
69 \r
70 Traceback (most recent call last):\r
71   File "devel/nmbug/nmbug-status", line 300, in <module>\r
72     page.write(database=db, views=config['views'])\r
73   File "devel/nmbug/nmbug-status", line 76, in write\r
74     self._write_view(database=database, view=view, stream=stream)\r
75   File "devel/nmbug/nmbug-status", line 93, in _write_view\r
76     threads = self._get_threads(messages=q.search_messages())\r
77   File "devel/nmbug/nmbug-status", line 107, in _get_threads\r
78     running_data=thread.running_data, message=message)\r
79   File "devel/nmbug/nmbug-status", line 207, in _message_display_data\r
80     *args, **kwargs)\r
81   File "devel/nmbug/nmbug-status", line 132, in _message_display_data\r
82     data['message-id-term'] = 'id:"{}"'.format(value)\r
83 ValueError: zero length field name in format\r
84 \r
85 Using python 2.6.6\r
86 \r
87 $ python -c 'print "{}".format("foo")'\r
88 Traceback (most recent call last):\r
89   File "<string>", line 1, in <module>\r
90 ValueError: zero length field name in format\r
91 zsh: exit 1     python -c '"{}".format("foo")'\r
92 \r
93 python -c 'print "{0}".format("foo")'\r
94 foo\r
95 \r
96 With python 2.7.x python -c 'print "{}".format("foo")' works OK.\r
97 \r
98 Argh, when I changed that one, next:\r
99 \r
100 Traceback (most recent call last):\r
101   File "devel/nmbug/nmbug-status", line 300, in <module>\r
102     page.write(database=db, views=config['views'])\r
103   File "devel/nmbug/nmbug-status", line 76, in write\r
104     self._write_view(database=database, view=view, stream=stream)\r
105   File "devel/nmbug/nmbug-status", line 95, in _write_view\r
106     self._write_threads(threads=threads, stream=stream)\r
107   File "devel/nmbug/nmbug-status", line 197, in _write_threads\r
108     ).format(**message_display_data))\r
109   File "/usr/lib64/python2.6/codecs.py", line 351, in write\r
110     data, consumed = self.encode(object, self.errors)\r
111 UnicodeEncodeError: 'ascii' codec can't encode character u'\u017b' in\r
112   position 176: ordinal not in range(128)\r
113 \r
114 This one is harder...\r
115 \r
116 Tomi\r
117 \r
118 \r
119 >\r
120 > W. Trevor King (17):\r
121 >   nmbug-status: Convert to Python-3-compatible print functions\r
122 >   nmbug-status: Use email.utils instead of rfc822\r
123 >   nmbug-status: Decode Popen output using the user's locale\r
124 >   nmbug-status: Factor config-loading out into read_config\r
125 >   nmbug-status: Add metavars for --config and --get-query\r
126 >   nmbug-status: Consolidate functions and main code\r
127 >   nmbug-status: Don't require write access\r
128 >   nmbug-status: Consolidate HTML header printing\r
129 >   nmbug-status: Add a Python-3-compatible urllib.parse.quote import\r
130 >   nmbug-status: Add Page and HtmlPage for modular rendering\r
131 >   nmbug-status: Normalize table HTML indentation\r
132 >   nmbug-status: Convert from XHTML 1.0 to HTML 5\r
133 >   nmbug-status: Encode output using the user's locale\r
134 >   nmbug-status: Anchor with h3 ids instead of a names\r
135 >   nmbug-status: Quote the title when using it as an id\r
136 >   nmbug-status: Use <code> and <p> markup where appropriate\r
137 >   nmbug-status: Color threads in HTML output\r
138 >\r
139 >  devel/nmbug/nmbug-status | 412 ++++++++++++++++++++++++++++++-----------------\r
140 >  1 file changed, 261 insertions(+), 151 deletions(-)\r
141 >\r
142 > -- \r
143 > 1.8.5.2.8.g0f6c0d1\r
144 >\r
145 > _______________________________________________\r
146 > notmuch mailing list\r
147 > notmuch@notmuchmail.org\r
148 > http://notmuchmail.org/mailman/listinfo/notmuch\r