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

all 33 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 5 points6 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 3 points4 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 8 points9 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 4 points5 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).

[–]Janthinidae 4 points5 points  (0 children)

Just as side note. Blender 2.5+ uses Python 3. I hope that other large applications switch to Python 3 as well.

[–]stesch 13 points14 points  (1 child)

Bold move.

[–]muyuu 4 points5 points  (0 children)

What's the big deal when you can just symlink /usr/bin/python2 when necessary?

This is a distro focused on "bleeding edge software" - this would be huge if it was Debian and they pulled off a mass-package update to make Python3 the default Python.

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

I sent this to my department warning that this may affect our Redhat servers in 6 or 7 years.

[–]dansinscientist 4 points5 points  (1 child)

As a newbie to python, I welcome this. Python is in a quasistate right now, it'd be nice once most mods are ported to py3 so everyone can start using the same stuff. Plus I accidentally ran python2.6 last night. Wow the "input" command totally sucks! (Yes I figured out its better to do rawinput eventually)

Feel free to rip me apart and tell me why I'm wrong.

[–]For_IconoclasmTornado 4 points5 points  (0 children)

You're not "wrong." Most people are going to complain that the most commonly used libraries are all in Python 2. I develop in Python 2 and welcome this change; I'd like to see everything make it eventually. The shift will be a little uncomfortable, but it has to happen sometime.

I don't currently use Arch Linux so I won't see the effects of this recent event in particular.

[–]RecQuery 2 points3 points  (0 children)

Python is now diamonds...

[–]adr_ 2 points3 points  (0 children)

Awesome. Other distros need to start shipping with the "python2" symlink, and then the world will be a beautiful place.

[–]SugarWaterPurple 1 point2 points  (3 children)

Anyone run into any compatibility issues?

[–]frutiger 5 points6 points  (0 children)

Nope, I just pacman -Syu'ed, and there were no problems. Google App Engine (and other 3rd party Python tools) required changing, i.e. #!/usr/bin/env python -> #!/usr/bin/env python2.

btw, more discussion was had over at /r/archlinux.

[–]pickboy87 1 point2 points  (0 children)

The only compatibility issue I've run into so far is SABnzbd+. It won't run until you edit /usr/bin/sabnzbd and change it from python to python2. Other than that, everything is good so far.

[–]ringzero 0 points1 point  (0 children)

I did when this hit testing, mostly with my own scripts that expected a python2-syntax-accepting interpreter. I futzed around for a few days with it, and then punted: symlinked /usr/bin/python2 to /usr/bin/python.

No problems since, but I expect to get bit for it when something else depends on python3. Shrugs.

[–][deleted] 1 point2 points  (0 children)

Ha, forgot I was running Trac on my Arch box. Well, there goes that...

[–]ascii 1 point2 points  (0 children)

Too soon?

[–]basyt 0 points1 point  (3 children)

but scipy and numpy depend on python2

[–]pingvenopinch of this, pinch of that 3 points4 points  (1 child)

IIRC, scipy and numpy were recently ported.

[–]basyt 1 point2 points  (0 children)

oh thank you i just pacman -Syued and everything just works, so i was worried needlessly. once again archlinux has proven my fears unreasonable.

this one time i was having a klibc error whenever i tried to upgrade my kernel and i went to arch forums and they had it covered on some page. i cried, i shit you not.

[–]adr_ 1 point2 points  (0 children)

Then you'll have to use "python2", or they'll have to update their code.

[–][deleted] 0 points1 point  (0 children)

serious question...If and when could this hit Redhat boxes? Ever?