Live data from Hacker News

Python 2 removed from Debian

bugs.debian.org

71–80 of 513 posts

Re: Python 2 removed from Debian

#72
post #4

And not a decade too soon. The Python 2 -> Python 3 migration will be studied for a long time as an example how not to release a new version of your language or library, right next to that Angular thingy. The number of headaches I've had to deal with because of this over the years have just about soured me on the whole Python offering, and I used to be a pretty big fan. Great that Debian finally pulls the plug on it,…

Forgive my ignorance, but what should have been done instead of the way the Python 2 to 3 migration happened? I know that Python 2 has stuck around for far longer than anyone wanted and that people were (are?) hesitant to migrate from 2 to 3, but I'm not sure what decisions contributed to that.

Just maintain backwards compatibility.

For us it was a change in string handling that stopped us being able to upgrade. Literally 10,000 things would have to be checked. We saw that red hat was supporting python 2 until 2025 so we decided to keep using python 2 until then. I think that once red hat stops supporting python 2 someone else will keep it running.

Python 2 still makes the world go round.

Re: Python 2 removed from Debian

#73
post #59

Earlier quoted context omitted.

> there isn't a single piece of code that I ever put together that worked longer than a few years out of the box without some breaking change The best practice, which prevents this issue, is to use envs, (as well as pinning your dependencies for any given project in a committable artifact). (Seems like a lot of people are using system Python, which isn't really recommended.)

I started a project in 2016 and used pipenv to freeze all the dependencies. A few weeks ago, I could not get it working on a new machine. Apparently the new system python broke some of the libraries. I had also pinned the python version in pipenv, but it seems like pipenv can only install python versions that are not too old. I really like the language, but all the tooling is seriously broken.

pyenv will make your life easier in this regard. that is all.

Re: Python 2 removed from Debian

#74
post #19

Earlier quoted context omitted.

Doesn't this say something about the language if it's been so difficult for people to migrate from 2 to 3? Yes, it was a major version change, but it doesn't bode well for arguments that Python is a good language to do long-term, maintainable, and large-scale development. Sure, now things are "settled" with 3, but Python continues to get more features. It just doesn't look good for the language if even doing a langua…

I think that's missing the point a little. The actual migration should you choose to do it was almost trivial. The official conversion script did most if not all the work. The changes were all cosmetic, like "print 42" changing to "print(42)". I'd say the uproar was about the minorness itself. The syntax had these tiny but otherwise incompatible changes, and for many people, for no good reason. Fo example it was deem…

> The actual migration should you choose to do it was almost trivial. The official conversion script did most if not all the work. The changes were all cosmetic, like "print 42" changing to "print(42)".

If that were it, it'd have been over a lot sooner. For some packages, bytes vs Unicode strings was bad. For many more, layers of dependencies were an impediment. The trivial stuff wasn't the problem.

Re: Python 2 removed from Debian

#75
I liked how Canonical did it: the command `python` would not execute, you have to use `python3` explicitly. This means that your old Python 2 code would not get executed if it were triggered by some shell script via the `python` command, you'd have to fix the shell script and become aware that you still need to migrate the Python script.

Re: Python 2 removed from Debian

#76

I feel like there was a batch of big software from the 90s and early 2000s that took a really long time to die, and they're not necessarily dead yet: Windows XP. Java. Python 2. IPv4. X11. Free/Open/NetBSD (1). Hell, I was using (adding new data to) a MUMPS-based system on OpenVMS until 2018. But I feel like we are seeing fewer new widely-publicized death marches now, despite many more projects starting. What changed…

> IPv4. X11

Those are from the 1980s.

Re: Python 2 removed from Debian

#77

I feel like there was a batch of big software from the 90s and early 2000s that took a really long time to die, and they're not necessarily dead yet: Windows XP. Java. Python 2. IPv4. X11. Free/Open/NetBSD (1). Hell, I was using (adding new data to) a MUMPS-based system on OpenVMS until 2018. But I feel like we are seeing fewer new widely-publicized death marches now, despite many more projects starting. What changed…

Sorry but this is an ill informed comment. Most of the stuff you are talking about is not bad, just legacy. And what are you saying about java? How is that bad? Also poeple dont like to change shit that runs well, thats why we have so much legacy stuff around. In the real world, it doesnt matter if your whole damn business is still running their warehouse system on a DOS program running in a god damn DOS emulator on…

I have a friend that I have been migrating his XP VM to new laptops for the last 13 years. XP was the last version of windows that would run his invoicing software and launching a VM is less painful for him than purchasing/learning/configuring new software. He is in his 60s now and close to retirement so for the cost of beer and pizza he has managed to avoid a huge headache.

Re: Python 2 removed from Debian

#78
post #47

And as we speak, I upgrade to 3.10 only to see my dependencies break and wonder if they have learnt anything at all.

I don't think there are any breaking changes in Python 3.10? Sounds more like a package management issue.

Depending from which version you're upgrading from. I think there are breaking changes between 3.7 (or 3.8?) and 3.10 regarding the asyncio loop. I had (simple) servers cause exceptions because they used `loop` as a keyword argument which got removed without proper deprecation.

Re: Python 2 removed from Debian

#79
I like Python 3. It eliminated a whole category of encoding/decoding errors. Even Python 2 codebases benefited from it, as libraries were updated to handle Unicode better in an effort to achieve compatibility with Python 3. I didn't experience much pain migrating codebases to it, but I'm just speaking for myself here.

Congratulations to Debian on upgrading to Python 3!

Re: Python 2 removed from Debian

#80

Glad this is finally mostly over, but... that was bad. I wonder if the energy that had to be put into this migration by everyone involved was worth what seems to be relatively small improvements. The print-as-a-statement was ugly but convenient and didn't seem like a big deal, the integer division was something that you could live with once you knew about it (and you still need to know what the current behavior is),…

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
Post reply on HN