News for hackers. Stuff that matters.
Re:Sunsetting Python 2 by voldacar on Monday September 09, 2019 @05:37AM (#20916606)
I long for the day when typing "python" into a shell will bring up a python 3 prompt
Re:Sunsetting Python 2 by avian on Monday September 09, 2019 @05:54AM (#20916684)
Switch to Arch Linux and live the dream. It has had python3 as /usr/bin/python since 2010.

https://www.archlinux.org/news/python-is-now-python-3/

Re:Sunsetting Python 2 by shpx on Monday September 09, 2019 @09:38AM (#20918012)
Also Gentoo since mid-2018.

Although their package management requires manually specifying the minimum accepted Python version for every single package, so they have thousands of packages that would run just fine on Python 3.7 but no one has the time to manually check and label them as such. So their default is still 3.6 and using 3.7 as your default version is not well supported.

I wish someone told me Gentoo is a non-starter before I wasted an afternoon installing it.

While we're on the topic, it's pretty stupid how PEP 394, the one that says "python should point to python2.7", gives its reasoning as "because all Linux distros except Arch do it this way" and then all the distros say "python should be python2 because the PEP says so" for the next 9 (maybe more) years. How is anything ever supposed to change?

Re:Sunsetting Python 2 by ImaCake on Monday September 09, 2019 @08:33AM (#20917497)
My mint 19.2 installation does the same. To run a python 2 script I have to run my conda python 2.7 install now.
Re:Sunsetting Python 2 by Lendal on Monday September 09, 2019 @09:08AM (#20917732)
Is Manjaro included in that?

Edit: Yes Manjaro has default Python3 too. :)

Re:Sunsetting Python 2 by sametmax on Monday September 09, 2019 @07:23AM (#20917122)
Windows 10 now offer you to install Python 3 if you do this.
Re:Sunsetting Python 2 by voldacar on Monday September 09, 2019 @08:43AM (#20917558)
And I would add - symlinking or shell aliasing does not count! I want a linux system without a single python2 binary anywhere on the disk!

How many more decades must we wait??

Re:Sunsetting Python 2 by JeremyBanks on Monday September 09, 2019 @08:58AM (#20917663)
Hopefully never.

If I have a modern C compiler, I can still run most C code from 30 years ago.

When I have a Rust 2030 compiler, I'll still be able to run Rust 2015.

But with only a Python 3 interpreter, I'm strictly unable to run the vast majority of Python code out there.

Re:Sunsetting Python 2 by voldacar on Monday September 09, 2019 @09:59AM (#20918204)
Then you can freely make the choice to install one from your package manager. Don't force your cruft on my system though.
Re:Sunsetting Python 2 by cdelsolar on Monday September 09, 2019 @09:53AM (#20918150)
the "vast majority"? do you have evidence for that?
Re:Sunsetting Python 2 by doubleunplussed on Monday September 09, 2019 @10:27AM (#20918488)
As soon as calibre and mercurial finish their ports to python 3, python 2 will vanish from my Arch install. The day approaches!
Re:Sunsetting Python 2 by _salmon on Tuesday September 10, 2019 @09:15AM (#20927749)
I ended up just aliasing "python" to Python3 and "python2" to Python2. Hasn't broken much yet in MacOS
Re:Sunsetting Python 2 by mixmastamyk on Monday September 09, 2019 @12:00PM (#20919349)
It does on a Windows vm if you checked the add to path checkbox.
Re:Sunsetting Python 2 by alerighi on Monday September 09, 2019 @07:34AM (#20917163)
sudo ln -sf /usr/bin/python3 /usr/bin/python

Or use a Linux distribution like Arch that has python symlinked to python3 by default.

Re:Sunsetting Python 2 by thomasahle on Monday September 09, 2019 @09:03AM (#20917702)
Or maybe just alias it so you don't break anything.
Re:Sunsetting Python 2 by kstrauser on Monday September 09, 2019 @01:08PM (#20920005)
Install pyenv and live your dream.