2025: Python Release 3.13.1 December

from pathlib import Path

pyupgrade will:

| Feature | How to Enable | What It Does | |---------|---------------|--------------| | (default) | No action required – enabled in the interpreter build. | The try/except block incurs almost no overhead when no exception is raised. | | Per‑interpreter bytecode cache | Set PYTHONPYCACHEPREFIX=$HOME/.cache/pyc (or any directory). | Separate .pyc caches per interpreter, improving start‑up for applications that spin up many sub‑interpreters. | | Import hash verification | python -X importhash script.py or export PYTHONIMPORTHASH=1 . | Checks a SHA‑256 signature embedded in compiled bytecode against a trusted key store ( ~/.python_import_signatures ). | python release 3.13.1 december 2025

Includes critical security updates, such as upgrading libexpat to version 2.6.4 to address specific vulnerabilities (CVE-2024-50602). from pathlib import Path pyupgrade will: | Feature

We use cookies to improve your experience. By using this tool, you accept our privacy policy.