Live data from Hacker News

Python 3.12.0 is to remove long-deprecated items

discuss.python.org

231–240 of 257 posts

Re: Python 3.12.0 is to remove long-deprecated items

#231
post #139

Earlier quoted context omitted.

Several groups of people offered to maintain python 2. They were told very clearly they could not do so "officially", and we're even threatened with lawyers if their thing looked like it could be mistaken for "Python 2".

Do you have pointers to that? The one I saw was called “python 2.8” which is definitely a point of confusion for people who might think it was supported.

Look up Tauthon , believe that was the name.

Re: Python 3.12.0 is to remove long-deprecated items

#232
post #78

Earlier quoted context omitted.

In your example, how did you install python 3.10 and 3.11? That's part of what pyenv solves for you.

it's very easy to install them, probably easier than learning pyenv but I have not tried. I just want to use the default settings as much as possible, they're guaranteed to stay as long as python is alive and typically have less surprises for me on daily coding.

Install a python version on your system:

    $ pyenv install 3.11-dev (or use pyenv install --list to show list all available versions to install)
Use it in your current shell:

    $ pyenv shell 3.11-dev
Use it in the project directory:

    $ pyenv local 3.11-dev
Use it as the global default:

    $ pyenv global 3.11-dev
All of the mentioned commands can be called with no arguments to show the current python version for the context.

There you go, now you know pyenv. Call it with no arguments to show the other possible commands.

Re: Python 3.12.0 is to remove long-deprecated items

#233
post #135

I'm normally joyful when a modern language (say, julia) decides to break backward compatibility to improve the language on a fundamental level. This is mostly because I'm not too vested in it. For languages where I have 10+ years of work behind, it's the exact opposite, and where I see the c/c++ model of not breaking backward compatibility a much saner choice. Python in particular is an extremely bittersweet pill to…

For a different perspective, I started using python about 5 years ago, and I never experienced a single breakage due to a new python release. Instead, I'm always excited to read new version releases notes and it's the only thing that may make me move away from debian stable someday. But waiting a few months, using containers, or compiling a newer python is usually fine when I can't wait. Removing deprecated stuff is……

5 years is not enough to be experiencing this. The pain is very real and consumes a tremendous amount of effort. I've started writing tools just to create inventories of which packages with which versions I'm using where in order to try to automate the upgrading of virtual environments as much as possible. It's a horrible experience.

The biggest boulder I currently see rolling towards me is the MongoDB driver since I need to upgrade the databases and the drivers can't cope with the latest version.

Re: Python 3.12.0 is to remove long-deprecated items

#234

Earlier quoted context omitted.

Can you detail any of these "small and large breakages" or "bit rot"? It just doesn't jive with my experiences with any large code bases in nearly any language, python included.

Python 3.10 introduced asyncio changes that broke compatibility with earlier 3.x releases. I don't have the details at hand, but as I recall, some code that supported caller-supplied event loops not only broke, but could no longer be made compatible with both old 3.x and new 3.x python versions (unless separate code paths were maintained). This was frustrating, because I don't expect point-releases to break the stand…

I had the same experience. I was pretty annoyed to see that some server apps were unable to run after the upgrade because of some changes to the loop. "Why?", I was asking myself.

Re: Python 3.12.0 is to remove long-deprecated items

#235
post #208

Earlier quoted context omitted.

Obsolete doesn’t mean something has no possibility of being useful but rather that it’s no longer commonly used because there are better alternatives. My son’s beloved steam locomotives still run but nobody uses them for normal commercial service because they became obsolete shortly after the invention of diesel and electric. > (of words, equipment, etc.) No longer in use; gone into disuse; disused or neglected (ofte…

As discussed in the thread above, there are scenarios in which lack of encryption etc is simply not relevant. And when that is the case, why would you prefer a more complicated protocol with more moving things that can go wrong?

Add an example for you: why I need to encrypt the telnet traffic to my LXI multimeters on my bench?

It just doesn't make sense to encrypt everything.

Re: Python 3.12.0 is to remove long-deprecated items

#236
post #27

This is a reminder that the excellent pyenv [0] project can help you manage all your Python versions. - Set global and per-project python versions - Not written in Python. - Shims your PATH - Linux, Mac, Windows [0]: https://github.com/pyenv/pyenv

I should maybe test out pyenv again. I tried it several years ago but I ran into some limitations. Or at least I thought I did, I might just have used it wrong. My main usecase, back then at least, was to have just one global-like environment for every Python version I was working with. And sometimes and additional one for debugging/testing some different packagecombinations. Back then it seemed like, to me, that pyenv only worked on a per-project basis, but I might just have followed incomplete guides and not looked into it deep enough.

Re: Python 3.12.0 is to remove long-deprecated items

#237
post #55

Earlier quoted context omitted.

Merriam Webster lists the following relevant meanings for "deprecated": > to express disapproval of > to withdraw official support for or discourage the use of (something, such as a software product) in favor of a newer or better alternative In other words, deprecated is a strong signal that one should strive to migrate from items marked as such.

So what? As long as it works, don't change it. This parts are deprecated since up to nearly a decade (Python 3.2 was released February 20th, 2011). And they will work for some more years. Some have not even a working replacement yet. Investing now in changing old code just to be compatible to a not even released version, is a bit pointless if you have more important work on the list.

Python 2 was supported for way longer than initially announced. Distutils as well. Maybe deprecated is not a strong enough signal because many projects hesitate to cut stuff loose that they deprecated because of the community backslash. Sometimes things have to be deprecated, but the community will never get around to adapt to that if they stick around forever.

Compared to that, Java still carries some deprecated items around. But with Java 9, deprecation for removal was introduced, which is a strong signal that stuff will be gone in two releases. Kubernetes has a strict deprecation policy as well, such that skipping more than two releases is asking for trouble.

Re: Python 3.12.0 is to remove long-deprecated items

#238
post #52
post #48

Earlier quoted context omitted.

I can't comment on the quality of the tool, I just don't like this attitude of "just use this tool we don't support, hosted on some platform we don't control, which might disappear tomorrow". Back in the day, this tool would have been shipped (and supported) with stdlib, or at least be frozen somewhere "official".

That tool is not a permanent addition to the list of dependencies, but for a single migration effort. As such, it is unnecessary to include it in the standard library.

It should still be hosted somewhere that won't disappear tomorrow if GH goes bust or starts packing malware.

Re: Python 3.12.0 is to remove long-deprecated items

#239
post #176

Earlier quoted context omitted.

No need to disagree, that's just two different design patterns among programming languages. If stuff like that matters, you can always choose Ruby or something similar. It has its own shortcomings though and neither approach is ideal in every situation. That being said, the transition from Python 2 to 3 was the most horrible thing that ever happened to a popular language. Print for example was fine as a keyword and f…

Meh, the print change was fairly trivial. You could backport the print function in Python 2 codebases, and updating existing print statements to use the function was easy to automate. String changing from bytes to Unicode was a lot more painful, in my experience.

That was just the surface. Even the Python Foundation knew that their 2to3 converter tool just wasn't sufficient and hat to delay the discontinuation of Python 2 for half a decade, because there was so much unportable code out there. In the end we had 12 years where the two languages lived side by side and my first job using Python had us use 2.7 for new projects due to library concerns despite 3 being around for more than 7 years already.

Re: Python 3.12.0 is to remove long-deprecated items

#240

Earlier quoted context omitted.

This is the top reason I chose Perl for my project. Literally every time I try to use someone else's Python code from GitHub I run into this crap. I wanted my project to be easy to install and run, so I chose Perl.

I have had Perl scripts which I've not used for 15 years, run them expecting to need to fix something , but nothing needed ...

The really nice part of sticking with python2 is that it is now a a stable interface. just like perl 5.

only half joking.

Post reply on HN