Live data from Hacker News

Python 3.12.0 is to remove long-deprecated items

discuss.python.org

151–160 of 257 posts

Re: Python 3.12.0 is to remove long-deprecated items

#151
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.

Whether it's easy or not depends on the OS you're working on. On Windows, it's just another executable installer, so it's trivial. On macOS, the official installers are terrible (they have no uninstaller), so you want another way. On Linux etc., some distros have only one Python version in the repos, some have two or three, but the latest versions of all reasonable distros won't let you install Python 3.4.

Re: Python 3.12.0 is to remove long-deprecated items

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

Is there a problem with venv? I am seriously curious. I use venv for 10 years and so far it was able to do everything I ever wanted.

venv is great, but it requires the Python version you want already installed. This is pyenv's job.

Re: Python 3.12.0 is to remove long-deprecated items

#153

Earlier quoted context omitted.

I have a 35k$ worth Xray flat panel detector (still have >5k$ ebay value today), it runs embedded linux on an obsolete samsung ARM processor and uses telnet to talk to the console computer through a point to point ethernet link. Apparently, it's impossible to migrate to ssh and why the ** I need to care about security here?

Didn't talk about old devices. Security can be very important in cases of connecting to other servers.

> Didn't talk about old devices.

Does not matter, you stated without nuance that telnet should no be used. So you told GP that they should trash their telnet-only devices.

Re: Python 3.12.0 is to remove long-deprecated items

#154

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…

Agree.

This is perfectly exemplified by Python 3's insistence that you call print with parenthesis:

>>> print "hello"

SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

I empathize with the lang devs in that having two forms of print is nonoptimal, but the fact it tells you to do something different while fully understanding what you said (as it were) is what really irritates me. It comes off feeling needlessly pedantic for the language.

Re: Python 3.12.0 is to remove long-deprecated items

#155
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.

> probably easier than learning pyenv

Yeah “pyenv install 3.10.8” is basically rocket surgery, near impossible to learn.

Re: Python 3.12.0 is to remove long-deprecated items

#156
post #67

If we're going to be making backwards incompatible changes to unittest, it'd be nice to introduce PEP8-compatible names, deprecate the old ones, and remove then in 3.20 or something. (I know there's pytest and nosetests, but especially when teaching people, it's nice to use what's in the standard library and unittest sticks out for having things named differently)

> I know there's pytest and nosetests, but especially when teaching people, it's nice to use what's in the standard library and unittest sticks out for having things named differently

You’re just crippling them for no reason.

Re: Python 3.12.0 is to remove long-deprecated items

#157
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.

Re: Python 3.12.0 is to remove long-deprecated items

#158

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…

Agree. This is perfectly exemplified by Python 3's insistence that you call print with parenthesis: >>> print "hello" SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)? I empathize with the lang devs in that having two forms of print is nonoptimal, but the fact it tells you to do something different while fully understanding what you said (as it were) is what really irritates me. It comes o…

I disagree strongly with this take and it seems basically to be saying "better error messages are bad."

What if clang says "did you forget a ';'"? It would have been better to just compile the code as if there was a semicolon?

Re: Python 3.12.0 is to remove long-deprecated items

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

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.

I have not been able to understand why conda is so popular. I have no trouble with scientific computing with plain old `pyenv` and have never had any issues with C extensions or compilation with plain old `pip`.

Conda seems to be the most prone to getting in weird states or just hanging while "Solving environment." I have been happier leaving it behind.

Really the only two I would even consider using now are pyenv and poetry.

Re: Python 3.12.0 is to remove long-deprecated items

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

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