Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One of the issues is that almost every Linux distro is still shipping 2.7+ (and with good reason, there's a lot of code that won't run in 3.0 still).

I think now that 2.7 is the last we will start to see a bit more migrate.

Edit: I didn't mean they aren't shipping 3.0, but that the default is still 2.7.x



That's simply not true, unless perhaps you actually mean "almost every Linux distro" (i.e. including the bulk of distros that have a whole of five users and release once in a blue moon).

The fact is that almost every major distro is shipping Python 3, and often has been for several releases/years: Fedora, Ubuntu, openSUSE, Debian, Gentoo, ArchLinux ... and many of these also have anywhere from dozens to hundreds of Python 3 libraries packaged.

If you mean that /usr/bin/python still points to Python 2 on most of these (in fact all of them except for ArchLinux): True, and that is unlikely to change, possibly never. It's my understanding that this is in keeping with upstream's wishes (from discussions on python-devel and python-porting): bin/python is to remain Python 2 with python3 being the right way to run the Python 3 interpreter.


That's so idiotic, I can't believe it might be the consensus on the python lists. It's exactly the right approach if you want to keep everyone on python 2 forever.

Linux developers and sysadmins are lazy by default (with good reasons: they have a lot to do). To make them get off their arses, you have to switch defaults and scream loudly when stuff breaks, otherwise they'll never bother.

If the problem is that it will break package xyz that is so old and completely unmaintained that nobody can fix it, well, it's a good reason to drop a zombie package. If your code depends on a zombie package, things would have broken down sooner or later anyway.


Sorry, you are right, I did mean that /usr/bin/python is usually 2.7.

For someone just starting out with python (on linux anyways) that means they are probably going to fire up that interpreter first.

I was wondering myself actually if any of the distros would switch to 3.0. I think a lot of packages would break if that were to happen.

As you've said, Arch has already switched but their package release isn't really typical for most distros.


Ubuntu's Python maintainer Barry Warsaw recently announced their goal to have no Python 2 in the "main" part of the repositories by their April 2014 release: http://lwn.net/Articles/469939/

I think that's probably a too aggressive schedule to actually keep, but here's hoping.


I'm curious if a distribution like RedHat will ever link /usr/bin/python to python3 instead of python2, the way Arch did. Arch gets away with it because it's a bleeding-edge rolling-release distro, but a distro like CentOS that prides itself on stability has much more to lose. This is the only real point of uncertainty, if you ask me.


I think they won't, that it's no longer a point of uncertainty, and that Arch essentially made a mistake in switching their /usr/bin/python prematurely.

The consensus from Python list discussions like "Shebang lines for Python 3" and "Support the /usr/bin/python2 symlink upstream" seemed to be that /usr/bin/python is to remain Python 2 indefinitely and that newly-written scripts should call python2 or python3 explicitly. If I recall right Guido's stance was the latter, but leaving plain python up to distros.

There's also PEP 394: http://www.python.org/dev/peps/pep-0394/

This is further cemented, if you will, by the new Windows launcher in 3.3 that extends shebang support to that platform and supports the same mappings.

That said, one of the KDE applications I maintain contains a fair amount of Python code, and since I consider Python 3 to be a much nicer language, it of course runs fine on 3.x. And purely from an emotional POV the fact that the Arch packages get to install those scripts without their usual sed call to replace "python" with "python2" does bring a smile to my face.


Arch moved to python3 well over a year ago.

Python2 is still in base-devel, but /usr/bin/python symlinks to python3, not python2.


You are right, I remember seeing that on my laptop.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: