Live data from Hacker News

Python 2 removed from Debian

bugs.debian.org

81–90 of 513 posts

Re: Python 2 removed from Debian

#81

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…

Very strange, about the whitespace. I write C++ most of the time and I love significant whitespace. I like the combination of power and (...these days, relative...) simplicity of the language for all kinds of helper tools. Probably wouldn't want to use it to write something that is large and / or needs to run fast.

Ive always found whitespace to be like variable names, restriction coming from the language always seems to make it harder to use them to convey things to the next person who comes along.

The code typesetting is for the humans not the machines.

Re: Python 2 removed from Debian

#82
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.

This is also how Debian did it, too. Actually it's probably propagated from Debian Unstable to Ubuntu.

You need to install either "python-is-python2" or "python-is-python3" packages to get proper system-wide symlinks. Also, it was strictly verboten to give either of two packages as dependencies to workaround migration procedures.

Debian Testing doesn't have Python2 at least for a year now.

Re: Python 2 removed from Debian

#83

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),…

The removal of implicit conversion between bytes and strings via ascii did not introduce bugs, it showed were you already had bugs that you maybe did not yet notice.

Re: Python 2 removed from Debian

#84
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?

Re: Python 2 removed from Debian

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

> Do you all know why 2023 will not be the year of the Linux desktop? Because desktops are a commercial market and consumers/users cannot sway what the Linux desktop experience is. And... you believe that Microsoft and Apple are swayed by users? More than Red Hat and Canonical? I don't buy that for one second.

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. A vbscript from 2000 still works to automate stuff on windows 11 even with the advent of powershell for example. They could save money and crapton of security issues by getting rid of the windows script host just as an example but they would make paying enterprise users unhappy and less likely to buy more from MS.

Re: Python 2 removed from Debian

#86
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.

At least they removed something that had been deprecated

  ERROR: gcloud failed to load: module 'collections' has no attribute 'Mapping'

Re: Python 2 removed from Debian

#87

Earlier quoted context omitted.

> It will be easier for the Python core maintainers, [...] It wasn't not even that easy, to be frank. 2to3 is not a small project [1] and they had (alas, incorrectly) assumed that there were enough people to have enough tests to be benefited from 2to3, only to be found massively wrong. In hindsight no one had a good idea about language evolution; the modern concensus is a single interpreter supporting multiple parall…

> first major language with this approach was ECMAScript 2009 (5th ed.) Not that I've any proof but I kind of find it hard to believe there were no other examples before

Perl's original "use strict" was added in 1994 with Perl 5, to allow backward compatibility with Perl 4 scripts.

Re: Python 2 removed from Debian

#88
post #56

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),…

IMO you're oversimplifying things without appreciating the scope of what went into Python 3. Core developer Brett Cannon's talk "Python 3.3: Trust Me, It's Better than 2.7" goes over most of the differences at the time (2013): https://www.youtube.com/watch?v=f_6vDi7ywuA

> "Python 3.3: Trust Me, It's Better than 2.7"

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.

Yes, Python 3 is (mostly) better than Python 2. No, it's not even remotely worth the amount of confusion and work it caused. If Python 3 had brought massive performance improvements, or proper support for multiple threads, then maybe it would have been. As it stands, Python's biggest weaknesses remain unaddressed.

Re: Python 2 removed from Debian

#89

Earlier quoted context omitted.

> It will be easier for the Python core maintainers, [...] It wasn't not even that easy, to be frank. 2to3 is not a small project [1] and they had (alas, incorrectly) assumed that there were enough people to have enough tests to be benefited from 2to3, only to be found massively wrong. In hindsight no one had a good idea about language evolution; the modern concensus is a single interpreter supporting multiple parall…

> first major language with this approach was ECMAScript 2009 (5th ed.) Not that I've any proof but I kind of find it hard to believe there were no other examples before

Python had that long before js, with __future__ imports.

But editions & friends are for syntax. Python 3 changed semantics all around. Editions are not an option when you’re changing the langage’s entire text model, especially without static typing.

Re: Python 2 removed from Debian

#90
post #85

Earlier quoted context omitted.

> Do you all know why 2023 will not be the year of the Linux desktop? Because desktops are a commercial market and consumers/users cannot sway what the Linux desktop experience is. And... you believe that Microsoft and Apple are swayed by users? More than Red Hat and Canonical? I don't buy that for one second.

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 companies pay for compatibility and stability, not "we <3 bleeding edge" Fedora or "volunteers maintaining a coherent system" Debian.

Post reply on HN