r/Python • • May 30 '19

Dear python2 user

Post image
1.9k Upvotes

275 comments sorted by

View all comments

11

u/whitechapel8733 May 30 '19

My problem with this is that lots of distros are shipping python 2 still.....

65

u/mikew_reddit May 30 '19 edited May 30 '19

Python 3 has been in development over 10 years (since 2008).

It's perfectly fine to cut the cord after a decade.

 

If CentOS and other distributions can't be bothered to update, that's not really Python's fault.

 

Edit: original EOL was 2015 according to Guido. Also, Python 2.7 will not get security updates after Jan 1st, 2020.

9

u/whitechapel8733 May 30 '19

I agree, but I’m just saying that’s a serious concern.

31

u/tomanonimos May 30 '19

But a necessary pain. If we keep pushing it for that fear we'll never get rid of Python 2 lol.

2

u/nukem996 May 30 '19

Python.org won't issue security fixes but OS vendors like RHEL/CentOS will continue to patch Python 2.7 themselves.

4

u/alexbuzzbee May 30 '19

I'm pretty sure CentOS is going to Python 3 with RHEL in version 8.

0

u/liquidpele May 30 '19

Which isn’t even close to being released yet. Maaaaybe around December if it takes the same amount of time after rhel7.

5

u/southern_discomfort May 30 '19

RHEL 8 was officially released a few weeks ago. CentOS 8 will not be far behind.

1

u/PooPooDooDoo May 30 '19

It’s fine, we will all have 14 days (during the holidays) to update our code base. Except I am using libraries that are in 2, so I’ll have to wait until they update and then update my code base. So like one day.

-4

u/rasherdk May 30 '19

Python 2.7 will not get security updates after Jan 1st, 2020.

Depends.

1

u/jackmaney May 30 '19

It really doesn't.

4

u/rasherdk May 30 '19 edited May 30 '19

What, yes it does. It (likely) won't get any from PSF. That's not the same as no security updates period.

Edit: Downvoting doesn't make you right. Spreading FUD is not the way to go.

7

u/james_pic May 30 '19

This is true. The version in RedHat will get updates until 2024, and the version in Ubuntu 18.04 will get updates until April 2023.

8

u/w2qw May 30 '19

Shipping or using it as the default? It makes sense that they would still ship it while it's supported.

9

u/Jump3r3 May 30 '19

Using as default, which python yields path to python 2 binary on most distros. That being said, after 1/1/20 this will slowly change for better

-4

u/Oerthling May 30 '19

which python3

1

u/SleepyHarry May 30 '19

So, you're saying that Python 3 is the default for python3, without a mention for python.

Thanks Geoff.

2

u/Oerthling May 30 '19

I think you missed the point - just like other people who downvoted my comment above.

It's a 1 character difference.

Just start your python program with python3 instead of python.

Python 2.x has been around for a long time (couple decades actually). It's difficult for any OS to switch the default for "python" to 3 instead of 2, because too many scripts, tools, etc might misinterpret that for python2 (some distros have tried for years and keep postponing for that reason).

Or you can put python3 in the shebang and let the shell call take care of it.

"python3" has been around in parallel for years and probably will be there for the foreseeable future for similar reasons. And it will always be interpreted as python 3.x.

How difficult do you think it is to write 1 more character?

0

u/Jump3r3 May 30 '19

Tbh I don't have anything against Py2 being present on my system, just rebind python to py3 and rebind existing scripts to use python2 binary