Notice: This page displays a fallback because interactive scripts did not run. Possible causes include disabled JavaScript or failure to load scripts or stylesheets.
Note: Python 3.12.7 has been superseded by Python 3.12.14.
Release date: Oct. 1, 2024
This is the seventh maintenance release of Python 3.12
Python 3.12 is the newest major release of the Python programming language, and it contains many new features and optimizations. 3.12.7 is the latest maintenance release, containing about 120 bug fixes, build improvements and documentation changes since 3.12.6.
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
perfprofiler 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
wstrandwstr_lengthmembers of the C implementation of unicode objects were removed, per PEP 623. - In the
unittestmodule, a number of long deprecated methods and classes were removed. (They had been deprecated since Python 3.1 or 3.2.) - The deprecated
smtpdanddistutilsmodules have been removed (see PEP 594 and PEP 632.) Thesetuptoolspackage continues to provide thedistutilsmodule. - A number of other old, broken and deprecated functions, classes and methods have been removed.
- Invalid backslash escape sequences in strings now warn with
SyntaxWarninginstead 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 | File size | Sigstore | SBOM | GPG | MD5 checksum | |
|---|---|---|---|---|---|---|---|---|
| Gzipped source tarball | Source release | 25.8 MB | .sigstore | SPDX | SIG | 5d0c0e4c6a022a87 165a9addcd869109 |
||
| XZ compressed source tarball | Source release | 19.5 MB | .sigstore | SPDX | SIG | c6c933c1a0db5259 7cb45a7910490f93 |
||
| macOS 64-bit universal2 installer | macOS | for macOS 10.13 and later | 43.3 MB | .sigstore | SIG | 82711848a795f6d7 b25e81844d5a9a3f |
||
| Windows installer (64-bit) | Windows | Recommended | 25.3 MB | .sigstore | SPDX | SIG | b51e0889be50c55f bdd809f4ad587120 |
|
| Windows installer (32-bit) | Windows | 24.1 MB | .sigstore | SPDX | SIG | 5d5452249401822c b3ad1bce7105d5fd |
||
| Windows installer (ARM64) | Windows | Experimental | 24.6 MB | .sigstore | SPDX | SIG | 19bdd2de8a7ccb6f 1115f85bc54c1764 |
|
| Windows embeddable package (64-bit) | Windows | 10.6 MB | .sigstore | SPDX | SIG | 4c0a5a44d4ca1d0b c76fe08ea8b76adc |
||
| Windows embeddable package (32-bit) | Windows | 9.4 MB | .sigstore | SPDX | SIG | 21a051ecac4a9a25 fab169793ecb6e56 |
||
| Windows embeddable package (ARM64) | Windows | 9.8 MB | .sigstore | SPDX | SIG | 6fc899d8dbd46dd2 b585a038f7cf68a4 |
||