Python 3.12.8
Release Date: Dec. 3, 2024
This is the eighth maintenance release of Python 3.12
Python 3.12.8 is the latest maintenance release of Python 3.12, containing more than 250 bug fixes, build improvements and documentation changes since 3.12.7.
Security content in this release
- gh-126623: Upgraded libexpat to 2.6.4 to fix CVE-2024-50602.
- gh-124651: Properly quote template strings in
venv
activation scripts.
Major new features of the 3.12 series, compared to 3.11
New features
- More flexible f-string parsing, allowing many things previously disallowed (PEP 701).
- Support for the buffer protocol in Python code (PEP 688).
- A new debugging/profiling API (PEP 669).
- Support for isolated subinterpreters with separate Global Interpreter Locks (PEP 684).
- Even more improved error messages. More exceptions potentially caused by typos now make suggestions to the user.
- Support for the Linux
perf
profiler to report Python function names in traces. - Many large and small performance improvements (like PEP 709 and support for the BOLT binary optimizer), delivering an estimated 5% overall performance improvement.
Type annotations
- New type annotation syntax for generic classes (PEP 695).
- New override decorator for methods (PEP 698).
Deprecations
- The deprecated
wstr
andwstr_length
members of the C implementation of unicode objects were removed, per PEP 623. - In the
unittest
module, a number of long deprecated methods and classes were removed. (They had been deprecated since Python 3.1 or 3.2.) - The deprecated
smtpd
anddistutils
modules have been removed (see PEP 594 and PEP 632.) Thesetuptools
package continues to provide thedistutils
module. - A number of other old, broken and deprecated functions, classes and methods have been removed.
- Invalid backslash escape sequences in strings now warn with
SyntaxWarning
instead ofDeprecationWarning
, making them more visible. (They will become syntax errors in the future.) - The internal representation of integers has changed in preparation for performance enhancements. (This should not affect most users as it is an internal detail, but it may cause problems for Cython-generated code.)
For more details on the changes to Python 3.12, see What's new in Python 3.12.
More resources
- Online Documentation.
- PEP 693, the Python 3.12 Release Schedule.
- Report bugs via GitHub Issues.
- Help fund Python directly or via GitHub Sponsors, and support the Python community.
Files
Version | Operating System | Description | MD5 Sum | File Size | GPG | Sigstore | SBOM | |
---|---|---|---|---|---|---|---|---|
Gzipped source tarball | Source release | 304473cf367fa65e450edf4b06b55fcc | 25.8 MB | SIG | .sigstore | SPDX | ||
XZ compressed source tarball | Source release | d46e5bf9f2e596a3ba45fc0b3c053dd2 | 19.5 MB | SIG | .sigstore | SPDX | ||
macOS 64-bit universal2 installer | macOS | for macOS 10.9 and later | dc762fdc78e9cfecf516db31054de9fd | 44.0 MB | SIG | .sigstore | ||
Windows installer (64-bit) | Windows | Recommended | 2f2ab2472a6aa29f8755c72c58f58f4b | 25.8 MB | SIG | .sigstore | SPDX | |
Windows installer (32-bit) | Windows | 745f11c8474893da55e5966173375cc8 | 24.6 MB | SIG | .sigstore | SPDX | ||
Windows installer (ARM64) | Windows | Experimental | ff0d440c2cc4aaddf81c9e247682bfa9 | 25.1 MB | SIG | .sigstore | SPDX | |
Windows embeddable package (64-bit) | Windows | 1e86b04bc7d27c5c06edf8f617e1184a | 10.6 MB | SIG | .sigstore | SPDX | ||
Windows embeddable package (32-bit) | Windows | cd4a16b1d27540b84e7a44327f69ee5a | 9.5 MB | SIG | .sigstore | SPDX | ||
Windows embeddable package (ARM64) | Windows | a1631f5cb0b3d5d1a27b5c3edc0f80e3 | 9.9 MB | SIG | .sigstore | SPDX |