4 ms·
- FLAVOR: Ubuntu Server - HEADLINE: Python 3 as default - DESCRIPTION: In lieu of a description, I'll just link to this: https://pythonclock.org https://pytho
by lucky_cloud 10y ago
- FLAVOR: Ubuntu Server
- HEADLINE: Python 3 as default
- DESCRIPTION: In lieu of a description, I'll just link to this: https://pythonclock.org https://pythonclock.org
- ROLE/AFFILIATION: Developer, sys admin
- tobltobs 10y agoWouldn't this mess up a lot of current server installations?
- raverbashing 10y agoYou 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 ;) )
- rspeer 10y agoIt already happened, so probably not.
- tobltobs 10y agoHard 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.
- rspeer 10y agoIt'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.
- hyperknot 10y agoOpposing view: This would make me stay on 16.04 LTS for a long long time.
- thom_nic 10y agoCan you explain why? Assuming you could still `apt-get install python27` and `update-alternatives` to symlink that back to the default `python`, no?
- hyperknot 10y agoThe 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.
- dijit 10y agoTo 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.
- compuguy 10y agoAnsible only works with python 2.x (with beta 3.x support).
- tobltobs 10y agoI 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.
- marcoceppi 10y agoI 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/ https://www.python.org/dev/peps/pep-0394/
- rlpb 10y agoPython 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/ https://www.python.org/dev/peps/pep-0394/) and I don't see Ubuntu diverging from this unless upstream's recommendation changes.
- dustinkirkland 10y agoEverything @rlpb just said here is spot on ;-) Definitive +1.