Live data from Hacker News

Python 2 removed from Debian

bugs.debian.org

131–140 of 513 posts

Re: Python 2 removed from Debian

#131

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 whole codebase to use it, there isn't a tremendous amount of benefit, but its the new thing from the same people and eventually everyone will use it. Trust me.
To which the execs ask you to stop fooling around and get back to work.

Re: Python 2 removed from Debian

#132
post #97

Earlier quoted context omitted.

I'm wondering, is there work on how python 3's changes could have been promoted in smoother way?

An excellent question, how do you smoothly break compatibility?

Really annoying deprecation notices help a bit.

Re: Python 2 removed from Debian

#133
It was a bit of a shock when I upgraded my Debian systems to Bullseye (11) from Buster (10) a year or so ago. I discovered that the wiki I've been using for years, Moin Moin, was removed because it didn't support Python 3. I've a lot in the wiki and was in no position to migrate, so I made a wiki only VM and keep it at "oldstable". Since none of it is internet-facing, I can keep it this was forever, even once all support ends. I'd rather not have to have another VM though.

Re: Python 2 removed from Debian

#134

Earlier quoted context omitted.

I’m pretty cautious about changing my own code, but even I am not paranoid enough to write tests to verify that freakin’ strings still have the behavior I rely on. At least not until the day they suddenly didn’t.

Yes, and that's one reason why a static compiled type system helps you maintain code, dependencies and language I'd say.

I tried adding type hinting to a program that I had to maintain once - because it had no unit tests and I was looking for the quickest way to make it less fragile. One tended to make a small change and then find that it broke something somewhere but finding that out was a long process.

FWIW I found it nearly useless - whereas biting the bullet and refactoring it so that it could be unit tested - even just a few tests - made a world of difference.

Re: Python 2 removed from Debian

#135

Earlier quoted context omitted.

We had crazy amounts of code handling unicode support and conversion from our ecommerce site to our ERP system (running on Windows using some Windows code page thing). With Python 3 all that went away, you can now just seamlessly parse text from one system to another. For me, the unicode handling alone was worth the time spend migrating from Python 2. That was a decade ago, to finding that the "python" command still…

> finding that the "python" command still launches a Python 2.7 apt install python-is-python3

I don't think my co-workers would like that :-)

Re: Python 2 removed from Debian

#136

Earlier quoted context omitted.

> The fact that such a talk exists shows that the improvements aren't worth the switch for most users. If they were, they wouldn't need convincing. That's reading far too much into a tongue in cheek presentation title. Besides, good devs are typically reasonably skeptical of new and shiny. And when you've got a large Python 2.7 codebase, and Python 3 is backwards incompatible, you'd be looking at a lot of work to upg…

> How much Python code in the wild implicitly depends on the behaviour of the GIL? About as much as depended on Python 2-specific features?

Sure, but the GIL behaviour is inherent to all concurrent (for a given value of concurrent) Python code. And code that could be run concurrently.

Removing the GIL would be bloody fantastic, but it's far more involved than 2 to 3.

Re: Python 2 removed from Debian

#137

Earlier quoted context omitted.

i think it’s clear this was a huge mistake. none of these changes were critical to pythons current success. python stalled for 10 years if not more because of these non-BC changes. it will fragmented indefinitely. this is a good case study of how one big ego can completely derail a massive project for decades

It won't be fragmented indefinitely, that claim might've carried some weight five years ago, but these days I see very few Python libraries that still support Python 2.7. And, if they do, it strongly implies that they've not been maintained for some time. (See also, a dependency on six) - with the caveat that sometimes you don't need to continually upgrade a library that fills its desired niche perfectly. Hell, if yo…

The people it lost are going to things other than python3.

Re: Python 2 removed from Debian

#138

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…

Meanwhile, in the real world, the feature backlog means that 2 to 3 never happened for a lot of us.

Re: Python 2 removed from Debian

#139

Earlier quoted context omitted.

I see the sort of perspective pervasively, but I don’t really understand it. I would guess that most people wouldn’t consider expunging c89 from gcc to be progress, yet this is almost universally the attitude towards python2. What am I missing?

Survivorship bias. Teams whose projects were seriously derailed are more likely to have stopped using and relying on Python.

Too bad for them. The rest of us get improvements. I'm way tired of being forced to use old C++ compilers because "upgrading is non revenue generating work". If you think rewriting your code in some other language is easier than upgrading to Python 3 then good luck to you.

Re: Python 2 removed from Debian

#140
post #122

As mentioned by several people already, the migration process from 2 to 3 was really painful. It will be easier for the Python core maintainers, but introducing a breaking change with the intent that that version 2 will be deprecated has probably caused more distress overall, especially maintainers of other open source projects which rely on a specific python version. Let's never have the same kind of breaking change…

I see people saying that the migration was painful, but my own experience with two separate Python 2->3 migrations were so smooth they might as well have been a minor version bumps. I don't know where this discrepancy comes from.

How big were these projects? I work on a giant py2 codebqse with thousands of _files_. I haven’t run sloccount in a while but I bet we’re over 1M LOC.

(And before anyone asks, a big part of why it’s so big is that it’s very old. So old it predates Django, so, in house framework, in house ORM, etc.)

Post reply on HN