News for hackers. Stuff that matters.
Re:Ask HN: What do you want to see in Ubuntu 17.10? by lucky_cloud on Friday March 31, 2017 @08:39AM (#14003064)
- FLAVOR: Ubuntu Server

- HEADLINE: Python 3 as default

- DESCRIPTION: In lieu of a description, I'll just link to this: https://pythonclock.org

- ROLE/AFFILIATION: Developer, sys admin

Re:Ask HN: What do you want to see in Ubuntu 17.10? by rlpb on Friday March 31, 2017 @11:03AM (#14004485)
Python 3 is installed by default, and Python 2 is no longer installed by default on Ubuntu Server since 16.04.

Both versions can be installed concurrently. Python 2 is available under /usr/bin/python2 if it is installed. Python 3 is available under /usr/bin/python3 if it is installed.

/usr/bin/python points to Python 2 (or nothing, if Python 2 is not installed). This is the upstream recommendation from PEP 394 (https://www.python.org/dev/peps/pep-0394/) and I don't see Ubuntu diverging from this unless upstream's recommendation changes.

Re:Ask HN: What do you want to see in Ubuntu 17.10? by dustinkirkland on Monday April 03, 2017 @05:30PM (#14027353)
Everything @rlpb just said here is spot on ;-) Definitive +1.
Re:Ask HN: What do you want to see in Ubuntu 17.10? by marcoceppi on Friday March 31, 2017 @09:16AM (#14003353)
I agree, I usually update defaults so that python => python3. However, PEP has some guidance on how this should be handled[1].

I imagine Ubuntu (Debian, et al) is following these guidelines. It would be cool to have a push for those who still depend not only on Python2 but on `/usr/bin/python` being py2 to update their app - or at least update their packaging :)

[1]: https://www.python.org/dev/peps/pep-0394/

Re:Ask HN: What do you want to see in Ubuntu 17.10? by hyperknot on Friday March 31, 2017 @09:15AM (#14003347)
Opposing view: This would make me stay on 16.04 LTS for a long long time.
Re:Ask HN: What do you want to see in Ubuntu 17.10? by thom_nic on Friday March 31, 2017 @09:36AM (#14003577)
Can you explain why? Assuming you could still `apt-get install python27` and `update-alternatives` to symlink that back to the default `python`, no?
Re:Ask HN: What do you want to see in Ubuntu 17.10? by e12e on Friday March 31, 2017 @12:48PM (#14005608)
I believe python upstream recommends that "python" is python2 and python3.x is "python3"?[1] (Although, that does not jive with official python packages for windows, which is both annoying and confusing - the pep governs "unix like" systems - eg. including linux subsystem for windows, but excluding python on windows...):

[1] https://www.python.org/dev/peps/pep-0394/

Re:Ask HN: What do you want to see in Ubuntu 17.10? by hyperknot on Friday March 31, 2017 @09:46AM (#14003695)
The default Python on any system is the only one which is really well tested and works with all the not-trivial-to-compile packages. Making py3 the default is exactly for deprecating py2 support, thus an apt-get install python27 would never have the wide range of apt installed packages, like it does now.
Re:Ask HN: What do you want to see in Ubuntu 17.10? by dijit on Friday March 31, 2017 @10:59AM (#14004450)
To be honest, new software should not be being developed on the 2.x line, so if it's not battletested now, it should never be.

But thats my opinion of course. We need to move the industry forward eventually and 95% of useful plugins/modules have already been ported.

It's time for py3 as a first class citizen.

Re:Ask HN: What do you want to see in Ubuntu 17.10? by tobltobs on Friday March 31, 2017 @03:28PM (#14007286)
I don't get the logic behind your battletested thought.

Generally it might be true that finally python 3 is now the default for new projects but that doesn't mean that there will be a switch to python 3 as default enviroment. There are still a lot of base libs which are not ported to python 3. Most often nobody has interest in porting them. Some are, but then often as a complete rewrite, which are not backwards compatible.

Until Python 3 is the default env it will take a few more years.

Re:Ask HN: What do you want to see in Ubuntu 17.10? by Scarblac on Wednesday April 05, 2017 @05:10PM (#14045659)
In 3 years, Python 2 will not be maintained anymore. It should really not be used for anything important in 18.04 LTS anymore, because that'll need to be supported for longer.
Re:Ask HN: What do you want to see in Ubuntu 17.10? by compuguy on Friday March 31, 2017 @02:59PM (#14006998)
Ansible only works with python 2.x (with beta 3.x support).
[dead]
Re:Ask HN: What do you want to see in Ubuntu 17.10? by tobltobs on Friday March 31, 2017 @11:03AM (#14004496)
On a server you are the snowflake with your Python 3 desire. Do you not use venv for applications?
Re:Ask HN: What do you want to see in Ubuntu 17.10? by tobltobs on Friday March 31, 2017 @09:05AM (#14003256)
Wouldn't this mess up a lot of current server installations?
Re:Ask HN: What do you want to see in Ubuntu 17.10? by raverbashing on Friday March 31, 2017 @09:09AM (#14003294)
You can't update a major version and expect things like this to not change

(What I mean is: sysadmins are aware of this and won't "just" upgrade to a new major version without considering such factors - at least they shouldn't do that ;) )

Re:Ask HN: What do you want to see in Ubuntu 17.10? by rspeer on Friday March 31, 2017 @11:57AM (#14005075)
It already happened, so probably not.
Re:Ask HN: What do you want to see in Ubuntu 17.10? by tobltobs on Friday March 31, 2017 @03:33PM (#14007332)
Hard to decipher what you mean. Maybe you want to say, that is already the default, but as this is obviously wrong you probably want to say, that Python 3 is kind of default now. Which might be true for new projects, but this doesn't have anything to do with the default env for servers. So maybe you did already messed up your server with a python version default change and you want to express that this can not happen to you anymore.
Re:Ask HN: What do you want to see in Ubuntu 17.10? by rspeer on Saturday April 01, 2017 @01:26AM (#14010614)
It's hard to decipher what you mean, too.

Ubuntu already switched from Python 2 to Python 3 and not many people feel "messed up" by this.

Python 3 is the only Python pre-installed on current versions of Ubuntu. All Ubuntu system utilities that use Python use Python 3. You have to install a separate package to get Python 2.