Update macOS installer to use Tcl/Tk 8.6.16.
Update macOS installer to use OpenSSL 3.0.16. Patch by Bénédikt Tran.
Update macOS installer to ship with SQLite 3.49.1.
Update bundled version of OpenSSL to 3.0.16. The new build also disables uplink support, which may be relevant to embedders but has no impact on normal use.
Some :data:`!SND_*` and :data:`!MB_*` constants are added to :mod:`winsound`.
Replaces our copy of zlib
with zlib-ng
, for performance improvements
in :mod:`zlib`.
Update Windows installer to ship with SQLite 3.49.1.
Always escape non-printable Unicode characters in :program:`pygettext`.
:program:`msgfmt` no longer adds the POT-Creation-Date
to generated
.mo
files for consistency with GNU msgfmt
.
Allow to unset one or more environment variables at once via :meth:`EnvironmentVarGuard.unset() <test.support.os_helper.EnvironmentVarGuard.unset>`. Patch by Bénédikt Tran.
test_ssl.test_dh_params
is skipped if the underlying TLS library does
not support finite-field ephemeral Diffie-Hellman.
Update bundled libexpat to 2.7.1
Upgrade to libexpat 2.7.0
Fix bug in the folding of rfc2047 encoded-words when flattening an email message using a modern email policy. Previously when an encoded-word was too long for a line, it would be decoded, split across lines, and re-encoded. But commas and other special characters in the original text could be left unencoded and unquoted. This could theoretically be used to spoof header lines using a carefully constructed encoded-word if the resulting rendered email was transmitted or re-parsed.
Fix function name in error message of _interpreters.run_string
.
Fix crash of _interpreters.run_string
on string subclasses.
Introduce new _PYTHON_SUBPROCESS_USE_POSIX_SPAWN
environment variable
knob in :mod:`subprocess` to control the use of :func:`os.posix_spawn`.
Do not shadow user arguments in generated :meth:`!__new__` by decorator :class:`warnings.deprecated`. Patch by Xuehai Pan.
The :class:`ctypes.py_object` type now supports subscription, making it a :term:`generic type`.
Add the :attr:`zipfile.ZipFile.data_offset` attribute, which stores the
offset to the beginning of ZIP data in a file when available. When the
:class:`zipfile.ZipFile` is opened in either mode 'w'
or 'x'
and the
underlying file does not support tell()
, the value will be None
instead.
Fix possible use of :mod:`socket` address structures with uninitialized members. Now all structure members are initialized with zeroes by default.
Improve import times by up to 27x for the :mod:`string` module. Patch by Adam Turner.
Display thread name in :mod:`faulthandler`. Patch by Victor Stinner.
Fix crash when deallocating :class:`contextvars.ContextVar` with weird unahashable string names.
:mod:`xml.etree.ElementTree`: update the error message when an element to remove via :meth:`Element.remove <xml.etree.ElementTree.Element.remove>` is not found. Patch by Bénédikt Tran.
Add :meth:`threading.RLock.locked`, :meth:`multiprocessing.Lock.locked`,
:meth:`multiprocessing.RLock.locked`, and allow
:meth:`multiprocessing.managers.SyncManager.Lock` and
:meth:`multiprocessing.managers.SyncManager.RLock` to proxy locked()
call.
Fix several thread-safety issues in :mod:`ctypes` on the :term:`free threaded <free threading>` build.
Improve the import time of the :mod:`ast` module by extracting the :func:`~ast.unparse` function to a helper module.
Improved performance of :func:`textwrap.indent` by an average of ~1.3x. Patch by Adam Turner.
Improved performance of :func:`textwrap.dedent` by an average of ~2.4x, (with improvements of up to 4x for large inputs), and fixed a bug where blank lines with whitespace characters other than space or horizontal tab were not normalised to the newline. Patch by Adam Turner, Marius Juston, and Pieter Eendebak.
:mod:`socket`: Fix code parsing AF_BLUETOOTH socket addresses.
Support frozen modules for :func:`linecache.getline`.
Fix a resource leak when constructing a :class:`gzip.GzipFile` with a
filename fails, for example when passing an invalid compresslevel
.
10-20% performance improvement of :func:`random.randint`.
Fix :exc:`ResourceWarning` when constructing a :class:`gzip.GzipFile` in write mode with a broken file object.
Deprecate the :mod:`!nturl2path` module. Call :func:`urllib.request.url2pathname` and :func:`~urllib.request.pathname2url` instead.
Fix issue where :func:`urllib.request.url2pathname` raised :exc:`OSError` when given a Windows URI containing a colon character not following a drive letter, such as before an NTFS alternate data stream.
Disable CALL
event in :mod:`bdb` in monitoring
backend when we don't
need any new events on the code object to get a better performance.
Register cseuckr
as an encoding alias for euc_kr
.
Fix sendfile fallback implementation to drain data after writing to transport in :mod:`asyncio`.
:func:`platform.libc_ver` can now detect and report the version of musl
on Alpine Linux.
Fix incorrect argument passing in :func:`warnings.warn_explicit`.
When creating a :mod:`datetime` object with an out of range date a more informative error is raised.
Allow :meth:`graphlib.TopologicalSorter.prepare` to be called more than once as long as sorting has not started. Patch by Daniel Pope.
Allow to generate multiple UUIDs at once via :option:`python -m uuid --count <uuid --count>`.
Fix :mod:`readline` in :term:`free-threaded <free threading>` build.
$_asynctask
is added as a :mod:`pdb` convenience variable to access the
current asyncio task if applicable.
Improve import time of :mod:`locale` using lazy import re
. Patch by
Semyon Moroz.
Fix :func:`ast.unparse` when :class:`ast.Interactive` contains multiple statements.
The :mod:`http.server` module now includes built-in support for HTTPS
servers exposed by :class:`http.server.HTTPSServer`. This functionality is
exposed by the command-line interface (python -m http.server
) through
the --tls-cert
, --tls-key
and --tls-password-file
options. Patch
by Semyon Moroz.
The implementations of equality and hashing for :class:`annotationlib.ForwardRef` now use all attributes on the object. Two :class:`!ForwardRef` objects are equal only if all attributes are equal.
:class:`annotationlib.ForwardRef` objects no longer cache their value when they are successfully evaluated. Successive calls to :meth:`annotationlib.ForwardRef.evaluate` may return different values.
Fix reading duplicated entries in :mod:`zipfile` by name. Reading duplicated
entries (except the last one) by ZipInfo
now emits a warning instead of
raising an exception.
The class of :class:`~ctypes.Structure`/:class:`~ctypes.Union` field descriptors is now available as :class:`~ctypes.CField`, and has new attributes to aid debugging and introspection.
Fix test.test_sysconfig.test_sysconfigdata_json
when running outside the
build directory (eg. after installing).
:mod:`xml.etree.ElementTree`: Fix a crash in :meth:`Element.find <xml.etree.ElementTree.Element.find>`, :meth:`Element.findtext <xml.etree.ElementTree.Element.findtext>` and :meth:`Element.findall <xml.etree.ElementTree.Element.findall>` when the tag to find implements an :meth:`~object.__eq__` method mutating the element being queried. Patch by Bénédikt Tran.
When headers are added to :class:`email.message.Message` objects, either through :meth:`email.message.Message.__setitem__` or :meth:`email.message.Message.add_header`, the field name is now validated according to :rfc:`RFC 5322, Section 2.2 <5322#section-2.2>` and a :exc:`ValueError` is raised if the field name contains any invalid characters.
Deprecate :meth:`!pathlib.PurePath.as_uri`; use :meth:`pathlib.Path.as_uri` instead.
:mod:`xml.etree.ElementTree`: Fix a crash in :meth:`Element.remove <xml.etree.ElementTree.Element.remove>` when the element is concurrently mutated. Patch by Bénédikt Tran.
Add the optional backend of sys.monitoring
to :mod:`bdb` and use it for
:mod:`pdb`.
Add :func:`fnmatch.filterfalse` for excluding names matching a pattern. Patch by Bénédikt Tran.
Add support for AI_NUMERICSERV in getaddrinfo emulation
Added aliases for Thai Language using Microsoft Code Pages.
Mention :class:`asyncio.Future` and :class:`asyncio.Task` in generic classes list.
Allow the JIT to remove an extra _TO_BOOL_BOOL
instruction after
_CONTAINS_OP_SET
by setting the return type to bool.
Fix crash when calling :meth:`!list.append` as an unbound method.
Fix a crash when using an unbound method :term:`descriptor` object in a function where a bound method descriptor was used.
Implement PEP 768 (Safe external debugger interface for CPython). Add a new :func:`sys.remote_exec` function to the :mod:`sys` module. This function schedules the execution of a Python file in a separate process. Patch by Pablo Galindo, Matt Wozniski and Ivona Stojanovic.
Allow JIT to omit str guard in truthiness test when str type is known.
Add support for optionally dropping grouping parentheses when using multiple exception types as per PEP 758. Patch by Pablo Galindo
Usage of a name in a function-scope annotation no longer triggers creation of a cell for that variable. This fixes a regression in earlier alphas of Python 3.14.
Improve the experimental JIT's ability to remove type checks for certain subscripting operations.
Compiler emits optimized code for builtin any/all/tuple calls over a generator expression.
Fix missing NULL check in _PyMem_FreeDelayed
in :term:`free-threaded
<free threading>` build.
Fix :func:`anext` failing on sync :meth:`~object.__anext__` raising an exception.
Fix signature of anext_awaitable.close
objects. Patch by Bénédikt Tran.
Optimize comparison of two constants in JIT builds
Add fast path for small and medium-size integers in :c:func:`PyLong_FromInt32`, :c:func:`PyLong_FromUInt32`, :c:func:`PyLong_FromInt64` and :c:func:`PyLong_FromUInt64`. Patch by Chris Eibl.
Optimize the AArch64 code generation for the JIT. Patch by Diego Russo
Optimize the AArch64 code generation for the JIT. Patch by Diego Russo
Fix error message when formatting bytes using the 'i'
flag. Patch by
Maxim Ageev.
Annotations at the class and module level that are conditionally defined are
now only reflected in __annotations__
if the block they are in is
executed. Patch by Jelle Zijlstra.
Do not crash on negative column
and end_column
in :mod:`ast`
locations.
Optimize LOAD_FAST
and its superinstruction form to reduce reference
counting overhead. These instructions are replaced with faster variants that
load borrowed references onto the operand stack when we can prove that the
reference in the frame outlives the reference loaded onto the stack.
Fixing multiprocessing Resource Tracker process leaking, usually observed when running Python as PID 1.
Fix an issue with thread identifiers being sign-extended on some platforms.
Add support for built-in implementation of HMAC (RFC 2104) based on HACL*. Patch by Bénédikt Tran.
Implement PEP 765: Disallow return/break/continue that exit a finally block.
Fix return codes inside :exc:`SystemExit` not getting returned by the REPL.
Disallow __classdict__
as the name of a type parameter. Using this name
would previously crash the interpreter in some circumstances.
Improve performance of builtin methods by using a freelist.
Improve performance of :class:`range` by using a freelist.
Update PyUnstable_GC_VisitObjects to traverse perm gen.
The PyTupleObject now caches the computed hash value in the new field ob_hash.
The DTrace build now properly passes the CC
and CFLAGS
variables to
the dtrace
command when utilizing SystemTap on Linux.
Fix mimalloc library builds for 32-bit ARM targets.
clang-cl on Windows needs option /EHa
to support SEH (structured
exception handling) correctly. Fix by Chris Eibl.
Add optimizing flag WITH_COMPUTED_GOTOS
to Windows builds for when using
a compiler that supports it (currently clang-cl). Patch by Chris Eibl.
Update the vendored HACL* library to fix build issues with older clang compilers.
Fix potential KeyError
when handling object sections during JIT building
process.