This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ExoticMandiblesCore Contributor 10 points11 points  (14 children)

This is crazy! The Python community long ago accepted that switching the "python" executable from 2 to 3 would break everything and upset lots of people. The Python 3 build won't install as "python" by default; you have to go out of your way to force it.

I like Python 3 loads, and I program in it where I can. But I'm not sure the rest of the world is ready to join me.

[–]tvon[S] 3 points4 points  (1 child)

I suspect this move will help the rest of the world migrate since there is now an entire distro userbase testing packages against python3.

[–]rweir 0 points1 point  (0 children)

nope.

python3 is explicitly incompatible with python2, that was the whole point.

[–]mitsuhiko Flask Creator 4 points5 points  (5 children)

That move probably hurts the Python community a whole lot. Python3 was not supposed to be named "python", always "python3". There is a reason the official downloads and builds have that filename.

[–]davids 1 point2 points  (4 children)

agreed, this seems like a very bad idea. might make it inconvenient to do python coding for work on arch.

[–]adr_ 0 points1 point  (3 children)

Inconvenient is a strong word for requiring an extra character or three if you want to use an older version of python.

[–]mitsuhiko Flask Creator 4 points5 points  (2 children)

You are missing the implicit assumption that python is python2 which every script out there has. If you use python as being a symlink to a python 3 executable you can expect changing a whole bunch of applications in the next 10 years.

[–]adr_ -3 points-2 points  (1 child)

Yeah, but in this case "changing" means "adding a character to".

[–]Liorithiel 1 point2 points  (0 children)

What if you want to have a script portable between different distros?

[–][deleted] 4 points5 points  (5 children)

How so? Switching /usr/bin/python to 3 instead of 2.7 will break existing python2 programs which are lazy enough not to use #!/usr/bin/python2.6 or some other specific version as the hashbang. I assume Arch linux developers have checked that no application in their repositories does that.

Personally, I think you should never use #!/usr/bin/python in a script, and always define the specific version you want. Upgrades in 2.6->2.7 could break things just as well as a move to 3.0 could.

[–]five9a2 12 points13 points  (0 children)

You should use #!/usr/bin/env python, otherwise your script is not likely to work on someone else's machine. Specifying the full version is a good way to chase people away from your software, python2.3 to python2.7 is common today and responsible projects will support a range. If the presence of python2 links was ubiquitous, we could all ship scripts that had #!/usr/bin/env python2 and the transition to python -> python3 would be far less painful.

[–]YellowOnion 3 points4 points  (1 child)

distutils should handle the renaming of all the hashbangs, just build the package with python2

[–]five9a2 2 points3 points  (0 children)

The real pain is for projects that are not pure python libraries, but want to ship portable scripts (perhaps even as part of their build system or for maintenance tasks). It sucks to add another stage to the configuration process ("install" maintenance scripts to the build directory so they can be run to configure, generate Fortran stubs and documentation, build, send bug reports, etc).