Oct-08-2025, 10:24 AM
Python 3.14.0 (final) is here!
Example of new template strings:
- PEP 779: Free-threaded Python is officially supported
- PEP 649: The evaluation of annotations is now deferred, improving the semantics of using annotations.
- PEP 750: Template string literals (t-strings) for custom string processing, using the familiar syntax of f-strings.
- PEP 734: Multiple interpreters in the stdlib.
- PEP 784: A new module compression.zstd providing support for the Zstandard compression algorithm.
- PEP 758: except and except* expressions may now omit the brackets.
- Syntax highlighting in PyREPL, and support for color in unittest, argparse, json and calendar CLIs.
- PEP 768: A zero-overhead external debugger interface for CPython.
- UUID versions 6-8 are now supported by the uuid module, and generation of versions 3-5 are up to 40% faster.
- PEP 765: Disallow return/break/continue that exit a finally block.
- PEP 741: An improved C API for configuring Python.
- A new type of interpreter. For certain newer compilers, this interpreter provides significantly better performance. Opt-in for now, requires building from source.
- Improved error messages.
- Builtin implementation of HMAC with formally verified code from the HACL* project.
- A new command-line interface to inspect running Python processes using asynchronous tasks.
- The pdb module now supports remote attaching to a running Python process.
Example of new template strings:
from html import escape as _html_escape
from string.templatelib import Template, Interpolation
def html_escape(html: Template) -> str:
if not isinstance(html, Template):
raise ValueError("Only templates are allowed")
result = []
for element in html:
match element:
case Interpolation(value):
result.append(_html_escape(value))
case str():
result.append(element)
return "".join(result)
name = "</b>World</b>"
tpl = t"<p>Hello {name}</p>"
print(html_escape(tpl))Output:<p>Hello </b>World</b></p>PEP 734from concurrent import interpreters
def worker(in_q: interpreters.Queue, out_q: interpreters.Queue):
import time
value = in_q.get()
time.sleep(1)
out_q.put(value ** 2)
in_queue = interpreters.create_queue()
out_queue = interpreters.create_queue()
interp = interpreters.create()
interp.call_in_thread(worker, in_queue, out_queue)
in_queue.put(42)
print(out_queue.get())Output:1764Python 3.13.8 is now available- This is the eighth maintenance release of Python 3.13
Python 3.13 is the newest previous major release of the Python programming language, and it contains many new features and optimizations compared to Python 3.12. 3.13.8 is the eighth maintenance release of 3.13, containing around 200 bugfixes, build improvements and documentation changes since 3.13.7.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!
