Skip to content

Latest commit

 

History

History
1212 lines (855 loc) · 25.9 KB

File metadata and controls

1212 lines (855 loc) · 25.9 KB

Fix negative timestamp during DST on Windows. Patch by Hugo van Kemenade.

Defers loading of the psapi.dll module until it is used by :func:`ctypes.util.dllist`.

Updated bundled version of OpenSSL to 3.5.5.

Fix test_frame_pointer_unwind when Python is built with :option:`--enable-shared`. Classify also libpython frames as "python". Patch by Victor Stinner.

When Python was compiled with system expat older then 2.7.2 but tests run with newer expat, still skip :class:`!test.test_pyexpat.MemoryProtectionTest`.

Fixes :cve:`2026-2297` by ensuring that SourcelessFileLoader uses :func:`io.open_code` when opening .pyc files.

Disallow usage of control characters in status in :mod:`wsgiref.handlers` to prevent HTTP header injections. Patch by Benedikt Johannes.

Fix crash in :mod:`struct` when calling :func:`repr` or __sizeof__() on an uninitialized :class:`struct.Struct` object created via Struct.__new__() without calling __init__().

Fix InvalidStateError when cancelling process created by :func:`asyncio.create_subprocess_exec` or :func:`asyncio.create_subprocess_shell`. Patch by Daan De Meyer.

:mod:`marshal` now supports :class:`frozendict` objects. The marshal format version was increased to 6. Patch by Victor Stinner.

:mod:`venv`: Prevent incorrect preservation of SELinux context when copying the Activate.ps1 script. The script inherited the SELinux security context of the system template directory, rather than the destination project directory.

os.listdir(-1) and os.scandir(-1) now fail with OSError(errno.EBADF) rather than listing the current directory. os.listxattr(-1) now fails with OSError(errno.EBADF) rather than listing extended attributes of the current directory. Patch by Victor Stinner.

Fix double free and null pointer dereference in unusual error scenarios in :mod:`hashlib` and :mod:`hmac` modules.

:mod:`hmac`: fix a crash when the initialization of the underlying C extension module fails.

:mod:`hashlib`: fix a crash when the initialization of the underlying C extension module fails.

The version attribute of the :mod:`tarfile` module is deprecated and slated for removal in Python 3.20.

Avoid undefined behaviour from signed integer overflow when parsing format strings in the :mod:`struct` module.

Removed Windows 95 compatibility for :func:`locale.getdefaultlocale`.

Add :func:`unicodedata.block` function to return the Unicode block of a character.

Add :data:`typing.TypeForm`, implementing PEP 747. Patch by Jelle Zijlstra.

:func:`dataclasses.field`: if metadata is None, use an empty :class:`frozendict`, instead of a :func:`~types.MappingProxyType` of an empty :class:`dict`. Patch by Victor Stinner.

Add :exc:`ModuleNotFoundError` hints when a module for a different ABI exists.

ParameterizedMIMEHeader.params of :mod:`email.headerregistry` is now a :class:`frozendict` instead of a :class:`types.MappingProxyType`. Patch by Victor Stinner.

Add valid import name suggestions on :exc:`ModuleNotFoundError`.

Fix :func:`unicodedata.decomposition` for Hangul characters.

Fix a memory leak in :func:`atexit.register`. Patch by Shamil Abdulaev.

Fix data races in :class:`io.IncrementalNewlineDecoder` in the :term:`free-threaded build`.

Make :class:`collections.deque` copy atomic in the :term:`free-threaded build`.

The :mod:`copy` module now supports the :class:`frozendict` type. Patch by Pieter Eendebak based on work by Victor Stinner.

The :mod:`json` module now supports the :class:`frozendict` type. Patch by Victor Stinner.

Added missing explanations for some parameters in :func:`glob.glob` and :func:`glob.iglob`.

Fixed a use-after-free in :mod:`ssl` when SSL_new() returns NULL in newPySSLSocket(). The error was reported via a dangling pointer after the object had already been freed.

Add '%D' support to :meth:`~datetime.datetime.strptime`.

Fix :class:`argparse.ArgumentParser` to be :mod:`pickleable <pickle>`.

Fix a race condition in :mod:`tracemalloc`: it no longer detaches the attached thread state to acquire its internal lock. Patch by Victor Stinner.

:func:`unicodedata.bidirectional` now return the correct default bidi class for unassigned code points.

Reduce the import time of :mod:`inspect` module by ~20%.

Fix the folding of headers by the :mod:`email` library when RFC 2047 encoded words are used. Now whitespace is correctly preserved and also correctly added between adjacent encoded words. The latter property was broken by the fix for gh-92081, which mostly fixed previous failures to preserve whitespace.

Fixed a hang on Windows in the :mod:`tempfile` module when trying to create a temporary file or subdirectory in a non-writable directory.

Methods directly decorated with :deco:`functools.singledispatchmethod` now dispatch on the second argument when called after being accessed as class attributes. Patch by Bartosz Sławecki.

The functional syntax for creating :class:`typing.NamedTuple` classes now supports passing any :term:`iterable` of fields and types. Previously, only sequences were supported.

Calling :func:`repr` on :func:`functools.partial` is now safer when the partial object's internal attributes are replaced while the string representation is being generated.

Attribute suggestions in :exc:`AttributeError` tracebacks are now formatted differently to make them easier to understand, for example: Did you mean '.datetime.now' instead of '.now'. Contributed by Bartosz Sławecki.

Fix crash in _remote_debugging that caused test_external_inspection to intermittently fail. Patch by Taegyun Kim.

Fixed a crash in socket.sendmsg() that could occur if ancillary data is mutated re-entrantly during argument parsing.

Fix a crash in :func:`!_interpchannels.list_all` after closing a channel.

Allow scheduler and setpgroup arguments to be explicitly :const:`None` when calling :func:`os.posix_spawn` or :func:`os.posix_spawnp`. Patch by Bénédikt Tran.

Raise :exc:`TypeError` instead of :exc:`SystemError` when the scheduler in :func:`os.posix_spawn` or :func:`os.posix_spawnp` is not a tuple. Patch by Bénédikt Tran.

:mod:`ssl`: fix reference leaks in :class:`ssl.SSLContext` objects. Patch by Bénédikt Tran.

Added :term:`path-like object` support for :func:`shutil.make_archive`.

Fix :class:`ctypes.CDLL` to honor the handle parameter on POSIX systems.

:mod:`zoneinfo`: fix a crash when instantiating :class:`~zoneinfo.ZoneInfo` objects for which the internal class-level cache is inconsistent.

Fix assertion failure in :mod:`sqlite3` blob subscript when slicing with indices that result in an empty slice.

Fix :meth:`asyncio.StreamWriter.start_tls` to transfer buffered data from :class:`~asyncio.StreamReader` to the SSL layer, preventing data loss when upgrading a connection to TLS mid-stream (e.g., when implementing PROXY protocol support).

Introduced :meth:`importlib.abc.MetaPathFinder.discover` and :meth:`importlib.abc.PathEntryFinder.discover` to allow module and submodule name discovery without assuming the use of traditional filesystem based imports.

Get rid of any possibility of a name conflict for named pipes in :mod:`multiprocessing` and :mod:`asyncio` on Windows, no matter how small.

Fix :mod:`sqlite3`'s :ref:`interactive shell <sqlite3-cli>` keeping part of previous commands when scrolling history.

Improve :exc:`TypeError` error message when :meth:`!weakref.WeakKeyDictionary.update` is used with keyword-only parameters.

Add support for Tangut Ideographs names in :mod:`unicodedata`.

The :mod:`re` module gains a new :func:`re.prefixmatch` function as an explicit spelling of what has to date always been known as :func:`re.match`. :class:`re.Pattern` similary gains a :meth:`re.Pattern.prefixmatch` method.

Why? Explicit is better than implicit. Other widely used languages all use the term "match" to mean what Python uses the term "search" for. The unadorened "match" name in Python has been a frequent case of confusion and coding bugs due to the inconsistency with the rest if the software industry.

We do not plan to deprecate and remove the older match name.

Fix :meth:`!unicodedata.ucd_3_2_0.numeric` for non-decimal values.

Re-enable :func:`os.posix_fallocate` and :func:`os.posix_fadvise` on AIX.

Add support for user data of Tk virtual events and detail for Enter, Leave, FocusIn, FocusOut, and ConfigureRequest events to :mod:`tkinter`.

:class:`mailbox.Mailbox` instances can now be used as a context manager. The Mailbox is locked on context entry and unlocked and closed at context exit.

Document missing public :class:`wave.Wave_write` getter methods.

Document rest of full public :class:`importlib.metadata.Distribution` API. Also add the (already documented) :class:`~importlib.metadata.PackagePath` to __all__.

A new "Improve this page" link is available in the left-hand sidebar of the docs, offering links to create GitHub issues, discussion forum posts, or pull requests.

Fix :exc:`SystemError` when __classdict__ or __conditional_annotations__ is in a class-scope inlined comprehension. Found by OSS Fuzz in :oss-fuzz:`491105000`.

Fixed a memory leak in the :term:`free-threaded build` where mimalloc pages could become permanently unreclaimable until the owning thread exited.

Make :meth:`!mmap.mmap.set_name` thread-safe on the :term:`free threaded <free threading>` build.

In the free threading build, skip the stop-the-world pause when reassigning __class__ on a newly created object.

Fix crash in AST unparser when unparsing dict comprehension unpacking. Found by OSS Fuzz in :oss-fuzz:`489790200`.

Fix a crash in :func:`os.pathconf` when called with -1 as the path argument.

Fix reference leaks in various unusual error scenarios.

Fixed a SystemError in the parser when an encoding cookie (for example, UTF-7) decodes to carriage returns (\r). Newlines are now normalized after decoding in the string tokenizer.

Patch by Pablo Galindo.

Added the :option:`-X pathconfig_warnings<-X>` and :envvar:`PYTHON_PATHCONFIG_WARNINGS` options, allowing to disable warnings from :ref:`sys-path-init`.

A warning is now shown during :ref:`sys-path-init` if it can't find a valid standard library.

Specialized the parser error for when with items are followed by a trailing comma (for example, with item,:), raising a clearer :exc:`SyntaxError` message. Patch by Pablo Galindo and Bartosz Sławecki.

Fix use-after-free in :meth:`dict.clear` when the dictionary values are embedded in an object and a destructor causes re-entrant mutation of the dictionary.

Fix JIT trace crash when recording function from cleared generator frame.

Fix compiler assertion fail when a type parameter bound contains an invalid expression in a conditional block.

Fix a crash in the free-threaded build when the dictionary argument to :meth:`str.maketrans` is concurrently modified.

:meth:`str.maketrans` now accepts :class:`frozendict`.

Speed up :meth:`bytes.hex`, :meth:`bytearray.hex`, :func:`binascii.hexlify`, and :mod:`hashlib` .hexdigest() operations with SIMD on x86-64, ARM64, and ARM32 with NEON when built with gcc (version 12 or higher) or clang (version 3 or higher) compilers. Around 1.1-3x faster for common 16-64 byte inputs such as hashlib hex digests, and up to 8x faster for larger data.

:func:`type` now accepts :class:`frozendict` as an argument.

Fix JIT optimizer assertion failure during CALL_ALLOC_AND_ENTER_INIT side exit.

:func:`exec` and :func:`eval` now accept :class:`frozendict` for globals. Patch by Victor Stinner.

Fix a crash when :func:`!__lazy_import__` is passed a non-string argument, by raising an :exc:`TypeError` instead.

Optimize :class:`memoryview` comparison: a :class:`memoryview` is equal to itself, there is no need to compare values. Patch by Victor Stinner.

Update specializer to support frozendict. Patch by Donghee Na.

Optimize :meth:`!frozendict.fromkeys` to avoid unnecessary thread-safety operations in frozendict cases. Patch by Donghee Na.

Speedup BINARY_OP_EXTEND for exact floats and medium-size integers by up to 15%. Patch by Chris Eibl.

Use mimalloc for raw memory allocations such as via :c:func:`PyMem_RawMalloc` for better performance on :term:`free-threaded builds <free-threaded build>`. Patch by Kumar Aditya.

Fix heap buffer overflow in the parser found by OSS-Fuzz.

Fix a crash in fork child process when perf support is enabled.

Fix undefined behavior in the lexer when start and multi_line_start pointers are NULL in _PyLexer_remember_fstring_buffers() and _PyLexer_restore_fstring_buffers(). The NULL pointer arithmetic (NULL - valid_pointer) is now guarded with explicit NULL checks.

Add built-in :class:`frozendict` type. Patch by Victor Stinner.

Fix a JIT assertion failure when a conditional branch jumps to the same target as the fallthrough path.

Add :c:func:`PyUnstable_SetImmortal` C-API function to mark objects as :term:`immortal`.

Clarify the error message raised when a class pattern is used to match on a non-class object.

Optimize BINARY_SLICE for list, tuple, and unicode by avoiding temporary slice object creation.

Align the QSBR thread state array to a 64-byte cache line boundary to avoid false sharing in the :term:`free-threaded build`.

Implement PEP 810. Patch by Pablo Galindo and Dino Viehland.

Deprecate PEP 456 support for providing an external definition of the string hashing scheme. Removal is scheduled for Python 3.19. Patch by Bénédikt Tran.

Improve :opcode:`MATCH_CLASS` performance by up to 52% in certain cases. Patch by Marc Mueller.

Fix erroneous clearing of an object's :attr:`~object.__dict__` if overwritten at runtime.

Literals using the \N{name} escape syntax can now construct CJK ideographs and Hangul syllables using case-insensitive names.

Restore private provisional _Py_InitializeMain() function removed in Python 3.14. Patch by Victor Stinner.

:c:func:`PyErr_CheckSignals` now raises the exception scheduled by :c:func:`PyThreadState_SetAsyncExc`, if any.

Made :c:func:`PyUnstable_Code_SetExtra`, :c:func:`PyUnstable_Code_GetExtra`, and :c:func:`PyUnstable_Eval_RequestCodeExtraIndex` thread-safe on the :term:`free threaded <free threading>` build.

Add the following functions for the new :class:`frozendict` type:

Patch by Victor Stinner.

Python.h now also includes <string.h> in the limited C API version 3.11 and newer to fix the :c:macro:`Py_CLEAR` macro which uses memcpy(). Patch by Victor Stinner.

Add :c:func:`PyArg_ParseArray` and :c:func:`PyArg_ParseArrayAndKeywords` functions to parse arguments of functions using the :c:macro:`METH_FASTCALL` calling convention. Patch by Victor Stinner.

Use wasmtime's --argv0 to auto-discover sysconfig in WASI builds

Fix targets "Clean" and "CLeanAll" in case of PGO builds on Windows. Patch by Chris Eibl.

When building with Visual Studio 2026 (Version 18), use PlatformToolSet v145 by default. Patch by Chris Eibl.

Update to WASI SDK 30.

Introduce executable specific linker flags to ./configure.