From fbb0d46f62ec38aa07719965a64c792b30c8270c Mon Sep 17 00:00:00 2001 From: Gaute Hope Date: Sat, 9 Aug 2014 15:58:58 +0200 Subject: [PATCH] Re: [PATCH] doc/prerst2man.py: swap execfile with an exec call --- cf/da8f340f95e572687060873039dc57b8080e00 | 117 ++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 cf/da8f340f95e572687060873039dc57b8080e00 diff --git a/cf/da8f340f95e572687060873039dc57b8080e00 b/cf/da8f340f95e572687060873039dc57b8080e00 new file mode 100644 index 000000000..85e9447fd --- /dev/null +++ b/cf/da8f340f95e572687060873039dc57b8080e00 @@ -0,0 +1,117 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 109A7431FBD + for ; Sat, 9 Aug 2014 06:59:08 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id MsMP0snf74K9 for ; + Sat, 9 Aug 2014 06:59:00 -0700 (PDT) +Received: from mail-qc0-f179.google.com (mail-qc0-f179.google.com + [209.85.216.179]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 5A7A3431FAE + for ; Sat, 9 Aug 2014 06:59:00 -0700 (PDT) +Received: by mail-qc0-f179.google.com with SMTP id m20so283952qcx.10 + for ; Sat, 09 Aug 2014 06:58:59 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:mime-version:in-reply-to:references:date + :message-id:subject:from:to:cc:content-type; + bh=xclzp3T28HhxciC+B8maouTH75fkED5U793Yi1BEkEw=; + b=HPAdzscebpCGWHjgwhVTTcnTdcS4sAVepz2caAk4o42Okp6UVQRp2Vo+E2BbQwjegn + 00WtBQ7gfjWLxcoIRkg8M5qEW/02QlGNtNKc7CxGhLSQaiqi5Zh46bWdLWkAVGEfq9V/ + QT7+BQy6dg80BWEUpBCbTCCHhrStP57avT57Zjvg6GfpwO/jNi9smUwloj3Qc4PXINaP + uMzfuDFkx9eVKyMYd/y8X0R4UT3gJ52pGDiJeAKgUv4LXrczCyE8SP2jvOxwuA4NFZlM + VYl1MqSDaQr8FGdxJVku9OqVbmR5kxXJx58fC5WOTp9N2VOZFdFLQ5lmf3sIpJUxa0lI + ryWA== +X-Gm-Message-State: + ALoCoQkAAhJDQcyMzP7SlZG52oczOZX3j8P5kth4N5ylOUhIqDiQi1QIlWXi9hgY3UoQIhFpamjs +MIME-Version: 1.0 +X-Received: by 10.140.83.168 with SMTP id j37mr29130434qgd.42.1407592738683; + Sat, 09 Aug 2014 06:58:58 -0700 (PDT) +Received: by 10.140.86.148 with HTTP; Sat, 9 Aug 2014 06:58:58 -0700 (PDT) +In-Reply-To: +References: <1407591591-25203-1-git-send-email-eg@gaute.vetsj.com> + +Date: Sat, 9 Aug 2014 15:58:58 +0200 +Message-ID: + +Subject: Re: [PATCH] doc/prerst2man.py: swap execfile with an exec call +From: Gaute Hope +To: Tomi Ollila +Content-Type: text/plain; charset=UTF-8 +Cc: notmuch +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 09 Aug 2014 13:59:08 -0000 + +Aight! Whatever works. This bit me today at least, building notmuch +git on Arch Linux fails without it. + +Cheers, Gaute + +On Sat, Aug 9, 2014 at 3:56 PM, Tomi Ollila wrote: +> On Sat, Aug 09 2014, Gaute Hope wrote: +> +>> at some point in python 3.* execfile was removed. per +>> http://stackoverflow.com/questions/6357361/alternative-to-execfile-in-python-3-2 +>> the execefile has been replaced in the same manner as python 2to3 helper +>> script would do. +>> +>> tested on python 3.4.1 and 2.7.8. +>> --- +> +> Thanks for the patch -- I have use the idea elsewhere with ipython :D +> +> Trevor has a patch series which takes care e.g. of this: +> +> id:"8cc9dd580ad672527e12f43706f9803b2c8e99d8.1405220724.git.wking@tremily.us" +> +> http://article.gmane.org/gmane.mail.notmuch.general/18661 +> +> +> Tomi +> +> +>> doc/prerst2man.py | 3 ++- +>> 1 file changed, 2 insertions(+), 1 deletion(-) +>> +>> diff --git a/doc/prerst2man.py b/doc/prerst2man.py +>> index 437dea9..3f85c0c 100644 +>> --- a/doc/prerst2man.py +>> +++ b/doc/prerst2man.py +>> @@ -10,7 +10,8 @@ outdir = argv[2] +>> if not isdir(outdir): +>> makedirs(outdir, 0o755) +>> +>> -execfile(sourcedir + "/conf.py") +>> +filename = sourcedir + "/conf.py" +>> +exec(compile(open(filename, "rb").read(), filename, 'exec')) +>> +>> +>> def header(file, startdocname, command, description, authors, section): +>> -- +>> 2.0.3 +>> +>> _______________________________________________ +>> notmuch mailing list +>> notmuch@notmuchmail.org +>> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2