Live data from Hacker News

Python 2 removed from Debian

bugs.debian.org

101–110 of 513 posts

Re: Python 2 removed from Debian

#101
post #42
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…

The string/bytes encoding lead to some weird runtime problems in a codebase I maintain (the quality of which is probably not that great to begin with). Also changes in non-statically compiled languages will always be a bit tricky. In general, a comprehensive unit test suite is required to step in for the compiler, otherwise there's no confident refactoring. But python is sooooo ubiquitous it's crazy, and most code do…

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.

Re: Python 2 removed from Debian

#102
post #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!

Yeah, coming from C#, Python 2's unicode support was so bad I almost abandoned it immediately as a Chinese speaker (and to make it worse, I use Windows). You literally can't use IDLE for learning/testing properly half of time due to encoding issues.

And what surprised me most is that every time I mentioned this, there would be lots people telling me how this is a superior design because you can operate string like bytes. I mean, it of course has its upside, but I don't think it's worth it if you care even slightly beyond ASCII.

Re: Python 2 removed from Debian

#103
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…

Let me be blunt here: Python sucks, but that's at the level of 'programming languages people complain about and programming languages nobody uses'. However the Python libraries absolutely rock and the ease with which you can get really performant number crunching code out of what is nominally an interpreted language is amazing. Statistics, machine learning, engineering, the notebooks etc, I would not pick anything el…

Funny, for about every point I feel the opposite way :-). Python is an elegant language that hits the sweet spot where it is very expressive, and easy to do what you want, and at the same time has enough structure so you don't produce a mess all the time.

The libraries are very powerful, but a lot of them are hacks. Numpy and Pandas totally rely on magic and overloading the array indexing operator. You can't express a problem the natural way or it will be slow, you have to think the numpy way. I find it especially confusing if you create expressions with numpy arrays. Am I operating on them element wise, or creating a "cross product", or am I creating some kind of magic indexing object? Matplotlib is also annoying, there are so many ways to do things and half of it is object oriented, while half of it uses global state.

One thing I like about Python are the web frameworks (Django, Flask). Async is also good, although it took almost 10 years for vanilla Python to catch up with what Twisted already had.

About code breaking I also have the opposite experience. I wrote a little Gtk app in the late 2000s and it worked with little or no changes for many Python and Gtk versions, thanks to the dynamism of Python. That would be completely impossible with a compiled language.

Re: Python 2 removed from Debian

#104
post #58

This really sucks but at least pyenv exists. Basically distros care so little about their users we have to use external tools to use python2. "Everyone has has a chance to migrate" . Doesn't work that way, just yesterday I spent a few hours trying to get scripts that are really good and would take me forever to migrate that are in python2 to work on an ubuntu based distro and this is with pyenv, custom venv,etc... ju…

You shouldn’t be using the system-provided Python for anything except system-wide tools that can be packaged and marked dependent on the system Python package (and any Python packages which are packaged as system packages - don’t use “pip install” system-wide). The system-provided Python is mostly there to support system packages/tools that happen to be written in Python.

Stand-alone applications should use pyenv/venv because you can’t guarantee which version of Python is the system-wide one (and you don’t necessarily want to tie your app to the distro’s release schedule). Dependencies should always be in a venv as to not interfere with the system-wide ones or other applications.

If the removal of Python from distro repos breaks your things then it’s a wake up call and you’ve been doing it wrong the whole time. Fortunately it’s an easy fix.

Re: Python 2 removed from Debian

#105
post #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.

I dont know python. Does python3 have different behaviour than python2 on the same code, beyond just crashing?

You can write code that runs in both interpreters. Same syntax can have different behavior.

I guess nowadays, as the py2 compatibility is a thing of the past, most programs would crash when using that interpreter version.

Re: Python 2 removed from Debian

#106
post #85

Earlier quoted context omitted.

For sure, market studies, focus groups,etc... look at windows 7 for example, fixed a lot of complaints users had about vista but to your point, their customers that have influence are those that pay the most which are bigcorps with MS and multimedia editors with apple. Do you know why MS is bloated and "slower"? Because of all the technology they support from decades ago and all the interpperability layers in between…

> For sure, market studies, focus groups,etc... look at windows 7 for example, fixed a lot of complaints users had about vista That's true. Now look at 8, 10, and 11 and tell me with a straight face that they still care. > Do you know why MS is bloated and "slower"? Because of all the technology they support from decades ago and all the interpperability layers in between. Then surely the comparison is RHEL, where com…

> That's true. Now look at 8, 10, and 11 and tell me with a straight face that they still care.

Do you see the Metro start screen anywhere on Windows 10 or 11?

If they weren't swayed by user input, why did they throw away all that time, effort, and energy put into the the Metro UI and go back to the start menu paradigm?

Re: Python 2 removed from Debian

#107
post #42

Earlier quoted context omitted.

The string/bytes encoding lead to some weird runtime problems in a codebase I maintain (the quality of which is probably not that great to begin with). Also changes in non-statically compiled languages will always be a bit tricky. In general, a comprehensive unit test suite is required to step in for the compiler, otherwise there's no confident refactoring. But python is sooooo ubiquitous it's crazy, and most code do…

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.

Re: Python 2 removed from Debian

#108

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

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 you're still using 3.6 you're limited in your ability to upgrade dependencies, 3.8 is generally the minimum supported Python version these days.

Re: Python 2 removed from Debian

#109

Earlier quoted context omitted.

Let me be blunt here: Python sucks, but that's at the level of 'programming languages people complain about and programming languages nobody uses'. However the Python libraries absolutely rock and the ease with which you can get really performant number crunching code out of what is nominally an interpreted language is amazing. Statistics, machine learning, engineering, the notebooks etc, I would not pick anything el…

Funny, for about every point I feel the opposite way :-). Python is an elegant language that hits the sweet spot where it is very expressive, and easy to do what you want, and at the same time has enough structure so you don't produce a mess all the time. The libraries are very powerful, but a lot of them are hacks. Numpy and Pandas totally rely on magic and overloading the array indexing operator. You can't express…

Interesting, and nice to have a contrasting datapoint.

I do think that "The libraries are very powerful, but a lot of them are hacks. Numpy and Pandas totally rely on magic and overloading the array indexing operator. You can't express a problem the natural way or it will be slow, you have to think the numpy way. I find it especially confusing if you create expressions with numpy arrays. Am I operating on them element wise, or creating a "cross product", or am I creating some kind of magic indexing object? Matplotlib is also annoying, there are so many ways to do things and half of it is object oriented, while half of it uses global state." is an illustration of my point: the language itself isn't powerful enough to do the job so you rely on a lot of libraries written in different languages to glue it all together.

An 'elegant' language would provide a way to do so without all of these leaky abstractions.

To me Clojure is such a language, but it doesn't nearly have the kind of ease of use that Python has.

Re: Python 2 removed from Debian

#110

Earlier quoted context omitted.

> For sure, market studies, focus groups,etc... look at windows 7 for example, fixed a lot of complaints users had about vista That's true. Now look at 8, 10, and 11 and tell me with a straight face that they still care. > Do you know why MS is bloated and "slower"? Because of all the technology they support from decades ago and all the interpperability layers in between. Then surely the comparison is RHEL, where com…

> That's true. Now look at 8, 10, and 11 and tell me with a straight face that they still care. Do you see the Metro start screen anywhere on Windows 10 or 11? If they weren't swayed by user input, why did they throw away all that time, effort, and energy put into the the Metro UI and go back to the start menu paradigm?

Okay, I'll give you 10, but they still shipped Metro in the first place, and then did that to the start menu in 11.
Post reply on HN