[PATCH] nmbug: explicitly prefer python3

Tomi Ollila tomi.ollila at iki.fi
Thu Mar 12 09:57:51 PDT 2020


On Thu, Mar 12 2020, Daniel Kahn Gillmor wrote:

> Two years later, I'd like to re-propose this patch that moves nmbug to
> python3.
>
> I have read what PEP 394 says (thanks for the pointer, Trevor!) but in
> practice (a) i do not see debian pointing /usr/bin/python to python3 any
> time in the near future, (b) python2 is officially EOL, and (c) i don't
> have a "python" binary in my $PATH at all any more on the machines where
> i do most of my development work.
>
> Can we please just be done with requiring people who actively develop
> notmuch to keep python 2 installed, or to point some other element named
> python maintained in their path ?

I've been running nmbug with a wrapper that runs python 2.7 (since default
python in that particular machine is python 2.6  -- which doesn't work with
nmbug (or it may but that is complicated, i'm not sure...).

So, to me just doing 1,s/python/python3/ does not affect me in any way
for the time being -- and anyone else who is stuck w/ python 2.7 (i doubt
there are any) could still use python 2.7 the same way...

So, IMO let's get it done =D

>
>            --dkg

Tomi

>
> On Thu 2018-02-08 23:32:11 -0500, Daniel Kahn Gillmor wrote:
>> nmbug and notmuch-report are developer tools.  It's 2018, and all
>> developers should have python3 available.
>>
>> Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
>> ---
>>  devel/nmbug/nmbug          | 2 +-
>>  devel/nmbug/notmuch-report | 5 ++---
>>  2 files changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/devel/nmbug/nmbug b/devel/nmbug/nmbug
>> index c35dd75d..043c1863 100755
>> --- a/devel/nmbug/nmbug
>> +++ b/devel/nmbug/nmbug
>> @@ -1,4 +1,4 @@
>> -#!/usr/bin/env python
>> +#!/usr/bin/env python3
>>  #
>>  # Copyright (c) 2011-2014 David Bremner <david at tethera.net>
>>  #                         W. Trevor King <wking at tremily.us>
>> diff --git a/devel/nmbug/notmuch-report b/devel/nmbug/notmuch-report
>> index a9c2a6ec..a4c13939 100755
>> --- a/devel/nmbug/notmuch-report
>> +++ b/devel/nmbug/notmuch-report
>> @@ -1,10 +1,9 @@
>> -#!/usr/bin/python
>> +#!/usr/bin/env python3
>>  #
>>  # Copyright (c) 2011-2012 David Bremner <david at tethera.net>
>>  #
>>  # dependencies
>> -#       - python 2.6 for json
>> -#       - argparse; either python 2.7, or install separately
>> +#       - python3 or python2.7
>>  #
>>  # This program is free software: you can redistribute it and/or modify
>>  # it under the terms of the GNU General Public License as published by
>> -- 
>> 2.15.1


More information about the notmuch mailing list