News for hackers. Stuff that matters.
Re:New features you can't use unless you are in Python 3 by mixmastamyk on Wednesday June 14, 2017 @12:59PM (#14554065)
Python 3 has been available on most dists for 5-10 years.
Re:New features you can't use unless you are in Python 3 by gshulegaard on Wednesday June 14, 2017 @01:10PM (#14554156)
What I said was the default version of Python is old on most distributions.

For example, CentOS 6 ships with Python 2.6 out of the box. Even faster moving distros (like Ubuntu) are still trying to make Python 3 the default (although at least Ubuntu ships with both 2.7 and 3.4+ out of the box).

Re:New features you can't use unless you are in Python 3 by the_af on Wednesday June 14, 2017 @01:28PM (#14554337)
What do you mean, default? "/usr/bin/python" symlinked to "/usr/bin/python3" instead of "/usr/bin/python2"?
Re:New features you can't use unless you are in Python 3 by netheril96 on Wednesday June 14, 2017 @02:57PM (#14555112)
Installed by default.
Re:New features you can't use unless you are in Python 3 by marcosdumay on Wednesday June 14, 2017 @04:41PM (#14555946)
As the GP said, Python3 is installed by default on any big distro for 5-10 years already.

It's not the default because /bin/python is synlinked to python2. You have to explicitly run it.

Re:New features you can't use unless you are in Python 3 by collinmanderson on Thursday June 15, 2017 @11:19AM (#14561187)
> Python3 is installed by default on any big distro for 5-10 years already.

That's not very true.

- Most BSDs and MacOS still don't have it installed by default.

- RHEL/CentOS still don't have it installed by default.

- Ubuntu LTS didn't get it by default until 14.04. (3 years ago) (mainline ubuntu got it in 13.04, 4 years ago)

Re:New features you can't use unless you are in Python 3 by the_af on Wednesday June 14, 2017 @03:01PM (#14555146)
Isn't Python 3 installed by default on most distros, as well as Python 2?
Re:New features you can't use unless you are in Python 3 by mrmondo on Thursday June 15, 2017 @04:59AM (#14558828)
No one should be using CentOS 6 in 2017, if you think python is your problem and you're running CentOS 6 you need to take a good hard look at your platform.
Re:New features you can't use unless you are in Python 3 by mixmastamyk on Wednesday June 14, 2017 @01:18PM (#14554229)
Centos 6 is 7 years old, if you are still using that it is unfortunately your problem. It's not hard to write "python3" on a modern dist.

Ubuntu has 3.5 and 3.6 is easily installable though not yet default 3.x.

Re:New features you can't use unless you are in Python 3 by rjgonza on Wednesday June 14, 2017 @01:36PM (#14554400)
Just because an operating system is "old" is not a reason to change it... Also it is still supported: https://wiki.centos.org/FAQ/General#head-fe8a0be91ee3e7dea81...
Re:New features you can't use unless you are in Python 3 by archgoon on Wednesday June 14, 2017 @01:32PM (#14554372)
Yes, it is his problem. And he's solving it by using python 2. Sometimes you have to use older distributions.
Re:New features you can't use unless you are in Python 3 by notsrg on Wednesday June 14, 2017 @01:26PM (#14554318)
You think someone is going to start a new project and use a 7 year old OS? I don't think it's "unfortunately my problem" when biz/client reqs for a 7 yo OS are completely out of my hands, unless of course the mindset is "use Python 3 or die trying".
Re:New features you can't use unless you are in Python 3 by mixmastamyk on Wednesday June 14, 2017 @02:23PM (#14554800)
And the other 96% of us can move on, no need to act like you're the majority.

Py 2.6 is already EOL for almost five years.

Re:New features you can't use unless you are in Python 3 by Volt on Wednesday June 14, 2017 @09:01PM (#14557186)
>no need to act like you're the majority

Is he making that assumption, or are you?

Re:New features you can't use unless you are in Python 3 by mixmastamyk on Friday June 16, 2017 @12:28PM (#14570310)
Let me reiterate, a 7 year old version of EOL software. Yes.
Re:New features you can't use unless you are in Python 3 by bradmwalker on Wednesday June 14, 2017 @02:56PM (#14555084)
Re:New features you can't use unless you are in Python 3 by tyingq on Wednesday June 14, 2017 @01:12PM (#14554166)
They are probably talking about "installed by default" vs available. Debian is still 2.x by default, and many of the Debian derivatives as well.

Not that the default install drives the whole ecosystem, but there are cases where targeting an interpreter you know will be there is helpful.

Re:New features you can't use unless you are in Python 3 by s-phi-nl on Wednesday June 14, 2017 @01:07PM (#14554136)
That's true, but many users are still affected by that Python 2 remains the default. Any user can install a tool for Python 2 with pip install --user but the user might need root privileges to install a tool for Python 3 if the system administrator never intentionally installed it.
Re:New features you can't use unless you are in Python 3 by melling on Wednesday June 14, 2017 @01:04PM (#14554114)
Furthermore, Python 2.x support will expire in 3 years. It's a lot less effort to install 3.x and use it now than plan, implement, and release a 3.x upgrade in 3 years.
Re:New features you can't use unless you are in Python 3 by gshulegaard on Wednesday June 14, 2017 @01:12PM (#14554176)
They have been pushing support back for 2 for a long while.

But I agree with you:

> or just write Python 2.7/6 code that is forward compatible with Python 3...in which case I still can't use the new features of 3.

Although, personally, I think the best thing to do is write forward compatible Python 2 code (or at least as much as you can). At the very least write Python 2 code that lends itself well to using a migration tool like 2-to-3.

Re:New features you can't use unless you are in Python 3 by euyyn on Wednesday June 14, 2017 @01:03PM (#14554103)
macOS Sierra today tells me its python is 2.7
Re:New features you can't use unless you are in Python 3 by seanp2k2 on Wednesday June 14, 2017 @01:19PM (#14554236)
You should use homebrew to join the pythonistas club on Mac. Better yet, use https://github.com/asdf-vm/asdf/blob/master/README.md to get all the pythons, rubies, nodes, and golangs you want.

Ubuntu 18.04 LTS plans on Python 3-only, but Ubuntu has been shipping Python 3.x since 13.04 and 3.x is the default with 2.x available since 16.04 , so in terms of shipping Python 3 code, Ubuntu 12.04 LTS (the last LTS where you can't assume it has a python 3) EOL'd on April 28 2017. Assuming $WORK follows EOL depredations, you should be fine for Ubuntu.

Re:New features you can't use unless you are in Python 3 by mplewis on Wednesday June 14, 2017 @01:06PM (#14554132)
And Python 3 is available on macOS Sierra via Homebrew.
Re:New features you can't use unless you are in Python 3 by msie on Wednesday June 14, 2017 @02:00PM (#14554626)
Hilarious since Homebrew is written in Ruby...do you have to upgrade Ruby too?