unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] doc/prerst2man.py: swap execfile with an exec call
@ 2014-08-09 13:39 Gaute Hope
  2014-08-09 13:56 ` Tomi Ollila
  0 siblings, 1 reply; 3+ messages in thread
From: Gaute Hope @ 2014-08-09 13:39 UTC (permalink / raw)
  To: notmuch

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.
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] doc/prerst2man.py: swap execfile with an exec call
  2014-08-09 13:39 [PATCH] doc/prerst2man.py: swap execfile with an exec call Gaute Hope
@ 2014-08-09 13:56 ` Tomi Ollila
  2014-08-09 13:58   ` Gaute Hope
  0 siblings, 1 reply; 3+ messages in thread
From: Tomi Ollila @ 2014-08-09 13:56 UTC (permalink / raw)
  To: Gaute Hope, notmuch

On Sat, Aug 09 2014, Gaute Hope <eg@gaute.vetsj.com> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] doc/prerst2man.py: swap execfile with an exec call
  2014-08-09 13:56 ` Tomi Ollila
@ 2014-08-09 13:58   ` Gaute Hope
  0 siblings, 0 replies; 3+ messages in thread
From: Gaute Hope @ 2014-08-09 13:58 UTC (permalink / raw)
  To: Tomi Ollila; +Cc: notmuch

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 <tomi.ollila@iki.fi> wrote:
> On Sat, Aug 09 2014, Gaute Hope <eg@gaute.vetsj.com> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-09 13:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-09 13:39 [PATCH] doc/prerst2man.py: swap execfile with an exec call Gaute Hope
2014-08-09 13:56 ` Tomi Ollila
2014-08-09 13:58   ` Gaute Hope

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).