Notice: While JavaScript is not essential for this website, your interaction with the content will be limited. Please turn JavaScript on for the full experience.

Python 3.12.6

Release Date: Sept. 6, 2024

This is the sixth 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.6 is the latest maintenance release, containing about 90 bugfixes, build improvements and documentation changes since 3.12.5. This is an expedited release to address the following security issues:

  • gh-123678 and gh-116741: Upgrade bundled libexpat to 2.6.3 to fix CVE-2024-28757, CVE-2024-45490, CVE-2024-45491 and CVE-2024-45492.
  • gh-123067: Fix quadratic complexity in parsing "-quoted cookie values with backslashes by http.cookies. Fixes CVE-2024-7592.
  • gh-121285: Remove backtracking from tarfile header parsing for hdrcharset, PAX, and GNU sparse headers. That’s CVE-2024-6232.
  • gh-102988: email.utils.getaddresses() and email.utils.parseaddr() now return ('', '') 2-tuples in more situations where invalid email addresses are encountered instead of potentially inaccurate values. Add optional strict parameter to these two functions: use strict=False to get the old behavior, accept malformed inputs. getattr(email.utils, 'supports_strict_parsing', False) can be use to check if the strict paramater is available. This improves the CVE-2023-27043 fix.
  • gh-123270: Sanitize names in zipfile.Path to avoid infinite loops (gh-122905) without breaking contents using legitimate characters. That’s CVE-2024-8088.

Also, as mentioned in the previous release of 3.12, this release drops support for macOS versions 10.9 through 10.12. Versions of macOS older than 10.13 haven't been supported by Apple since 2019, and maintaining support for them has become too difficult. (All versions of Python 3.13 have already dropped support for them.)

Major new features of the 3.12 series, compared to 3.11

New features

Type annotations

Deprecations

  • The deprecated wstr and wstr_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 and distutils modules have been removed (see PEP 594 and PEP 632. The setuptools package continues to provide the distutils 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 of DeprecationWarning, 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

Full Changelog

Files

Version Operating System Description MD5 Sum File Size GPG Sigstore SBOM
Gzipped source tarball Source release c2f1dd5c8807ee50b778684b7958ee28 25.8 MB SIG .sigstore SPDX
XZ compressed source tarball Source release cb669514937d3e894e74081627722aa5 19.5 MB SIG .sigstore SPDX
macOS 64-bit universal2 installer macOS for macOS 10.13 and later 9fe25ae8e0dfea2854e6bce62e69a3dd 43.2 MB SIG .sigstore
Windows installer (64-bit) Windows Recommended d8548aa7609a762ba66f62eeb2ca862d 25.3 MB SIG .sigstore SPDX
Windows installer (32-bit) Windows 9b4c59154c46444e082266d8bd3a6429 24.1 MB SIG .sigstore SPDX
Windows installer (ARM64) Windows Experimental 4ae3dfd4a32963ec6e6578890d97b19c 24.6 MB SIG .sigstore SPDX
Windows embeddable package (64-bit) Windows ae256f31ee4700eba679802233bff3e9 10.5 MB SIG .sigstore SPDX
Windows embeddable package (32-bit) Windows b6eecbdfd865e4a3ae8bed93b9f2cd95 9.4 MB SIG .sigstore SPDX
Windows embeddable package (ARM64) Windows e6c889dd2ae2dacfbfd9cb5faeb7aefe 9.8 MB SIG .sigstore SPDX