r/Python • • Dec 31 '19

Today is the last day of Python 2 support!

1.5k Upvotes

253 comments sorted by

25

u/I_get_in Dec 31 '19

Seems like it’s not actually going to be retired until April 2020: https://www.python.org/psf/press-release/pr20191220/

14

u/reJectedeuw Dec 31 '19

2020 ruined

14

u/sztomi Dec 31 '19

Exactly ^ I wonder how so many people missed this.

5

u/Sw429 Dec 31 '19

Just let us dream, ok?

7

u/AcousticDan Dec 31 '19

Right, but the title says end of support, which is tomorrow.

2

u/I_get_in Dec 31 '19

Yeah, I just thought this would also be worth to point out.

2

u/13steinj Dec 31 '19

But in the article a new security release is going to be released in April.

4

u/AcousticDan Dec 31 '19

It's already planned. Any bug submitted after tomorrow won't be fixed. That's end of support.

→ More replies (3)
→ More replies (2)

4

u/toyg Dec 31 '19

The code-freeze is tomorrow. From here to April it will just be testing and very minor bugfixing. No support.

2

u/IronManMark20 Dec 31 '19

Technically the last release won't be until April to coincide with PyCon. However only the release manager will merge things into the branch.

628

u/Zomunieo Dec 31 '19

Maybe Google will finally stop returning Python 2 documentation as its first hit?

185

u/pblokhout Dec 31 '19

My usual path is to not even look for the 3 version, but go to the 2 and change it straight away at the top.

132

u/chinpokomon Dec 31 '19

I hate to admit it, but this is usually my solution too. Unfortunately, that probably makes search engines think they are providing the links I want, reinforcing the problem.

45

u/lengau Dec 31 '19

Normally when a version of Python reaches EOL they remove the docs from docs.python.org. I'm sure that'll be the case here too, so I think at that point search engines will probably have no choice but to send you to the python 3 docs.

Although it'd be exactly the sort of thing to expect that we'd get a horrible combination of the Python 3.5 and 3.8 documentation.

6

u/billsil Dec 31 '19

Really? You can still find the python 2.4 docs last time I checked this year...

3

u/lengau Dec 31 '19

Looks like you're right - they only remove the links to the old documentation.

2

u/Ailrk Dec 31 '19

I don't think they will ever pit done python2 docs given that there are tons of historical code there.

0

u/[deleted] Dec 31 '19

[deleted]

31

u/hughperman Dec 31 '19

Off the top of my head, matrix multiplication operator, format strings(?), dictionary key iterators now are guaranteed ordered by order of insertion, whatever that new inline assignment "walrus" operator is actually called, ...

5

u/FriedChickenPants Dec 31 '19

so dict now behaves like OrderedDict?

→ More replies (4)
→ More replies (1)

12

u/lengau Dec 31 '19

There's not much - things like the Walrus operator etc.

The main thing is getting that combination of library documentation will be awful.

0

u/[deleted] Dec 31 '19

[deleted]

→ More replies (2)

1

u/bulletmark Dec 31 '19

I use this chrome://extensions/?id=codfjigcljdnlklcaopdciclmmdandig

0

u/[deleted] Dec 31 '19

[deleted]

16

u/kx233 Dec 31 '19

❤ I've been using ddg for years but I had no idea about this!

→ More replies (2)

9

u/[deleted] Dec 31 '19

that's a curious usage of !

7

u/dirtydan Dec 31 '19

not is is, dogs are cats, reality tv stars are in charge. We wanted flying cars, we got this.

5

u/AZNman1111 Jan 01 '20

Yeah theyre called bangs. ddg has a TON of useful ones for every language.

Languages (python):

!bpo !bpoi !bs4 !ciupy3 !dj !django !djangome !djlts !djpackages !drf !iris !keras !matplotlib !matplotlib (!mpl) !mpl !nltk !nukepy !numpy !obspy !obspydev !pandas !pep !php2py !pip !py !py2 !py27 !py3 !py34 !py36doc !py3fr !py3k !py3k !pybug !pylm !pylons !pypa !pypi !pypi !pyqt !pyside !pyside2 !python !python (!py) !python2 !python26 !python27 !python3 !python3 !python30 !python31 !python32 !pythondev !pyvideo !rpy !scipy !skimage !sns !sopy !sqlalchemy !sqlalchemy !tensorflow !tflow !web2py

From https://duckduckgo.com/bang_lite.html

→ More replies (1)

1

u/[deleted] Jan 01 '20

You don't need !py3 !py goes to Python 3 was that for many years, maybe since 2015

8

u/x3x9x Dec 31 '19

Google announced they even stop with python 2 in the cloud environment so I would not be surprised!

3

u/pprimeismyname Dec 31 '19

Ffs praying they stop

2

u/CommanderStarling Dec 31 '19

Really? Mine is always the latest version of python. As soon as 3.8 was released that’s the only documentation I would see no matter what I searched.

1

u/wildcarde815 Dec 31 '19

Apparently a bunch of their stock VMs on their cloud infra still deliver 2.7 and don't work with 3.x...

1

u/gabriot Jan 01 '20

Why are you still using Google as your search engine?

1

u/[deleted] Jan 01 '20

I use ddg.gg if you prefix your query with !py you will go directly to python 3 documentation.

159

u/be_like_beer Dec 31 '19

The king is dead. Long live the king

28

u/[deleted] Dec 31 '19

Please let's be realistic. Stopping support != Dead. There is still so much Python 2 code out in the wild and so many people are still learning it as the first language that Python 2 will never die. It's time this community starts acknowledging the reality. There are many developers who still won't change their codebase as it is simply too much effort with too little to be gained.

45

u/hughperman Dec 31 '19

It's time this community starts acknowledging the reality.

This has been the line for ages but in my view python 3 uptake is much better now than even a couple of years ago.

so many people are still learning it as the first language

Source for this?

2

u/[deleted] Dec 31 '19 edited Dec 31 '19

Source for this?

Indirect support is from the number of online tutorials and books that primarily use Python 2 which are still in circulation at Amazon and elsewhere - especially Mark Lutz's Learning Python (5th ed) which is still a best-seller (and deservedly so). Although Lutz describes both Python 2 and 3 features, he focuses mainly on 2 and describes breaking changes introduced by 3. In the book he does not make it a secret that he dislikes the new features in Python 3 and the complexities they introduce, which is probably why he didn't release another edition since 2013 in spite of the book doing so well.

0

u/[deleted] Dec 31 '19

[deleted]

23

u/toyg Dec 31 '19

Name and shame, please...

No surprise though, academia very often lags behind industry standards.

→ More replies (1)

14

u/jabbalaci Dec 31 '19

Why would anyone start learning Python 2?

7

u/Sw429 Dec 31 '19

Because they find tutorials online for python 2 and don't know any better. Or because their systems at work only have python 2 and they don't have a choice. Basically, we can't seem to get rid of python 2 lol.

→ More replies (3)

12

u/cnobile Dec 31 '19

Yes it is. Wait until all the third party packages stop supporting Python 2, you'll be locked into old versions forever. I have at least 5 packages on pypi and I'll be removing Python 2 support soon. It's too much trouble to support something that's dead.

10

u/billsil Dec 31 '19

It was so nice to drop python 2.7 support for my open source project. Nothing really changed, but I got to drop testing for lots of dependency versions, use f-strings and fix some python 3 bugs since I was finally using it full time.

I made sure to add a killer python 3 feature to encourage the upgrade process. Part of the delay was nobody has really done that. F-strings are cool, but not reason enough.

→ More replies (7)

85

u/daanzel Dec 31 '19

We have the whole month of January reserved as a technical-debt sprint, which in our case translates to 'migrating all legacy crap to python 3'. Oh well, best get it over with asap.. Glad when it's done.

118

u/PeridexisErrant Dec 31 '19

OK, you need to know about the tools for this.

I assume you're starting with a python 2 only codebase, with decent tests (or some other way to check it's working).

  • Install pyupgrade, and run it. You have now dropped all python 2.6 idioms... hopefully this doesn't change much.

  • install python-modernize and run it - this will convert your code to a python 2+3 polyglot using six. Run all your tests and make sure they pass.

  • manual cleanup here - for example check for iterables needlessly cast to lists, etc.

Now it's time to go Python 3 only:

  • run pyupgrade with the --py3-plus argument. This fixes a lot of things, including stripping out six shims!

  • run all your tests to check it worked, manual cleanup, etc.

Also consider using autoflake, com2ann, isort, and black (with --target-version), for even more automatic code-transformation goodness.

20

u/masklinn Dec 31 '19 edited Dec 31 '19

I expect these handle the simpler conversions but there are a fair amount of subtle changes between 2 and 3, not only the string changes (which is a runtime issue more than a static one) but also:

  • rounding changes, you should look for and be wary of any round call in your codebase as there are two significant changes to round(): in Python 2 it always returns a float, in Python 3 with a precision of 0 it returns an int; and Python 3 uses banker's rounding (rounds to even) whereas Python 2 rounds away from 0 (up for positive numbers, down for negatives)

  • ordering changes, in Python 2 all values are absolutely ordered with fairly arcane (read: bonkers) rules. In Python 3, values are generally only ordered within their type and ordering has to be defined explicitly, this means e.g. None < 3 is true in p2 but a type error in p3. This affects anything which uses comparisons e.g. min(), max(), sorted(), this is where it showed up a lot at $dayjob you'd get lists which would sometimes contain None or unconverted values and it'd blow up in production.

edit: a few more issues which can't necessarily be "statically" discovered and fixed:

  • int / int was integer (truncating) division and becomes real division. You can "force down" by from __future__ import division in order to use real division in Python 2, however it's hard to work things out the other way around because // is a floor division not an integer division: it always returns a float, and it rounds down even if you give it two floats

  • the order of iteration in dicts is never specified and always an implementation detail, but we had issues in several places with implicit reliance on iteration order (usually for reasons of precision in floating-point operations). The order of iteration changes in Python 3.3 (completely randomised by default) and 3.6 (order of insertion, which 3.7 made part of the language spec).

17

u/gatewaynode Dec 31 '19

No mention of 2to3? I've found it to work really well without so many steps.

25

u/PeridexisErrant Dec 31 '19

The python-modernize library is built on lib2to3, with more fixers and targeting cross-compatible code. I've found it really useful for a staged approach, which let me do incremental migration of some big projects while others kept adding features.

If 2to3 works for you though, that's great! Definitely simpler to have a one-step solution from the standard library :-)

9

u/masklinn Dec 31 '19

The problem of 2to3 is that it breaks your code, so you can't do a step-by-step "online" migration (migrate bit by bit and have the code keep working throughout), you have to do the entire thing at once, it's a hard commitment.

Which means it's only suitable for fairly small and simple codebases.

10

u/alcalde Dec 31 '19

The problem of 2to3 is that it breaks your code

Damn, my skill set is being replaced by software....

2

u/billsil Dec 31 '19

It also tries to do the compatible way instead of what you really want. dict.items() is 95% of the time what you want and not listing it. Fix the prints and running it in python 3 with no other changes is largely correct.

3

u/daanzel Dec 31 '19

Thx for the tips! I'll look into those I've not heard of.

Fortunately most of our old code is fully (unit-) tested and well documented. We also made the change to python 3 for our new projects about a year ago, so we know what needs to happen!

However, unfortunately for us, there's more to it than just changing the codebase; we have a very large Cloudera stack (actually 3; DT/ACC/PRD), where most of our code is Pyspark with many UDF's. We also have quite a complex deployment pipeline, and to support both python 2 and 3 applications, there is a lot of additional stuff in there. My fear is these things will give us the biggest headache...

1

u/whimsicalthrow98 Jan 06 '20

Hi sorry I'm here super late, but I'm working on an important project where we're trying to use an open source deep learning model from Github. I've spent months trying to interpret their code because instead of posting the model, they posted the Python 2 code they used to train it, which involves a lot of old packages without support and I just stopped for a while because my sad little Macbook Air doesn't have enough power to train the model. I totally forgot about this whole Python 2 thing (last worked on this part of the project in November unfortunately) - do you think this is an okay strategy to use? I'm freaking out very much right now so hopefully your strategy will work. Thank you SO much for this comment in advance!! :)

2

u/PeridexisErrant Jan 06 '20

Ooh, that's a painful situation to be in :/

It really depends on what packages the model depends on, what you mean by "unsupported", how they wrote the code, etc.

That said, I would always start by trying these automatic transformations - they're pretty solid. If they break something, the future package would also be worth a shot - IMO modernize produces nicer code and is certainly easier to upgrade from, but future can be helpful if someone has written code that depends on the details of certain unidiomatic py2isms.

Work in a branch, never put automated fixes and manual cleanup in the same commit (your future self will thank you if you have to rebase), and test as often as you can. Don't be afraid to make incremental progress, either - lock in small wins and they will compound over time.

Good luck, and good skill!

→ More replies (2)

0

u/[deleted] Dec 31 '19

[deleted]

45

u/PeridexisErrant Dec 31 '19

For bonus points, use Hypothesis to have the computer come up with tests for you!

7

u/tr14l Dec 31 '19

Run all your what now?

3

u/PeridexisErrant Jan 01 '20

(or some other way to check it's working)

If you don't have that, the process of dropping Python 2 compatibility can just be rm -r code/ - it's much faster and minimizes technical debt ¯\(ツ)/¯

5

u/u7aa6cc60 Dec 31 '19

He means "run it and see if it does something"

10

u/colemaker360 Dec 31 '19 edited Aug 06 '26

Breezy coated saffron meadow amber lantern

This post was anonymized with Redact.dev

9

u/daanzel Dec 31 '19

Well, we've been pushing for the migration for about a year now, but there's always higher prio things to do first. Apparently managers do trigger on 'end of life' though; guess they think everything will simply stop working or something, I don't know.. Anyways, I'm happy with whatever gets it on the agenda since maintaining both 2 and 3 code is not something I've became a fan of in the past year..

1

u/[deleted] Jan 01 '20

You could have at least work toward migrating by running pylint --py3k and mypy when doing a PR check.

5

u/[deleted] Dec 31 '19

reminds me of the GDPR/DSGVO garbage. sure, we had a few years advance notice, but fuck it, let's start preparing 6 months before it's mandatory

1

u/[deleted] Jan 01 '20

Oh yeah, the California law should also be in effect now.

2

u/toyg Jan 01 '20

But no enforcement until 2021, which means a ton of shit is going to fly in December...

→ More replies (2)

4

u/PkmnSayse Dec 31 '19

I just spent December doing this! Went from python 2.7.9 to 3.8.1 and django 1.11 to 3.0 😀

Was actually really easy with 2to3 and I enjoyed ripping out that legacy crap.

Cant wait to have fun with all that walrus-y goodness...

7

u/LightUmbra Dec 31 '19

If you don't get it done by end of day, Guido will come and delete it all.

1

u/ocawa Dec 31 '19

What if you don't make it at the end of January? When is the first security patch for python 3?

1

u/PkmnSayse Jan 05 '20

Python 3 came out in 2008, suffice to say theres been quite a lot of updates

1

u/ocawa Jan 06 '20

Or I mean when would the first security patch for python3 that python2 wouldn't get?

→ More replies (1)

26

u/tastycat Dec 31 '19

The worst job I've ever had is going to contact me in about 4 months to rewrite all the software I wrote for them because of this.

13

u/calumbria Dec 31 '19

Are you going to accept?

18

u/tastycat Dec 31 '19

fuck no

8

u/atimholt Dec 31 '19

Have you ever heard the advice where you quote a price that you genuinely would be happy to work for? Quote them upwards of $700/hr, if that’ll relieve the stress.

But yeah, some things aren’t worth any amount of money, because they’re not about the money.

6

u/tastycat Dec 31 '19

Yeah but I did that the first time and they still managed to crush my spirit.

3

u/skunkwaffle Dec 31 '19

Read this in the Fuck croquet! voice in my head.

1

u/Sw429 Dec 31 '19

How much money would they have to offer you to do it?

13

u/tastycat Dec 31 '19

They'd have to give me the whole company, and even then I'd fire the client to end the project and still wouldn't do it.

→ More replies (1)

3

u/toyg Dec 31 '19

Send them my way :o) I could do with some cash in 2020...

6

u/tastycat Dec 31 '19

It's yours. I hope you know SOAP.

2

u/toyg Jan 01 '20

Sadly, I do know it a bit. Enough to know that python libs in this area have always be a bit wank... I see why it might not be the best gig. Still, I’m happy to look at it if you don’t fancy it :)

98

u/[deleted] Dec 31 '19

... finally.

146

u/NitroXSC Dec 31 '19
finally:
    python2.close()

43

u/aes110 Dec 31 '19
from contextlib import closing

with closing(python2):
    ...

1

u/[deleted] Dec 31 '19

Nice, I hadn't really looked at contextlib yet, there are some hidden gems in there!

2

u/aes110 Dec 31 '19

Check out contextmanager, thats one of my favourites, it allows you to turn a generator to a context manager

from contextlib import contextmanager

@contextmanager
def foo():
    print('before') #this is the __enter__
    yield 'value' # this is what __enter_ returns
    print('after') # this is the __exit__

with foo() as x:
   ...

0

u/[deleted] Dec 31 '19

[deleted]

68

u/tr14l Dec 31 '19

Dammit, you just deleted python3... Zero-indexing man, geez. Now we have to start over.

12

u/imaryamsharma Dec 31 '19 edited Dec 31 '19

If we just deleted versions like that, that means python1 was also deleted. Which means currently there is only two items in the list [“Python2”, “Python3”]. Since there 2 items in the list it is an error and we are safe.

7

u/Sw429 Dec 31 '19

I like to imagine it's a dictionary.

5

u/hughperman Dec 31 '19

Could be a dictionary

→ More replies (2)

3

u/[deleted] Dec 31 '19

The only finally here maybe now everybody will STFU about how support is ending. We get it. Meanwhile plenty of people are still stuck on it for business things they use but didn't write.

Let's hope they don't pull this crap with 4 and no I don't care who said they won't ever do it again. Deeds, not words.

0

u/[deleted] Dec 31 '19

[deleted]

2

u/blabbities Dec 31 '19

TO LOS ANGELES, CALIFORNIA!

40

u/javad94 Dec 31 '19 edited Dec 31 '19

Actually the last release of python 2.7 which is 2.7.18 will be in mid April 2020 https://www.python.org/dev/peps/pep-0373/

15

u/toyg Dec 31 '19

But it's code-frozen from tomorrow. So, effectively, what's done is done.

4

u/javad94 Dec 31 '19

Yeah I see. But why not release it with the deadline.

4

u/toyg Jan 01 '20 edited Jan 01 '20

It’s a very precise interpretation of support: any security issue arisen before today, will be addressed in that last release. To have a full release on 31/12/2019, they would have had to code-freeze much earlier, which means issues appearing between then and now would not have been addressed.

→ More replies (2)

2

u/billsil Jan 01 '20

Because there are bugs they'd like to fix.

40

u/hldh214 Dec 31 '19

1

u/[deleted] Jan 01 '20

So which is right, that website or this one? https://www.python.org/psf/press-release/pr20191220/

2

u/[deleted] Jan 01 '20 edited Jan 01 '20

Yours, since it is newer.

Damn PSF. I really hope it is a setup for April fools.

Edit: looks like both of them are right, the code freeze is on January 1st, it just takes that long to release the last version.

0

u/[deleted] Dec 31 '19

[deleted]

4

u/alcalde Dec 31 '19

When the ball (python) drops, Python 2 will be gone!

145

u/rj_ravishjha Dec 31 '19

Apolgy for bad english

where were u wen python 2 die

i was at house eating dorito when phone ring

"Python 2 is kil"

"no"

20

u/house_monkey Dec 31 '19

I cri everytime

34

u/lysobrody Dec 31 '19

The only reason why I celebrate New year's Eve

8

u/xtreak Dec 31 '19

Python 3.7-3.9 received openssl 3.0 support : https://bugs.python.org/issue38820 .

7

u/Exnixon Dec 31 '19

Will distros PLEASE stop pointing /usr/bin/python at Python2 now?

3

u/HAIR_OF_CHEESE Dec 31 '19

Fedora 31 points it to python3

→ More replies (2)

6

u/dreamin_in_space Dec 31 '19

So how long until we migrate to Python 4!? :D

10

u/PriorProfile Dec 31 '19

Nah they are going the Winamp route. Next version should be 5.

6

u/atimholt Dec 31 '19

Serious question: how “guaranteed” is it that Python will never make a breaking change in the future? I get the feeling that the jump was a one-and-done, never-again breaking change, but I’m not certain how concrete that is.

This Python 2/3 thing is the ur-example that languages like C++ point to when touting “eternal” backwards compatibility.

5

u/calumbria Dec 31 '19

They said they won't make huge breaking changes again, but we might expect minor ones in future. For example Python 3.7 had some minor breaking changes.

1

u/toyg Jan 01 '20 edited Jan 01 '20

There is an official document on the matter. TLDR:

Unless it is going through the deprecation process below, the behavior of an API must not change between any two consecutive releases.

Similarly a feature cannot be removed without notice between any two consecutive releases.

Addition of a feature which breaks 3rd party libraries or applications should have a large benefit to breakage ratio, and/or the incompatibility should be trival to fix in broken code. For example, adding an stdlib module with the same name as a third party package is not acceptable. Adding a method or attribute that conflicts with 3rd party code through inheritance, however, is likely reasonable.

The deprecation process is basically to add a warning in at least one release and observe feedback before proceeding with changes in the subsequent release.

By release, they typically mean a single-point release, i.e. 3.7 and 3.8 are two releases, 3.7.1 and 3.7.2 are not.

4

u/TheBlackCat13 Dec 31 '19

It might be the version after Python 3.9 (that is effectively Python 3.10) or it might not. But whatever it is it won't be the big change of Python 3 (just like Python 2 wasn't).

2

u/[deleted] Dec 31 '19

I would find it strange if the next minor version after 3.9 is 4. Doesn't Python use semantic versioning?

5

u/TheBlackCat13 Dec 31 '19

No, Python explicitly and purposefully does not use semantic versioning. There are backwards-compatibility breaks in minor versions and the Python 1 to Python 2 change was not a major backwards-compatibility break like the Python 2 to Python 3 change was.

→ More replies (1)

1

u/[deleted] Jan 01 '20

How do you know that?

5

u/StarkillerX42 Dec 31 '19

My company will upgrade their systems in July/August...

...

...

...happy new year?

5

u/[deleted] Dec 31 '19

Did Apple update from Python 2 to python 3?

4

u/DataVeg Dec 31 '19

Yes, in Catalina there is both python 2 and 3, but 2 is only for back-compatibility for some 3rd party tools and will be removed in future releases - https://developer.apple.com/documentation/macos_release_notes/macos_catalina_10_15_release_notes

9

u/Rajarshi1993 Dec 31 '19

I feel kinda sad. I know I shouldn't be, but, I mean, it has been with us for so long.

Coders of the future will want to know what it was like, and what are we going to say to them? It was an awkward transition to Py3, but a memorable one.

5

u/b4ux1t3 Dec 31 '19

I mean, there's nothing stopping you from grabbing old releases of Python, source or binary, just to see what it was like.

I recently compiled Python 1.5.1 for shits and giggles, just out of nostalgia (it's the first version of Python I ever used!). It's crazy how much the language has grown.

1

u/Rajarshi1993 Jan 01 '20

There was a Python 1 ???

3

u/normandantzig Dec 31 '19

It will could be captured in the History of Programming Languages (HOPL) conference after this years one. Random HOPL III Python Link

To be clear HOPL 4 is this year and HOPL 5 will happen in another decade.

4

u/geonyoro Dec 31 '19

And today I was asked to migrate a python2 application, developed in 2019, from one server to another. Mschew.

4

u/savvy__steve Dec 31 '19

13 hours to convert all your Python 2 code.... GO!

3

u/[deleted] Dec 31 '19

Huzzah!

3

u/[deleted] Dec 31 '19

The future is now old man!

6

u/[deleted] Dec 31 '19

F in chat

2

u/Tape_Drive Dec 31 '19

Oh goodness. As much as. Like Python 3, you know that some random company is going to have a script using an outdated command.

2

u/[deleted] Dec 31 '19

print “Goodbye, World!”

4

u/[deleted] Dec 31 '19

Thank god

3

u/kteague Dec 31 '19

But it will be 2020 not 3030?!!

3

u/jwink3101 Dec 31 '19

I woke up this morning, turned to my wife, and said “Python2 dies today!!!”

Very excited! I work on a lot of air-gapped networks so I am often limited in what versions I get to use but I think I can finally start just using 3. Still, I’ve been writing cross-compatible code for so long that I don’t inherently use the new features. It’ll take some time to get used to using them first.

1

u/PeridexisErrant Jan 01 '20

Try pyupgrade - you can tell it that you're writing --py3-plus or --py36-plus code, and it'll convert most of them for you!

3

u/[deleted] Dec 31 '19

Doesn't matter. Py2 will be alive and kicking for years, if not decades.

2

u/b4ux1t3 Dec 31 '19

Right, but so is Cobol. It's not like it's going to be drawing in new developers. It's going to be relegated to legacy systems that no one wants to touch.

That does mean that in a few years, devs with deep knowledge of Python 2 can might get some fantastic job security. Or not, since it's probably just cheaper to convert to 3.

2

u/13steinj Dec 31 '19

Understatement. But everyone will still continue to act like using it is a cardinal sin because people love circlejerking.

1

u/ynotChanceNCounter Dec 31 '19

because people love circlejerking

Because you've all had about a million years to migrate, and it's some other poor bastard who'll have to clean up the laziness. "Circlejerking." I wish I were running a studio right now just so I could fire every asshole who protests the migration.

1

u/[deleted] Dec 31 '19

Your studio would go bankrupt very fast wit this attitude.

→ More replies (1)

1

u/TriflingHusband Dec 31 '19

As long as RHEL7 is still supported, Python 2 will still be around. At work I had to create a Python 2 GUI that runs on RHEL6 to run on a server at a government customer site. People really overestimate how quickly Python 2 is going to fade.

1

u/PeridexisErrant Jan 01 '20

I'm under no illusions that people will keep using Python 2, but as of this morning none of my open source code will support Python 2 unless someone is paying me to do so.

Perfectly legitimate to have enterprise LTS, but you can no longer get new versions of libraries for free!

2

u/BlackAccipiter Dec 31 '19

Strange... We gonna lose the legend Python 2 on my birthday.

2

u/KrypticEon Dec 31 '19

Right, this makes a pot of sense

A couple of weeks ago Code Academy's course for Python 3 was free, and now it's a premium only course

Assholes

Is it still worth taking the Python 2 course?

0

u/[deleted] Dec 31 '19

[deleted]

2

u/KrypticEon Dec 31 '19

Ok but as someone with absolute 0 knowledge of programming / coding I am now at a loss of where to begin based on your statement

I don't know what python is used for, how to write it, or what porjects suit it. And sadly I do not have any colleagues that could help intro me to it. I'm having to do it 100% on my own steam - so should I buy a book? Would love to hear how you got into it

2

u/alcalde Dec 31 '19

Here, this is for people who are knew to programming, and uses Python....

https://www.amazon.com/Head-First-Programming-learners-programming/dp/0596802374

Also, never forget this important lesson.

2

u/Dogeek Expert - 3.9.1 Dec 31 '19
  • Python is used for everything, from small automation scripts, to full fledged graphical user interfaces, web apps, or full websites (like reddit!)

  • Any project you want can be done with python, with a few caveats : python is slow, even for an interpreted language. It's not particularly suited for game development (even though Civ 4 was made with python) or heavy calculations. If you need speed, you can use numpy along with numba to drastically speed up portions of your code. But we're talking milliseconds here, it's rarely relevant to spend development time on speeding things up, unless the script takes a long time to execute and you need it regularly.

  • A book is never a bad idea, but it still costs money. If you're on a tight budget, you can actually read the python docs, which has its fair share of tutorials that teach the language's basics. You can also head over to r/learnpython to ask for help!

  • If you need tutoring, I'd be happy to help. I answer questions on r/learnpython very frequently, and I'd be happy to teach someone how to code in the language.

1

u/AcousticDan Dec 31 '19

Udemy has regular sales, I'd look there.

1

u/calumbria Dec 31 '19

There are some great free books linked in the sidebar for the python subreddit (r/Python). They should help you get started.

0

u/[deleted] Dec 31 '19

[deleted]

2

u/KrypticEon Dec 31 '19

Excellent, thanks! Hopefully the book follows python 3! Lol

0

u/[deleted] Dec 31 '19

[deleted]

→ More replies (1)

1

u/[deleted] Dec 31 '19

Thank god i am tired of forgetting with people still using Python 2.

1

u/Gypiz Dec 31 '19

Rip never gonna forget

1

u/-qarma- Dec 31 '19

Will I still be able to write programs in python 2?

2

u/MrBarry Dec 31 '19

Yes, if that's how you want to live your life. ;)

1

u/thedjotaku Python 3.7 Dec 31 '19

Correction: last day of free Python support. If you have enough money, you can fund a hacker to keep your Python2 backporting going.

3

u/13steinj Dec 31 '19

Not even, a security update will be released in April.

The PSF is officially procrastinating. Which is hilarious because multiple people predicted this way of action from ghe beginning.

4

u/toyg Dec 31 '19

The "security update" will be code-frozen tomorrow. They just timed the final release to be as late as possible. If any hole comes up from here to April, it will not be added to that release, afaik.

2

u/thedjotaku Python 3.7 Dec 31 '19

well, they already pushed it back once. So, why not? hehe

Hopefully there's never a Py4

1

u/[deleted] Dec 31 '19

RIP python 2

1

u/WallyMetropolis Dec 31 '19

What is dead may never die

1

u/[deleted] Dec 31 '19

doesnt python 2 still have a download link on official python site doe

1

u/[deleted] Dec 31 '19

Good.

1

u/[deleted] Dec 31 '19

No more print "string"s!

1

u/eatbutthin Dec 31 '19

see you off in life, remember your glory in history

1

u/OmerSdeChen Dec 31 '19

Print very sad ..

1

u/atimholt Dec 31 '19

Ding dong the witch is dead!

1

u/cediddi SyntaxError: not a chance Dec 31 '19

Good bye Python 2, hello the New Era of Python?

1

u/MaddMaann Dec 31 '19

THIS...IS...HUGE

1

u/dullbananas Jan 01 '20

press f'' to pay respects

1

u/[deleted] Jan 02 '20

Does that means the default python 2.7 from subsequent Linux distros will be replaced by 3?

1

u/[deleted] Dec 31 '19

F

1

u/[deleted] Dec 31 '19

O damnnnn

1

u/[deleted] Dec 31 '19

One of our application is setup in pYhton 2, guess atlast it would have to be migrated to 3..... Lol

1

u/[deleted] Dec 31 '19

I feel sad, I got job because of Python2, learnt ML, DL and Backend dev all from it, now I yse Python3. :(

1

u/[deleted] Dec 31 '19

Sticking with python2

5

u/alcalde Dec 31 '19

Why must you be on the wrong side of history?

0

u/[deleted] Dec 31 '19

F

0

u/Sw429 Dec 31 '19

This just made 2020 infinitely more glorious. Imagine, a python 2-free world!

→ More replies (1)

-1

u/marazmru Dec 31 '19

The whole Russia drinking fo this.