Live data from Hacker News

Python 3.12.0 is to remove long-deprecated items

discuss.python.org

81–90 of 257 posts

Re: Python 3.12.0 is to remove long-deprecated items

#81

I see telnetlib is on the way out in 3.13 or so, which means a lot of pointless busywork in my future. Its a super useful module for a lot of tasks. The suggested replacements either are asyncio based (which means whole ass rewrites as asyncio is really fucking opinionated), or are excessively restrictive in some stupid way. "Infosec" at work tend to raise a ruckus when their scans detect "older" versions of Python o…

[deleted]

Re: Python 3.12.0 is to remove long-deprecated items

#82

I see telnetlib is on the way out in 3.13 or so, which means a lot of pointless busywork in my future. Its a super useful module for a lot of tasks. The suggested replacements either are asyncio based (which means whole ass rewrites as asyncio is really fucking opinionated), or are excessively restrictive in some stupid way. "Infosec" at work tend to raise a ruckus when their scans detect "older" versions of Python o…

I would expect them to move telnetlib to a separate, unsupported repo that you can then import.

Even if they don’t, from a cursory view, it seems it’s a pure python library (https://github.com/python/cpython/blob/main/Lib/telnetlib.py).

If so, can’t you copy the current code into your project? You would take on the burden of supporting it, but looking at https://github.com/python/cpython/commits/main/Lib/telnetlib..., that doesn’t seem to be much of a burden.

Re: Python 3.12.0 is to remove long-deprecated items

#83

I see telnetlib is on the way out in 3.13 or so, which means a lot of pointless busywork in my future. Its a super useful module for a lot of tasks. The suggested replacements either are asyncio based (which means whole ass rewrites as asyncio is really fucking opinionated), or are excessively restrictive in some stupid way. "Infosec" at work tend to raise a ruckus when their scans detect "older" versions of Python o…

You should be able to repackage it as a module.

Re: Python 3.12.0 is to remove long-deprecated items

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

as of late I've settled on using asdf[0] rather than nvm, pyvenv etc. [0] https://asdf-vm.com/guide/getting-started.html

Agreed, asdf is the last stop for me, and uses pyenv internally anyway for python

Re: Python 3.12.0 is to remove long-deprecated items

#87
Speaking of standard lib, today I was looking to do a sliding window over an iterator and ended up on the pairwise function in itertools that was added in 3.10.

Seems like such a wasted opportunity, to add a sliding window for n=2, and then in the documentation add a recipe for a sliding window function for any n.

Re: Python 3.12.0 is to remove long-deprecated items

#88
post #10

While it's been coming for a long time, it's still frustrating to see the cgi module go. It's going to create a load of busy work to rewrite some low-traffic scripts. Modules being removed [edit: in 3.13]: https://docs.python.org/dev/whatsnew/3.12.html#pending-remov... Updating CGI scripts will be a bit fiddly: https://peps.python.org/pep-0594/#cgi

Just copy out cgi.py and use it as a module.

https://github.com/python/cpython/blob/3.11/Lib/cgi.py

Re: Python 3.12.0 is to remove long-deprecated items

#90
post #55

Earlier quoted context omitted.

Deprecated does not mean removed. They are still there, working fine, having no big reason to change them. I know it, as I just checked my and my workplaces code, and there are several usages of deprecated code. And we are on 3.9/3.10.

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.
Post reply on HN