Live data from Hacker News

Python 3.13.0 Is Released

docs.python.org

21–30 of 135 posts

Re: Python 3.13.0 Is Released

#21
post #5

Any rule of thumb when it comes to adopting Python releases? Is it usually best to wait for the first patch version before using in production?

Scream into a pillow because even PHP manages to have less breaking releases. Python is a dumpster fire that no one wants to admit or have an honest conversation about. If python 2 is still around my advice is don't upgrade unless you have a clear reason for the new features.

Re: Python 3.13.0 Is Released

#23
What I've been surprised about is the number of python packages that require specific python versions(e.g., works on 3.10, but not 3.11. Package versioning is already touchy enough without the language itself causing it in minor upgrades.

And will python 3.14 be named pi-thon 3.14. I will see myself out.

Re: Python 3.13.0 Is Released

#24
post #4

Python versions 3.11, 3.12 and now 3.13 have contained far fewer additions to the language than earlier 3.x versions. Instead the newest releases have been focusing on implementation improvements - and in 3.13, the new REPL, experimental JIT & GIL-free options all sound great! The language itself is (more than) complex enough already - I hope this focus on implementation quality continues.

The last couple years also saw a stringent approach to deprecations: If something is marked as deprecated, it WILL be removed in a minor release sooner than later.

Yep. They’ve primarily (entirely?) involved removing ancient libraries from stdlib, usually with links to maintained 3rd party libraries. People who can’t/won’t upgrade to newer Pythons, perhaps because their old system that uses those old modules can’t run a newer one, aren’t affected. People using newer Pythons can replace those modules.

There may be a person in the world panicking that they need to be on Python 3.13 and also need to parse Amiga IFF files, but it seems unlikely.

Re: Python 3.13.0 Is Released

#25
post #15

When I'm in a docker container using the Python 3 version that comes with Debian - is there an easy way to swap it out for this version so I can test how my software behaves under 3.13?

This[0] is the Docker Python using Debian Bookworm, so as soon as 3.13.0 (not the release candidate I've linked to) is released, there will be an image. Otherwise, there's always the excellent `pyenv` to use, including this person's docker-pyenv project [1] [0] https://hub.docker.com/layers/library/python/3.13.0rc3-slim-... [1] https://github.com/tzenderman/docker-pyenv?tab=readme-ov-fil...

Hmm.. I think this is a misunderstanding.

What I meant is: While I am already inside a container running Debian, can I ...

    1: ./myscript.py
    2: some_magic_command
    3: ./myscript.py
So 1 runs it under 3.11 (which came with Debian) and 2 runs it under 3.13.

I don't need to preserve 3.11. some_magic_command can wrack havoc in the container as much as it wants. As soon as I exit it, it will be gone anyhow.

The in a sense, the question is not related to Docker at all. I just mentioned that I would do it inside a container to emphasize that I don't need to preserve anything.

Re: Python 3.13.0 Is Released

#26
post #2

> Free-threaded execution allows for full utilization of the available processing power by running threads in parallel on available CPU cores. While not all software will benefit from this automatically, programs designed with threading in mind will run faster on multi-core hardware. Would be nice to see performance improvements for libraries like FastAPI, NetworkX etc in future.

They are not threaded at all.

Re: Python 3.13.0 Is Released

#27
post #5

Any rule of thumb when it comes to adopting Python releases? Is it usually best to wait for the first patch version before using in production?

n-1 is the rule I follow. So if asked today I'd look at 3.12.

Re: Python 3.13.0 Is Released

#28
With the 3.13 TypeIs[0] and the 3.10 TypeGuard[1], we can achieve some of Rust's power (such as the 'if let' pattern) without runtime guarantees.

This is a win for the DX, but this is not yet widely used. For example, "TypeGuard[" appears in only 8k Python files on GitHub.[2]

[0] -- https://docs.python.org/3.13/library/typing.html#typing.Type...

[1] -- https://docs.python.org/3.13/library/typing.html#typing.Type...

[2] -- https://github.com/search?q=%22TypeGuard%5B%22+path%3A*.py&t...

Re: Python 3.13.0 Is Released

#29
post #4

Python versions 3.11, 3.12 and now 3.13 have contained far fewer additions to the language than earlier 3.x versions. Instead the newest releases have been focusing on implementation improvements - and in 3.13, the new REPL, experimental JIT & GIL-free options all sound great! The language itself is (more than) complex enough already - I hope this focus on implementation quality continues.

Removing GIL only increases complexity.

Re: Python 3.13.0 Is Released

#30
post #26
post #2

> Free-threaded execution allows for full utilization of the available processing power by running threads in parallel on available CPU cores. While not all software will benefit from this automatically, programs designed with threading in mind will run faster on multi-core hardware. Would be nice to see performance improvements for libraries like FastAPI, NetworkX etc in future.

They are not threaded at all.

Correct. Async stuff in Python is based on libuv like event loops similar to how Nodejs and others operate, not full threads.
Post reply on HN