Live data from Hacker News

Python 3.12.0 is to remove long-deprecated items

discuss.python.org

251–257 of 257 posts

Re: Python 3.12.0 is to remove long-deprecated items

#251
post #240

Earlier quoted context omitted.

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.

I would consider it, except it is no longer being installed most places, since it is "deprecated".

Re: Python 3.12.0 is to remove long-deprecated items

#252

Earlier quoted context omitted.

You can. Package everything you need with the environment and you’re done. Now whether future versions of whatever container you choose to run it in will support establishing the environment is a separate detail. There is no answer. You can go all the way to reserving an entire computer to run mission critical code but you don’t know if it is future proof in terms of electrical specifications. That’s the point of civ…

> You can go all the way to reserving an entire computer to run mission critical code but you don’t know if it is future proof in terms of electrical specifications. See, that's a beautiful example, just not in the direction that I think you intend it. I can, in fact, take an appliance that's a few decades old and plug it into a modern outlet and it'll work just fine. I do not, in fact, have to preserve an entire ele…

No it is an example exactly in the incorrect way that you took it. Just because electricity has been relatively constant in specification doesn’t mean it’ll always be the case. You can work with that assumption up to even a third or fourth order approximation. But on some level it’ll fail.

Which brings you to the larger generalization that you haven’t grasped: the further down the stack you go, the more stable it is. Python is nearest the top layer. Hardware changes in decade cycles. Electricity likely in century cycles. Keep going. The laws of physics change never. Obv the time scales aren’t strictly logarithmic. Human ingenuity means we could find some exceptional electricity specification tomorrow and convert the whole world in one decade. But it is relatively rarer.

Re: Python 3.12.0 is to remove long-deprecated items

#253

Earlier quoted context omitted.

> Set global and per-project python versions Does that mean I can do things like install black and jupyter once and use that install across projects?

Yes? I mean that's just how standard python works as well.

I use anaconda and every time I create a new environment I have to install jupyter and black in order to have access to them after running `conda activate $envname`.

Re: Python 3.12.0 is to remove long-deprecated items

#254
post #135

Earlier quoted context omitted.

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…

We have recognised this problem and to that end we have produced a Stable API standard https://www.mongodb.com/docs/manual/reference/stable-api/

I realise this doesn't help you with historical API changes.

If you look for help in the MongoDB community and tag me (Joe.Drumgoole@mongodb.com) I will make sure you get help migrating your app.

https://www.mongodb.com/community/forums/

Re: Python 3.12.0 is to remove long-deprecated items

#255

Earlier quoted context omitted.

Hello from corporate America where WSL is most certainly not standard and will require a virgin sacrifice if you want to get it approved by IT. Which is to say, no pyenv is not an option for everyone.

Even aside from that, WSL is only useful if you are writing code that will run on Linux at the end of the day. This is usually true for web apps, but that's not the only thing people write in Python. Libraries, in particular, need to be able to target Windows directly.

or even if you want to build a python binary for windows, you can't cross compile it as far as I've found

Re: Python 3.12.0 is to remove long-deprecated items

#256
post #230
post #199

Earlier quoted context omitted.

Sure, but wait until you see what next year brings us!

Umm, I didn’t have a great experience with Poetry. For starters, I wanted to create a separate virtual env to install Poetry in and have Poetry install the project’s dependencies in a separate virtual env. There was simply no way to do that and I didn’t wanna install Poetry globally on my machine. I also didn’t wanna use docker just for this, so I realized that Poetry could just not be for me.

This isn’t a poetry problem. Use pipenv for this. It’s pip but uses separate venvs to install packages. Pipenv install poetry will do exactly what you want I think.

Re: Python 3.12.0 is to remove long-deprecated items

#257
post #92

> smtpd has been removed according to the schedule in PEP 594 Damn! 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_vers…

Darn the smtpd thing is going to be annoying next time I try to debug a mail sender. It was super convenient. Shame they didn’t leave just that.

I use that one too. An alternative might be https://aiosmtpd.readthedocs.io/en/latest/cli.html
Post reply on HN