[PATCH] nmbug: explicitly prefer python3

Tomi Ollila tomi.ollila at iki.fi
Wed Feb 14 21:37:53 PST 2018


On Mon, Feb 12 2018, W. Trevor King wrote:

> On Sun, Feb 11, 2018 at 10:56:36PM -0500, Daniel Kahn Gillmor wrote:
>> On Fri 2018-02-09 12:46:24 -0800, W. Trevor King wrote:
>> > From later on in PEP 394 [1]:
>> >
>> >   It is anticipated that there will eventually come a time where
>> >   the third party ecosystem surrounding Python 3 is sufficiently
>> >   mature for this recommendation to be updated to suggest that the
>> >   python symlink refer to python3 rather than python2.
>> >
>> > And from right up at the beginning [2]:
>> >
>> >   however, end users should be aware that python refers to python3
>> >   on at least Arch Linux (that change is what prompted the
>> >   creation of this PEP), so python should be used in the shebang
>> >   line only for scripts that are source compatible with both
>> >   Python 2 and 3.
>> >
>> > On my Gentoo system, I've also selected Python 3 to back ‘python’.
>> > So I think your solution should be “add a /usr/bin/python symlink
>> > to your python3”, not “claim that nmbug is only compatible with
>> > Python 3”.
>> 
>> Presumably you still have /usr/bin/python3 in addition to
>> /usr/bin/python as well.  So the one thing i think we're both
>> agreeing on is that we use nmbug with python 3.
>
> Yup.  But I'm not sure that is the case for all nmbug users.
>
>> It looks to me like you're asking me to change my operating system
>> to accomodate your naming preference.
>
> No, I'm asking you to change your operating system to accommodate PEP
> 394's naming preferences.  As PEP 394 points out, Arch made the switch
> to using ‘python’ for ‘python3’ long ago.  You'd just be following
> their lead.
>
>> I'm asking that we put the onus on developers who really insist on
>> using nmbug with python 2.7 maintain their own local patch against
>> nmbug, rather than other developers either modifying their local
>> operating system in potentially disastrous ways (/usr/bin/python as
>> python3 would cause severe breakage for at least one python2-only
>> tool i rely on daily, sadly)…
>
> That Python-2-only tool should be using python2 in its shebang.  This
> is exactly the sort of issue that PEP 394 was created to address.
> Once you patch that tool to follow PEP 394, you should have no problem
> adjusting your system to also follow PEP 394.
>
>> … or carrying their own local patch against nmbug.
>
> A shebang with ‘python’ should work with everyone (and it's what PEP
> 394 recommends for scripts that work with both Python major versions).
> The only folks who would need a local patch would be folks with
> systems like your current plan that contain no ‘python’ command at
> all.  I see no upside to such systems, while I do see upsides to
> systems with just a ‘python2’ (and a ‘python’ alias for it) or just a
> ‘python3’ (and a ‘python’ alias for it).
>
>> i'll drop this request now because i don't understand the origin of
>> the strength of your reaction, and already wish i'd spent the time
>> i've lost on it on something more productive :( I hope if you change
>> your mind you'll come back and recommend it here.
>
> I like nmbug and have put some time into it.  But I'm not the notmuch
> maintainer, and as you point out, nmbug would still work for me with a
> python3 shebang.  So if the maintainers want to switch to python3 it's
> no skin off my back.  They can always wait and field requests from any
> python2-only users if/when those users file complaints (which may be
> never).

Thank you both for interesting read. Based on these I cannot say which
way this should go (personally I prefer faster conversion to python3
but perhaps that is not good readson to put python3 in hashbang).
In this case I value Trevor as valid notmuch maintainer as anyone
else who has done significant work for nmbug.

Tomi

>
> Cheers,
> Trevor
>
> -- 
> This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
> For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy


More information about the notmuch mailing list