Hacker News new | ask | show | jobs
by nikolay 2690 days ago
Well, this whole Python 2 & 3 is a huge fiasco. Supporting 2.x keeps the circus forever on.
2 comments

I don't know that I agree that it's a fiasco. I've been asked to work on a PDP11 in the last few years and while it was mind-boggling (the request -- I turned it down), it was understandable from a business perspective. So I can see how some businesses might want Just A Little While Longer on Python 2.x.

shrug, use python 3.x and don't sweat the fact that some folks are still stuck on 2.x. You certainly can't stop someone from offering support for 2.x -- the language is well defined and the reference implementation is open source. Anyone out there could put up a "Python 2.x Support: Cheap!" sign and be in business.

It surely is. There's a reason behind why support for old versions ends at some point.
Reinventing the wheel keeps the circus going forever. As long as python 2 is supported I don't have to touch any of the scripts I have to "maintain". The moment I am forced to migrate everything to Python 4 (they broke everything already, why not again) I will have to deal with a huge amount of pointless busywork just trying to restore functionality.
Python 4 will not "break everything again", it will be equivalent to a point release. It has been already explicitly mentioned.
Yeah, this is how to world moves forward - otherwise, we'd all be still watching VHS movies. Plus, there's this lovely tool called 2to3.
Funnily I can still watch VHS movies on a relatively new TV. Just had to plug in the VHS recorder and play, meanwhile the description of 2to3 makes it look like a plug and pray.

I mean really? A script that might mention some cases it can't fix as warnings. "optional" fixes that replace missing classes with incompatible replacements, giving you the "choice" of fixing the mess by hand. Also an apparently unstable API for your own fixes, doubling down on breaking your code while you try to fix your broken code has to be dedication.

> Note The lib2to3 API should be considered unstable and may change drastically in the future.

Well, 2to3 works surprisingly well and I've converted tons of projects with it. Most major Python projects support both 2 and 3, so, private codebases, which "just work", should stay on the "just working" old versions of the interpreter instead of insisting maintainers to waste time entertaining their laziness, because things that "just work" don't require ANY updates, right?
I am happy as long as I can plug-in old versions of the interpreter in a system 10 years from now as easily as I could plug-in my VHS recorder into the TV. Might be able to do that if I install a windows version of python on Wine, there is a good chance (~100%) that the dependencies of python on Linux will not remain compatible that long.
Yeah, but dependencies are another story. So, my point is, if something "just works" and you don't want to have to upgrade, you need to freeze the entire system with all dependencies, which includes hardware, OS, etc. Everything else is just an illusion.

I sill have people using my Win16-based software written using Borland Pascal with Objects I wrote 30 years ago. They keep changing power supplies, etc. of an old system, but recently they had some major hardware problem and asked me to help them. I couldn't and wouldn't.

They ended up somebody creating a VM from their hard drive, and they are happy now and can back up that image and keep the circus going on forever.

What's the problem to stay on the "just working" version of Python and not feel entitled to get updates?!
The only entitlement here comes from you.

If pypy wants to support 2, they can. If developers want to take advantage of that, they can. If library maintainers want to drop 2 support, they can. If others want to fork the libraries to provide security for the 2.x fork, they can.

What is not acceptable is trying to dictate what technology others choose to use to suit your personal preference.

Well, there's demand for McDonald's today as well, and people happy to supply to meet it! The Python community has dragged this circus for way too long it is now finally being put to an end. But there always will be dinosaurs who won't embrace progress and innovation, of course.
I could kiss this comment. You don't have a right to stop other people using py2 just so your ecosystem is a little cleaner. Yet that level of entitlement is apparently not uncommon in Python discussions.