Live data from Hacker News

Python 2 removed from Debian

bugs.debian.org

111–120 of 513 posts

Re: Python 2 removed from Debian

#111
post #97

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.

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?

Re: Python 2 removed from Debian

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

If you upgrade the runtime / compiler, you'll run into changes of behaviour. This really applies to almost every implementation out there. This applies across the board with large enough codebase.

Re: Python 2 removed from Debian

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

Most of the issues I've found are C ABI issues with 3.10, but that usually just requires upgrading the dependency.

3.8 is a bigger C ABI roadblock than 3.10.

Re: Python 2 removed from Debian

#114
post #86

Earlier quoted context omitted.

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'

That was a 3.8 change I think? It moved from collections to collections.abc, IIRC.

Re: Python 2 removed from Debian

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

My biggest pain point with Python is C / Rust dependencies. So, not really Python per se, as I suspect any language relying on C ABIs will hit the same issues.

Re: Python 2 removed from Debian

#116

Earlier quoted context omitted.

Probably not. Java is going through the same exact thing with Java 8 right now. The issue is that humans don't plan ahead for when the software they use inevitably goes EOL, be it programming languages, libraries, or operating systems, and so only really do so when forced (sometimes only after a security incident). In the case of Python 2 and Java 8, the problem was/has been exacerbated by the organization supporting…

> So why would anyone decide, much less how would one justify to a corporate overlord, to spend all the time and resources to refactor their code, upgrade libraries (assuming the libraries themselves upgrade), update build systems, perform extensive regression testing, and everything else, just for a version that would be EOL one year after what they just upgraded from? The longer you delay upgrades, the bigger the d…

Most Java versions are good about backcompat, almost all the pain comes with Java 9 actually enforcing boundaries and breaking things that had merely been discouraged before (in the name of JDK modularization, which we otherwise aren’t interested in).

Re: Python 2 removed from Debian

#117
post #54

print "goodbye, sweet prince" I've been slowly porting a lot of my legacy code from 2 to 3 on an as-needed basis, there's a few bits though that are just too huge/crusty/etc that they will never get ported.

I can't even imagine what terrible hacks you had to spawn to be able to claim this.

A lot of code I wrote over the years handles raw bytes, treating them as strings (sometimes), shuffling them over sockets, doing stupid things with said sockets, etc.

Lots of abuse of how weakly/poorly/forgivingly typed Py2 is.

Doing the same processes in Py3 is actually headache inducing because of the much stronger typing system.

Re: Python 2 removed from Debian

#118
Meanwhile we are still living our Python 2 like moments in .NET and JVM ecosystems, with the huge amount of projects stuck in .NET Framework and Java 8, with no end in sight of them ever moving forward.

Re: Python 2 removed from Debian

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

There were some breaking changes within Python 3.10, mostly esoteric features that didn't seem to be used that much. Lots of deprecation warnings though and some C API changes that did break at least one package I used.

When I worked on patching/rebuilding all the Python packages for Alpine's upgrade to Python 3.10 I remember quite a few things being broken and needing patches (maybe about 5% of the overall packages), but a lot of those were also test failures due to the new deprecations, so while some stuff did truly break, it was pretty rare.

[1] https://docs.python.org/3/whatsnew/3.10.html (see the removed section especially)

Re: Python 2 removed from Debian

#120
post #96

Earlier quoted context omitted.

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

Pipenv has pyenv integration. It just doesn't work with python 3.6 on my machine. My guess is that it tries running pipenv itself with the old interpreter and is no longer compatible. In any case, faffing around with 25 different third-party solutions is a horrible developer experience.

I feel you.

Fwiw what I've settled on that seems the most stable is to use pyenv as the "outer layer", as it shims the python interpreter along with any venvs so you don't get conflicts / heisen-incompatibility. Lets you use anaconda envs as children as well. The real trick, I think, is to pick one system as the canonical master env controller and don't deviate.

Post reply on HN