Python announced the new 3.14 version yesterday! See what’s new and how to install guide for Ubuntu users.
Python 3.14 is the latest stable release of the Python programming language, with 5 years support until 2030.
Since the release, the free-threaded build of Python is officially supported and no longer experimental. It’s so far optional, though will be make default in next phase.
In Python 3.14, the evaluation of annotations is now deferred. It introduced the new annotationlib
module, providing tools for inspecting deferred annotations. And, annotations may be evaluated in the VALUE format, the FORWARDREF format, and the STRING format. See PEP 649 for more.
It added Template string literals (PEP 750), new mechanism for custom string processing. The new t-strings
use the familiar syntax of f-strings, but return an object representing the static and interpolated parts of the string.
Python 3.14 finally added multiple interpreters in the standard library (PEP 734). With the new concurrent.interpreters
module, it now supports running multiple copies of Python in the same process simultaneously without C-API.
It as well introduced new compression
package contains compression.lzma
, compression.bz2
, compression.gzip
, compression.zlib
, as well as compression.zstd
modules.
Besides compression and decompression for the Zstandard format (PEP 784), the support for reading and writing Zstandard compressed archives has been added to the tarfile
, zipfile
, and shutil
modules.
The release also introduced a zero-overhead debugging interface for CPython, that allows debuggers and profilers to safely attach to running Python processes without stopping or restarting them.
A new command-line interface is added to inspect running Python processes using asynchronous tasks, available via python -m asyncio ps PID
or python -m asyncio pstree PID
.
And the pdb
module now supports remote attaching to a running Python process using a new -p PID
command-line option. For example, run python -m pdb -p 1234
will connect to the Python process with the given PID and allow you to debug it interactively.
Other changes include:
- PEP 758: Allow
except
andexcept*
expressions without brackets. - PEP 765: Disallow return/break/continue that exit a finally block.
- PEP 741: Add a C API to configure the Python initialization without relying on C structures and the ability to make ABI-compatible changes in the future.
- Syntax highlighting in PyREPL, and support for color in unittest, argparse, json and calendar CLIs.
- UUID versions 6-8 are now supported by the uuid module, and generation of versions 3-5 are up to 40% faster.
- Add a new type of interpreter to CPython, which provides significantly better performance for certain newer compilers.
- Add a built-in implementation for HMAC (RFC 2104) using formally verified code from the HACL* project.
- Improve error messages, and more.
For more details about Python 3.14, see the official docs.
Install Python 3.14
The source tarball for Python 3.14 is available to download via the link below:
For Ubuntu 22.04 and Ubuntu 24.04, the popular Deadsnakes PPA has been updated with Python 3.14 for the 2 LTS releases.
To add the PPA and install the package, run commands below one by one:
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update sudo apt install python3.14-full
For other Ubuntu releases, it’s not hard to build from source. And, I’ve written a step by step guide for all current Ubuntu releases.