Live data from Hacker News

Python 2 removed from Debian

bugs.debian.org

431–440 of 513 posts

Re: Python 2 removed from Debian

#431

Earlier quoted context omitted.

How would Python 2 end up removed from a container image?

If someone builds a container that is designed like this: FROM debian RUN do-x RUN install python2 and then someone changes do-x, if I understand, the layers below it get invalidated and all of a sudden install python2 fails. This is very bad design but very easy to replicate.

Okay, but surely my poorly written dockerfile that grabs the wrong images and runs broken code is not Debian's or python's problem?

Older versions of debian that still support python2 will theoritically be around forever, and any codebase that absolutely needs them should always work.

(though I contend that, given that we've had 15 YEARS of warning that this was coming, such instances should be vanishingly rare and not under active development)

Re: Python 2 removed from Debian

#432
post #418

Earlier quoted context omitted.

The python2 executable still functions correctly as does all other code you have that relies on python2. Make sure the code is in the right place and run the python executable just as you have done before. However that's not what you're complaining about. You are complaining about is that you want others to support python2 forever, just as you may want browsers/sites to support `alert()`, the ` ` tag and IE 6.0 forev…

> However that's not what you're complaining about. You are complaining about is that you want others to support python2 forever, just as you may want browsers/sites to support `alert()`, the ` ` tag and IE 6.0 forever. However that's not how the world works. Incorrect. You have to understand that I am not a Python user, and don't a priori care what they do with the language. I only become annoyed when something brea…

If Python changes affect you then by definition you are a user.

Python is basically in the same situation as Perl was a decade ago, with the added benefit of mainstream, living-breathing "success stories" like all the data science stuff (numpy, scikit-learn, etc), django, etc. (And Python seems to have a sufficiently large batch of pragmatic & progressive experiments that address various challenges facing users. Decades of effort went into scraping off the warts in areas like packaging, performance, stdlib ergonomics, etc. Python also successfully reformed its leadership.)

Re: Python 2 removed from Debian

#433

As someone who does not use Python , the end result of this is that I now look into whether random utilities I use happen to be written in Python, and if so try to find an alternative. This is because I felt the pain of this transition -- again, as someone who does not program in Python. It has been miserable every time some random utility starts complaining that Python 3 is missing and then somehow when you install…

It's ok. At least our children won't have to go through this dreaded dependency hell. Also, the role of Python 3 in popularizing Python was worth all the pain. Without version 3 it would not have been where it stands today.

Re: Python 2 removed from Debian

#434
post #395

Earlier quoted context omitted.

I’m not trying to dispute whether it’s a problem. I agree it’s a problem. I’m saying that avoiding Python because of it is illogical (to me) because the problems they’re describing aren’t unique to Python, and I don’t think there’s much that doesn’t suffer from it. Perl is an odd one because, as your comment says, Perl is going 5->7 because 6 was such a disastrous break.

> I’m not trying to dispute whether it’s a problem. I agree it’s a problem. ack > I’m saying that avoiding Python because of it is illogical (to me) because the problems they’re describing aren’t unique to Python, and I don’t think there’s much that doesn’t suffer from it. I don't completely agree, but I see your point. Any interpreted language (or non-statically linked binaries) could (and does) suffer from these pr…

slight correction >Agree. And they did the right thing by actually renaming it Raku and skipping the version release.

should be >Agree. And they did the right thing by actually renaming it Raku and functionally killing the language.

Re: Python 2 removed from Debian

#435
post #349

Earlier quoted context omitted.

>You have containers that have worked for years that all of a sudden error out saying "Python 2 is no longer supported," Isn't this precisely the problem containers are trying to solve? You can update your system, get rid of unsupported software, and still keep the older version of Debian within your container that depends on an unsupported version of Python.

That's the dream of containers. Arguably this is the "reality" of Nix. But the reality of containers is that if a layer gets invalidated, you need to refetch packages that are lower down. If the Python 2 versions (or Python 2 itself) is removed, then you can't "just" surgically make the change you want in the container without affecting the rest of the system (this is a major failing of Docker, but the world we live…

Nix is also now intentionally breaking any packages that use Python 2, in my experience, so unless you're using a specific, older Nix channel, you're unlikely to have much success with anything that needs Python 2.

Re: Python 2 removed from Debian

#436
post #427

Earlier quoted context omitted.

> However that's not what you're complaining about. You are complaining about is that you want others to support python2 forever, just as you may want browsers/sites to support `alert()`, the ` ` tag and IE 6.0 forever. However that's not how the world works. Incorrect. You have to understand that I am not a Python user, and don't a priori care what they do with the language. I only become annoyed when something brea…

Ok cool but all this is just complaining that your build system isn't hermetic and that's someone else's fault? Like, what? You want to "not care about any of this" but then get annoyed when that bites you in the ass? Avoid writing huge, long rambling comments and try to simplify your arguments to less than 100 words. You may find the fault, and the fix, becomes obvious. Start with trying to refute "The python2 execu…

> Avoid writing huge, long rambling comments and try to simplify your arguments to less than 100 words. You may find the fault, and the fix, becomes obvious.

If you don't want to read the comment, then also don't bother responding. The comment is long because I am explaining a death by a thousand paper cuts situation. Don't worry, Python isn't going to die just because I don't like it. You don't have to defend Python even if you don't feel like reading my comment. You can also just ignore it or come back to it when you have time to engage with it thoughtfully, instead of just asserting you are correct and having your only argument be that I can't fit my argument to the arbitrary word length you've come up with.

> Those where the first that came to mind. There are many others, and many more if you widen it to server-side JS.

You should stick to talking about Python. This is just not the case and not the culture of browser JS. It's honestly fairly disrespectful of the monumental work browser engineers have done to make that a reality. If you want to switch your argument to server-side JS (where blink and alert don't exist and you are thus leaving it completely as an exercise to the reader to come up with the similar situation), fine, but node 0.10 runs exactly the same today as it did 10 years ago. Again, the bar I am setting is low: have the unchanged thing still gettable and still runnable. I get it. When you work in a certain environment, you imagine all the problems it has must be common and all the benefits are unique. But that isn't the case with this particular problem.

Re: Python 2 removed from Debian

#437

Earlier quoted context omitted.

> The python maintainers went out of their way to break things - and were smug about it. That’s what it felt like to the community. The other side of that coin is that the python maintainers went out of their way to push back the Python 2 EOL. They kept on pushing the date back and back again, as per the sunset page: "We did not want to hurt the people using Python 2. So, in 2008, we announced that we would sunset Py…

> I have no time for whinging snowflakes complaining 12 years (2020-2008) was not enough time to migrate their code to Python 3. Hell, even the original 7 years (2015-2008) should have been long enough for 99.999999% of the community. I'm old enough to have read this when it came out...and it changed my view on backwards compatability (from Joel Spolsky of Trello, FogBugz, and StackOverflow fame) "Code doesn't rust":…

I mean, code does rust in many ways.

Not just talking ASCII was one of the first ways.

Drift in 3rd party library support is another.

Security support of the language and libraries is a massive one.

Simply put as hard as you try to stand still the rest of the world is not going to.

Re: Python 2 removed from Debian

#438
post #427

Earlier quoted context omitted.

Ok cool but all this is just complaining that your build system isn't hermetic and that's someone else's fault? Like, what? You want to "not care about any of this" but then get annoyed when that bites you in the ass? Avoid writing huge, long rambling comments and try to simplify your arguments to less than 100 words. You may find the fault, and the fix, becomes obvious. Start with trying to refute "The python2 execu…

> Avoid writing huge, long rambling comments and try to simplify your arguments to less than 100 words. You may find the fault, and the fix, becomes obvious. If you don't want to read the comment, then also don't bother responding. The comment is long because I am explaining a death by a thousand paper cuts situation. Don't worry, Python isn't going to die just because I don't like it. You don't have to defend Python…

It’s possible to explain a death by 1000 cuts situation in less than ~630 words. Despite that in the now nearly 1,000 words you’ve written in this sub thread alone you haven’t really asserted anything concrete.

Start with trying to refute "The python2 executable still functions correctly as does all other code you have that relies on python2" without referencing anything specific to your build practices.

Re: Python 2 removed from Debian

#439

Earlier quoted context omitted.

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

> You shouldn’t be using the system-provided Python for anything except system-wide tools That does not sound like a user friendly programming language. The version compatibility of Python is a joke and has been after 2.7 to 3 to. Which is the main reason I don't use Python for anything but bash-like scripts.

One major problem is that some version of Python was supplied with most Linux/Unix distributions - this allowed people to get started without thinking about this problem and then end up too deep in the hole by the time they realise.

Other languages or OSes that don't have their interpreter bundled forced you to think about the problem from the start and build a way to ship a stable version of the runtime with your application.

Python, as a server-side programming language is not too bad. You can standardise on a version and bundle that interpreter version with your application itself in whatever artefact you produce (whether a Docker container, tarball with Python binaries + source or entire VM image with the right Python version installed).

Desktop distribution is a pain, but that's not limited to Python; any language that can't compile to a native binary will have this problem - even Java, despite having much better backwards compatibility, still isn't prefect and sometimes requires an older JRE to be installed on your target machine.

Re: Python 2 removed from Debian

#440
post #375

Earlier quoted context omitted.

> This is totally false - code produced by 2to3 no longer ran on 2. That's what "breaking changes" and "backwards incompatible" means. What exactly is hard to grasp? > So you ended up w a chicken and egg problem. You really don't. Your code and your upstream dependencies need to be ported to python3. Once your dependencies are updated, all that's missing is you doing your job. Python2 has been on the path to deprecat…

Ok, so what happens when several of your dependencies never ported? This isn't strawmanning - this is literally the case for a codebase I'm working with today .

> Ok, so what happens when several of your dependencies never ported?

If you're consuming dependencies which were never updated in the past decade then you have more worrying problems to deal with than porting your code to python3.

Post reply on HN