Re: [PATCH 1/2] Add Google Inc. to AUTHORS as a contributor.
[notmuch-archives.git] / e3 / ea9ff9c5fbbee0dabc47ae2303cac65ec75cbb
1 Return-Path: <david@tethera.net>\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 17D0A431FBD\r
6         for <notmuch@notmuchmail.org>; Fri, 30 May 2014 06:14:54 -0700 (PDT)\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 29GFD5HQU5Hx for <notmuch@notmuchmail.org>;\r
16         Fri, 30 May 2014 06:14:50 -0700 (PDT)\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
18         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 7E808431FAE\r
21         for <notmuch@notmuchmail.org>; Fri, 30 May 2014 06:14:50 -0700 (PDT)\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
23         (envelope-from <david@tethera.net>)\r
24         id 1WqMe1-0003gl-Kx; Fri, 30 May 2014 10:14:49 -0300\r
25 Received: (nullmailer pid 6869 invoked by uid 1000); Fri, 30 May 2014\r
26         13:14:46 -0000\r
27 From: David Bremner <david@tethera.net>\r
28 To: notmuch@notmuchmail.org\r
29 Subject: [Jakub Wilk] Bug#749890: python3-notmuch: missing header in mbox\r
30         message -> NullPointerError\r
31 User-Agent: Notmuch/0.18 (http://notmuchmail.org) Emacs/24.3.1\r
32         (x86_64-pc-linux-gnu)\r
33 Date: Fri, 30 May 2014 10:14:46 -0300\r
34 Message-ID: <87k393l86x.fsf@zancas.localnet>\r
35 MIME-Version: 1.0\r
36 Content-Type: multipart/mixed; boundary="=-=-="\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Fri, 30 May 2014 13:14:54 -0000\r
50 \r
51 --=-=-=\r
52 Content-Type: text/plain\r
53 \r
54 \r
55 this looks like a bug in the python bindings to me\r
56 \r
57 \r
58 --=-=-=\r
59 Content-Type: message/rfc822\r
60 Content-Disposition: inline\r
61 \r
62 Return-path: <bounces+20140530-bremner=debian.org@packages.qa.debian.org>\r
63 Envelope-to: david@tethera.net\r
64 Delivery-date: Fri, 30 May 2014 09:39:12 -0300\r
65 Received: from quantz.debian.org ([5.153.231.28])\r
66         by yantan.tethera.net with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128)\r
67         (Exim 4.80)\r
68         (envelope-from <bounces+20140530-bremner=debian.org@packages.qa.debian.org>)\r
69         id 1WqM5Y-0003YR-FC\r
70         for david@tethera.net; Fri, 30 May 2014 09:39:12 -0300\r
71 Received: from qa by quantz.debian.org with local (Exim 4.80)\r
72         (envelope-from <bounces+20140530-bremner=debian.org@packages.qa.debian.org>)\r
73         id 1WqM5V-0003Ov-Vh\r
74         for david@tethera.net; Fri, 30 May 2014 12:39:09 +0000\r
75 Received: from buxtehude.debian.org ([140.211.166.26])  from C=NA,ST=NA,\r
76  L=Ankh Morpork,O=Debian SMTP,OU=Debian SMTP CA,CN=buxtehude.debian.org,\r
77  EMAIL=hostmaster@buxtehude.debian.org (verified)       by quantz.debian.org with\r
78  esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128)   (Exim 4.80)     (envelope-from\r
79  <debbugs@buxtehude.debian.org>)        id 1WqM5V-0003OV-Gx     for\r
80  notmuch@packages.qa.debian.org; Fri, 30 May 2014 12:39:09 +0000\r
81 Received: from debbugs by buxtehude.debian.org with local (Exim 4.80)\r
82  (envelope-from <debbugs@buxtehude.debian.org>) id 1WqM5T-0000k8-4S; Fri,\r
83  30 May 2014 12:39:07 +0000\r
84 X-Loop: owner@bugs.debian.org\r
85 Subject: Bug#749890: python3-notmuch: missing header in mbox message ->\r
86  NullPointerError\r
87 Reply-To: Jakub Wilk <jwilk@debian.org>, 749890@bugs.debian.org\r
88 Resent-From: Jakub Wilk <jwilk@debian.org>\r
89 Original-Sender: Jakub Wilk <jwilk@master.debian.org>\r
90 Resent-To: debian-bugs-dist@lists.debian.org\r
91 Resent-CC: jwilk@debian.org, Carl Worth <cworth@debian.org>\r
92 X-Loop: owner@bugs.debian.org\r
93 Resent-Date: Fri, 30 May 2014 12:39:02 +0000\r
94 Resent-Message-ID: <handler.749890.B.14014533741926@bugs.debian.org>\r
95 X-Debian-PR-Message: report 749890\r
96 X-Debian-PR-Package: python3-notmuch\r
97 X-Debian-PR-Keywords: \r
98 X-Debian-PR-Source: notmuch\r
99 Received: via spool by submit@bugs.debian.org id=B.14014533741926 (code B);\r
100  Fri, 30 May 2014 12:39:02 +0000\r
101 Received: (at submit) by bugs.debian.org; 30 May 2014 12:36:14 +0000\r
102 X-Spam-Checker-Version: SpamAssassin 3.3.2-bugs.debian.org_2005_01_02\r
103         (2011-06-06) on buxtehude.debian.org\r
104 X-Spam-Level: \r
105 X-Spam-Status: No, score=-17.8 required=4.0 tests=BAYES_00,FOURLA,\r
106         FROMDEVELOPER,HAS_PACKAGE,RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD,X_DEBBUGS_CC,\r
107         X_DEBBUGS_NO_ACK autolearn=ham version=3.3.2-bugs.debian.org_2005_01_02\r
108 X-Spam-Bayes: score:0.0000 Tokens: new, 17; hammy, 151; neutral, 76;\r
109  spammy,        0. spammytokens: hammytokens:0.000-+--HX-Debbugs-No-Ack:please,\r
110         0.000-+--H*F:U*jwilk, 0.000-+--H*M:jwilk, 0.000-+--H*r:jwilk,\r
111         0.000-+--H*MI:jwilk\r
112 Received: from master.debian.org ([82.195.75.110])      from C=NA,ST=NA,\r
113  L=Ankh Morpork,O=Debian SMTP,OU=Debian SMTP CA,CN=master.debian.org,\r
114  EMAIL=hostmaster@master.debian.org (verified)  by buxtehude.debian.org with\r
115  esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128)   (Exim 4.80)     (envelope-from\r
116  <jwilk@debian.org>)    id 1WqM2g-0000Un-Ea     for submit@bugs.debian.org; Fri,\r
117  30 May 2014 12:36:14 +0000\r
118 Received: from jwilk by master.debian.org with local (Exim 4.80)\r
119  (envelope-from <jwilk@debian.org>)     id 1WqM2e-0005im-An     for\r
120  submit@bugs.debian.org; Fri, 30 May 2014 12:36:12 +0000\r
121 Date: Fri, 30 May 2014 14:36:09 +0200\r
122 From: Jakub Wilk <jwilk@debian.org>\r
123 To: Debian Bug Tracking System <submit@bugs.debian.org>\r
124 Message-ID: <20140530123609.GA5727@jwilk.net>\r
125 X-Reportbug-Version: 6.5.0\r
126 User-Agent: Mutt/1.5.23 (2014-03-12)\r
127 Sender: Jakub Wilk <jwilk@master.debian.org>\r
128 Delivered-To: submit@bugs.debian.org\r
129 Delivered-To: notmuch@packages.qa.debian.org\r
130 Precedence: list\r
131 X-Loop: notmuch@packages.qa.debian.org\r
132 X-Debian: PTS\r
133 X-Debian-Package: notmuch\r
134 X-PTS-Package: notmuch\r
135 X-PTS-Keyword: bts\r
136 List-Unsubscribe: <mailto:pts@qa.debian.org?body=unsubscribe%20notmuch>\r
137 Resent-Sender: Debian QA <qa@quantz.debian.org>\r
138 MIME-Version: 1.0\r
139 Content-Type: multipart/mixed; boundary="====-=-="\r
140 \r
141 --====-=-=\r
142 Content-Type: text/plain; format=flowed\r
143 Content-Disposition: inline\r
144 \r
145 Package: python3-notmuch\r
146 Version: 0.18-3\r
147 Severity: minor\r
148 \r
149 If a message starts with the "From " postmark (i.e., it's in the mbox \r
150 format), and you ask the get_header() method for a non-existent header, \r
151 it raises NullPointerError, instead of returning empty string.\r
152 \r
153 Now, I realize that support for indexing mbox files has been dropped, \r
154 but users might still have them on disk, indexed by an old version of \r
155 notmuch. This is how I discovered this bug.\r
156 \r
157 I've attached my crafted mail archive (which I indexed with wheezy's \r
158 notmuch), and the script that I used for testing:\r
159 \r
160 $ python3 test.py\r
161 OK\r
162 NullPointerError()\r
163 \r
164 \r
165 -- System Information:\r
166 Debian Release: jessie/sid\r
167   APT prefers unstable\r
168   APT policy: (990, 'unstable'), (500, 'stable')\r
169 Architecture: amd64 (x86_64)\r
170 \r
171 Kernel: Linux 3.14-1-amd64 (SMP w/1 CPU core)\r
172 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)\r
173 Shell: /bin/sh linked to /bin/dash\r
174 \r
175 Versions of packages python3-notmuch depends on:\r
176 ii  libnotmuch3  0.18-3+b1\r
177 \r
178 -- \r
179 Jakub Wilk\r
180 \r
181 --====-=-=\r
182 Content-Type: application/gzip\r
183 Content-Disposition: attachment; filename=mail.tar.gz\r
184 Content-Transfer-Encoding: base64\r
185 \r
186 H4sIAPd3iFMAA+3UTW6DMBCGYdacYnKCjI0dVA4QddNVTkCaqCI1suQQRb19CbsitVk5P+r7bMbI\r
187 SAwefe7bLiyLvHRUez/V0bxOa2MrZ7Wuam8LNVa1KsRn7mtyOg5tGltJMQ5/vXdtf/5zT6K/zP8j\r
188 xl3Gb1zOY+Xc7/Mf92bzX3lXyE0O8Z/Pf3PaHvbvQyOv+xCinGMKu0VZ/ni6d4/IZ8r/ts0Z/6v5\r
189 N8bM8++cJ/+3sE6xl8O5C58i69TJW/sllYpxjb406sWqcSWXBAAAAAAAAAAAAAAAD+0bvcL6SAAo\r
190 AAA=\r
191 --====-=-=\r
192 Content-Type: text/x-python\r
193 Content-Disposition: attachment; filename=test.py\r
194 \r
195 #!/usr/bin/python3\r
196 \r
197 import notmuch\r
198 \r
199 with notmuch.Database() as db:\r
200     query = db.create_query('')\r
201     for msg in query.search_messages():\r
202         try:\r
203             assert msg.get_header('Subject') == 'Hello world!'\r
204             assert msg.get_header('Does-Not-Exist') == ''\r
205         except Exception as exc:\r
206             print(ascii(exc))\r
207         else:\r
208             print('OK')\r
209 \r
210 # vim:ts=4 sw=4 et\r
211 \r
212 --====-=-=--\r
213 \r
214 --=-=-=--\r