Live data from Hacker News

Python 2 removed from Debian

bugs.debian.org

481–490 of 513 posts

Re: Python 2 removed from Debian

#481
post #217

Earlier quoted context omitted.

> No, it's not even remotely worth the amount of confusion and work it caused. Have you worked with pervasively non-ASCII text in Python 2? Like on a machine where any file might suddenly turn out to be non-ASCII (even if it’s only in a comment), not just data inside a few carefully-patrolled fences? Outside of a few well-behaved libraries (Flask), my experience was that it was utterly impossible. More than half of m…

Not the one you replied to, but we were doing things mostly without strings (audio processing, stuff with bits) and python 2 worked perfectly fine. We had started this project as late as 2013 because the important libraries had not been ported yet and when the stuff wrapped up in 2017... I'm not sure if we could have switched by then. So personally I'm ok with Python 3 but I actually never ran into the described prob…

[dead]

Re: Python 2 removed from Debian

#482

Earlier quoted context omitted.

The point is just you don’t understand how your tools work.

It seems the actual problem is a disagreement on how tools SHOULD work. A saw still works after a decade on a shelf, programs should still work too because they are tools.

What shelf? A garage? Detached? A shed? How humid? You may want to resurface and oil that saw after a decade. The wood handle may have rotted, or the plastic one may be gummy. Taking care of tools is how they last.

Re: Python 2 removed from Debian

#483

2to3 really showed that Python didn't understand their audience. If they had started a new project called COBRA and just eventually had it over take python the world would be all over it. But massive breaking changes going from 2 to 3 was a disaster for their audience. Worse still you could hear the acrimony in Pythons communications on the topic.

Well, trying to sell a project to the higher-ups is a lot easier when you can say > Hey our interpreter for our backend code will be eventually deprecated. It is currently version 2 and we need to move to version 3" Then the execs say "we are on 2?? and there is a 3??! what are we waiting for?!" A whole lot easier than trying to say: > Hey, there is a new interpreter out there called COBRA. We need to rewrite our who…

It's simple.

Python doesn't exist anymore, everyone's using COBRA. We can dedicate a dozen engineer months to switch to COBRA.

Or thousands to maintain python ourselves...

Re: Python 2 removed from Debian

#484

Earlier quoted context omitted.

An excellent question, how do you smoothly break compatibility?

Easy: Introduce breaking new version, but freeze and continue to support old versions (e.g. a python3 install should include the ability to fallback to python2). A real world example of this philosophy are the D3D APIs. Each new major D3D version had a completely new API, but old D3D versions are supported forever. Python source files then somehow need to announce what python runtime version they expect. Having to su…

Very interesting comparison to D3D.

The one of the things Microsoft appear to have mastery of is making sure users and devs don't feel breaking changes.

Drivers generally as well as D3D.

Re: Python 2 removed from Debian

#485
post #341

Earlier quoted context omitted.

“It's high time people like you stop making up excuses and start to own up their misconceptions, misjudgements, and mistakes.” What is it about python 3 that brings out this lecture stuff. I would really like to see the inside of this “easy” change at even the bigger most well resourced places. Google / Facebook / Dropbox etc. At small places where a program is working and programmer is gone they are not investing in…

> Yes, they did put u”” back in. No it did not destroy the world. This saga isn't completely over, over here: We still have code running python2 that we don't have the room to upgrade, and libraries that have to work with both python2 and python3. Meanwhile, people are pushing "code consistency" to the point where people outside our team are taking those libraries and running the "black" formatter on them - but "blac…

I like black and python 3 - but that’s pretty funny! In fairness black is opinionated on purpose - even if it understood u”” it’d remove it if it’s targeting 3 probably because it tries to reformat to one style. Amazing how long the ripples last though

Re: Python 2 removed from Debian

#486
post #424
post #375

Earlier quoted context omitted.

Ok, so what happens when several of your dependencies never ported? This isn't strawmanning - this is literally the case for a codebase I'm working with today .

You should not be using those dependencies today . Looks like they have been unmaintained for a decade and can contain a ton of vulnerabilities. Though I find it hard to believe that there are some useful dependencies that have not been ported and don't have better alternatives. Typically a "never ported" dependency is never ported because it is deprecated in favor of something better.

Does no one work in a business? Does no one work with science instruments purchased more than 5 years ago? Businesses have lots of useful dependencies that have not ported. If you are running a payroll system and it’s working, there is a real aversion to going to a new code base, and the cost benefit is not there for many businesses. You do realize python 2 is downloaded 3 million times per month now? Yes that’s down - but it’s not nothing - probably 300 - 400 thousand plus users easily

Re: Python 2 removed from Debian

#487
post #375

Earlier quoted context omitted.

Ok, so what happens when several of your dependencies never ported? This isn't strawmanning - this is literally the case for a codebase I'm working with today .

> Ok, so what happens when several of your dependencies never ported? If you're consuming dependencies which were never updated in the past decade then you have more worrying problems to deal with than porting your code to python3.

That’s not true at all - in high compliance industries if the dependency has been validated and is working changing it brings risk.

Re: Python 2 removed from Debian

#488
post #372

Earlier quoted context omitted.

I prefer Hg over Git but I use Git. Why? One time I tried to use hg command and it didn't work. Why? I was on a system that had incompatible Python interpreter to the Hg scripts. That was it. Since then I use Git everywhere even though I prefer Hg.

And one time I tried to install MS Office on my OpenBSD server. Can you guess what happened? Since then I only use Ed even though I prefer MS Office. What was your point again?

The point is that even though I like Python and Hg, a single snag like that is enough to tip the cost/benefit ratio in favor of C (egad!) and Git.

(With a side dish of "I'm entitled to working tools.")

Re: Python 2 removed from Debian

#489

Earlier quoted context omitted.

The print function was the simplest part of the transition. For one you could find and replace all instances of it fairly safely across your codebase and you could quickly discover any places where things broke because of a bad replace. That part took like an hour for a large codebase. The Unicode handling on the other hand took ages because string handling is not easily searchable and replacing it requires understan…

Python is a scripting language. Imagine if bash suddenly changed its syntax so that that instead of printing using echo, you now have to write echo(). Sure it’s just a pair of parentheses. But you probably have thousands of shell scripts on your computer. Are you really going to get your hands dirty and risk editing them without knowing what they do? Of course not, you’re just going to revert back to the version of b…

You are correct that my experience is mostly though not exclusively we Django projects. I guess maintaining your code pays off in the long run.

Again, you are arguing that running 2to3 and testing your code was hard. I guess that may be true. But having hunted for a ton of subtle Unicode bugs that problem was very worth fixing.

Re: Python 2 removed from Debian

#490
post #408

Earlier quoted context omitted.

Laughing at your users is a sure path to unlimited success and good fortune as a developer, for sure.

[flagged]

We've banned this account for repeatedly and egregiously breaking the site guidelines. Not cool.

If you don't want to be banned, you're welcome to email hn@ycombinator.com and give us reason to believe that you'll follow the rules in the future. They're here: https://news.ycombinator.com/newsguidelines.html.

Post reply on HN