--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id E5850431FD0\r
+ for <notmuch@notmuchmail.org>; Sat, 1 Nov 2014 01:08:58 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id trZ97GScag9U for <notmuch@notmuchmail.org>;\r
+ Sat, 1 Nov 2014 01:08:48 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id B5F98431FAF\r
+ for <notmuch@notmuchmail.org>; Sat, 1 Nov 2014 01:08:48 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id DAEF31000E0;\r
+ Sat, 1 Nov 2014 10:08:26 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: "W. Trevor King" <wking@tremily.us>, Jesse Rosenthal <jrosenthal@jhu.edu>\r
+Subject: Re: [PATCH] test: Make gen-threads work with python3\r
+In-Reply-To: <20141031174153.GQ15443@odin.tremily.us>\r
+References: <1414776805-30000-1-git-send-email-jrosenthal@jhu.edu>\r
+ <20141031174153.GQ15443@odin.tremily.us>\r
+User-Agent: Notmuch/0.18.1+130~ga61922f (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Sat, 01 Nov 2014 10:08:26 +0200\r
+Message-ID: <m2vbmzfimd.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: quoted-printable\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 01 Nov 2014 08:08:59 -0000\r
+\r
+On Fri, Oct 31 2014, "W. Trevor King" <wking@tremily.us> wrote:\r
+\r
+> On Fri, Oct 31, 2014 at 01:33:25PM -0400, Jesse Rosenthal wrote:\r
+>> We instead initalize the dictionary using the dict comprehension and\r
+>> then update it with the values from the tree. This will work with\r
+>> both python2 and python3.\r
+>\r
+> Dict comprehensions are new in 2.7 [1,2], so this drops support for\r
+> systems where =E2=80=98python=E2=80=99 means =E2=80=98python2.6=E2=80=99.=\r
+ Personally, I'm fine with\r
+> that, but I thought I'd point it out in case 2.6 users wanted to push\r
+> back ;).\r
+\r
+Thanks Trevor. The original changed line:\r
+\r
+- ntree =3D dict(tree, **{child: to_expand[0] for child in children})\r
+\r
+is already incompatible with python 2.6, so this doesn't change the current=\r
+=20\r
+status quo there.\r
+\r
+The above changed to=20\r
+\r
++ ntree =3D dict(tree, **dict((child, to_expand[0]) for child in children))\r
+\r
+works in Python 2.6 (if anyone interested), and it looks the change in this\r
+patch is not difficult to make work in python 2.6 in case anyone\r
+desires to do so...\r
+\r
+Although I have ready-made patch to make the former code work in python 2.6\r
+I've thought that maybe it is just unnecessary burden to support python 2.6\r
+there -- so that people can concentrate on improving tests instead...\r
+\r
+Therefore, +1 for this patch, provided that it works as expected.\r
+\r
+Tomi\r
+\r
+\r
+>\r
+>> diff --git a/test/gen-threads.py b/test/gen-threads.py\r
+>> index 9fbb847..70fb1f6 100644\r
+>> --- a/test/gen-threads.py\r
+>> +++ b/test/gen-threads.py\r
+>> @@ -2,7 +2,6 @@\r
+>> # argv[1]. Each output line is a thread structure, where the n'th\r
+>> # field is either a number giving the parent of message n or "None"\r
+>> # for the root.\r
+>> -\r
+>> import sys\r
+>\r
+> Why remove this blank line?\r
+>\r
+>> from itertools import chain, combinations\r
+>>=20=20\r
+>> @@ -28,6 +27,7 @@ while queue:\r
+>> else:\r
+>> # Expand node to_expand[0] with each possible set of children\r
+>> for children in subsets(free):\r
+>> - ntree =3D dict(tree, **{child: to_expand[0] for child in ch=\r
+ildren})\r
+>> + ntree =3D {child: to_expand[0] for child in children}\r
+>> + ntree.update(tree)\r
+>\r
+> This looks good to me.\r
+>\r
+> Cheers,\r
+> Trevor\r
+>\r
+> [1]: https://docs.python.org/3/whatsnew/2.7.html#other-language-changes\r
+> [2]: http://legacy.python.org/dev/peps/pep-0274/\r
+>\r
+> --=20\r
+> This email may be signed or encrypted with GnuPG (http://www.gnupg.org).\r
+> For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r