Version | Change log |
Python 3.13.1 Dec 4, 2024 |
Security content in this release: gh-126623: Upgraded libexpat to 2.6.4 to fix CVE-2024-50602. gh-122792: Changed IPv4-mapped ipaddress.IPv6Address to consistently use the mapped IPv4 address value for deciding properties. Properties which have their behavior fixed are is_multicast, is_reserved, is_link_local, is_global, and is_unspecified. gh-124651: Properly quote template strings in venv activation scripts. gh-125140: Remove the current directory from sys.path when using PyREPL. New features: A new and improved interactive interpreter, based on PyPy's, featuring multi-line editing and color support, as well as colorized exception tracebacks. An experimental free-threaded build mode, which disables the Global Interpreter Lock, allowing threads to run more concurrently. The build mode is available as an experimental feature in the Windows and macOS installers as well. A preliminary, experimental JIT, providing the ground work for significant performance improvements. The locals() builtin function (and its C equivalent) now has well-defined semantics when mutating the returned mapping, which allows debuggers to operate more consistently. A modified version of mimalloc is now included, optional but enabled by default if supported by the platform, and required for the free-threaded build mode. Docstrings now have their leading indentation stripped, reducing memory use and the size of .pyc files. (Most tools handling docstrings already strip leading indentation.) The dbm module has a new dbm.sqlite3 backend that is used by default when creating new files. The minimum supported macOS version was changed from 10.9 to 10.13 (High Sierra). Older macOS versions will not be supported going forward. WASI is now a Tier 2 supported platform. Emscripten is no longer an officially supported platform (but Pyodide continues to support Emscripten). iOS is now a Tier 3 supported platform. Android is now a Tier 3 supported platform. Typing: Support for type defaults in type parameters |
Python 3.13.0 Oct 8, 2024 |
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 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.) |
Python 3.12.7 Oct 2, 2024 |
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 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.) |
Python 3.12.6 Sep 10, 2024 |
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. |
Python 3.12.5 Aug 7, 2024 |
New features: More flexible f-string parsing, allowing many things previously disallowed Support for the buffer protocol in Python code A new debugging/profiling API Support for isolated subinterpreters with separate Global Interpreter Locks 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 New override decorator for methods 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.) |
Python 3.12.4 Jun 7, 2024 | |
Python 3.12.3 Apr 9, 2024 | |
Python 3.12.2 Feb 7, 2024 | |
Python 3.12.1 Dec 8, 2023 | |
Python 3.12.0 Oct 2, 2023 |