From the public account: OSC Open Source Community
Python 3.14 has been officially released. This version features significant improvements in syntax, performance, type system, and development experience.
Here is an overview of the core changes:
Template Strings (T-Strings)
Introduced <span class="language-plaintext">t"..."</span> syntax, supporting delayed interpolation and context replacement, allowing access to template structures, combining safety and flexibility, suitable for web templates, SQL queries, and more.
Annotation Delayed Evaluation
Type annotations are now parsed lazily by default, resolving forward reference issues and enhancing the flexibility of the type system, eliminating the need to manually import <span class="language-plaintext">from __future__ import annotations</span>.
Free-Threaded Mode
Official support for a multi-threaded mode without GIL (Global Interpreter Lock), enabling true parallelism for CPU-intensive tasks through <span class="language-plaintext">free-threaded</span>, resulting in significant performance improvements.
Experimental JIT Compiler
Introduced a JIT compiler in the official binary packages for macOS/Windows, which is disabled by default and must be explicitly enabled, capable of converting hot bytecode to machine code for accelerated execution.
Smarter Error Messages
Error messages are now more user-friendly, with suggestions for spelling mistakes and more precise syntax error locations, reducing debugging time.
Standard Library Upgrades
- New
<span class="language-plaintext">compression.zstd</span>module added, supporting the Zstandard compression algorithm. <span class="language-plaintext">uuid</span>module now supports UUID v6/v7/v8, with a 40% performance improvement.<span class="language-plaintext">map()</span>function now includes a<span class="language-plaintext">strict</span>parameter to avoid iterator length mismatch issues.- Support for WebAssembly platform, allowing Python to run directly in the browser.
Multi-Interpreter Support
Through the <span class="language-plaintext">concurrent.interpreters</span> module, multiple independent interpreter instances can be created within a single process, bypassing GIL limitations and enhancing parallel computing capabilities.
Download link: https://www.python.org/downloads/
https://www.python.org/downloads/release/python-3140/
—END—