[arch-general] a plea for python 2

Sander Jansen s.jansen at gmail.com
Thu Dec 15 00:06:00 EST 2011


On Wed, Dec 14, 2011 at 5:44 PM, Thomas Dziedzic <gostrc at gmail.com> wrote:
> On Wed, Dec 14, 2011 at 5:19 PM, Sander Jansen <s.jansen at gmail.com> wrote:
>> On Wed, Dec 14, 2011 at 5:05 PM, Thomas Dziedzic <gostrc at gmail.com> wrote:
>>> On Wed, Dec 14, 2011 at 5:00 PM, Thomas Bächler <thomas at archlinux.org> wrote:
>>>> Am 14.12.2011 23:24, schrieb Evan Martin:
>>>>> What I don't understand is why you're manually patching upstream
>>>>> software to rewrite references from /usr/bin/python to
>>>>> /usr/bin/python2.  This sort of forking is exactly the sort of
>>>>> divergence (like how Ubuntu modified their GTK to add their own
>>>>> specific hooks) that I was fleeing from when I came to Arch.
>>>>
>>>> There's no forking here. Python 2 is end-of-life, python 3 is current.
>>>> Applications that set a 'python' shebang, but require 'python2' are
>>>> *broken*, we *fix* them.
>>>>
>>>
>>> This is how I feel about the current situation also.
>>>
>>> The pep clearly defines that you should only be using python2 or
>>> python3 in your shebangs, and that python should be ideally used only
>>> to invoke interactive sessions.
>>>
>>> The fact that programmers and distro python packagers ignore this is
>>> not our fault.
>>
>> "Until the conventions described in this PEP are more widely adopted,
>> having python invoke python2 will remain the recommended option."
>
> The full quote is:
>
> "More conservative distributions that are less willing to tolerate
> breakage of third party scripts continue to alias it to python2. Until
> the conventions described in this PEP are more widely adopted, having
> python invoke python2 will remain the recommended option."

Correct, but since the second part isn't only restricted to
"conservative" distribution, I didn't feel a need to quote the first
part.



> Also, when do you suppose "widely adopted" will occur? If you leave
> space for interpretation, then expect opinions that don't match yours.
> This is a recommendation and someone is going to have to take the
> first step eventually.
> Here is a metaphor in the spirit of the season:
> Arch is the snowplow that is shoveling the snow to the sides of the
> road to make it easier for other distros to pass.

Well, I don't care either way.

As you said yourself, new programs should use python2 or python3
instead of relying on python. Considering the amount of python2 code
vs python 3, Arch definitely took the more expensive approach (in
terms of supporting existing python 2 code) in aliasing python to
python3, while a perfectly valid approach and less burdensome and
backward compatible way would have been to alias it to python2.

No point in changing it now, but perhaps this could be used as a
valuable lesson when python4 comes around. :)

Cheers,

Sander


More information about the arch-general mailing list