--- /dev/null
+Return-Path: <bremner@tesseract.cs.unb.ca>\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 A9CEE431FBC\r
+ for <notmuch@notmuchmail.org>; Sat, 3 Jan 2015 05:21:46 -0800 (PST)\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 iAkXO9wAvqGg for <notmuch@notmuchmail.org>;\r
+ Sat, 3 Jan 2015 05:21:43 -0800 (PST)\r
+Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
+ (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 817F4431FB6\r
+ for <notmuch@notmuchmail.org>; Sat, 3 Jan 2015 05:21:43 -0800 (PST)\r
+Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
+ (envelope-from <bremner@tesseract.cs.unb.ca>)\r
+ id 1Y7OeF-0006PZ-6z; Sat, 03 Jan 2015 09:21:43 -0400\r
+Received: (nullmailer pid 2607 invoked by uid 1000); Sat, 03 Jan 2015\r
+ 13:21:38 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] build: eliminate use of python execfile command\r
+Date: Sat, 3 Jan 2015 14:21:22 +0100\r
+Message-Id: <1420291282-2553-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.1.3\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, 03 Jan 2015 13:21:46 -0000\r
+\r
+As discussed in\r
+id:8cc9dd580ad672527e12f43706f9803b2c8e99d8.1405220724.git.wking@tremily.us,\r
+execfile is unavailable in python3.\r
+\r
+The approach of this commit avoids modifying the python module path,\r
+which is arguably preferable since it avoids potentially accidentally importing a module from the wrong place.\r
+---\r
+ devel/release-checks.sh | 2 +-\r
+ doc/prerst2man.py | 3 ++-\r
+ 2 files changed, 3 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/devel/release-checks.sh b/devel/release-checks.sh\r
+index 797d62a..ae02f55 100755\r
+--- a/devel/release-checks.sh\r
++++ b/devel/release-checks.sh\r
+@@ -130,7 +130,7 @@ else\r
+ fi\r
+ \r
+ echo -n "Checking that python bindings version is $VERSION... "\r
+-py_version=`python -c "execfile('$PV_FILE'); print __VERSION__"`\r
++py_version=`python -c "with open('$PV_FILE') as vf: exec(vf.read()); print __VERSION__"`\r
+ if [ "$py_version" = "$VERSION" ]\r
+ then\r
+ echo Yes.\r
+diff --git a/doc/prerst2man.py b/doc/prerst2man.py\r
+index 437dea9..968722a 100644\r
+--- a/doc/prerst2man.py\r
++++ b/doc/prerst2man.py\r
+@@ -10,7 +10,8 @@ outdir = argv[2]\r
+ if not isdir(outdir):\r
+ makedirs(outdir, 0o755)\r
+ \r
+-execfile(sourcedir + "/conf.py")\r
++with open(sourcedir + "/conf.py") as cf:\r
++ exec(cf.read())\r
+ \r
+ \r
+ def header(file, startdocname, command, description, authors, section):\r
+-- \r
+2.1.3\r
+\r