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

Note that this version of Ubuntu will not be shipping with Python 2. That's kind of a big deal.


I wonder if this will cause much strife. I run ArchLinux, for which the default /usr/bin/python is Python 3. Often I run into issues with (admittedly software not from the repos) which uses the

#!/usr/bin/python

shebang, and expects it to reference Python 2, thus causing breakage.


Ubuntu won't be changing that - /usr/bin/python will still mean Python 2. It just won't be installed by default (if they meet their goal, which looks doubtful for this cycle).


Interesting, that's not recommended by python devs. Ubuntu follows the guideline of keeping /usr/bin/python as Python 2 (which will not be installed by default), and /usr/bin/python3 as Python 3.

ETA: Arch Linux actually did this before there was an "official" guideline. http://www.wefearchange.org/2012/04/python-3-on-desktop-for-...


I guess the reason that I like Arch (new software releases quickly) also caused them to beat the official guideline here :)

Thanks for the pointer.


There's always:

#!/usr/bin/env python

too


which btw wouldn't help at all with op's scenario of Python 2 scripts finding an unexpected Python 3 interpreter.


Exactly. Whenever a script is made, it should have #!/usr/bin/env interpreter# as the first line.

#!/usr/bin/env python2 #!/usr/bin/env python3

Explicitly declaring the required version fixes that problem. In arch, most of the PKGBUILDs will have a line to sed the explicit line into the file in place of the generic python line.


About time too. It's been 3½ years since Python 3 came out. People should've moved to it a long time ago.


I suspect lack of Django support for Python 3 was a factor


Actually the move has and always had a 5 year time frame. We are well within it.

As a side note, I just yesterday tried out the Django 1.5 development trunk in a python3 virtualenv and it all worked. :)


Oh, sure, that wasn't intended as a dig on Django. My point was just the fact that you couldn't run it under Python3 was likely a factor in the slow adoption.



Shipping. To wit: Python 2 is installable, but will not be installed by default.


They won't remove python2k from the repositories any time soon.


Are we getting PHP 5.4 too? I want me some [] and php -S.


5.4.6 is in Quantal right now. Presumably 12.10 will have that.


Great! Then I won't have to rely on someone's ppa for PHP5.4 on Precise.


That was the goal, but it's not happening. 13.04, yes. Promise.


Let me expand: we didn't make it to have python3 be the only shipped python in 12.10 because of several major dependencies. The stumbling blocks (as far as I know---when the rubber hits the road other things might pop up) were twisted, protobuf, and xapian. We have contracted out the work of porting the first two (the results of these efforts will be shipped in 12.10, in universe), and are moving away from the third one.


Just installed beta1. Opened terminal and then:

    $ python --version
    Python 2.7.3


you mean that it uses python 3 for the system, i assume? surely python 2 will be installable from the software centre, just like python3 can be installed now?


They are going to use Python 3 for the system, yes. Python 2 will be available, as expected, in the repo's.

They are encouraging developers to transition their code to Python 3.


Yes, just like tomcat6.


not a python guy but heard this means python<3 scripts will break? no backwards compatibility with the new version?


First sentence is false, second is true (by itself).

Python 3 isn't becoming `/usr/bin/python` - it will be `/usr/bin/python3` and the Python programs that are shipped on the CD will use that. If you thought Python 3 was going to become `/usr/bin/python`, then yes, that would cause backwards compatibility issues.




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

Search: