Live data from Hacker News

Python 2 removed from Debian

bugs.debian.org

241–250 of 513 posts

Re: Python 2 removed from Debian

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

Yes they do care, about profit that is. Doing random stuff users want isn't usually profitable though which is why I like the configurability of Linux. But if users who pay up demand something they will listen unless it contradicts with a more profitable business strategy.

> Then surely the comparison is RHEL, where companies pay for compatibility and stability, not "we Unfortunately, RHEL and SLED are both targeting enterprise users, very little of that is desktop as well.

You know who else succeeded in the Linux desktop that isn't really considered proper Linux? ChromeOS on the ChromeBook.

If only these new laptop makers like purism or system76 took a similar radical approach where they would indeed listen to paying users more directly better than existing bigcorps, that would give Linux on the desktop a chance at market share gains that are significant. Then I would be comfortable gifting a Linux laptop to a non-technical user who can call a support line when having issues or needing a feature.

Re: Python 2 removed from Debian

#242
post #88

Earlier quoted context omitted.

> "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…

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

Agreed. Unicode change alone would be sufficient do to Python 3.

Re: Python 2 removed from Debian

#243
post #231

I really feel like the community was a difficult pain in the ass during the 2->3 migration. There were breaking changes but I’m sure the Python maintainers didn’t expect the community to react so badly. Are there some valid reasons that made 2->3 migration insanely hard for some projects? I remember seeing blog articles whining about print vs print(), but surely there are some more important stuff.

> Are there some valid reasons that made 2->3 migration insanely hard for some projects?

Print was a non-issue once you could do "from __future__ import print_function". It was the unicode migration.

All string handling from I/O required at least checking.

The dependency issue was the most crippling, though: because you can't load Python 2 code from Python 3, before your project can begin migrating you have to wait for all your dependencies to update as well. This may involve them changing the types that get passed over the API from 'str' to 'bytes' or vice versa, which is potentially a breaking change.

Re: Python 2 removed from Debian

#244
post #236

Earlier quoted context omitted.

Genuinely curious, what would you like it to look like?

golang has a wonderful solution

Would you care to elaborate on what it is and why it's better for the benefit of those of us who don't know Go?

It's tricky to look up a different solution you aren't familiar since the terminology is different. What I'm seeing currently doesn't really look that different to Python, but with different names for the types and such.

Taking a stab at it; This looks simple, and runes are great (similar to Python):

https://golangdocs.com/strings-in-golang

But something that bothers me is that converting an array of bytes to a string looks to implicitly be ASCII, or possibly UTF8. This document doesn't say.

This document acknowledges encodings and clarifies that literals are UTF8, but makes no mention of byte arrays:

https://go.dev/blog/strings

I've poked through as many SO questions as I care to and am not clear on how to use different encodings. Looks to me like this is a difference in philosophy; Python would say, explicit is better then implicit, and I'm inclined to agree.

If I'm not understanding properly I'm happy to be corrected.

Re: Python 2 removed from Debian

#245
post #184
post #56

Earlier quoted context omitted.

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

The changes Python made was made in Perl without breaking compatibility, you just wrote say use v5.24 in header to use given feature set (defaulted to something old to not break old stuff) The Py3 approach was terrible and wasted untold amount of hours just because you had to migrate everything, you couldn't just upgrade codebase piece by piece like in case of Perl. At the very least they should've just made new one…

Isn't that effectively what was done with Python? You'd do "#!/usr/bin/env python" for old code and "#!/usr/bin/env python3" for new code. Rather than it being wrapped up in a single entry-point, you had the different runtimes and library sets.

Re: Python 2 removed from Debian

#246
When (if?) the dust settles, I'd love to watch a technology focused documentary to hear the historic retelling of all the python 2 to 3 events. It started before I started programming, I don't program in python much, and thus I don't have a ton of context.

If anyone has any good resources I could browse that might help me understand the full story feel free to share.

Re: Python 2 removed from Debian

#247
post #231

I really feel like the community was a difficult pain in the ass during the 2->3 migration. There were breaking changes but I’m sure the Python maintainers didn’t expect the community to react so badly. Are there some valid reasons that made 2->3 migration insanely hard for some projects? I remember seeing blog articles whining about print vs print(), but surely there are some more important stuff.

Migrating where there’s a 1-1 mapping of old API to new API is easy, such as the print to print() change. The hard part is when there’s a 1-N mapping, where a single name in the old API becomes multiple names in the new API. These are the most useful changes to make, because they can split apart unrelated concepts that had been erroneously represented by the same object, but require a human to determine which use case applies.

For python2, the str class could either contain a sequence of characters, or could contain a sequence of bytes. These are often conflated when using ASCII encoded text, but are very different for any other encoding. In python3, these are represented by the str class for a sequence of characters, and by the bytes class for a sequence of bytes. It’s so much nicer to work with, but required manually separating out the earlier use case.

Re: Python 2 removed from Debian

#248
post #129

Earlier quoted context omitted.

The best thing about significant whitespace is the reduction in pernickety code review comments about it compared to other languages. If you also agree to "just run black" to format code then that kind of bullshit drops to almost 0 in a team.

The bad thing about significant whitespace is it breaks copy-pasteability of code, with no way to get broken formatting back without understanding what the code does. That is a lot worse than formatting squabbles, especially for a glue language where you are expected to be able to copy snippets for short scripts all the time.

That and even with version control you will always have to keep an eye out for accidental deletion of the last bit of whitespace on any code block. It's a pretty easy mistake to overlook without context.

Re: Python 2 removed from Debian

#249

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

Honestly curious if it would have possible to make it better/faster.

Re: Python 2 removed from Debian

#250

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…

Look, the breaking change to python3 was a disaster. There’s no need to sugar coat it. It was incompetently managed, in a way that made the technical success of the work look like a failure. That’s on them. They screwed up. I lived through it; I feel no particular need to smile and nod and say “it wasn’t that bad”. It was bad. Things are good now! Python 3 is great, it’s well supported and the people involved all lea…

> No one is seriously going back to Python 2 at this point.

No, the community is stupid and wrong. My machine learning professor (actual professor, not a teaching assistant) only used Python 2 in 2017. Imagine how many people had their opinions shaped by someone like them.

> … it is: never do this.

By that standard, we would never get things like angular 2 or Raku.

Would it be better if we renamed Python 3 to some other name and pretended it was a completely new language?

Post reply on HN