Earlier quoted context omitted.
The title is referencing this line (not TFA's actual title): > In the unittest module, a number of long deprecated methods and classes were removed. (They had been deprecated since Python 3.1 or 3.2). I doubt your projects are using 3.1 or 3.2 (or older, except perhaps 2.7, but then you wouldn't care that 3.12 was removing something deprecated vs 3.11 which has it)?
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.
Python 3.12.0 is to remove long-deprecated items
91–100 of 257 posts
Re: Python 3.12.0 is to remove long-deprecated items
#92Damn! I guess it's time to cross out my snippet of running a debug smtp server in almost any Linux distro & Mac:
python -m smtpd -n -c DebuggingServer localhost:25
> Remove the distutils package. It was deprecated in Python 3.10 by PEP 632
So apparently we need to replace
from distutils.version import StrictVersion
with
from pkg_resources import parse_version
A bit labor for my code but OK.
Re: Python 3.12.0 is to remove long-deprecated items
#93Earlier 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.
Dont't most linux distros have separate packages for most recent python major versions, so that they can't installed in parallel?
Re: Python 3.12.0 is to remove long-deprecated items
#94This 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
> Pyenv does not officially support Windows and does not work in Windows outside the Windows Subsystem for Linux. I don't only use Win but I do use windows, so having to use different tooling makes pyenv a hard to swallow pill
Re: Python 3.12.0 is to remove long-deprecated items
#95This should have been called Python 4 if they are removing this many things in a breaking fashion. Is the disaster of the python 2->3 rollout preventing them from doing so? Either way, doesnt effect me, python 2.7 forever.
Re: Python 3.12.0 is to remove long-deprecated items
#96This 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
> Pyenv does not officially support Windows and does not work in Windows outside the Windows Subsystem for Linux. I don't only use Win but I do use windows, so having to use different tooling makes pyenv a hard to swallow pill
Re: Python 3.12.0 is to remove long-deprecated items
#97Speaking 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.
It's nice to not have to depend on anything external, but boltons is something I just treat as an expanded part of the standard library.
Re: Python 3.12.0 is to remove long-deprecated items
#98While 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
#99This 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
How does pyenv compare with conda, mamba, pip and poetry? I typically use conda but ever since they broke with python 3.10 I have been considering moving to other environment managers.
Re: Python 3.12.0 is to remove long-deprecated items
#100wait, since when python.org has a discuss subdomain? And it's running Discourse which is built on RoR? What the...
Besides, a few years ago they moved from Mercurial to Git(Hub).