News for hackers. Stuff that matters.
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by zacharyvoase on Thursday September 06, 2012 @07:49PM (#4486940)
Note that this version of Ubuntu will not be shipping with Python 2. That's kind of a big deal.
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by pserwylo on Thursday September 06, 2012 @08:51PM (#4487155)
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.

Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by takluyver on Thursday September 06, 2012 @09:01PM (#4487184)
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).
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by sp332 on Friday September 07, 2012 @08:32AM (#4488709)
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-...

Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by pserwylo on Saturday September 08, 2012 @12:50AM (#4492277)
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.

Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by h00k on Thursday September 06, 2012 @10:38PM (#4487455)
There's always:

#!/usr/bin/env python

too

Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by pilif on Friday September 07, 2012 @02:41AM (#4487906)
which btw wouldn't help at all with op's scenario of Python 2 scripts finding an unexpected Python 3 interpreter.
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by nnnnni on Friday September 07, 2012 @07:46AM (#4488578)
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.

Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by w1ntermute on Thursday September 06, 2012 @08:51PM (#4487153)
About time too. It's been 3½ years since Python 3 came out. People should've moved to it a long time ago.
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by packetslave on Thursday September 06, 2012 @09:14PM (#4487219)
I suspect lack of Django support for Python 3 was a factor
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by gitarr on Friday September 07, 2012 @02:18AM (#4487858)
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. :)

Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by packetslave on Friday September 07, 2012 @07:01PM (#4491609)
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.
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by zurn on Friday September 07, 2012 @12:53AM (#4487738)
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by zacharyvoase on Friday September 07, 2012 @01:13AM (#4487759)
Shipping. To wit: Python 2 is installable, but will not be installed by default.
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by ch0wn on Friday September 07, 2012 @03:26AM (#4487965)
They won't remove python2k from the repositories any time soon.
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by TazeTSchnitzel on Friday September 07, 2012 @04:06AM (#4488066)
Are we getting PHP 5.4 too? I want me some [] and php -S.
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by chipaca on Friday September 07, 2012 @06:46AM (#4488456)
5.4.6 is in Quantal right now. Presumably 12.10 will have that.
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by TazeTSchnitzel on Friday September 07, 2012 @07:39AM (#4488568)
Great! Then I won't have to rely on someone's ppa for PHP5.4 on Precise.
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by chipaca on Friday September 07, 2012 @06:36AM (#4488438)
That was the goal, but it's not happening. 13.04, yes. Promise.
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by chipaca on Friday September 07, 2012 @07:09AM (#4488505)
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.
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by tebeka on Friday September 07, 2012 @12:50PM (#4490001)
Just installed beta1. Opened terminal and then:

    $ python --version
    Python 2.7.3
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by andrewcooke on Thursday September 06, 2012 @07:55PM (#4486957)
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?
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by biomechanica on Thursday September 06, 2012 @08:01PM (#4486979)
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.

Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by brokenparser on Thursday September 06, 2012 @08:03PM (#4486985)
Yes, just like tomcat6.
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by propercoil on Thursday September 06, 2012 @10:38PM (#4487458)
not a python guy but heard this means python<3 scripts will break? no backwards compatibility with the new version?
Re:Ubuntu announces 12.10 (Quantal Quetzal) Beta 1 by briancurtin on Friday September 07, 2012 @01:13AM (#4487758)
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.