October 7th, 2024

Python 3.13.0 Is Released

Python 3.13, released on October 7, 2024, features a revamped interpreter, experimental free-threaded execution, a JIT compiler, removal of deprecated modules, and enhanced typing capabilities for improved performance and usability.

Read original articleLink Icon
Python 3.13.0 Is Released

Python 3.13, released on October 7, 2024, introduces several significant enhancements and features. Key improvements include a revamped interactive interpreter that supports multiline editing, color-coded tracebacks, and enhanced error messages. The new version also features experimental support for free-threaded execution, allowing for better utilization of multi-core processors by running threads in parallel without the global interpreter lock (GIL). Additionally, an experimental Just-In-Time (JIT) compiler has been added, which may improve performance for certain applications. The locals() function now has defined mutation semantics, improving reliability for debugging tools. The standard library has seen the removal of deprecated modules and APIs, including 19 legacy modules, and several modules have been improved for user-friendliness and correctness. Notable changes in the typing system include support for default values in type parameters and new decorators for marking deprecations. Python 3.13 also officially supports mobile platforms like iOS and Android. Overall, this release emphasizes performance, usability, and modern programming practices, while also streamlining the language by removing outdated components.

- Python 3.13 introduces a new interactive interpreter with enhanced features.

- Experimental free-threaded execution allows better multi-core performance.

- A Just-In-Time (JIT) compiler is included to potentially speed up Python programs.

- Several deprecated modules have been removed from the standard library.

- New typing features enhance type safety and usability in Python code.

Link Icon 16 comments
By @pansa2 - 7 months
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.

By @wdroz - 7 months
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...

By @boarush - 7 months
Python version from 3.10 have had a very annoying bug with the SSLContext (something related only to glibc) where there are memory leaks when opening new connections to new hosts and eventually causes any service (dockerized in my case) to crash due to OOM. Can still see that the issues have not been resolved in this release which basically makes it very difficult to deploy any production grade service difficult.
By @rkwz - 7 months
> 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.

By @SubiculumCode - 7 months
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.

By @CJefferson - 7 months
Good to get advanced notice, if I read all the way down, that they will silently completely change the behavior of multiprocessing in 3.14 (only on Unix/Linux, in case other people wonder what’s going on), which is going to break a bunch of programs I work with.

I really like using Python, but I can’t keep using it when they just keep breaking things like this. Most people don’t read all the release notes.

By @ajay-d - 7 months
Still in prerelease (RC3), no? At least at time of writing
By @stevesimmons - 7 months
And Azure Functions still doesn't support Python 3.12, released more than a year ago!
By @causal - 7 months
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?
By @bun_terminator - 7 months
I appreciate the effort to leave out the "And now for something completely different" section (on https://www.python.org/downloads/release/python-3130/) after the previous drama.
By @mg - 7 months
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?
By @gjvc - 7 months
looking forward to the GraalVM version
By @lumpa - 7 months
By @BiteCode_dev - 7 months
I still see Python 3.12.7 being the latest one, with 3.13 delayed because of the GC perf regression. The link, for me, points to the 3.13 RC.

Am I seeing a cached version and you see 3.13 ? Cause I can't see it on the homage page download link either.