| .. date: 2026-09-29-16-32-46 | |
| .. gh-issue: 158446 | |
| .. nonce: dToaPr | |
| .. release date: 2026-10-13 | |
| .. section: Security | |
| Fix a crash or incorrect output that could occur when formatting a | |
| :class:`float` or :class:`complex` with a precision close to the platform's | |
| ``INT_MAX``. :c:func:`PyOS_double_to_string` now raises :exc:`ValueError` | |
| for any precision of that magnitude, regardless of presentation type or | |
| value, as the format string parsers already did for precisions above | |
| ``INT_MAX``. | |
| .. | |
| .. date: 2026-09-23-11-34-30 | |
| .. gh-issue: 156793 | |
| .. nonce: zC_AjF | |
| .. section: Security | |
| :mod:`asyncio`: :meth:`loop.start_tls() <asyncio.loop.start_tls>` and | |
| :meth:`loop.create_connection() <asyncio.loop.create_connection>` now | |
| validate the *server_hostname* argument if an :class:`ssl.SSLContext` is | |
| passed with *check_hostname* set to ``True``. | |
| .. | |
| .. date: 2026-09-16-14-05-19 | |
| .. gh-issue: 156793 | |
| .. nonce: Qa1T5Z | |
| .. section: Security | |
| :meth:`ssl.SSLContext.wrap_bio` now validates its *server_side*, | |
| *server_hostname* and *session* arguments similar to | |
| :meth:`ssl.SSLContext.wrap_socket`. | |
| In particular, a context with :attr:`~ssl.SSLContext.check_hostname` enabled | |
| and no *server_hostname* passed to :meth:`!wrap_bio` now raises | |
| :exc:`ValueError` instead of completing a handshake that verified the | |
| certificate chain without verifying the peer's identity, with no indication | |
| that the check had been skipped. | |
| .. | |
| .. date: 2026-09-10-13-38-11 | |
| .. gh-issue: 157265 | |
| .. nonce: -vYuMp | |
| .. section: Security | |
| In :mod:`tarfile`, when extracting a link falls back to extracting a member | |
| of the archive, skip the member when the filter function returns None when | |
| called with the extracted member's name replaced with the link's. | |
| .. | |
| .. date: 2026-08-31-16-47-33 | |
| .. gh-issue: 157953 | |
| .. nonce: KxCF5N | |
| .. section: Security | |
| Update bundled `libexpat <https://libexpat.github.io/>`_ to version 2.8.5. | |
| .. | |
| .. date: 2026-08-18-13-54-05 | |
| .. gh-issue: 156002 | |
| .. nonce: CcWXPP | |
| .. section: Security | |
| Bound the amount of data :mod:`zipfile` decompresses per read for members | |
| compressed with bzip2, LZMA, or Zstandard, matching the existing limit for | |
| deflate. A small archive member could previously expand into an unbounded | |
| allocation even when read in small chunks. | |
| .. | |
| .. date: 2026-08-14-11-55-00 | |
| .. gh-issue: 157579 | |
| .. nonce: Kq3Vt2 | |
| .. section: Security | |
| Fix a race condition in the cleanup of :class:`tempfile.TemporaryDirectory`. | |
| When working around file system permission errors, files are now removed | |
| relative to open directory file descriptors instead of resolving their path | |
| again, so that replacing a directory of the tree with a symbolic link can no | |
| longer make the cleanup delete files outside of the temporary directory. | |
| This addresses :cve:`2026-12345`. | |
| .. | |
| .. date: 2026-08-13-13-08-11 | |
| .. gh-issue: 155999 | |
| .. nonce: Xt4rWq | |
| .. section: Security | |
| Fix the :mod:`tarfile` ``tar`` and ``data`` extraction filters creating | |
| directories outside the destination for members whose name leaves the | |
| destination and returns to it, such as ``../evil/../dest/sub/file``. The | |
| containment check used the resolved path, but intermediate directories were | |
| created from the name as given. | |
| .. | |
| .. date: 2026-08-10-12-00-00 | |
| .. gh-issue: 156293 | |
| .. nonce: sNIcbk | |
| .. section: Security | |
| Fix a crash in :mod:`ssl` when an :attr:`~ssl.SSLContext.sni_callback` | |
| switches a connection to another :class:`~ssl.SSLContext` and the context | |
| that carries the callback is no longer referenced by the application. | |
| Servers that keep their ``sni_callback`` context alive (the usual case when | |
| it wraps the listening socket or is stored on the server object) were not | |
| affected. This addresses :cve:`2026-19445`. | |
| .. | |
| .. date: 2026-08-06-11-43-20 | |
| .. gh-issue: 155292 | |
| .. nonce: j4pHBO | |
| .. section: Security | |
| Change the :mod:`stringprep` module and :mod:`encodings.idna` codec to not | |
| consider Unicode codepoint attributes beyond those defined in :rfc:`3454`. | |
| .. | |
| .. date: 2026-07-31-16-20-17 | |
| .. gh-issue: 155694 | |
| .. nonce: SsxlKG | |
| .. section: Security | |
| Fix :cve:`2026-15806` by scoping :class:`~urllib.request.HTTPPasswordMgr` | |
| credentials to the URL scheme, preventing credentials stored for an HTTPS | |
| URL from being used for a matching HTTP URL, while URIs without a scheme | |
| continue to match any scheme. | |
| .. | |
| .. date: 2026-07-04-17-00-00 | |
| .. gh-issue: 153030 | |
| .. nonce: RovkP6 | |
| .. section: Security | |
| Fixed quadratic complexity in incremental parsing of long unterminated | |
| constructs (such as tags or comments) in :class:`html.parser.HTMLParser`, | |
| which could be exploited for a denial of service. | |
| .. | |
| .. date: 2026-06-30-13-24-13 | |
| .. gh-issue: 152674 | |
| .. nonce: -2QVoL | |
| .. section: Security | |
| The :class:`xml.etree.ElementTree.Element` methods | |
| :meth:`~xml.etree.ElementTree.Element.findall`, | |
| :meth:`~xml.etree.ElementTree.Element.iterfind` and | |
| :meth:`~xml.etree.ElementTree.Element.find` avoid quadratic behavior when | |
| using XPath index predicates (``[1]``, ``[last()]``, ``[last()-N]``) on XML | |
| documents with many same-tag siblings. | |
| .. | |
| .. date: 2026-06-25-20-44-20 | |
| .. gh-issue: 152216 | |
| .. nonce: VxiK5y | |
| .. section: Security | |
| Update bundled `libexpat <https://libexpat.github.io/>`_ to version 2.8.2. | |
| .. | |
| .. date: 2026-06-23-14-19-30 | |
| .. gh-issue: 151987 | |
| .. nonce: 8mNIMf | |
| .. section: Security | |
| The :meth:`tarfile.TarFile.extract` method now applies the given filter when | |
| it extracts a link target from the archive as a fallback. | |
| .. | |
| .. date: 2026-06-23-13-28-16 | |
| .. gh-issue: 151981 | |
| .. nonce: xBHEcU | |
| .. section: Security | |
| In :mod:`tarfile`, seeking a stream now stops when end of the stream is | |
| reached. | |
| .. | |
| .. date: 2026-06-16-14-58-02 | |
| .. gh-issue: 151544 | |
| .. nonce: _bexVy | |
| .. section: Security | |
| :file:`Modules/Setup.local` is no longer used as a landmark to discover | |
| whether Python is running in a source tree, as it could potentially affect | |
| actual installs. The :file:`pybuilddir.txt` file is now the sole indicator | |
| of running in a source tree. | |
| .. | |
| .. date: 2026-06-10-13-08-19 | |
| .. gh-issue: 151558 | |
| .. nonce: mL74i2 | |
| .. section: Security | |
| Fixed an vulnerability in the :mod:`tarfile` ``data`` and ``tar`` extraction | |
| filters where crafted archives could create a symlink pointing outside the | |
| destination directory. This was a bypass of :cve:`2025-4330`. | |
| .. | |
| .. date: 2026-05-30-09-36-20 | |
| .. gh-issue: 150599 | |
| .. nonce: nlHqU- | |
| .. section: Security | |
| Fix a possible stack buffer overflow in :mod:`bz2` when a | |
| :class:`bz2.BZ2Decompressor` is reused after a decompression error. The | |
| decompressor now becomes unusable after libbz2 reports an error. | |
| .. | |
| .. date: 2026-05-30-00-00-00 | |
| .. gh-issue: 150743 | |
| .. nonce: httpdos | |
| .. section: Security | |
| :mod:`http.client` now limits the number of chunked-response trailer lines | |
| it will read to :attr:`~http.client.HTTPConnection.max_response_headers` | |
| (100 by default), and the number of interim (1xx) responses it will skip to | |
| 100. A malicious or broken server could previously stream trailer lines or | |
| ``100 Continue`` responses forever, hanging the client even when a socket | |
| timeout was in use. Reported by ``@YLChen-007`` via GHSA-w4q2-g22w-6fr4. | |
| .. | |
| .. date: 2026-05-18-17-46-00 | |
| .. gh-issue: 149835 | |
| .. nonce: EebFlk | |
| .. section: Security | |
| :func:`shutil.move` now resolves symlinks via :func:`os.path.realpath` when | |
| checking whether the destination is inside the source directory, preventing | |
| a symlink-based bypass of that guard. | |
| .. | |
| .. date: 2026-05-11-21-15-07 | |
| .. gh-issue: 149698 | |
| .. nonce: OudOcW | |
| .. section: Security | |
| Update bundled `libexpat <https://libexpat.github.io/>`_ to version 2.8.1 | |
| for the fix for :cve:`2026-45186`. | |
| .. | |
| .. date: 2026-05-10-18-05-32 | |
| .. gh-issue: 87451 | |
| .. nonce: XkKB6M | |
| .. section: Security | |
| The :mod:`ftplib` module's undocumented ``ftpcp`` function no longer trusts | |
| the IPv4 address value returned from the source server in response to the | |
| ``PASV`` command by default, completing the fix for CVE-2021-4189. As with | |
| :class:`ftplib.FTP`, the former behavior can be re-enabled by setting the | |
| ``trust_server_pasv_ipv4_address`` attribute on the source | |
| :class:`ftplib.FTP` instance to ``True``. Thanks to Qi Deng at Aurascape AI | |
| for the report. | |
| .. | |
| .. date: 2026-05-08-02-18-54 | |
| .. gh-issue: 149474 | |
| .. nonce: ujQ-mu | |
| .. section: Security | |
| Fix the binary writer in :mod:`profiling.sampling` not firing the audit | |
| (:pep:`578`) when creating the output file. The writer and the reader now | |
| accept any path-like object. Patch by Maurycy Pawłowski-Wieroński. | |
| .. | |
| .. date: 2026-05-03-21-00-00 | |
| .. gh-issue: 149486 | |
| .. nonce: tarflt | |
| .. section: Security | |
| :func:`tarfile.data_filter` now validates link targets using the same | |
| normalised value that is written to disk, strips trailing separators from | |
| the member name when resolving a symlink's directory, and rejects link | |
| members that would replace the destination directory itself. This closes | |
| several path-traversal bypasses of the ``data`` extraction filter. | |
| .. | |
| .. date: 2026-04-27-16-36-11 | |
| .. gh-issue: 149079 | |
| .. nonce: vKl-LM | |
| .. section: Security | |
| Fix a potential denial of service in :func:`unicodedata.normalize`. The | |
| canonical ordering step of Unicode normalization used a quadratic-time | |
| insertion sort for reordering combining characters, which could be exploited | |
| with crafted input containing many combining characters in non-canonical | |
| order. Replaced with a linear-time counting sort for long runs. | |
| .. | |
| .. date: 2026-04-26-19-30-45 | |
| .. gh-issue: 149018 | |
| .. nonce: a9SqWb | |
| .. section: Security | |
| Improved protection against XML hash-flooding attacks in | |
| :mod:`xml.parsers.expat` and :mod:`xml.etree.ElementTree` when Python is | |
| compiled with libExpat 2.8.0 or later. | |
| .. | |
| .. date: 2026-01-16-11-58-19 | |
| .. gh-issue: 143927 | |
| .. nonce: aviFeG | |
| .. section: Security | |
| Normalize all line endings (CR, CRLF, and LF) to LF+TAB when writing | |
| multi-line configparser values. | |
| .. | |
| .. date: 2026-10-12-23-32-50 | |
| .. gh-issue: 159285 | |
| .. nonce: nlLuwQ | |
| .. section: Core and Builtins | |
| Fix a crash in a debug build when copying an empty :class:`dict` fails with | |
| :exc:`MemoryError`. Patch by Christian Aurich Zanettini Martins. | |
| .. | |
| .. date: 2026-10-11-01-41-31 | |
| .. gh-issue: 129724 | |
| .. nonce: Kq3vTz | |
| .. section: Core and Builtins | |
| Fix the output of :mod:`marshal` for compiled code, and so the content of | |
| ``.pyc`` files, varying with what was imported or compiled earlier in the | |
| process. Strings in :class:`slice` constants made only of ASCII letters, | |
| digits and underscores are now interned in the default build, like those of | |
| other constants. | |
| .. | |
| .. date: 2026-10-10-23-50-00 | |
| .. gh-issue: 159137 | |
| .. nonce: gcWalk | |
| .. section: Core and Builtins | |
| Speed up the garbage collector by untracking tuples and counting the | |
| surviving objects while it looks for unreachable objects, which saves two | |
| walks of the collected generation in every collection. | |
| .. | |
| .. date: 2026-10-10-00-00-00 | |
| .. gh-issue: 159137 | |
| .. nonce: gcReuse | |
| .. section: Core and Builtins | |
| Avoid a second reachability analysis in the garbage collector when no | |
| weakref callback, finalizer, or collectable-object debug output ran. | |
| Finished generators, coroutines, and async generators can skip this analysis | |
| even when finalized. Free-threaded builds also avoid a second stop-the-world | |
| pause in this case. | |
| .. | |
| .. date: 2026-10-06-14-12-49 | |
| .. gh-issue: 158918 | |
| .. nonce: TDVkZx | |
| .. section: Core and Builtins | |
| Reduce C stack usage of ``_PyModule_IsPossiblyShadowing``, which could | |
| potentially cause stack overflows during module attribute access while | |
| deeply recursing in agressively optimized builds. | |
| .. | |
| .. date: 2026-10-06-05-12-21 | |
| .. gh-issue: 158803 | |
| .. nonce: iYTpRQ | |
| .. section: Core and Builtins | |
| Fix a crash in :meth:`bytes.join` and :meth:`bytearray.join` in the | |
| :term:`free-threaded build` when another thread concurrently mutates the | |
| list being joined. Patch by Christian Aurich Zanettini Martins. | |
| .. | |
| .. date: 2026-10-05-03-25-30 | |
| .. gh-issue: 158824 | |
| .. nonce: h-hJj7 | |
| .. section: Core and Builtins | |
| Fix module-level :meth:`~module.__getattr__` being called before a module's | |
| own lazy imports were resolved, which allowed it to shadow them. | |
| .. | |
| .. date: 2026-10-05-01-59-22 | |
| .. gh-issue: 158820 | |
| .. nonce: 3KLyOT | |
| .. section: Core and Builtins | |
| Fix a crash when a :ref:`lazy import <lazy-imports>` is declared or resolved | |
| by a finalizer running during interpreter shutdown. | |
| .. | |
| .. date: 2026-10-04-11-59-33 | |
| .. gh-issue: 158592 | |
| .. nonce: _BpoeY | |
| .. section: Core and Builtins | |
| Skip the array reallocation when shrinking a small :class:`list`. Patch by | |
| Donghee Na. | |
| .. | |
| .. date: 2026-10-04-01-40-31 | |
| .. gh-issue: 158790 | |
| .. nonce: F3kQ7z | |
| .. section: Core and Builtins | |
| Speed up :meth:`list.insert` and item deletion via :keyword:`del` in | |
| free-threaded builds by using :manpage:`memmove(3)`. | |
| .. | |
| .. date: 2026-10-03-19-11-03 | |
| .. gh-issue: 130706 | |
| .. nonce: 01-O6U | |
| .. section: Core and Builtins | |
| Add a fast path to ``_Py_Dealloc()`` for non-GC objects. Patch by Donghee | |
| Na. | |
| .. | |
| .. date: 2026-10-03-16-14-26 | |
| .. gh-issue: 158583 | |
| .. nonce: 7EUMvS | |
| .. section: Core and Builtins | |
| :meth:`bytes.fromhex` and :meth:`bytearray.fromhex`: Fix uninitialized | |
| memory read. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-10-02-16-19-35 | |
| .. gh-issue: 158592 | |
| .. nonce: V6W21J | |
| .. section: Core and Builtins | |
| ``del list[index]`` now triggers shrinking the list's internal array. | |
| .. | |
| .. date: 2026-10-01-20-00-00 | |
| .. gh-issue: 158140 | |
| .. nonce: small | |
| .. section: Core and Builtins | |
| Resolve lazily imported sibling submodules independently, so accessing one | |
| does not import another merely because its declaration came last. | |
| .. | |
| .. date: 2026-09-30-10-12-41 | |
| .. gh-issue: 158316 | |
| .. nonce: Yv3kQe | |
| .. section: Core and Builtins | |
| On Free Threading, speed up :meth:`bytearray.decode` by decoding the | |
| underlying storage directly instead of going through the buffer protocol. | |
| .. | |
| .. date: 2026-09-30-01-30-58 | |
| .. gh-issue: 158486 | |
| .. nonce: cqmMwv | |
| .. section: Core and Builtins | |
| Fix the PowerSort mask calculation in :meth:`list.sort` for very large | |
| lists. | |
| .. | |
| .. date: 2026-09-29-07-28-20 | |
| .. gh-issue: 158380 | |
| .. nonce: F0J0PO | |
| .. section: Core and Builtins | |
| Fix incorrect type guards for ``dict`` reads and writes in the experimental | |
| JIT. | |
| .. | |
| .. date: 2026-09-28-18-58-27 | |
| .. gh-issue: 158364 | |
| .. nonce: jBqmTs | |
| .. section: Core and Builtins | |
| Fix crash when :func:`sys._current_frames` or | |
| :func:`sys._current_exceptions` is called while another interpreter is | |
| running. | |
| .. | |
| .. date: 2026-09-28-11-52-49 | |
| .. gh-issue: 158219 | |
| .. nonce: tNjBVV | |
| .. section: Core and Builtins | |
| Fix :class:`bytearray` constructor: do not use a bytes object if its hash | |
| value is already computed. Patch by Cody Maloney and Victor Stinner. | |
| .. | |
| .. date: 2026-09-26-23-44-44 | |
| .. gh-issue: 158241 | |
| .. nonce: NZ9OSU | |
| .. section: Core and Builtins | |
| Fix a crash and possible code object corruption following a | |
| :exc:`MemoryError` while compiling Python code. | |
| .. | |
| .. date: 2026-09-26-15-39-32 | |
| .. gh-issue: 158254 | |
| .. nonce: qT7vRk | |
| .. section: Core and Builtins | |
| Reverse iterators over a :class:`dict` and its views now raise | |
| :exc:`RuntimeError` if the dictionary's keys change during iteration, like | |
| forward iterators, instead of yielding entries for the new keys. | |
| .. | |
| .. date: 2026-09-25-22-34-50 | |
| .. gh-issue: 158165 | |
| .. nonce: GVPxKy | |
| .. section: Core and Builtins | |
| Fix compilation of ``_Py_get_machine_stack_pointer()`` with MinGW on | |
| Windows. Patch by Donghee Na. | |
| .. | |
| .. date: 2026-09-24-18-44-40 | |
| .. gh-issue: 158072 | |
| .. nonce: mHveWw | |
| .. section: Core and Builtins | |
| Fix a JIT crash when a class is instantiated with their default arguments | |
| .. | |
| .. date: 2026-09-24-18-20-00 | |
| .. gh-issue: 153569 | |
| .. nonce: diagnostics | |
| .. section: Core and Builtins | |
| Correct missing-brace error messages for multiline f-strings and t-strings. | |
| Improve tokenization of UTF-8 input split across many readline calls. | |
| Preserve source order when reading files with stateful encodings. Preserve | |
| input errors when scanning string literals. | |
| .. | |
| .. date: 2026-09-24-17-30-48 | |
| .. gh-issue: 157914 | |
| .. nonce: 5fVJob | |
| .. section: Core and Builtins | |
| Revert :gh:`146064`. The linked PyMutex change was causing a significant | |
| performance regression in some cases. | |
| .. | |
| .. date: 2026-09-22-12-00-00 | |
| .. gh-issue: 157838 | |
| .. nonce: brcMrg | |
| .. section: Core and Builtins | |
| Merge biased reference counts on behalf of threads that are detached instead | |
| of waiting for them to attach again, in the free-threaded build. | |
| .. | |
| .. date: 2026-09-20-12-11-01 | |
| .. gh-issue: 157840 | |
| .. nonce: EAo1Kp | |
| .. section: Core and Builtins | |
| Speed up calls to :func:`hasattr` and three-argument :func:`getattr` for | |
| unassigned attributes in an object's :attr:`~object.__slots__` by roughly | |
| 6x. | |
| .. | |
| .. date: 2026-09-20-08-59-48 | |
| .. gh-issue: 157833 | |
| .. nonce: 3b0bac | |
| .. section: Core and Builtins | |
| Fix call specialization for C functions and methods with ``METH_CLASS``, | |
| ``METH_STATIC``, or ``METH_COEXIST`` flags, improving their call | |
| performance. | |
| .. | |
| .. date: 2026-09-19-12-00-00 | |
| .. gh-issue: 157778 | |
| .. nonce: fstring-brace | |
| .. section: Core and Builtins | |
| Include the line number of the opening brace in the :exc:`SyntaxError` for | |
| an unclosed f-string or t-string replacement field when a matching quote on | |
| a later line is interpreted as the start of an unterminated string. | |
| .. | |
| .. date: 2026-09-18-20-24-43 | |
| .. gh-issue: 157468 | |
| .. nonce: zVIAva | |
| .. section: Core and Builtins | |
| Fix the JIT optimizer folding a builtin name to a constant taken from the | |
| interpreter's builtins dictionary even when the running function uses a | |
| different ``__builtins__`` mapping, such as one created with | |
| ``vars(builtins).copy()``. The optimizer now only folds when the function's | |
| builtins is the interpreter's, and the folded constant is guarded at runtime | |
| so that another function sharing the same code object but a different | |
| builtins mapping does not use it. | |
| .. | |
| .. date: 2026-09-18-15-20-00 | |
| .. gh-issue: 157757 | |
| .. nonce: Kq3Lm7 | |
| .. section: Core and Builtins | |
| Fix a lazy ``import a.b as c`` reading ``b`` off ``a`` instead of importing | |
| the module ``a.b``. It now binds the submodule, and raises | |
| :exc:`ModuleNotFoundError` when no module backs the name. | |
| .. | |
| .. date: 2026-09-16-15-02-11 | |
| .. gh-issue: 155695 | |
| .. nonce: Kf3xQa | |
| .. section: Core and Builtins | |
| Resolved names are now removed from :data:`sys.lazy_modules` more | |
| consistently: a lazy import of an already loaded module is no longer | |
| recorded, and reifying ``lazy from pkg import attr`` now discards the | |
| ``pkg.attr`` entry. | |
| .. | |
| .. date: 2026-09-15-17-04-54 | |
| .. gh-issue: 155742 | |
| .. nonce: 2DUW_9 | |
| .. section: Core and Builtins | |
| In debug mode at Python exit, check if immutable singleton objects have been | |
| modified by mistake to detect bugs in C extensions. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-14-23-16-26 | |
| .. gh-issue: 156939 | |
| .. nonce: oZqlSt | |
| .. section: Core and Builtins | |
| When Python is built in debug mode, :class:`bytes` and :class:`bytearray` | |
| destructors now check if the trailing null byte has been overridden to | |
| detect buffer overflow. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-13-21-00-00 | |
| .. gh-issue: 153568 | |
| .. nonce: prefix-cache | |
| .. section: Core and Builtins | |
| Speed up parsing by reusing memoized rule prefixes across consecutive | |
| grammar alternatives, avoiding repeated rule calls and cache lookups. | |
| .. | |
| .. date: 2026-09-13-17-00-00 | |
| .. gh-issue: 153568 | |
| .. nonce: target-grammar | |
| .. section: Core and Builtins | |
| Speed up parsing by sharing expression rules with assignment and deletion | |
| targets, and simplify comparison and keyword argument rules. | |
| .. | |
| .. date: 2026-09-13-12-46-10 | |
| .. gh-issue: 157378 | |
| .. nonce: Rg7Tq2 | |
| .. section: Core and Builtins | |
| Fix ``SyntaxError.offset`` and ``SyntaxError.end_offset`` for the "Non-UTF-8 | |
| code starting with ..." error when a non-ASCII character precedes the | |
| invalid byte on the same line. Patch by Shamil Abdulaev. | |
| .. | |
| .. date: 2026-09-13-10-43-24 | |
| .. gh-issue: 156762 | |
| .. nonce: Kbf2mo | |
| .. section: Core and Builtins | |
| Fix undefined behaviour in :class:`operator.methodcaller`: its | |
| :c:member:`~PyTypeObject.tp_clear` slot function returned ``void`` instead | |
| of ``int``, so the garbage collector called it through an incompatible | |
| function type. Patched by Shamil Abdulaev. | |
| .. | |
| .. date: 2026-09-12-22-29-51 | |
| .. gh-issue: 157377 | |
| .. nonce: O6WYlM | |
| .. section: Core and Builtins | |
| Fix :func:`gc.get_count` on the free-threaded build resetting the | |
| thread-local allocation counter that schedules automatic garbage collection. | |
| A thread that called it while allocating could prevent cyclic garbage from | |
| ever being collected. | |
| .. | |
| .. date: 2026-09-12-16-40-00 | |
| .. gh-issue: 157361 | |
| .. nonce: anextpy | |
| .. section: Core and Builtins | |
| Implement :func:`anext` in Python instead of C, in a frozen ``_pybuiltins`` | |
| module. The awaitable returned by ``anext(it, default)`` is now a plain | |
| coroutine, so introspection tools such as :func:`asyncio.print_call_graph` | |
| can see through it into :meth:`~object.__anext__`. | |
| .. | |
| .. date: 2026-09-12-12-00-00 | |
| .. gh-issue: 153568 | |
| .. nonce: parser | |
| .. section: Core and Builtins | |
| Reduce temporary allocations while parsing Python source. | |
| .. | |
| .. date: 2026-09-10-08-21-07 | |
| .. gh-issue: 157247 | |
| .. nonce: Zv4bz2 | |
| .. section: Core and Builtins | |
| Fix :func:`sys.activate_stack_trampoline` allowing activation from a | |
| subinterpreter while the JIT is enabled in the main interpreter. | |
| .. | |
| .. date: 2026-09-10-02-50-14 | |
| .. gh-issue: 157242 | |
| .. nonce: LsqOUJ | |
| .. section: Core and Builtins | |
| If :meth:`bytearray.resize` or :meth:`bytearray.take_bytes` fails, leave the | |
| :class:`bytearray` unchanged, instead of clearing it. Patch by Victor | |
| Stinner. | |
| .. | |
| .. date: 2026-09-05-17-32-11 | |
| .. gh-issue: 156995 | |
| .. nonce: Tk3bYt | |
| .. section: Core and Builtins | |
| Fix :class:`bytearray` sharing its buffer with the single-byte | |
| :class:`bytes` object of the same value, so that writing to the bytearray | |
| modified that :class:`bytes` object. This happened with | |
| :meth:`bytearray.take_bytes` when exactly one byte remained, and on the | |
| free-threaded build when a bytearray was shrunk to one byte from another | |
| thread. | |
| .. | |
| .. date: 2026-09-04-22-00-00 | |
| .. gh-issue: 156910 | |
| .. nonce: aBcD3f | |
| .. section: Core and Builtins | |
| Fix a deadlock in the :term:`free threaded <free threading>` build when | |
| setting ``__abstractmethods__`` on a type while another thread holds the | |
| type lock. | |
| .. | |
| .. date: 2026-09-04-16-12-30 | |
| .. gh-issue: 156942 | |
| .. nonce: Qk7Rw2 | |
| .. section: Core and Builtins | |
| :mod:`marshal` no longer replaces the exception raised while marshalling the | |
| value with a generic ``ValueError("unmarshallable object")``. Error | |
| messages now name the type of the unsupported object and, for the types | |
| supported only by newer data formats, the required version. | |
| .. | |
| .. date: 2026-09-04-14-06-00 | |
| .. gh-issue: 156091 | |
| .. nonce: nested-comp | |
| .. section: Core and Builtins | |
| Fix a crash when compiling deeply nested inlined list, set, or dict | |
| comprehensions. A :exc:`SyntaxError` is now raised when the nesting exceeds | |
| the compiler's static block limit. | |
| .. | |
| .. date: 2026-09-04-05-25-35 | |
| .. gh-issue: 156865 | |
| .. nonce: 7c5SBs | |
| .. section: Core and Builtins | |
| Raise :exc:`ValueError`'s for overflows, while trying to change | |
| :class:`memoryview` elements with ``'f'`` and ``'Zf'`` format codes. Patch | |
| by Sergey B Kirpichev. | |
| .. | |
| .. date: 2026-09-03-15-20-00 | |
| .. gh-issue: 156894 | |
| .. nonce: Rt9Bx4 | |
| .. section: Core and Builtins | |
| Fix the position of syntax errors which cover a range if the line contains | |
| non-ASCII characters before the error. | |
| .. | |
| .. date: 2026-09-03-12-40-00 | |
| .. gh-issue: 156886 | |
| .. nonce: Kx7mQt | |
| .. section: Core and Builtins | |
| Fix :exc:`ZeroDivisionError` spuriously raised for a complex power with a | |
| non-zero base when the phase of the result is infinite, e.g. | |
| ``1e300**1e308j`` or ``complex('inf')**1j``. | |
| .. | |
| .. date: 2026-09-01-07-15-20 | |
| .. gh-issue: 155525 | |
| .. nonce: A7kP2m | |
| .. section: Core and Builtins | |
| Fix quadratic-time tokenization of modules containing many f-strings or | |
| t-strings. | |
| .. | |
| .. date: 2026-08-31-10-45-11 | |
| .. gh-issue: 156689 | |
| .. nonce: Jq3xNv | |
| .. section: Core and Builtins | |
| Fix an out-of-bounds read in :func:`compile` and :func:`ast.parse` when an | |
| AST object is passed with ``mode='func_type'``. | |
| .. | |
| .. date: 2026-08-27-13-26-50 | |
| .. gh-issue: 156459 | |
| .. nonce: Z8Zqik | |
| .. section: Core and Builtins | |
| Fix cleanup on error in ``compiler_set_qualname``. Previously it was called | |
| in ``_PyCompile_EnterScope``, after the scope had been entered, and this was | |
| not reversed in case of an error. | |
| .. | |
| .. date: 2026-08-26-10-00-00 | |
| .. gh-issue: 155725 | |
| .. nonce: tRcMal | |
| .. section: Core and Builtins | |
| :mod:`tracemalloc` no longer acquires the :term:`GIL` nor creates a | |
| temporary thread state to trace memory allocations: traceback frames now | |
| store plain UTF-8 strings instead of Python str objects, and tracebacks are | |
| captured using the Python thread state already associated with the calling | |
| thread, even if it is not attached. Threads without a Python thread state | |
| record the traceback as ``<unknown>``. | |
| .. | |
| .. date: 2026-08-26-01-08-38 | |
| .. gh-issue: 156371 | |
| .. nonce: USpwKG | |
| .. section: Core and Builtins | |
| Fix missing ``PyRefTracer_DESTROY`` events for trashcan deferred objects. | |
| Patch by Donghee Na. | |
| .. | |
| .. date: 2026-08-24-12-00-00 | |
| .. gh-issue: 156310 | |
| .. nonce: pSqIter | |
| .. section: Core and Builtins | |
| Fix memory safety issues in the :func:`iter` fallback for objects that | |
| implement :meth:`~object.__getitem__` without :meth:`~object.__iter__` | |
| (``PySeqIter_Type``). Sharing an iterator between threads in the | |
| free-threaded build could use the underlying sequence after it was freed, | |
| and re-entrant exhaustion in the default build could decrement the | |
| sequence's reference count twice. Concurrent iteration may still see | |
| duplicate or missing items, but it no longer corrupts the interpreter state. | |
| .. | |
| .. date: 2026-08-23-21-30-00 | |
| .. gh-issue: 64862 | |
| .. nonce: Kx7Qm2 | |
| .. section: Core and Builtins | |
| The :func:`iter` function now accepts the *stop_exception* parameter. The | |
| created iterator stops when the callable raises the specified exception. The | |
| second parameter is now named *stop_value* and can be passed by keyword. | |
| :func:`aiter` now accepts the same *stop_value* and *stop_exception* | |
| parameters, calling an asynchronous callable and awaiting the result. | |
| .. | |
| .. date: 2026-08-23-12-00-00 | |
| .. gh-issue: 156114 | |
| .. nonce: Kq7fXz | |
| .. section: Core and Builtins | |
| Fix a crash in the perf trampoline when a code object has a name or filename | |
| that cannot be encoded to UTF-8. Patched by Shamil Abdulaev. | |
| .. | |
| .. date: 2026-08-21-18-49-12 | |
| .. gh-issue: 156204 | |
| .. nonce: ZusA7e | |
| .. section: Core and Builtins | |
| Fix a crash in :c:func:`PyErr_GivenExceptionMatches` when evaluating deeply | |
| nested exception tuples. The recursion is now bounded, and exceeding the | |
| limit is reported as an unraisable exception. | |
| .. | |
| .. date: 2026-08-21-14-38-06 | |
| .. gh-issue: 148750 | |
| .. nonce: xBijjR | |
| .. section: Core and Builtins | |
| :mod:`encodings` is no longer frozen, due to issues importing submodules | |
| when using a zipped standard library. | |
| .. | |
| .. date: 2026-08-20-22-13-20 | |
| .. gh-issue: 156126 | |
| .. nonce: pXm4Qr | |
| .. section: Core and Builtins | |
| Fix a crash when importing a module whose name contains characters that | |
| cannot be encoded to UTF-8 (such as lone surrogates) while :option:`-X | |
| importtime <-X>` is enabled. | |
| .. | |
| .. date: 2026-08-19-06-43-54 | |
| .. gh-issue: 144446 | |
| .. nonce: k3QzXa | |
| .. section: Core and Builtins | |
| Fix thread safety of the :attr:`!generator.gi_frame`, | |
| :attr:`!coroutine.cr_frame` and :attr:`!agen.ag_frame` attributes in the | |
| free-threading build. | |
| .. | |
| .. date: 2026-08-18-18-13-47 | |
| .. gh-issue: 156021 | |
| .. nonce: 3mK5c5 | |
| .. section: Core and Builtins | |
| Empty :mod:`AST <ast>` node representations no longer include ``...`` when | |
| the recursion depth limit is exceeded, making them easier to distinguish | |
| from non-empty ones. Patch by Bartosz Sławecki. | |
| .. | |
| .. date: 2026-08-18-14-19-51 | |
| .. gh-issue: 155254 | |
| .. nonce: 75TMlb | |
| .. section: Core and Builtins | |
| Avoid warning about missing standard library when using | |
| :ref:`sys-path-init-_pth-files`. | |
| .. | |
| .. date: 2026-08-17-15-13-14 | |
| .. gh-issue: 155978 | |
| .. nonce: 4ztALD | |
| .. section: Core and Builtins | |
| Fix a memory leak in the free-threaded build when setting or deleting a | |
| special method (such as ``__repr__``) on a class that has many subclasses. | |
| .. | |
| .. date: 2026-08-16-19-33-01 | |
| .. gh-issue: 148653 | |
| .. nonce: Kt3vQx | |
| .. section: Core and Builtins | |
| Forbid :mod:`marshalling <marshal>` recursive tuples, and fix a crash when | |
| unmarshalling a self-referencing tuple. | |
| .. | |
| .. date: 2026-08-15-20-31-20 | |
| .. gh-issue: 155823 | |
| .. nonce: OhNmzi | |
| .. section: Core and Builtins | |
| Fix a JIT bug where the side exit taken when a virtual iterator is exhausted | |
| left a stale value on the stack, so the tier one interpreter resumed with | |
| corrupted state and ``yield from`` raised :exc:`AttributeError` instead of | |
| finishing normally. | |
| .. | |
| .. date: 2026-08-14-19-00-00 | |
| .. gh-issue: 155141 | |
| .. nonce: call-kw | |
| .. section: Core and Builtins | |
| Compile pure-keyword calls with 16 to 29 keyword arguments using the faster | |
| ``CALL_KW`` instruction. This includes common cases such as dataclass | |
| constructors with many fields. | |
| .. | |
| .. date: 2026-08-13-13-50-00 | |
| .. gh-issue: 155752 | |
| .. nonce: Rp7K2x | |
| .. section: Core and Builtins | |
| Fix a crash when a :class:`types.GenericAlias` argument gains a | |
| ``__typing_subst__`` hook after the alias parameters have been cached. | |
| .. | |
| .. date: 2026-08-11-13-50-35 | |
| .. gh-issue: 155504 | |
| .. nonce: PsTqZm | |
| .. section: Core and Builtins | |
| Fix a crash when thread state creation fails before the thread state is | |
| fully initialized. | |
| .. | |
| .. date: 2026-08-11-06-04-26 | |
| .. gh-issue: 155526 | |
| .. nonce: W7ZHXu | |
| .. section: Core and Builtins | |
| Fix spurious :exc:`OverflowError` for ``abs(nanj)`` in case :c:data:`errno` | |
| was previously set to :c:macro:`!ERANGE` by some library call. Patch by | |
| Sergey B Kirpichev. | |
| .. | |
| .. date: 2026-08-11-01-45-24 | |
| .. gh-issue: 129752 | |
| .. nonce: Zo3OUx | |
| .. section: Core and Builtins | |
| Don't update adaptive counters in the free-threaded build when thread-local | |
| bytecode is disabled (``-X tlbc=0``). Patch by Donghee Na. | |
| .. | |
| .. date: 2026-08-10-11-20-00 | |
| .. gh-issue: 155515 | |
| .. nonce: Lp3qWc | |
| .. section: Core and Builtins | |
| Track the internal HAMT iterators, which back iteration over a | |
| :class:`contextvars.Context`, with the garbage collector. A reference cycle | |
| running through such an iterator was never collected, leaking the whole | |
| context it iterated over. | |
| .. | |
| .. date: 2026-08-07-18-32-15 | |
| .. gh-issue: 155400 | |
| .. nonce: Kq3Vpt | |
| .. section: Core and Builtins | |
| Fix a deadlock in the free-threaded build between two threads assigning to a | |
| special method of the same class. While applying the type slot updates with | |
| the world stopped, only the type lock was prevented from being released; the | |
| type dict mutex could still be released and re-acquired, in the wrong order, | |
| if the thread blocked on the stop-the-world mutex. | |
| .. | |
| .. date: 2026-08-07-14-45-02 | |
| .. gh-issue: 155315 | |
| .. nonce: Mk9Fd2 | |
| .. section: Core and Builtins | |
| Fix :mod:`marshal` so that a ``frozendict`` referenced more than once in the | |
| serialized data round-trips correctly, instead of failing to load with | |
| :exc:`ValueError`. Patch by tonghuaroot. | |
| .. | |
| .. date: 2026-08-07-13-40-12 | |
| .. gh-issue: 155363 | |
| .. nonce: Qk3Vt9 | |
| .. section: Core and Builtins | |
| Fix a leak in the :term:`free-threaded build` when creating a thread state | |
| fails after an internal QSBR slot has been reserved for it. The slot could | |
| never be reclaimed, so the QSBR array grew without bound across repeated | |
| failures. | |
| .. | |
| .. date: 2026-08-07-10-14-56 | |
| .. gh-issue: 154701 | |
| .. nonce: zulh2S | |
| .. section: Core and Builtins | |
| Fix an infinite loop in JIT when a ``FOR_ITER`` side exit links an executor | |
| back to itself. | |
| .. | |
| .. date: 2026-08-02-17-55-29 | |
| .. gh-issue: 154937 | |
| .. nonce: m9IBba | |
| .. section: Core and Builtins | |
| Fix a data race on thread handle identifiers when ``_thread._shutdown()`` | |
| runs concurrently with the startup of non-daemon threads in the | |
| :term:`free-threaded build`. | |
| .. | |
| .. date: 2026-08-01-18-04-11 | |
| .. gh-issue: 120321 | |
| .. nonce: k3XvQb | |
| .. section: Core and Builtins | |
| Fix thread safety of :term:`asynchronous generators <asynchronous | |
| generator>` when iterated, closed or thrown into concurrently from multiple | |
| threads on the :term:`free threading` build. Also make an ``athrow()`` | |
| awaitable single-use: reusing it after completion now raises | |
| :exc:`RuntimeError` instead of resuming the generator again. | |
| .. | |
| .. date: 2026-08-01-15-07-10 | |
| .. gh-issue: 154902 | |
| .. nonce: DIi6sf | |
| .. section: Core and Builtins | |
| Fix a crash when ``__conditional_annotations__`` is rebound to a non-set | |
| object. | |
| .. | |
| .. date: 2026-07-29-08-43-14 | |
| .. gh-issue: 151464 | |
| .. nonce: o_mtmz | |
| .. section: Core and Builtins | |
| Exclude invalid token ``<>`` from :mod:`tokenize` output. :exc:`SyntaxError` | |
| for ``<>`` now suggests ``!=``. | |
| .. | |
| .. date: 2026-07-28-10-00-00 | |
| .. gh-issue: 133931 | |
| .. nonce: fnQzxD | |
| .. section: Core and Builtins | |
| Fix data races when setting attributes of function objects on the | |
| :term:`free threaded <free threading>` build. | |
| .. | |
| .. date: 2026-07-27-17-20-49 | |
| .. gh-issue: 154719 | |
| .. nonce: eI88Gs | |
| .. section: Core and Builtins | |
| Trailing whitespace in a t-string interpolation expression is now preserved | |
| in :attr:`string.templatelib.Interpolation.expression`, up to the closing | |
| ``}`` or the conversion (``!``), format (``:``), or debug (``=``) delimiter. | |
| Explicit line continuations following a debug ``=`` remain part of the debug | |
| text and are excluded from | |
| :attr:`~string.templatelib.Interpolation.expression`. | |
| .. | |
| .. date: 2026-07-27-16-29-10 | |
| .. gh-issue: 154775 | |
| .. nonce: _ISRIk | |
| .. section: Core and Builtins | |
| When matching a complex literal in :keyword:`case` statements, an extraneous | |
| ``+`` sign (for example, ``1++1j`` or ``1-+1j``) is no longer allowed. | |
| .. | |
| .. date: 2026-07-26-09-07-41 | |
| .. gh-issue: 154709 | |
| .. nonce: M2uZ76 | |
| .. section: Core and Builtins | |
| Fix an out-of-bounds access in reverse dictionary iterators when the | |
| underlying dictionary is cleared and modified after the iterator is created. | |
| .. | |
| .. date: 2026-07-25-17-35-14 | |
| .. gh-issue: 154695 | |
| .. nonce: aQWLLv | |
| .. section: Core and Builtins | |
| Fix :class:`asyncio.Task` raising :exc:`AttributeError` when created with | |
| ``eager_start=True`` and no explicit *loop* argument. | |
| .. | |
| .. date: 2026-07-25-12-44-13 | |
| .. gh-issue: 154044 | |
| .. nonce: GBa2wP | |
| .. section: Core and Builtins | |
| Fix a data race on a descriptor's ``__qualname__`` cache in the | |
| :term:`free-threaded build`. | |
| .. | |
| .. date: 2026-07-25-12-43-42 | |
| .. gh-issue: 154196 | |
| .. nonce: 0rAdob | |
| .. section: Core and Builtins | |
| Improve :exc:`AttributeError` messages from unresolved lazy imports. Patch | |
| by Bartosz Sławecki. | |
| .. | |
| .. date: 2026-07-24-13-15-31 | |
| .. gh-issue: 153809 | |
| .. nonce: JFA6GT | |
| .. section: Core and Builtins | |
| Fix interpreter crash while deallocating objects of :class:`asyncio.Task` on | |
| free-threaded builds. Contributed by Sergey Miryanov. | |
| .. | |
| .. date: 2026-07-22-14-30-00 | |
| .. gh-issue: 154429 | |
| .. nonce: Qk9mZ2 | |
| .. section: Core and Builtins | |
| Slightly speed up deallocation of objects that are not tracked by the | |
| garbage collector, such as :class:`int`, :class:`float` and :class:`str`. | |
| .. | |
| .. date: 2026-07-21-14-38-49 | |
| .. gh-issue: 145868 | |
| .. nonce: 7iGRvU | |
| .. section: Core and Builtins | |
| Suggest the closest valid feature name in the :exc:`SyntaxError` message | |
| when an unknown name is imported from :mod:`__future__`. | |
| .. | |
| .. date: 2026-07-20-20-16-08 | |
| .. gh-issue: 154275 | |
| .. nonce: l961cA | |
| .. section: Core and Builtins | |
| Fix a crash when getting deeply nested ``__parameters__`` from a | |
| :class:`types.GenericAlias` objects. | |
| .. | |
| .. date: 2026-07-19-19-14-39 | |
| .. gh-issue: 154043 | |
| .. nonce: Kych7F | |
| .. section: Core and Builtins | |
| Fix a data race when iterating a shared :class:`types.GenericAlias` iterator | |
| from multiple threads under the :term:`free-threaded build`. | |
| .. | |
| .. date: 2026-07-19-16-18-25 | |
| .. gh-issue: 154014 | |
| .. nonce: CJsjVL | |
| .. section: Core and Builtins | |
| Fix a JIT assertion during interpreter shutdown by initializing ``vm_data`` | |
| fields for cold executors that bypass ``_Py_ExecutorInit()``. | |
| .. | |
| .. date: 2026-07-19-12-33-27 | |
| .. gh-issue: 153932 | |
| .. nonce: lKw2bo | |
| .. section: Core and Builtins | |
| Fix thread safety issue in the ``__reduce__`` method of | |
| :py:class:`enumerate`. | |
| .. | |
| .. date: 2026-07-17-22-03-39 | |
| .. gh-issue: 153881 | |
| .. nonce: oDa06s | |
| .. section: Core and Builtins | |
| Fix potential data race when calling :meth:`~object.__getstate__` under the | |
| :term:`free-threaded build`. | |
| .. | |
| .. date: 2026-07-16-02-50-01 | |
| .. gh-issue: 153785 | |
| .. nonce: fJqPKC | |
| .. section: Core and Builtins | |
| :exc:`AttributeError`: The default error message is now generated from | |
| ``name`` and ``obj`` attributes when both are set and the exception was | |
| constructed with no positional arguments, or with a single positional | |
| argument equal to ``name``. Patch by Bartosz Sławecki. | |
| .. | |
| .. date: 2026-07-14-20-19-48 | |
| .. gh-issue: 152075 | |
| .. nonce: V9Rwhp | |
| .. section: Core and Builtins | |
| Reduced lock contention during LOAD_GLOBAL bytecode specialization under | |
| free threading. | |
| .. | |
| .. date: 2026-07-13-13-05-00 | |
| .. gh-issue: 78959 | |
| .. nonce: Xy4a2B | |
| .. section: Core and Builtins | |
| Add the *order* parameter to :meth:`memoryview.cast`. With ``order='F'`` it | |
| creates a zero-copy Fortran-contiguous (column-major) view of a flat buffer, | |
| mirroring the *order* argument of :meth:`memoryview.tobytes`. | |
| .. | |
| .. date: 2026-07-11-16-53-21 | |
| .. gh-issue: 153568 | |
| .. nonce: newlines | |
| .. section: Core and Builtins | |
| Speed up the tokenizer by copying source text verbatim when it contains no | |
| carriage returns. | |
| .. | |
| .. date: 2026-07-11-15-45-00 | |
| .. gh-issue: 153578 | |
| .. nonce: Qm4Zt9 | |
| .. section: Core and Builtins | |
| Fix an out-of-bounds write in :meth:`bytearray.extend` when the bytearray is | |
| resized while the argument's :meth:`~object.__buffer__` is being acquired, | |
| for example by another thread. Patch by tonghuaroot. | |
| .. | |
| .. date: 2026-07-11-15-30-00 | |
| .. gh-issue: 153570 | |
| .. nonce: Kb7Xd2 | |
| .. section: Core and Builtins | |
| Fix a use-after-free in :meth:`bytearray.take_bytes` when the argument's | |
| :meth:`~object.__index__` method resizes the bytearray. Patch by | |
| tonghuaroot. | |
| .. | |
| .. date: 2026-07-11-15-07-49 | |
| .. gh-issue: 153568 | |
| .. nonce: identcache | |
| .. section: Core and Builtins | |
| Speed up the parser by caching repeated identifiers during a parse. | |
| .. | |
| .. date: 2026-07-11-15-01-45 | |
| .. gh-issue: 153568 | |
| .. nonce: toktext | |
| .. section: Core and Builtins | |
| Speed up the parser by not materializing the text of tokens whose text is | |
| never read. | |
| .. | |
| .. date: 2026-07-11-14-59-17 | |
| .. gh-issue: 153568 | |
| .. nonce: leftrec | |
| .. section: Core and Builtins | |
| Speed up parsing of left-recursive rules by updating their memoization | |
| entries in place. | |
| .. | |
| .. date: 2026-07-11-14-58-24 | |
| .. gh-issue: 153568 | |
| .. nonce: stackchk | |
| .. section: Core and Builtins | |
| Speed up the parser by turning its per-rule C-stack check into a single | |
| inline comparison. | |
| .. | |
| .. date: 2026-07-11-14-57-19 | |
| .. gh-issue: 153568 | |
| .. nonce: memoflt | |
| .. section: Core and Builtins | |
| Speed up the parser by letting memoization lookups that cannot match return | |
| immediately. | |
| .. | |
| .. date: 2026-07-11-01-17-57 | |
| .. gh-issue: 153419 | |
| .. nonce: U8HJOJ | |
| .. section: Core and Builtins | |
| Fix multiple :class:`bytearray` crashes and reference leaks caused by | |
| skipping :meth:`~object.__init__` and broken state setup code. | |
| .. | |
| .. date: 2026-07-09-13-28-27 | |
| .. gh-issue: 153354 | |
| .. nonce: It4Jj_ | |
| .. section: Core and Builtins | |
| Fix a crash in compiler-generated ``__annotate__`` functions when the | |
| annotation format comparison returned a non-boolean result. | |
| .. | |
| .. date: 2026-07-08-13-23-11 | |
| .. gh-issue: 153298 | |
| .. nonce: wvcXxN | |
| .. section: Core and Builtins | |
| Fixes a data race in :class:`types.GenericAlias` ``__parameters__`` | |
| initialization on free-threading builds. | |
| .. | |
| .. date: 2026-07-07-04-16-48 | |
| .. gh-issue: 153205 | |
| .. nonce: 5fE8QZ | |
| .. section: Core and Builtins | |
| Fix a potential :exc:`SystemError` during vector calls when memory | |
| allocation fails. A :exc:`MemoryError` is now raised instead. | |
| .. | |
| .. date: 2026-07-06-18-00-00 | |
| .. gh-issue: 153171 | |
| .. nonce: errloc1 | |
| .. section: Core and Builtins | |
| Improve syntax error messages for misplaced ``not`` after an operator in | |
| contexts where a generic "invalid syntax" error was previously reported, | |
| such as ``1 << 2 + not x`` and ``1 * + not x``. | |
| .. | |
| .. date: 2026-07-06-16-30-00 | |
| .. gh-issue: 153236 | |
| .. nonce: lazy-import-errors | |
| .. section: Core and Builtins | |
| Propagate exceptions raised while importing lazy submodules instead of | |
| reporting them as missing attributes. | |
| .. | |
| .. date: 2026-07-01-12-00-00 | |
| .. gh-issue: 102960 | |
| .. nonce: fR8kJa | |
| .. section: Core and Builtins | |
| :ref:`Frame objects <frame-objects>` now support :mod:`weak references | |
| <weakref>`. Patch by Łukasz Langa. | |
| .. | |
| .. date: 2026-06-30-14-50-00 | |
| .. gh-issue: 152708 | |
| .. nonce: aBcDeF | |
| .. section: Core and Builtins | |
| Fix AST generation asymmetry where unary positive ``+`` was implicitly | |
| dropped in pattern match expressions, restoring parsing parity with unary | |
| negative ``-``. | |
| .. | |
| .. date: 2026-06-30-14-00-00 | |
| .. gh-issue: 152682 | |
| .. nonce: yId7e5 | |
| .. section: Core and Builtins | |
| Fix NULL pointer dereference in :func:`compile` when a reserved name (e.g. | |
| ``__classdict__``) is used as a type parameter name and memory allocation | |
| fails while formatting the error message. | |
| .. | |
| .. date: 2026-06-29-23-29-14 | |
| .. gh-issue: 152635 | |
| .. nonce: O21J0O | |
| .. section: Core and Builtins | |
| Fix a crash caused when running out of memory creating a | |
| :mod:`!_interpchannels` channel. Now a :exc:`MemoryError` is correctly | |
| raised. | |
| .. | |
| .. date: 2026-06-28-14-39-05 | |
| .. gh-issue: 152405 | |
| .. nonce: -_3YRo | |
| .. section: Core and Builtins | |
| Do not expose the internal mapping of :class:`types.MappingProxyType` when | |
| performing rich-compare operations with non-stdlib types. Previously, it was | |
| possible to mutate the internal mapping of a proxy there. Now we pass not | |
| the original :class:`dict` instance, but its copy, when dealing with custom | |
| types. | |
| .. | |
| .. date: 2026-06-28-14-31-03 | |
| .. gh-issue: 152492 | |
| .. nonce: _09Zee | |
| .. section: Core and Builtins | |
| :type:`collections.OrderedDict` ``update`` method can now accept | |
| :type:`frozendict` as an argument. | |
| .. | |
| .. date: 2026-06-27-10-05-12 | |
| .. gh-issue: 152375 | |
| .. nonce: L-ZBk6 | |
| .. section: Core and Builtins | |
| Fix undefined behaviour when a :mod:`sys.monitoring` callback raised an | |
| exception while the program was following a branch or loop. | |
| .. | |
| .. date: 2026-06-26-22-38-21 | |
| .. gh-issue: 152192 | |
| .. nonce: lX2jIM | |
| .. section: Core and Builtins | |
| Fix a truncated ``oparg`` being passed to JIT trace initialization for a | |
| ``JUMP_BACKWARD`` with an ``EXTENDED_ARG``. | |
| .. | |
| .. date: 2026-06-26-22-03-16 | |
| .. gh-issue: 152235 | |
| .. nonce: ZKWiWk | |
| .. section: Core and Builtins | |
| Defer GC tracking of :meth:`set.intersection`, :meth:`set.difference`, | |
| :meth:`set.symmetric_difference`, :meth:`set.union` and ``set.__sub__``. | |
| Patch by Donghee Na. | |
| .. | |
| .. date: 2026-06-26-20-37-22 | |
| .. gh-issue: 152315 | |
| .. nonce: iVS7u5 | |
| .. section: Core and Builtins | |
| :exc:`TypeError` messages for some instance methods called with too many | |
| positional arguments now suggest checking whether the method definition is | |
| missing the ``self`` parameter. | |
| .. | |
| .. date: 2026-06-26-05-49-13 | |
| .. gh-issue: 152235 | |
| .. nonce: YU20T9 | |
| .. section: Core and Builtins | |
| Defer GC tracking of a :class:`set` or :class:`frozenset` to the end of its | |
| construction from iterable. Patch by Donghee Na. | |
| .. | |
| .. date: 2026-06-25-21-34-15 | |
| .. gh-issue: 152228 | |
| .. nonce: a6K14K | |
| .. section: Core and Builtins | |
| Fix an assertion failure when python is built in a debug mode that happened | |
| in :meth:`str.replace` under a limited memory situation. | |
| .. | |
| .. date: 2026-06-24-14-05-00 | |
| .. gh-issue: 152107 | |
| .. nonce: K3jX9p | |
| .. section: Core and Builtins | |
| Fix a crash when creating a :class:`dict` item iterator (for example | |
| ``iter(d.items())`` or ``reversed(d.items())``) under a memory-allocation | |
| failure. Patch by Jiucheng Zang. | |
| .. | |
| .. date: 2026-06-24-13-36-31 | |
| .. gh-issue: 151722 | |
| .. nonce: lWKfE1 | |
| .. section: Core and Builtins | |
| :meth:`!frozendict.fromkeys` now only tracks the :class:`frozendict` in the | |
| garbage collector once the dictionary is fully initialized. Patch by Donghee | |
| Na and Victor Stinner. | |
| .. | |
| .. date: 2026-06-23-23-48-54 | |
| .. gh-issue: 151763 | |
| .. nonce: Eu8pYQ | |
| .. section: Core and Builtins | |
| Fixes possible crash on :class:`types.CodeType` deallocation. | |
| .. | |
| .. date: 2026-06-23-19-50-22 | |
| .. gh-issue: 152020 | |
| .. nonce: DTKXjR | |
| .. section: Core and Builtins | |
| On the free-threaded build, :func:`asyncio.all_tasks` no longer loses | |
| eager-started tasks when called from a thread other than the one running the | |
| event loop. | |
| .. | |
| .. date: 2026-06-23-12-03-55 | |
| .. gh-issue: 151763 | |
| .. nonce: K7QfWG | |
| .. section: Core and Builtins | |
| Fix a potential crash in :func:`compile`, :func:`exec`, :func:`eval` and | |
| :func:`ast.parse` when an allocation fails: the parser or compiler could | |
| return without setting an exception. | |
| .. | |
| .. date: 2026-06-22-14-48-22 | |
| .. gh-issue: 151912 | |
| .. nonce: YcxfnU | |
| .. section: Core and Builtins | |
| Fixed a crash in ``type()`` when selecting a metaclass whose ``tp_new`` slot | |
| is ``NULL``. Such metaclasses are now rejected with ``TypeError`` instead of | |
| causing a NULL pointer dereference. | |
| .. | |
| .. date: 2026-06-22-11-05-56 | |
| .. gh-issue: 151895 | |
| .. nonce: QQsjUQ | |
| .. section: Core and Builtins | |
| Fixed a crash in :func:`marshal.loads` when an allocation failed while | |
| loading a reference-tracked dictionary; it now raises :exc:`MemoryError`. | |
| .. | |
| .. date: 2026-06-22-06-26-34 | |
| .. gh-issue: 151905 | |
| .. nonce: FOLMYg | |
| .. section: Core and Builtins | |
| Fix OOM error handling in :c:func:`PyFrame_GetBack` to propagate exceptions | |
| instead of masking them as None. | |
| .. | |
| .. date: 2026-06-22-02-42-38 | |
| .. gh-issue: 151907 | |
| .. nonce: 6Tol_J | |
| .. section: Core and Builtins | |
| Avoid creating :class:`list` objects in comprehensions when the | |
| comprehension is not used as a value. | |
| .. | |
| .. date: 2026-06-21-16-00-00 | |
| .. gh-issue: 151773 | |
| .. nonce: mN4kRt | |
| .. section: Core and Builtins | |
| Fix a crash in :func:`contextvars.ContextVar.set` when memory allocation | |
| fails. | |
| .. | |
| .. date: 2026-06-21-12-55-18 | |
| .. gh-issue: 151665 | |
| .. nonce: 82fmzx | |
| .. section: Core and Builtins | |
| :func:`inspect.signature` now works on the lazy evaluators of type aliases | |
| and type parameters instead of raising :exc:`ValueError`. | |
| .. | |
| .. date: 2026-06-20-10-01-26 | |
| .. gh-issue: 151672 | |
| .. nonce: K-w7j0 | |
| .. section: Core and Builtins | |
| Fix an inconsistency where calling ``__lazy_import__`` with a string | |
| ``fromlist`` would return a :class:`types.LazyImportType` that resolves to | |
| the named member, rather than the module being imported. | |
| .. | |
| .. date: 2026-06-20-00-30-47 | |
| .. gh-issue: 151722 | |
| .. nonce: RPMPIY | |
| .. section: Core and Builtins | |
| Defer GC tracking of :class:`frozendict` to end of construction. Patch by | |
| Donghee Na. | |
| .. | |
| .. date: 2026-06-19-16-40-01 | |
| .. gh-issue: 151619 | |
| .. nonce: 35yyJW | |
| .. section: Core and Builtins | |
| Fix an issue where using non-module global or builtin namespaces (such as | |
| dictionaries passed to :func:`exec`) could cause cached global loads to | |
| produce unresolved :ref:`lazy imports <lazy-imports>`. | |
| .. | |
| .. date: 2026-06-19-12-00-00 | |
| .. gh-issue: 151646 | |
| .. nonce: Gc5tAt | |
| .. section: Core and Builtins | |
| Fix a data race in free-threading builds between :func:`gc.get_stats` and a | |
| concurrent garbage collection cycle. Access to the per-generation | |
| statistics is now serialized with a mutex so the reader observes a | |
| consistent snapshot. | |
| .. | |
| .. date: 2026-06-18-16-00-10 | |
| .. gh-issue: 151126 | |
| .. nonce: tBqn6I | |
| .. section: Core and Builtins | |
| Fix a crash when sharing :class:`memoryview` objects between interpreters | |
| fails due to running out of memory. It now raises a proper | |
| :exc:`MemoryError`. | |
| .. | |
| .. date: 2026-06-18-00-00-00 | |
| .. gh-issue: 151644 | |
| .. nonce: 5cFffN | |
| .. section: Core and Builtins | |
| Fix a data race in :func:`sys.setdlopenflags` and :func:`sys.getdlopenflags` | |
| when called concurrently in the free-threaded build. The underlying | |
| ``_PyImport_GetDLOpenFlags`` and ``_PyImport_SetDLOpenFlags`` functions now | |
| use atomic load/store operations. | |
| .. | |
| .. date: 2026-06-17-16-46-07 | |
| .. gh-issue: 151126 | |
| .. nonce: vhTL0T | |
| .. section: Core and Builtins | |
| Avoid possible crash in ``_winapi.c`` where a device has no memory left. Now | |
| it properly raises a :exc:`MemoryError`. Patch by Ivy Xu. | |
| .. | |
| .. date: 2026-06-17-16-26-45 | |
| .. gh-issue: 151126 | |
| .. nonce: Yc_6wC | |
| .. section: Core and Builtins | |
| Avoid possible crash in ``getpath.c`` where a device has no memory left. Now | |
| it properly raises a :exc:`MemoryError`. Patch by Ivy Xu. | |
| .. | |
| .. date: 2026-06-16-19-20-00 | |
| .. gh-issue: 151518 | |
| .. nonce: e6v0Js | |
| .. section: Core and Builtins | |
| Fix a free-threaded stop-the-world fairness issue that could starve a thread | |
| reattaching after being suspended while detached. | |
| .. | |
| .. date: 2026-06-16-17-23-37 | |
| .. gh-issue: 151546 | |
| .. nonce: LhiaZz | |
| .. section: Core and Builtins | |
| Fix the stack limit check if Python is linked to musl (ex: Alpine Linux). | |
| Use the stack size set by the linker to compute the stack limits. Patch by | |
| Victor Stinner. | |
| .. | |
| .. date: 2026-06-16-00-45-42 | |
| .. gh-issue: 151510 | |
| .. nonce: HJ-kGn | |
| .. section: Core and Builtins | |
| Fix a crash in :func:`!__lazy_import__` when called without an explicit | |
| ``globals`` argument and without a current Python frame. | |
| .. | |
| .. date: 2026-06-14-05-05-15 | |
| .. gh-issue: 151461 | |
| .. nonce: 5q0s88 | |
| .. section: Core and Builtins | |
| Fix direct execution of files with invalid source encodings to report the | |
| underlying codec lookup or decoding error instead of the generic | |
| ``SyntaxError: encoding problem`` message. Patch by Bartosz Sławecki. | |
| .. | |
| .. date: 2026-06-12-17-15-53 | |
| .. gh-issue: 151377 | |
| .. nonce: bQSQUk | |
| .. section: Core and Builtins | |
| Fix races in free-threaded builds when updating type slots for newly created | |
| classes and when removing entries from a base type's subclasses dictionary. | |
| .. | |
| .. date: 2026-06-12-15-30-25 | |
| .. gh-issue: 151218 | |
| .. nonce: 5M_nv8 | |
| .. section: Core and Builtins | |
| :c:func:`PyConfig_Set` and :func:`sys.set_int_max_str_digits` now replace | |
| :data:`sys.flags` (create a new object), instead of modifying | |
| :data:`sys.flags` in-place. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-06-11-16-03-23 | |
| .. gh-issue: 151297 | |
| .. nonce: NGPkUM | |
| .. section: Core and Builtins | |
| Fix an invalid pointer dereference that could occur when calling | |
| :c:func:`PyObject_Realloc` with a NULL pointer in :term:`free-threaded | |
| builds <free-threaded build>` or with :envvar:`PYTHONMALLOC` set to | |
| ``mimalloc``. | |
| .. | |
| .. date: 2026-06-10-15-42-46 | |
| .. gh-issue: 151253 | |
| .. nonce: 7MMQ8P | |
| .. section: Core and Builtins | |
| If ``import encodings`` (first import) fails at Python startup, dump the | |
| Python path configuration to help users debugging their configuration. Patch | |
| by Victor Stinner. | |
| .. | |
| .. date: 2026-06-10-15-19-58 | |
| .. gh-issue: 151238 | |
| .. nonce: C9Wu4x | |
| .. section: Core and Builtins | |
| Fix a crash when compiling a concatenated f-string or t-string if an error | |
| occurs when processing one of it's parts. | |
| .. | |
| .. date: 2026-06-09-12-24-35 | |
| .. gh-issue: 151112 | |
| .. nonce: 4RKCkD | |
| .. section: Core and Builtins | |
| Fix a crash in the compiler that could occur when running out of memory. | |
| .. | |
| .. date: 2026-06-09-10-28-30 | |
| .. gh-issue: 151126 | |
| .. nonce: DKa6Sl | |
| .. section: Core and Builtins | |
| Fix a crash, when there's no memory left on a device, which happened in: | |
| code compilation, :mod:`!_interpchannels` module, | |
| :func:`!_winapi.CreateProcess` function. | |
| Now these places raise proper :exc:`MemoryError` errors. | |
| .. | |
| .. date: 2026-06-08-13-14-42 | |
| .. gh-issue: 150902 | |
| .. nonce: -CWZ66 | |
| .. section: Core and Builtins | |
| Apply an existing optimization of PyCriticalSection (single mutex) to | |
| PyCriticalSection2: avoid acquiring the same locks that the current CS has | |
| already acquired. | |
| .. | |
| .. date: 2026-06-08-05-31-22 | |
| .. gh-issue: 151065 | |
| .. nonce: _o_31F | |
| .. section: Core and Builtins | |
| Fix memory leak when using the :ref:`mimalloc memory allocator <mimalloc>`. | |
| .. | |
| .. date: 2026-06-06-20-15-08 | |
| .. gh-issue: 151029 | |
| .. nonce: A33CKK | |
| .. section: Core and Builtins | |
| On Linux, fix :func:`sys.remote_exec` unable to find remote writable memory | |
| when ``libpython`` replaced on disk. | |
| .. | |
| .. date: 2026-06-06-08-20-00 | |
| .. gh-issue: 150942 | |
| .. nonce: Jk9pQr | |
| .. section: Core and Builtins | |
| Speed up frame local variable item collection by appending result pairs to | |
| the output list without an extra reference-count round-trip (using the | |
| internal reference-stealing list append helper). Patch by Omkar Kabde. | |
| .. | |
| .. date: 2026-06-05-22-52-41 | |
| .. gh-issue: 150988 | |
| .. nonce: fDKfMJ | |
| .. section: Core and Builtins | |
| Fix a reference leak in :exc:`OSError` when attributes are set before | |
| ``super().__init__()``. | |
| .. | |
| .. date: 2026-06-05-09-25-08 | |
| .. gh-issue: 145685 | |
| .. nonce: afO33b | |
| .. section: Core and Builtins | |
| The internal method cache used for types is now a per-type cache instead of | |
| a global per-interpreter one, improving performance and reducing cache | |
| misses. Patch by Kumar Aditya. | |
| .. | |
| .. date: 2026-06-04-15-02-35 | |
| .. gh-issue: 146495 | |
| .. nonce: wWRRvx | |
| .. section: Core and Builtins | |
| Improve :exc:`SyntaxError` message for ``&&`` and ``||`` operators, | |
| suggesting ``and``/``&`` and ``or``/``|`` respectively. | |
| .. | |
| .. date: 2026-06-04-12-53-10 | |
| .. gh-issue: 148874 | |
| .. nonce: r121cG | |
| .. section: Core and Builtins | |
| Ignore interrupts immediately after calling the ``__enter__`` method of a | |
| context menager in a ``with`` statement. This ensures that the ``__exit__`` | |
| method is always called in a ``with`` statement. | |
| .. | |
| .. date: 2026-06-03-21-14-28 | |
| .. gh-issue: 150459 | |
| .. nonce: qpsCEl | |
| .. section: Core and Builtins | |
| Fix :exc:`SyntaxError` error message for ``from x lazy import y``. Raise | |
| :exc:`SyntaxWarning` on ``from . lazy import x`` (with whitespace between | |
| the dots and a module named ``lazy``). | |
| .. | |
| .. date: 2026-06-03-16-27-00 | |
| .. gh-issue: 150858 | |
| .. nonce: j2dSkD | |
| .. section: Core and Builtins | |
| Fix a data race while changing ``__qualname__`` of a type concurrently on | |
| free-threaded builds. | |
| .. | |
| .. date: 2026-06-02-16-21-02 | |
| .. gh-issue: 150737 | |
| .. nonce: LoYUFY | |
| .. section: Core and Builtins | |
| Optimize bytecode for empty unpack cases such as ``{*()}``. | |
| .. | |
| .. date: 2026-06-01-19-24-12 | |
| .. gh-issue: 150723 | |
| .. nonce: WlcL_- | |
| .. section: Core and Builtins | |
| Fix perf jitdump timestamps on macOS. Events were stamped using | |
| ``CLOCK_MONOTONIC``, but macOS profilers timestamp their samples with | |
| ``mach_absolute_time()``. The mismatch prevented the JIT code mappings from | |
| lining up with the samples, so no Python frame could be resolved. | |
| .. | |
| .. date: 2026-06-01-19-21-01 | |
| .. gh-issue: 150723 | |
| .. nonce: Hb3JDG | |
| .. section: Core and Builtins | |
| Fix malformed perf jitdump thread ids on macOS. The ``thread_id`` field of | |
| the ``JR_CODE_LOAD`` record was written as a 64-bit value instead of the | |
| 32-bit value required by the jitdump format, which shifted every following | |
| field and prevented profilers from resolving Python frames. | |
| .. | |
| .. date: 2026-06-01-19-00-00 | |
| .. gh-issue: 150700 | |
| .. nonce: W8CzVR | |
| .. section: Core and Builtins | |
| Fix a :exc:`SystemError` when compiling a class-scope comprehension | |
| containing a ``lambda`` that references ``__class__``, ``__classdict__``, or | |
| ``__conditional_annotations__``. Patch by Bartosz Sławecki. | |
| .. | |
| .. date: 2026-05-30-20-19-35 | |
| .. gh-issue: 150633 | |
| .. nonce: XkNul0 | |
| .. section: Core and Builtins | |
| Fix the frozen importer accepting module names with embedded null bytes, | |
| which caused it to bypass the :data:`sys.modules` cache and create duplicate | |
| module objects. | |
| .. | |
| .. date: 2026-05-29-17-51-11 | |
| .. gh-issue: 144774 | |
| .. nonce: jPcixe | |
| .. section: Core and Builtins | |
| Fix data race in :class:`BaseException` when an exception is copied while | |
| being mutated. | |
| .. | |
| .. date: 2026-05-26-00-06-30 | |
| .. gh-issue: 150411 | |
| .. nonce: u-d-_5 | |
| .. section: Core and Builtins | |
| Fix a data race in the free-threaded build when :func:`gc.get_count` reads | |
| the young generation allocation count while another thread updates it. | |
| .. | |
| .. date: 2026-05-25-16-00-22 | |
| .. gh-issue: 150374 | |
| .. nonce: Emu6d8 | |
| .. section: Core and Builtins | |
| Fix double release of the import lock on lazy import reification errors. | |
| .. | |
| .. date: 2026-05-24-22-46-49 | |
| .. gh-issue: 148613 | |
| .. nonce: PLpmyd | |
| .. section: Core and Builtins | |
| Fix a data race in the free-threaded build between :func:`gc.set_threshold` | |
| and garbage collection scheduling during object allocation. | |
| .. | |
| .. date: 2026-05-24-14-45-00 | |
| .. gh-issue: 149156 | |
| .. nonce: NP73rB | |
| .. section: Core and Builtins | |
| Fix an intermittent crash after :func:`os.fork` when perf trampoline | |
| profiling is enabled and the child returns through trampoline frames | |
| inherited from the parent process. | |
| .. | |
| .. date: 2026-05-23-22-08-01 | |
| .. gh-issue: 149449 | |
| .. nonce: 2lhQFF | |
| .. section: Core and Builtins | |
| Fix a use-after-free crash when the :mod:`unicodedata` module was removed | |
| from :data:`sys.modules` and garbage-collected between calls that decode | |
| ``\N{...}`` escapes or use the ``namereplace`` codec error handler. | |
| .. | |
| .. date: 2026-05-22-21-52-38 | |
| .. gh-issue: 150207 | |
| .. nonce: l2BUtI | |
| .. section: Core and Builtins | |
| Fix a crash when a memory allocation fails during tokenizer initialization. | |
| A proper :exc:`MemoryError` is now raised instead. | |
| .. | |
| .. date: 2026-05-22-17-10-29 | |
| .. gh-issue: 149816 | |
| .. nonce: u1-iqT | |
| .. section: Core and Builtins | |
| Fix a Use-After-Free race condition in ``subtype_getweakref()`` during | |
| concurrent weakref creation and destruction in the free-threading build. | |
| .. | |
| .. date: 2026-05-22-17-09-28 | |
| .. gh-issue: 150107 | |
| .. nonce: GD72-D | |
| .. section: Core and Builtins | |
| :mod:`asyncio`: ``sendfile()`` and ``sock_sendfile()`` event loop methods | |
| now call ``file.seek(offset)`` if *file* has a ``seek()`` method, even if | |
| *offset* is ``0`` (default value). | |
| .. | |
| .. date: 2026-05-21-21-04-43 | |
| .. gh-issue: 150208 | |
| .. nonce: VOkxRG | |
| .. section: Core and Builtins | |
| Avoid double-quoting string values from ``pyconfig.h`` in ``sysconfigdata`` | |
| variables. | |
| .. | |
| .. date: 2026-05-20-13-06-17 | |
| .. gh-issue: 150146 | |
| .. nonce: i5m_SL | |
| .. section: Core and Builtins | |
| Fix a crash on a complex type variable substitution. | |
| ``from typing import TypeVar; memoryview[TypeVar("")][*typing.Mapping[..., | |
| ...]]`` used to fail due to missing ``NULL`` check on ``_unpack_args`` C | |
| function call. | |
| .. | |
| .. date: 2026-05-18-18-36-28 | |
| .. gh-issue: 148587 | |
| .. nonce: -RD3z5 | |
| .. section: Core and Builtins | |
| :py:attr:`sys.lazy_modules` is now a set instead of a dict as initially | |
| spelled out in PEP 810. | |
| .. | |
| .. date: 2026-05-18-17-16-51 | |
| .. gh-issue: 150027 | |
| .. nonce: sJgLvd | |
| .. section: Core and Builtins | |
| Improve performance of :class:`frozenset` objects by avoiding copies during | |
| construction. | |
| .. | |
| .. date: 2026-05-18-16-54-54 | |
| .. gh-issue: 150042 | |
| .. nonce: LSr5W8 | |
| .. section: Core and Builtins | |
| Fix refleak in queue.SimpleQueue.put if memory allocation fails. | |
| .. | |
| .. date: 2026-05-18-13-47-17 | |
| .. gh-issue: 149590 | |
| .. nonce: IPBeQx | |
| .. section: Core and Builtins | |
| Fix crash when faulthandler is imported more than once. | |
| .. | |
| .. date: 2026-05-18-12-32-33 | |
| .. gh-issue: 149816 | |
| .. nonce: v18Ypf | |
| .. section: Core and Builtins | |
| Fix race conditions in ``invoke_gc_callback`` iterating ``gc.callbacks`` in | |
| free-threading mode. | |
| .. | |
| .. date: 2026-05-17-12-00-00 | |
| .. gh-issue: 138325 | |
| .. nonce: h2XSfe | |
| .. section: Core and Builtins | |
| Speed up converting a list to a tuple in the ``tuple(genexpr)`` fast path | |
| and in starred tuple displays (e.g. ``(*a, *b)``) by stealing the list's | |
| items into the tuple instead of copying them. | |
| .. | |
| .. date: 2026-05-16-11-03-54 | |
| .. gh-issue: 149816 | |
| .. nonce: X_gqMT | |
| .. section: Core and Builtins | |
| Fix a race condition in ``_PyBytes_FromList`` in free-threading mode. | |
| .. | |
| .. date: 2026-05-15-20-13-41 | |
| .. gh-issue: 157407 | |
| .. nonce: 4Lso8S | |
| .. section: Core and Builtins | |
| Argument Clinic now parses arguments of positional-only methods with a | |
| *defining class* directly, without a :c:type:`!_PyArg_Parser`. | |
| .. | |
| .. date: 2026-05-15-11-31-57 | |
| .. gh-issue: 149816 | |
| .. nonce: ugN2rx | |
| .. section: Core and Builtins | |
| Fix a race condition in :class:`memoryview` with free-threading. | |
| .. | |
| .. date: 2026-05-14-19-41-03 | |
| .. gh-issue: 149807 | |
| .. nonce: IwGaCo | |
| .. section: Core and Builtins | |
| Fix ``hash(frozendict)``: compute the hash of each ``(key, value)`` pair | |
| correctly. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-05-13-21-26-26 | |
| .. gh-issue: 149805 | |
| .. nonce: IG6cza | |
| .. section: Core and Builtins | |
| Fix a :exc:`SystemError` when compiling a compiling ``__classdict__`` class | |
| annotation. Found by OSS-Fuzz in :oss-fuzz:`512907042`. | |
| .. | |
| .. date: 2026-05-13-06-54-41 | |
| .. gh-issue: 149738 | |
| .. nonce: 4BLFoH | |
| .. section: Core and Builtins | |
| :mod:`sqlite3`: Disallow removing ``row_factory`` and ``text_factory`` | |
| attributes of a connection or cursor to prevent a crash on a query. | |
| .. | |
| .. date: 2026-05-12-16-47-23 | |
| .. gh-issue: 139808 | |
| .. nonce: iIs7_E | |
| .. section: Core and Builtins | |
| Add branch protections for AArch64 (BTI/PAC) in assembly code used by | |
| :option:`-X perf_jit <-X>` (Linux perf profiler integration). | |
| .. | |
| .. date: 2026-05-12-12-49-30 | |
| .. gh-issue: 127727 | |
| .. nonce: hNmj9G | |
| .. section: Core and Builtins | |
| Warn when running a virtual environment created for a different minor Python | |
| version than the current interpreter, and suggest using ``python -m venv | |
| --upgrade``. | |
| .. | |
| .. date: 2026-05-11-18-20-41 | |
| .. gh-issue: 148871 | |
| .. nonce: AeCbq7 | |
| .. section: Core and Builtins | |
| The empty tuple ``()`` is now loaded via :opcode:`LOAD_COMMON_CONSTANT` | |
| instead of :opcode:`LOAD_CONST`, removing it from per-code-object | |
| :attr:`~codeobject.co_consts` tuples. | |
| .. | |
| .. date: 2026-05-11-15-58-23 | |
| .. gh-issue: 149689 | |
| .. nonce: 9Ht49z | |
| .. section: Core and Builtins | |
| Fix missing error propagation in parser action helpers when memory | |
| allocation fails. Patch by Thomas Kowalski. | |
| .. | |
| .. date: 2026-05-11-14-48-56 | |
| .. gh-issue: 149676 | |
| .. nonce: 6aTrw1 | |
| .. section: Core and Builtins | |
| Fix ``frozendict | frozendict`` hash. | |
| .. | |
| .. date: 2026-05-10-16-43-50 | |
| .. gh-issue: 148829 | |
| .. nonce: gscS14 | |
| .. section: Core and Builtins | |
| :class:`sentinel` objects now support a ``repr=`` argument and their | |
| :attr:`~sentinel.__module__` attribute is writable. | |
| .. | |
| .. date: 2026-05-10-07-42-36 | |
| .. gh-issue: 149642 | |
| .. nonce: 6ZksML | |
| .. section: Core and Builtins | |
| Allow imports inside ``exec()`` calls within functions under | |
| ``PYTHON_LAZY_IMPORTS=all``. | |
| .. | |
| .. date: 2026-05-09-15-22-32 | |
| .. gh-issue: 144957 | |
| .. nonce: u1F2aQ | |
| .. section: Core and Builtins | |
| Fix lazy ``from`` imports of module attributes provided by module-level | |
| ``__getattr__``. | |
| .. | |
| .. date: 2026-05-07-03-18-59 | |
| .. gh-issue: 149459 | |
| .. nonce: 5fhAqP | |
| .. section: Core and Builtins | |
| Fix a crash in the JIT optimizer when a specialized ``LOAD_SPECIAL`` guard | |
| deoptimized after inserting the synthetic ``NULL`` stack entry. | |
| .. | |
| .. date: 2026-05-05-12-00-00 | |
| .. gh-issue: 149321 | |
| .. nonce: remove-lazy-imports-none | |
| .. section: Core and Builtins | |
| Do not support ``none`` as a lazy imports mode. | |
| .. | |
| .. date: 2026-04-29-15-10-59 | |
| .. gh-issue: 149162 | |
| .. nonce: BPPyrq | |
| .. section: Core and Builtins | |
| Fix a potential deadlock in :c:func:`PyUnicode_InternFromString` and other | |
| interning functions in the :term:`free-threaded build` when called from C++ | |
| static local initializers. | |
| .. | |
| .. date: 2026-04-26-15-08-53 | |
| .. gh-issue: 148817 | |
| .. nonce: cuN07H | |
| .. section: Core and Builtins | |
| Fold large constant list and set literals used as the iterable of a | |
| :keyword:`for` loop or ``in``/``not in`` test into a constant :class:`tuple` | |
| or :class:`frozenset`, restoring an optimization previously done by the AST | |
| optimizer that was lost when constant folding moved to the CFG. | |
| .. | |
| .. date: 2026-04-21-15-07-03 | |
| .. gh-issue: 148825 | |
| .. nonce: AbJzmZ | |
| .. section: Core and Builtins | |
| Fix build error if specialization is disabled. | |
| .. | |
| .. date: 2026-04-15-15-48-04 | |
| .. gh-issue: 148450 | |
| .. nonce: 2MEVqH | |
| .. section: Core and Builtins | |
| Fix ``abc.register()`` so it invalidates type version tags for registered | |
| classes. | |
| .. | |
| .. date: 2026-04-13-00-00-00 | |
| .. gh-issue: 148442 | |
| .. nonce: aBcDeF | |
| .. section: Core and Builtins | |
| Fix a race condition in ``list.__lt__``, ``list.__le__``, ``list.__gt__``, | |
| and ``list.__ge__``. Previously, under concurrent list mutation, the items | |
| being compared could be replaced with other objects before the final | |
| comparison, causing the final comparison result to be incorrect. | |
| .. | |
| .. date: 2026-03-31-16-15-15 | |
| .. gh-issue: 75723 | |
| .. nonce: BZ4Rsn | |
| .. section: Core and Builtins | |
| Avoid re-executing ``.pth`` files when :func:`site.addsitedir` is called for | |
| a known directory. | |
| .. | |
| .. date: 2026-03-23-00-45-44 | |
| .. gh-issue: 145857 | |
| .. nonce: dB66WV | |
| .. section: Core and Builtins | |
| The ``DELETE_GLOBAL`` opcode is now replaced with ``PUSH_NULL; | |
| STORE_GLOBAL``. | |
| .. | |
| .. date: 2026-03-20-16-27-15 | |
| .. gh-issue: 145855 | |
| .. nonce: 3yaHO4 | |
| .. section: Core and Builtins | |
| The ``DELETE_ATTR`` opcode is now replaced with ``PUSH_NULL; STORE_ATTR``. | |
| .. | |
| .. date: 2026-03-16-02-23-48 | |
| .. gh-issue: 145854 | |
| .. nonce: rRexF3 | |
| .. section: Core and Builtins | |
| The ``DELETE_NAME`` opcode is now replaced with ``PUSH_NULL; STORE_NAME``. | |
| .. | |
| .. date: 2026-02-14-16-19-22 | |
| .. gh-issue: 138912 | |
| .. nonce: TKMC9K | |
| .. section: Core and Builtins | |
| Add fast path for :keyword:`match` class patterns without any sub-patterns | |
| to improve performance by ~15%. | |
| .. | |
| .. date: 2025-08-15-06-28-45 | |
| .. gh-issue: 91484 | |
| .. nonce: huCgHt | |
| .. section: Core and Builtins | |
| :meth:`memoryview.cast` now allows casting from N-D to 1-D for F-contiguous. | |
| .. | |
| .. date: 2024-12-24-08-44-49 | |
| .. gh-issue: 128213 | |
| .. nonce: Y71jDi | |
| .. section: Core and Builtins | |
| Speed up :class:`bytes` creation from :class:`list` and :class:`tuple` of | |
| integers. | |
| Patch by Ben Hsing and Pieter Eendebak | |
| .. | |
| .. date: 2024-09-19-15-47-50 | |
| .. gh-issue: 117999 | |
| .. nonce: Iq4jEG | |
| .. section: Core and Builtins | |
| Fix calculation of powers of complex numbers. Small integer powers now | |
| produce correct sign of zero components. Negative powers of infinite numbers | |
| now evaluate to zero instead of NaN. Powers of infinite numbers no longer | |
| raise OverflowError. | |
| .. | |
| .. date: 2020-06-23-13-59-37 | |
| .. gh-issue: 85260 | |
| .. nonce: o_LJ76 | |
| .. section: Core and Builtins | |
| :func:`compile` now raises :exc:`ValueError` instead of crashing on a debug | |
| build if an identifier field of an AST node (such as the name of a function, | |
| a class, an imported module or a caught exception) is ``"None"``, ``"True"`` | |
| or ``"False"``. | |
| .. | |
| .. bpo: 38131 | |
| .. date: 2019-12-27-19-20-33 | |
| .. nonce: J5fv54 | |
| .. section: Core and Builtins | |
| Produce more meaningful messages when compiling AST objects with wrong field | |
| values. Patch by Batuhan Taskaya. | |
| .. | |
| .. date: 2026-10-11-08-41-00 | |
| .. gh-issue: 159184 | |
| .. nonce: Nn4tOr | |
| .. section: Library | |
| Fix :func:`marshal.dumps` raising :exc:`TypeError` for a set or frozenset | |
| containing several complex NaNs, which also made it impossible to write a | |
| :file:`.pyc` file for source code containing such a constant. | |
| .. | |
| .. date: 2026-10-11-08-40-00 | |
| .. gh-issue: 159185 | |
| .. nonce: Sq7cZd | |
| .. section: Library | |
| Fix a crash in :func:`marshal.dumps` and :func:`marshal.dump` when a set is | |
| modified while its elements are serialized, for example by the | |
| :meth:`~object.__buffer__` method of one of its elements. | |
| :exc:`RuntimeError` is now raised. | |
| .. | |
| .. date: 2026-10-11-06-00-00 | |
| .. gh-issue: 129724 | |
| .. nonce: mRsh1x | |
| .. section: Library | |
| Make the output of :func:`marshal.dumps` and :func:`marshal.dump`, and so | |
| the content of :file:`.pyc` files, independent of the reference counts of | |
| the serialized objects. The format is unchanged, but the data is not | |
| byte-for-byte identical to that written by previous Python versions. | |
| .. | |
| .. date: 2026-10-08-16-18-43 | |
| .. gh-issue: 87720 | |
| .. nonce: Elqdl9 | |
| .. section: Library | |
| Fixed error in :mod:`email` new policies where header folding failed to | |
| detect the need to re-quote text obtained from encoded words in certain | |
| cases. | |
| .. | |
| .. date: 2026-10-07-20-32-20 | |
| .. gh-issue: 158929 | |
| .. nonce: 6dwqfQ | |
| .. section: Library | |
| Fix crash when calling :func:`syslog.syslog` while a subinterpreter in | |
| another thread calls :func:`syslog.openlog` or :func:`syslog.closelog`. | |
| .. | |
| .. date: 2026-10-07-02-29-45 | |
| .. gh-issue: 158897 | |
| .. nonce: jH3FwQ | |
| .. section: Library | |
| Optimize :meth:`!io.BufferedReader.readline` when lines are close to the | |
| buffer size (128 kB by default) or longer than the buffer size. Replace the | |
| C loop searching for the newline byte in the buffer with a :c:func:`!memchr` | |
| call which is more efficient. In the good case, it makes ``readline()`` up | |
| to 4x faster! Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-10-06-20-33-52 | |
| .. gh-issue: 158936 | |
| .. nonce: flCm_m | |
| .. section: Library | |
| :func:`~dataclasses.dataclass` no longer fails when a string annotation | |
| names a :ref:`lazy import <lazy-imports>` that cannot be resolved, matching | |
| the behavior for non-string annotations. | |
| .. | |
| .. date: 2026-10-06-20-03-01 | |
| .. gh-issue: 158893 | |
| .. nonce: B6A53q | |
| .. section: Library | |
| Make :func:`os.strerror` thread-safe: use the reentrant ``strerror_r()`` | |
| function if available. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-10-05-18-00-01 | |
| .. gh-issue: 158539 | |
| .. nonce: k8Lv2a | |
| .. section: Library | |
| Fix macOS runtime section lookup for remote debugging when virtual memory | |
| region sizes differ from Mach-O segment file sizes. | |
| .. | |
| .. date: 2026-10-05-18-00-00 | |
| .. gh-issue: 156545 | |
| .. nonce: z1mQp7 | |
| .. section: Library | |
| Fix deep flamegraph exports on platforms with small C stacks by falling back | |
| to the Python JSON encoder when the C encoder runs out of stack space. | |
| .. | |
| .. date: 2026-10-05-13-57-08 | |
| .. gh-issue: 79459 | |
| .. nonce: 2RgBDL | |
| .. section: Library | |
| :mod:`tempfile` functions that take a ``prefix`` or ``suffix`` argument now | |
| raise a :exc:`ValueError` if they contain a directory component: | |
| :func:`tempfile.mkstemp`, :func:`tempfile.mkdtemp`, | |
| :func:`tempfile.TemporaryFile`, :func:`tempfile.NamedTemporaryFile`. | |
| .. | |
| .. date: 2026-10-04-20-00-00 | |
| .. gh-issue: 158552 | |
| .. nonce: windows | |
| .. section: Library | |
| Wait for Windows threads to finish suspending before reading target memory | |
| in the sampling profiler's blocking mode. Resume the target if waiting for | |
| suspension fails. | |
| .. | |
| .. date: 2026-10-01-16-45-00 | |
| .. gh-issue: 156321 | |
| .. nonce: Kq3xVt | |
| .. section: Library | |
| Fix :func:`asyncio.shield` reporting an exception from the inner future | |
| through the loop exception handler as soon as it completes after the shield | |
| was cancelled, even when the exception is retrieved afterwards. The | |
| exception is now reported only if it is never retrieved, as with any other | |
| future. | |
| .. | |
| .. date: 2026-10-01-14-00-00 | |
| .. gh-issue: 158539 | |
| .. nonce: q1w2e3 | |
| .. section: Library | |
| Fix :mod:`profiling.sampling` exception mode discarding samples for code | |
| running inside an ``except`` block in a generator or coroutine. The remote | |
| debugger now follows ``tstate->exc_info`` and its ``previous_item`` chain | |
| instead of only reading the embedded ``exc_state``, matching the exception | |
| that :func:`sys.exception` reports. | |
| .. | |
| .. date: 2026-10-01-13-59-02 | |
| .. gh-issue: 158563 | |
| .. nonce: kR7wQe | |
| .. section: Library | |
| Fix :func:`turtle.undo` after :func:`turtle.teleport` and after an exception | |
| in :func:`turtle.circle`, :func:`turtle.dot` or :func:`turtle.write`. Fix | |
| :func:`turtle.stamp`, :func:`turtle.clearstamp`, :func:`turtle.clear` and | |
| :func:`turtle.reset` when the undo buffer is disabled. | |
| .. | |
| .. date: 2026-09-30-22-10-00 | |
| .. gh-issue: 158540 | |
| .. nonce: kQ9vXm | |
| .. section: Library | |
| Fix :mod:`profiling.sampling` not adding the directory containing the | |
| profiled script to :data:`sys.path`, which prevented the script from | |
| importing modules placed next to it. The script's directory is now added, | |
| matching the behavior of ``python script.py``. | |
| .. | |
| .. date: 2026-09-30-20-09-46 | |
| .. gh-issue: 158522 | |
| .. nonce: L6j7tU | |
| .. section: Library | |
| Fix :mod:`profiling.sampling` showing a single frame for a task whose | |
| coroutine recurses. Patch by Timofei Ivankov. | |
| .. | |
| .. date: 2026-09-26-22-07-09 | |
| .. gh-issue: 158237 | |
| .. nonce: AbCdEf | |
| .. section: Library | |
| Fix :func:`ast.unparse` to not insert a space before attribute access on | |
| bool constants (e.g. ``True.real`` instead of ``True .real``). | |
| .. | |
| .. date: 2026-09-25-22-15-54 | |
| .. gh-issue: 158169 | |
| .. nonce: ZlibTail | |
| .. section: Library | |
| Fix :attr:`zlib.Decompress.unconsumed_tail` duplicating | |
| :attr:`~zlib.Decompress.unused_data` after end of stream when *max_length* | |
| was used. | |
| .. | |
| .. date: 2026-09-19-20-31-58 | |
| .. gh-issue: 141540 | |
| .. nonce: phc605 | |
| .. section: Library | |
| Quote the unconverted data and the format in the error messages of | |
| :func:`time.strptime` and :meth:`datetime.datetime.strptime` so that | |
| whitespace such as a trailing newline is visible. | |
| .. | |
| .. date: 2026-09-19-14-10-18 | |
| .. gh-issue: 157788 | |
| .. nonce: v70Lxd | |
| .. section: Library | |
| Fix ``python -m asyncio ps`` failing on a process that has a task with a | |
| name longer than 255 characters. | |
| .. | |
| .. date: 2026-09-19-12-00-00 | |
| .. gh-issue: 157605 | |
| .. nonce: Qh92xZ | |
| .. section: Library | |
| Fix :mod:`profiling.sampling` failing when a native thread has an empty | |
| Python stack. | |
| .. | |
| .. date: 2026-09-18-17-33-31 | |
| .. gh-issue: 157763 | |
| .. nonce: Wd0_Uo | |
| .. section: Library | |
| The undocumented :func:`!ctypes.util.test` function is now :term:`soft | |
| deprecated` and a no-op at runtime. | |
| .. | |
| .. date: 2026-09-18-12-00-00 | |
| .. gh-issue: 157660 | |
| .. nonce: tlbc | |
| .. section: Library | |
| Fix :mod:`profiling.sampling` reporting errors or incorrect line numbers in | |
| free-threaded builds when a thread-local bytecode array grows or gains | |
| entries after being cached. | |
| .. | |
| .. date: 2026-09-17-21-05-42 | |
| .. gh-issue: 153888 | |
| .. nonce: Ht7Yqb | |
| .. section: Library | |
| Fix :func:`unittest.mock.patch` with ``autospec``, ``spec``, or ``spec_set`` | |
| when used with lazy-imported objects. | |
| .. | |
| .. date: 2026-09-17-17-30-00 | |
| .. gh-issue: 119646 | |
| .. nonce: kP8nQm | |
| .. section: Library | |
| On Windows, :exc:`OSError` from :mod:`subprocess` now includes the attempted | |
| executable or working directory in ``filename``. | |
| .. | |
| .. date: 2026-09-17-15-14-08 | |
| .. gh-issue: 157675 | |
| .. nonce: C4-ze9 | |
| .. section: Library | |
| :func:`encodings.idna.nameprep` now takes a *limit* argument that allows | |
| rejecting extremely large input early. The ``idna`` encoding and the | |
| :func:`!encodings.idna.ToASCII` and :func:`!encodings.idna.ToUnicode` | |
| functions use this to avoid passing unbounded input to quadratic-time | |
| algorithms. | |
| .. | |
| .. date: 2026-09-17-14-00-00 | |
| .. gh-issue: 157672 | |
| .. nonce: tksigs | |
| .. section: Library | |
| Fix :mod:`tkinter` on macOS: creating a :class:`~tkinter.Tk` instance no | |
| longer replaces the Python handlers of SIGINT, SIGHUP and SIGTERM with Tk's | |
| handler which exits the process, so Ctrl-C raises :exc:`KeyboardInterrupt` | |
| again. | |
| .. | |
| .. date: 2026-09-17-03-20-24 | |
| .. gh-issue: 157639 | |
| .. nonce: VP3kc4 | |
| .. section: Library | |
| Fix a crash in :mod:`!cProfile` when an external timer re-enters the | |
| profiler. Profiling events raised while the external timer runs are now | |
| ignored. | |
| .. | |
| .. date: 2026-09-16-14-04-38 | |
| .. gh-issue: 157621 | |
| .. nonce: R6v2S8 | |
| .. section: Library | |
| Fix a crash when a weak-reference callback is attached to a | |
| :class:`typing.ParamSpecArgs` or :class:`typing.ParamSpecKwargs` instance. | |
| .. | |
| .. date: 2026-09-16-09-28-42 | |
| .. gh-issue: 157633 | |
| .. nonce: EvGFI0 | |
| .. section: Library | |
| Update :mod:`unicodedata` database to Unicode 18.0.0. | |
| .. | |
| .. date: 2026-09-15-16-37-19 | |
| .. gh-issue: 69919 | |
| .. nonce: izH1zP | |
| .. section: Library | |
| :meth:`code.InteractiveInterpreter.runsource` and the REPL now report any | |
| exception raised by compiling the source, such as :exc:`MemoryError` or | |
| :exc:`RecursionError` for too deeply nested source, instead of propagating | |
| it or printing a traceback of the REPL internals. | |
| .. | |
| .. date: 2026-09-14-18-36-32 | |
| .. gh-issue: 157514 | |
| .. nonce: 02FZED | |
| .. section: Library | |
| Add constants :const:`tkinter.TCL_VERSION_INFO` and | |
| :const:`tkinter.TK_VERSION_INFO`, named tuples with the versions of the Tcl | |
| and Tk libraries that were used for building the module, and | |
| ``_tkinter.TCL_PATCH_LEVEL`` and ``_tkinter.TK_PATCH_LEVEL`` strings. | |
| .. | |
| .. date: 2026-09-14-18-36-31 | |
| .. gh-issue: 157513 | |
| .. nonce: EW4QOC | |
| .. section: Library | |
| :const:`ssl.OPENSSL_VERSION_INFO` is now a named tuple. Add | |
| :const:`ssl.OPENSSL_API_VERSION_INFO` which provides information about the | |
| version of the OpenSSL library that was used for building the module. | |
| .. | |
| .. date: 2026-09-14-12-05-02 | |
| .. gh-issue: 157487 | |
| .. nonce: ID-qIv | |
| .. section: Library | |
| Add constants :const:`ctypes.LIBFFI_VERSION`, | |
| :const:`ctypes.libffi_version`, :const:`ctypes.LIBFFI_VERSION_INFO` and | |
| :const:`ctypes.libffi_version_info`, which provide information about the | |
| version of the libffi library in use. They are only available with libffi | |
| 3.5 or later. | |
| .. | |
| .. date: 2026-09-14-11-38-23 | |
| .. gh-issue: 157485 | |
| .. nonce: yAK9LN | |
| .. section: Library | |
| Add constants :const:`readline.READLINE_VERSION_INFO`, | |
| :const:`readline.readline_version_info` and | |
| :const:`readline.readline_version`, which provide information about the | |
| version of the Readline library in use. | |
| .. | |
| .. date: 2026-09-14-10-39-05 | |
| .. gh-issue: 157480 | |
| .. nonce: to5EnW | |
| .. section: Library | |
| Add constants in :mod:`dbm.ndbm` which provide information about the version | |
| of the underlying library in use: :const:`~dbm.ndbm.GDBM_VERSION_INFO`, | |
| :const:`~dbm.ndbm.gdbm_version_info` and :const:`~dbm.ndbm.gdbm_version` if | |
| it is GDBM, or :const:`~dbm.ndbm.BDB_VERSION`, | |
| :const:`~dbm.ndbm.bdb_version`, :const:`~dbm.ndbm.BDB_VERSION_INFO` and | |
| :const:`~dbm.ndbm.bdb_version_info` if it is Berkeley DB. | |
| :const:`dbm.ndbm.library` is now ``'ndbm'`` instead of ``'GNU gdbm'`` for a | |
| classic NDBM library. | |
| .. | |
| .. date: 2026-09-14-10-22-36 | |
| .. gh-issue: 157478 | |
| .. nonce: F4cBKN | |
| .. section: Library | |
| Add constants :const:`dbm.gnu.GDBM_VERSION_INFO`, | |
| :const:`dbm.gnu.gdbm_version_info` and :const:`dbm.gnu.gdbm_version`, which | |
| provide information about the version of the GDBM library in use. The | |
| private constant ``_gdbm._GDBM_VERSION`` has been removed. | |
| .. | |
| .. date: 2026-09-14-09-28-35 | |
| .. gh-issue: 157475 | |
| .. nonce: dvuniU | |
| .. section: Library | |
| Add constants :const:`decimal.LIBMPDEC_VERSION`, | |
| :const:`decimal.libmpdec_version`, :const:`decimal.LIBMPDEC_VERSION_INFO`, | |
| and :const:`decimal.libmpdec_version_info` in the C implementation, which | |
| provide information about the version of the libmpdec library in use. | |
| .. | |
| .. date: 2026-09-14-09-02-19 | |
| .. gh-issue: 157473 | |
| .. nonce: LlzPyM | |
| .. section: Library | |
| Add constant :const:`xml.parsers.expat.VERSION_INFO` which provides | |
| information about the version of the Expat library that was used for | |
| building the module. :const:`xml.parsers.expat.version_info` is now a named | |
| tuple. | |
| .. | |
| .. date: 2026-09-14-07-49-51 | |
| .. gh-issue: 157470 | |
| .. nonce: jgEHYK | |
| .. section: Library | |
| Add constants :const:`sqlite3.SQLITE_VERSION` and | |
| :const:`sqlite3.SQLITE_VERSION_INFO` which provide information about the | |
| version of the SQLite library that was used for building the module. | |
| :const:`sqlite3.sqlite_version_info` is now a named tuple. | |
| .. | |
| .. date: 2026-09-14-00-30-00 | |
| .. gh-issue: 157451 | |
| .. nonce: k7Qm2x | |
| .. section: Library | |
| Fix :mod:`gettext` plural form selection when the ``Plural-Forms`` | |
| expression combines the unary ``!`` operator with a binary operator, for | |
| example ``!n + 1`` or ``2 * !n``. The latter raised :exc:`SyntaxError`. | |
| .. | |
| .. date: 2026-09-13-21-45-00 | |
| .. gh-issue: 150816 | |
| .. nonce: pQ3kZs | |
| .. section: Library | |
| Speed up :func:`inspect.signature` for Python functions by skipping | |
| redundant validation when creating :class:`inspect.Parameter` objects. | |
| .. | |
| .. date: 2026-09-13-15-58-28 | |
| .. gh-issue: 157335 | |
| .. nonce: efaMah | |
| .. section: Library | |
| Fix out-of-bounds write in ``mmap.mmap.__setitem__`` that could occur when | |
| converting the index or the assigned value (via :meth:`~object.__index__` | |
| for a single item, or via the buffer protocol for a slice) resized or closed | |
| the mmap object during the assignment. | |
| .. | |
| .. date: 2026-09-13-10-30-00 | |
| .. gh-issue: 157406 | |
| .. nonce: a3kZq7 | |
| .. section: Library | |
| Fix the Python implementation of :class:`xml.etree.ElementTree.XMLParser`: | |
| the ``doctype()`` method of the target is now called for a document type | |
| declaration without an external identifier, like ``<!DOCTYPE html>``, as in | |
| the C implementation. | |
| .. | |
| .. date: 2026-09-13-07-14-35 | |
| .. gh-issue: 128509 | |
| .. nonce: 9F2GCE | |
| .. section: Library | |
| :func:`marshal.load` and :func:`marshal.loads` can now get 1-byte string | |
| singletons. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-12-18-03-15 | |
| .. gh-issue: 157364 | |
| .. nonce: Qd7mKs | |
| .. section: Library | |
| Fix a use-after-free in :class:`io.TextIOWrapper` when a call to the | |
| underlying buffer reentrantly detaches it. Patched by Shamil Abdulaev. | |
| .. | |
| .. date: 2026-09-12-15-50-23 | |
| .. gh-issue: 157366 | |
| .. nonce: djwD2M | |
| .. section: Library | |
| Remove the accidental acceptance of :class:`bytes` in the C implementation | |
| of :mod:`xml.etree.ElementTree`, a leftover of the Python 2 to Python 3 | |
| migration, for paths of :meth:`~xml.etree.ElementTree.Element.find` and | |
| similar methods, for the tag of :meth:`~xml.etree.ElementTree.Element.iter`, | |
| and for the names of events of :class:`~xml.etree.ElementTree.XMLPullParser` | |
| and :func:`~xml.etree.ElementTree.iterparse`. It now raises the same | |
| exceptions as the Python implementation. | |
| .. | |
| .. date: 2026-09-12-03-14-57 | |
| .. gh-issue: 157242 | |
| .. nonce: ycbtjC | |
| .. section: Library | |
| :class:`io.BytesIO` is no longer closed on ``write()`` and ``truncate()`` | |
| failure (:exc:`MemoryError`). Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-11-16-50-11 | |
| .. gh-issue: 157325 | |
| .. nonce: hzTild | |
| .. section: Library | |
| Fix an out-of-bounds read in the ``hz`` incremental decoder when the input | |
| ends with ``~``. | |
| .. | |
| .. date: 2026-09-11-14-14-51 | |
| .. gh-issue: 157301 | |
| .. nonce: QxcE2r | |
| .. section: Library | |
| Fix :class:`asyncio.Task` hanging the event loop when an eager start fails | |
| to enter the task's context. | |
| .. | |
| .. date: 2026-09-11-12-00-00 | |
| .. gh-issue: 156955 | |
| .. nonce: bLtmAp | |
| .. section: Library | |
| Speed up :func:`csv.writer` by caching the set of characters that need | |
| quoting or escaping in the dialect. Writing long fields is now up to 5 times | |
| faster. | |
| .. | |
| .. date: 2026-09-09-13-46-38 | |
| .. gh-issue: 157213 | |
| .. nonce: rYg7pO | |
| .. section: Library | |
| Fix :func:`asyncio.gather` leaving stale await-graph edges on children that | |
| outlive it. | |
| .. | |
| .. date: 2026-09-08-15-55-00 | |
| .. gh-issue: 157176 | |
| .. nonce: yZ8a1B | |
| .. section: Library | |
| Make the :class:`time.struct_time` type immutable to prevent reference | |
| cycles between the type and its instances. Patch by Shamil Abdulaev. | |
| .. | |
| .. date: 2026-09-08-13-06-29 | |
| .. gh-issue: 156002 | |
| .. nonce: vmOC8T | |
| .. section: Library | |
| :mod:`zipfile` again reads members through a third-party decompressor | |
| installed by monkey-patching the private ``_get_decompressor()`` to return | |
| an object that only implements old BZ2Decompressor API from Python 3.3. | |
| Calling decompress() with one argument is deprecated. Note that | |
| decompressors without ``needs_input`` and two-argument ``decompress()`` are | |
| vulnerable to :cve:`2026-15310`. | |
| .. | |
| .. date: 2026-09-08-09-30-00 | |
| .. gh-issue: 157159 | |
| .. nonce: tabNny | |
| .. section: Library | |
| The usage message printed by ``python -m tabnanny`` when no arguments are | |
| given now suggests ``python -m`` instead of the source file. | |
| .. | |
| .. date: 2026-09-08-04-10-00 | |
| .. gh-issue: 123018 | |
| .. nonce: hV2kQe | |
| .. section: Library | |
| Fix :func:`readline.write_history_file` and | |
| :func:`readline.append_history_file` producing a history file that | |
| :func:`readline.read_history_file` could not load when a limit was set with | |
| :func:`readline.set_history_length` and Python was built against | |
| ``libedit``. This works around `NetBSD PR 60322 | |
| <https://gnats.netbsd.org/60322>`_. | |
| .. | |
| .. date: 2026-09-08-00-31-56 | |
| .. gh-issue: 157127 | |
| .. nonce: gduPd0 | |
| .. section: Library | |
| Reword the :mod:`argparse` error message reported for a missing required | |
| mutually exclusive group to ``one of the following arguments is required: | |
| --foo, --bar``, so that the argument names are separated by commas. | |
| .. | |
| .. date: 2026-09-07-23-40-00 | |
| .. gh-issue: 157146 | |
| .. nonce: lczip1 | |
| .. section: Library | |
| :mod:`linecache` can now read the source of a module that was imported from | |
| a zip archive on :data:`sys.path` when given only the file name, as | |
| :mod:`pdb`, :mod:`warnings` and :mod:`doctest` do. | |
| .. | |
| .. date: 2026-09-07-12-24-11 | |
| .. gh-issue: 157058 | |
| .. nonce: 2SoQU7 | |
| .. section: Library | |
| :func:`asyncio.wait_for` with a non-positive timeout now records the waiter | |
| in the call graph. | |
| .. | |
| .. date: 2026-09-07-00-21-31 | |
| .. gh-issue: 156933 | |
| .. nonce: OalCjC | |
| .. section: Library | |
| Fix incorrect integer return values from :mod:`ctypes` callbacks on some | |
| platforms, such as s390x. | |
| .. | |
| .. date: 2026-09-06-15-23-24 | |
| .. gh-issue: 157048 | |
| .. nonce: UtFyiJ | |
| .. section: Library | |
| Preserve the position and contents of :class:`io.BytesIO` when | |
| :meth:`!BytesIO.__init__` fails because a buffer is exported. | |
| .. | |
| .. date: 2026-09-06-15-12-18 | |
| .. gh-issue: 157025 | |
| .. nonce: ZvFpFT | |
| .. section: Library | |
| Fix transport cleanup when cancelling :meth:`asyncio.loop.sendfile` while | |
| waiting for the write buffer to drain in the native implementation. | |
| .. | |
| .. date: 2026-09-05-22-39-22 | |
| .. gh-issue: 156961 | |
| .. nonce: ZtYqoA | |
| .. section: Library | |
| Fix :func:`tkinter.font.nametofont` and the :class:`tkinter.font.Font` | |
| constructor for a font name or description returned by Tk as a Tcl object, | |
| for example by :meth:`ttk.Style.lookup() <tkinter.ttk.Style.lookup>`. | |
| .. | |
| .. date: 2026-09-05-18-23-30 | |
| .. gh-issue: 156988 | |
| .. nonce: nEUQE6 | |
| .. section: Library | |
| :func:`asyncio.print_call_graph` no longer truncates the call stack at a | |
| synchronous generator. | |
| .. | |
| .. date: 2026-09-05-15-27-11 | |
| .. gh-issue: 156970 | |
| .. nonce: DxlgbB | |
| .. section: Library | |
| Set the docstring of :attr:`unittest.mock.Mock.return_value`. | |
| .. | |
| .. date: 2026-09-04-16-05-45 | |
| .. gh-issue: 156946 | |
| .. nonce: 0ZYCdh | |
| .. section: Library | |
| Fix a crash in :mod:`curses.panel` when the finalizer of a panel's user | |
| pointer runs while the panel is being deallocated. The panel is now taken | |
| off the panel stack before its user pointer is dropped. | |
| .. | |
| .. date: 2026-09-04-14-15-31 | |
| .. gh-issue: 156924 | |
| .. nonce: 3Ux7IJ | |
| .. section: Library | |
| :meth:`annotationlib.ForwardRef.evaluate` now resolves :ref:`lazy import | |
| <lazy-imports>` proxies found in the namespace. With | |
| :attr:`~annotationlib.Format.FORWARDREF`, a lazy import that fails to | |
| resolve now results in a :class:`~annotationlib.ForwardRef` instead of the | |
| :class:`lazy import proxy <types.LazyImportType>`, and with | |
| :attr:`~annotationlib.Format.VALUE` the underlying exception is propagated. | |
| .. | |
| .. date: 2026-09-04-11-45-08 | |
| .. gh-issue: 156865 | |
| .. nonce: mrdfKJ | |
| .. section: Library | |
| Don't raise exceptions on overflows in :class:`ctypes.c_float_complex`. | |
| Patch by Sergey B Kirpichev. | |
| .. | |
| .. date: 2026-09-04-09-18-05 | |
| .. gh-issue: 156920 | |
| .. nonce: lONsKT | |
| .. section: Library | |
| Fix :mod:`asyncio` on Windows: closing a :class:`~asyncio.DatagramTransport` | |
| under :class:`~asyncio.ProactorEventLoop` while datagrams were still queued, | |
| or while an in-flight write failed right as ``close()`` was draining the | |
| buffer, could strand the queued data and never call ``connection_lost()``, | |
| hanging the close indefinitely. | |
| .. | |
| .. date: 2026-09-03-04-51-46 | |
| .. gh-issue: 156864 | |
| .. nonce: Pbe7Tl | |
| .. section: Library | |
| :func:`array.array` setter now correctly detects overflows for the ``'e'``, | |
| ``'f'`` and ``'Zf'`` type codes. Patch by Sergey B Kirpichev. | |
| .. | |
| .. date: 2026-09-03-04-32-06 | |
| .. gh-issue: 156867 | |
| .. nonce: hq3efC | |
| .. section: Library | |
| Raise :exc:`OverflowError`'s for native ``'Zf'`` format in | |
| :func:`struct.pack`, like for ``'f'`` format. Previously overflows in the | |
| :c:expr:`float complex` type were silent. Patch by Sergey B Kirpichev. | |
| .. | |
| .. date: 2026-09-02-17-28-16 | |
| .. gh-issue: 156810 | |
| .. nonce: cLpEnc | |
| .. section: Library | |
| Fix a :exc:`UnicodeEncodeError` crash in the sampling profiler's | |
| collapsed-stack export (``--collapsed``) when a sampled frame's function or | |
| file name contains non-ASCII or surrogate-escaped characters. The output | |
| file is now written as UTF-8. | |
| .. | |
| .. date: 2026-09-02-12-11-00 | |
| .. gh-issue: 124697 | |
| .. nonce: sUbScp | |
| .. section: Library | |
| The :mod:`symtable` module now represents inlined list, set and dict | |
| comprehensions (:pep:`709`) as their own symbol table entries of type | |
| :attr:`~symtable.SymbolTableType.INLINED_COMPREHENSION`. | |
| .. | |
| .. date: 2026-09-01-16-58-30 | |
| .. gh-issue: 156797 | |
| .. nonce: Qm4tRs | |
| .. section: Library | |
| Fix :class:`xml.sax.saxutils.XMLGenerator`: the namespace URI is now escaped | |
| in the namespace declaration. Previously a URI containing ``&``, ``<`` or a | |
| quote character produced a document which cannot be parsed. | |
| .. | |
| .. date: 2026-09-01-02-30-00 | |
| .. gh-issue: 63102 | |
| .. nonce: Pz3wK8 | |
| .. section: Library | |
| :class:`~xml.etree.ElementTree.XMLPullParser` and | |
| :func:`~xml.etree.ElementTree.iterparse` now support the *target* parameter. | |
| The reported object is the value returned by the corresponding method of the | |
| target, so no tree is built if the target does not build one. Only the | |
| standard :class:`~xml.etree.ElementTree.TreeBuilder` was supported in the C | |
| implementation before. | |
| .. | |
| .. date: 2026-09-01-00-30-00 | |
| .. gh-issue: 61290 | |
| .. nonce: Vx7pQ2 | |
| .. section: Library | |
| :mod:`xml.etree.ElementTree` no longer refuses to serialize attributes | |
| without a namespace when the *default_namespace* option is used. The default | |
| namespace declaration does not apply to attribute names, so an unqualified | |
| attribute name is written as is, and a qualified attribute name is always | |
| written with a prefix. | |
| .. | |
| .. date: 2026-08-31-23-10-00 | |
| .. gh-issue: 83895 | |
| .. nonce: Jm5tR3 | |
| .. section: Library | |
| :mod:`xml.etree.ElementTree` now accepts input larger than 2 GiB in the C | |
| implementation. The data is fed to Expat in chunks, as | |
| :mod:`xml.parsers.expat` already did, instead of raising | |
| :exc:`OverflowError`. | |
| .. | |
| .. date: 2026-08-31-20-30-00 | |
| .. gh-issue: 99064 | |
| .. nonce: Rt4mZ9 | |
| .. section: Library | |
| Fix :func:`xml.etree.ElementTree.parse` with a text file or other source of | |
| :class:`str` data in the C implementation. The encoding declared in the | |
| document was applied to the already decoded text, which produced mojibake. | |
| It is now ignored, as when parsing with :meth:`!XMLParser.feed` or | |
| :func:`~xml.etree.ElementTree.fromstring`. | |
| .. | |
| .. date: 2026-08-31-19-30-00 | |
| .. gh-issue: 89499 | |
| .. nonce: Kx8vQ1 | |
| .. section: Library | |
| :meth:`ElementTree.write() <xml.etree.ElementTree.ElementTree.write>`, | |
| :func:`~xml.etree.ElementTree.tostring` and | |
| :func:`~xml.etree.ElementTree.tostringlist` now support the *standalone* | |
| parameter, the value of the standalone document declaration in the XML | |
| declaration. | |
| .. | |
| .. date: 2026-08-31-17-10-00 | |
| .. gh-issue: 156713 | |
| .. nonce: Nt2URL | |
| .. section: Library | |
| Fix :func:`!nturl2path.pathname2url` and :func:`!nturl2path.url2pathname`: | |
| the filesystem encoding and error handler are now used for percent-encoding | |
| and decoding, as in :mod:`urllib.request`. Previously paths containing | |
| surrogate characters raised :exc:`UnicodeEncodeError`. | |
| .. | |
| .. date: 2026-08-31-11-40-00 | |
| .. gh-issue: 156774 | |
| .. nonce: Pd8Lz1 | |
| .. section: Library | |
| Speed up :mod:`pdb` startup by only importing :mod:`asyncio` when the | |
| program being debugged has already imported it. | |
| .. | |
| .. date: 2026-08-31-09-01-22 | |
| .. gh-issue: 156439 | |
| .. nonce: j9WHCc | |
| .. section: Library | |
| :func:`socket.if_nametoindex` and :func:`socket.if_indextoname` are now | |
| available on platforms that provide them but not ``if_nameindex``, such as | |
| Android before API level 24. | |
| .. | |
| .. date: 2026-08-31-00-00-00 | |
| .. gh-issue: 156698 | |
| .. nonce: gyDxUe | |
| .. section: Library | |
| Fix :class:`asyncio.ProactorEventLoop` UDP transports so that a write error | |
| no longer strands a paused protocol: the write loop is now rescheduled when | |
| data remains buffered, and the protocol is resumed when the buffer has | |
| drained. | |
| .. | |
| .. date: 2026-08-31-00-00-00 | |
| .. gh-issue: 127057 | |
| .. nonce: N9yg62 | |
| .. section: Library | |
| Fix :class:`asyncio.ProactorEventLoop` UDP transports so that a | |
| :exc:`ConnectionResetError` raised by ``WSARecvFrom`` no longer stops the | |
| read loop. | |
| .. | |
| .. date: 2026-08-30-21-00-00 | |
| .. gh-issue: 156665 | |
| .. nonce: Jm3Kp9 | |
| .. section: Library | |
| :mod:`xml.dom.minidom` now validates namespaces in | |
| :meth:`~xml.dom.Document.createElementNS`, | |
| :meth:`~xml.dom.Document.createAttributeNS` and | |
| :meth:`~xml.dom.Element.setAttributeNS`, and when setting | |
| :attr:`~xml.dom.Node.prefix` of an attribute. :exc:`~xml.dom.NamespaceErr` | |
| is now raised for a malformed qualified name, for a prefix with an empty | |
| namespace, and for illegal use of the ``xml`` and ``xmlns`` prefixes. | |
| .. | |
| .. date: 2026-08-30-19-30-00 | |
| .. gh-issue: 156658 | |
| .. nonce: Xq5Nt7 | |
| .. section: Library | |
| :mod:`xml.dom` and :mod:`xml.etree.ElementTree` no longer treat characters | |
| which are not white space in XML (such as U+00A0) as white space. Previously | |
| they could be lost in :func:`~xml.etree.ElementTree.indent`, | |
| :func:`~xml.etree.ElementTree.canonicalize` with ``strip_text=True``, and | |
| when parsing with the ``whitespace-in-element-content`` feature turned off. | |
| .. | |
| .. date: 2026-08-30-18-00-00 | |
| .. gh-issue: 81623 | |
| .. nonce: Vh2Kt6 | |
| .. section: Library | |
| :meth:`~xml.dom.minidom.Node.toprettyxml` in :mod:`xml.dom.minidom` and | |
| :func:`~xml.etree.ElementTree.indent` in :mod:`xml.etree.ElementTree` no | |
| longer add whitespace inside an element which is marked with | |
| ``xml:space="preserve"`` or which contains text (:meth:`!toprettyxml` also | |
| takes into account the content model declared in the DTD). Previously such | |
| indentation changed the content of the element. | |
| .. | |
| .. date: 2026-08-30-13-37-47 | |
| .. gh-issue: 54092 | |
| .. nonce: Tq8Wm3 | |
| .. section: Library | |
| Implement :meth:`~xml.dom.minidom.Node.writexml` for document fragments in | |
| :mod:`xml.dom.minidom`, so that :meth:`~xml.dom.minidom.Node.toxml` and | |
| :meth:`~xml.dom.minidom.Node.toprettyxml` now work for them. They write the | |
| children of the fragment, without adding a level of indentation. | |
| .. | |
| .. date: 2026-08-30-13-25-53 | |
| .. gh-issue: 156512 | |
| .. nonce: tVTOIV | |
| .. section: Library | |
| Fix :mod:`asyncio` losing a connection twice when ``resume_writing()`` | |
| closes the transport. | |
| .. | |
| .. date: 2026-08-30-12-00-00 | |
| .. gh-issue: 44376 | |
| .. nonce: Kp4Vz9 | |
| .. section: Library | |
| :meth:`~xml.dom.minidom.Node.writexml` in :mod:`xml.dom.minidom` now writes | |
| the namespace declarations needed to serialize the namespaces of the element | |
| and its attributes, if they are not already declared for an ancestor. The | |
| document is not modified. | |
| .. | |
| .. date: 2026-08-29-11-37-40 | |
| .. gh-issue: 156545 | |
| .. nonce: fLaMe1 | |
| .. section: Library | |
| Fix the sampling profiler's flamegraph export so that profiling a deeply | |
| recursive program no longer fails with :exc:`RecursionError` instead of | |
| producing a flamegraph. Patch by tonghuaroot. | |
| .. | |
| .. date: 2026-08-28-18-10-25 | |
| .. gh-issue: 156523 | |
| .. nonce: llJqo9 | |
| .. section: Library | |
| Fix :func:`asyncio.as_completed` not recording the awaiting task in the call | |
| graph. | |
| .. | |
| .. date: 2026-08-28-00-59-00 | |
| .. gh-issue: 156476 | |
| .. nonce: rQhxc7 | |
| .. section: Library | |
| The pure Python implementation of :meth:`queue.SimpleQueue.get` now ignores | |
| *timeout* when *block* is false, matching the documented behavior and the C | |
| implementation. It previously raised :exc:`ValueError`. | |
| .. | |
| .. date: 2026-08-27-08-31-29 | |
| .. gh-issue: 156444 | |
| .. nonce: klcySy | |
| .. section: Library | |
| Fix matching of a negated character set in a bytes pattern compiled with | |
| both :const:`re.IGNORECASE` and :const:`re.LOCALE`. The case closure is now | |
| applied to the members of the set, so that ``[^bc]`` no longer matches | |
| ``b'B'``. | |
| .. | |
| .. date: 2026-08-26-15-28-59 | |
| .. gh-issue: 156360 | |
| .. nonce: ctZMHf | |
| .. section: Library | |
| Add the :envvar:`PYTHON_TURTLE_LANG` environment variable to select the | |
| language of :mod:`turtle` docstrings. Docstring dictionary entries naming a | |
| method which does not exist in the running version are no longer reported. | |
| .. | |
| .. date: 2026-08-26-13-58-01 | |
| .. gh-issue: 156400 | |
| .. nonce: dGrmP1 | |
| .. section: Library | |
| Fix socket and pipe leaks in :mod:`asyncio` when ``protocol_factory()`` | |
| raises in :meth:`loop.create_datagram_endpoint | |
| <asyncio.loop.create_datagram_endpoint>`, :meth:`loop.connect_read_pipe | |
| <asyncio.loop.connect_read_pipe>`, and :meth:`loop.connect_write_pipe | |
| <asyncio.loop.connect_write_pipe>`. The socket or pipe is now closed instead | |
| of leaking until garbage collection. | |
| .. | |
| .. date: 2026-08-26-12-48-10 | |
| .. gh-issue: 156408 | |
| .. nonce: -Yd0k7 | |
| .. section: Library | |
| Fix :func:`asyncio.print_call_graph` raising :exc:`AttributeError` when | |
| called on a task that has already finished. | |
| .. | |
| .. date: 2026-08-26-08-20-07 | |
| .. gh-issue: 156404 | |
| .. nonce: 2gP33I | |
| .. section: Library | |
| Restore compatibility with :file:`.pth` files generated before Python 3.15 | |
| in the :mod:`site` module. Inject the ``fullname`` variable in the frame | |
| which executes pth code. | |
| .. | |
| .. date: 2026-08-26-02-30-00 | |
| .. gh-issue: 156353 | |
| .. nonce: abcdef | |
| .. section: Library | |
| Fix :mod:`configparser` parsing when using whitespace in *delimiters*. | |
| .. | |
| .. date: 2026-08-24-22-20-55 | |
| .. gh-issue: 156327 | |
| .. nonce: arC8Ph | |
| .. section: Library | |
| Fix :func:`asyncio.print_call_graph` including its own frame in the printed | |
| call stack. | |
| .. | |
| .. date: 2026-08-24-14-28-47 | |
| .. gh-issue: 108549 | |
| .. nonce: XZ34WD | |
| .. section: Library | |
| Fix :class:`asyncio.Task`, when the task has a pending cancellation, replace | |
| **exc** exception with a :exc:`asyncio.CancelledError` unless it is | |
| :exc:`SystemExit` or :exc:`KeyboardInterrupt`, which must propagate | |
| unchanged. | |
| .. | |
| .. date: 2026-08-22-19-00-00 | |
| .. gh-issue: 156261 | |
| .. nonce: Nq4tWv | |
| .. section: Library | |
| :func:`pwd.getpwuid` now raises :exc:`OverflowError` instead of | |
| :exc:`KeyError` if the user id is out of the range of the C ``uid_t`` type, | |
| as :func:`grp.getgrgid` does for the group id. | |
| .. | |
| .. date: 2026-08-22-14-12-40 | |
| .. gh-issue: 156230 | |
| .. nonce: Lt9wQd | |
| .. section: Library | |
| :meth:`curses.window.instr`, :meth:`~curses.window.in_wstr` and | |
| :meth:`~curses.window.in_wchstr` no longer limit the count to 2047, which | |
| silently truncated a longer line. | |
| .. | |
| .. date: 2026-08-22-10-30-00 | |
| .. gh-issue: 156228 | |
| .. nonce: k3Rmxw | |
| .. section: Library | |
| The :mod:`ssl` and :mod:`hashlib` modules now route OpenSSL memory | |
| allocations through the Python raw memory allocators, making OpenSSL memory | |
| usage visible to :mod:`tracemalloc` and to custom allocators installed with | |
| :c:func:`PyMem_SetAllocator`. | |
| .. | |
| .. date: 2026-08-21-14-30-00 | |
| .. gh-issue: 156180 | |
| .. nonce: Qz3Lv8 | |
| .. section: Library | |
| :func:`zlib.adler32_combine` and :func:`zlib.crc32_combine` now raise | |
| :exc:`ValueError` if the *len2* argument is negative, instead of returning | |
| rubbish or hanging indefinitely, respectively. | |
| .. | |
| .. date: 2026-08-21-13-30-00 | |
| .. gh-issue: 156166 | |
| .. nonce: Xv8pQm | |
| .. section: Library | |
| :mod:`ssl`: A failed assignment or deletion of the ``_msg_callback`` | |
| attribute of :class:`ssl.SSLContext` no longer removes the current callback. | |
| Deleting it now raises :exc:`AttributeError` instead of :exc:`TypeError`. | |
| .. | |
| .. date: 2026-08-21-11-56-28 | |
| .. gh-issue: 156173 | |
| .. nonce: mhZa8a | |
| .. section: Library | |
| Calling :meth:`zlib.Decompress.flush` on invalid compressed data now raises | |
| :exc:`zlib.error` instead of being silently ignored. | |
| .. | |
| .. date: 2026-08-20-16-30-00 | |
| .. gh-issue: 156124 | |
| .. nonce: Kq3vXz | |
| .. section: Library | |
| Fix a crash in the free-threaded build when deleting the :attr:`!contents` | |
| attribute of a :mod:`ctypes` pointer. | |
| .. | |
| .. date: 2026-08-20-13-50-49 | |
| .. gh-issue: 156112 | |
| .. nonce: yEcma8 | |
| .. section: Library | |
| :mod:`!_ios_support` no longer fails to import when | |
| :func:`ctypes.util.find_library` cannot resolve the ObjC runtime through the | |
| dyld shared cache, as is the case on iOS 13. The runtime is now loaded by | |
| name, which dyld resolves against the cache directly. | |
| .. | |
| .. date: 2026-08-20-12-10-00 | |
| .. gh-issue: 156101 | |
| .. nonce: Qb2xNv | |
| .. section: Library | |
| Fix :attr:`sqlite3.Cursor.arraysize` being set to 0 if the assigned value is | |
| too large. The attribute is now left unchanged if the assignment fails. | |
| .. | |
| .. date: 2026-08-20-12-05-00 | |
| .. gh-issue: 156100 | |
| .. nonce: Lm7qWz | |
| .. section: Library | |
| Fix crashes in :class:`sqlite3.Connection` when deleting the | |
| :attr:`~sqlite3.Connection.autocommit` attribute or setting it to an integer | |
| which does not fit in C :c:expr:`long`. Both now raise an exception. | |
| .. | |
| .. date: 2026-08-20-12-00-00 | |
| .. gh-issue: 156099 | |
| .. nonce: Kp4vRt | |
| .. section: Library | |
| Fix a crash when deleting the ``keylog_filename`` attribute of | |
| :class:`ssl.SSLContext`. It now raises :exc:`AttributeError`. | |
| .. | |
| .. date: 2026-08-19-21-01-19 | |
| .. gh-issue: 156067 | |
| .. nonce: 1CXkqc | |
| .. section: Library | |
| Fix error handling in the :mod:`zoneinfo` accelerator module when a | |
| transition index is ``-1`` or a TZ string's ``__bool__`` raises. | |
| .. | |
| .. date: 2026-08-18-13-41-00 | |
| .. gh-issue: 155997 | |
| .. nonce: CjbD1F | |
| .. section: Library | |
| Fix :func:`concurrent.interpreters.list_all`. It failed if an interpreter | |
| was destroyed during the call, in particular by a garbage collection which | |
| finalized the object owning the last reference to it. | |
| .. | |
| .. date: 2026-08-17-22-51-22 | |
| .. gh-issue: 155974 | |
| .. nonce: Qz3Vb7 | |
| .. section: Library | |
| Fix a regression in Python 3.15: :meth:`~curses.window.addstr`, | |
| :meth:`~curses.window.addnstr`, :meth:`~curses.window.insstr` and | |
| :meth:`~curses.window.insnstr` again restore the window attributes when the | |
| write fails, instead of leaving the temporary *attr* applied. | |
| .. | |
| .. date: 2026-08-17-21-00-00 | |
| .. gh-issue: 155941 | |
| .. nonce: strmCb | |
| .. section: Library | |
| Fix :func:`asyncio.start_server` when a plain-function *client_connected_cb* | |
| raises: the error is now reported like the coroutine case and the transport | |
| is closed, instead of leaving the connection open forever (which also made | |
| :meth:`asyncio.Server.wait_closed` hang). | |
| .. | |
| .. date: 2026-08-17-18-00-00 | |
| .. gh-issue: 155934 | |
| .. nonce: acCept | |
| .. section: Library | |
| Fix a socket leak in :mod:`asyncio` when transport creation fails for a | |
| connection accepted by a server, and report the error via the loop exception | |
| handler even when debug mode is disabled. | |
| .. | |
| .. date: 2026-08-17-17-39-41 | |
| .. gh-issue: 155966 | |
| .. nonce: 0YOADY | |
| .. section: Library | |
| :func:`math.tanpi` now raises :exc:`ValueError` for half-integer values | |
| (e.g., ``tanpi(1.5)``), as these are poles of the function. | |
| .. | |
| .. date: 2026-08-17-12-40-00 | |
| .. gh-issue: 155952 | |
| .. nonce: Vq3Lm8 | |
| .. section: Library | |
| Fix the signatures of :meth:`sqlite3.Connection.execute`, | |
| :func:`warnings.warn` and :func:`locale.setlocale` which rendered | |
| ``<unrepresentable>`` instead of the correct defaults for parameters. | |
| .. | |
| .. date: 2026-08-17-12-07-38 | |
| .. gh-issue: 155596 | |
| .. nonce: Rt4mZq | |
| .. section: Library | |
| Fix :func:`pprint.pprint` and :func:`pprint.pformat` with ``expand=True`` | |
| not honouring *width* for nested values. The width of the ``'key':`` prefix | |
| was not counted when deciding whether a value fitted on the current line, so | |
| values under long keys could overflow *width* instead of being expanded. | |
| .. | |
| .. date: 2026-08-16-11-38-17 | |
| .. gh-issue: 155888 | |
| .. nonce: pO-nAp | |
| .. section: Library | |
| Fix :meth:`asyncio.WriteTransport.writelines` hanging the transport when the | |
| last data chunk is empty. | |
| .. | |
| .. date: 2026-08-15-21-55-31 | |
| .. gh-issue: 155869 | |
| .. nonce: yRUnQW | |
| .. section: Library | |
| Fix :meth:`!reorganize` in :mod:`dbm.dumb` failing to persist updated value | |
| offsets, which could cause data loss after reopening the database. | |
| .. | |
| .. date: 2026-08-15-18-16-16 | |
| .. gh-issue: 121291 | |
| .. nonce: WljPkh | |
| .. section: Library | |
| :class:`enum.Flag` (and :class:`enum.IntFlag`) subclasses no longer have a | |
| mixin base's own ``__or__``, ``__and__``, ``__xor__``, ``__ror__``, | |
| ``__rand__``, ``__rxor__``, or ``__invert__`` override silently replaced by | |
| :class:`~enum.Flag`'s default implementation. | |
| .. | |
| .. date: 2026-08-15-17-40-12 | |
| .. gh-issue: 155863 | |
| .. nonce: Kw3Vqp | |
| .. section: Library | |
| Add the ``WACS_*`` constants to the :mod:`curses` module. They are the | |
| counterparts of the ``ACS_*`` line-drawing codes as | |
| :class:`curses.complexchar` cells, and are added, like the latter, by | |
| :func:`curses.initscr` and :func:`curses.newterm`. | |
| .. | |
| .. date: 2026-08-15-13-54-22 | |
| .. gh-issue: 155843 | |
| .. nonce: PD5Af3 | |
| .. section: Library | |
| :mod:`hmac`: ensure that HMAC objects are properly initialized to prevent | |
| rare crashes on allocation failures. Patch by Bénédikt Tran. | |
| .. | |
| .. date: 2026-08-15-13-18-01 | |
| .. gh-issue: 155835 | |
| .. nonce: mlyLWp | |
| .. section: Library | |
| :mod:`hashlib`: Fix a data race when accessing | |
| :attr:`~hashlib.hash.digest_size` on BLAKE-2 objects. Patch by Bénédikt | |
| Tran. | |
| .. | |
| .. date: 2026-08-15-13-12-09 | |
| .. gh-issue: 155835 | |
| .. nonce: DsbSmy | |
| .. section: Library | |
| :mod:`hashlib`: Fix data races when accessing | |
| :attr:`~hashlib.hash.digest_size` and :attr:`~hashlib.hash.block_size` on | |
| SHA-3 objects. Patch by Bénédikt Tran. | |
| .. | |
| .. date: 2026-08-15-10-20-40 | |
| .. gh-issue: 155811 | |
| .. nonce: knP-YB | |
| .. section: Library | |
| Add a sequence counter to GC statistics to prevent :mod:`!_remote_debugging` | |
| returning inconsistent snapshots caused by non-atomic reads. Patch by | |
| Maurycy Pawłowski-Wieroński. | |
| .. | |
| .. date: 2026-08-15-09-47-23 | |
| .. gh-issue: 155717 | |
| .. nonce: jWFLR2 | |
| .. section: Library | |
| :mod:`multiprocessing`'s default start method is now :ref:`"spawn" | |
| <multiprocessing-start-methods>` instead of ``"forkserver"`` when there is | |
| no writable temporary directory, such as on a read-only file system. | |
| Previously starting a process failed with an :exc:`OSError` there. Patch by | |
| Bénédikt Tran. | |
| .. | |
| .. date: 2026-08-14-14-10-00 | |
| .. gh-issue: 155775 | |
| .. nonce: Kq3vTx | |
| .. section: Library | |
| Fix a regression in :mod:`imaplib` introduced in the fix for :gh:`63121`: | |
| refreshing the capabilities after a successful :meth:`~imaplib.IMAP4.login` | |
| or :meth:`~imaplib.IMAP4.authenticate` consumed the ``CAPABILITY`` response, | |
| so it could no longer be read with :meth:`~imaplib.IMAP4.response`. | |
| .. | |
| .. date: 2026-08-14-12-46-07 | |
| .. gh-issue: 113318 | |
| .. nonce: DYGQjo | |
| .. section: Library | |
| Fix crashes when deleting an attribute whose setter is generated by Argument | |
| Clinic and is not prepared for deletion, among them | |
| :attr:`frame.f_trace_opcodes` and the ``context``, ``owner`` and ``session`` | |
| attributes of ``_ssl._SSLSocket``. Deleting such attribute now raises | |
| :exc:`AttributeError`. | |
| .. | |
| .. date: 2026-08-14-11-12-18 | |
| .. gh-issue: 155781 | |
| .. nonce: sqlite-converter | |
| .. section: Library | |
| Fix a possible crash in free-threaded builds when the :mod:`sqlite3` | |
| converter registry is modified concurrently while a cursor builds its row | |
| cast map. | |
| .. | |
| .. date: 2026-08-14-10-49-45 | |
| .. gh-issue: 83371 | |
| .. nonce: Km4Rt7 | |
| .. section: Library | |
| Fix a deadlock in :class:`multiprocessing.pool.Pool` when *callback* or | |
| *error_callback* raises an exception. It killed the thread which handles | |
| results, so that the pool hung forever. The exception is now the result of | |
| the job, as an error raised while iterating the input, and is raised by | |
| :meth:`!AsyncResult.get`. | |
| .. | |
| .. date: 2026-08-13-16-02-13 | |
| .. gh-issue: 155702 | |
| .. nonce: Kb7Qm4 | |
| .. section: Library | |
| Fix :class:`sqlite3.Blob` slice assignment with a step. It patched the bytes | |
| object read from the blob, which for a single byte is an immortal singleton, | |
| so that the value of that byte was changed in the whole process. | |
| .. | |
| .. date: 2026-08-12-22-15-00 | |
| .. gh-issue: 90756 | |
| .. nonce: Qn7dLm | |
| .. section: Library | |
| :meth:`xml.etree.ElementTree.ElementTree.write` now treats the ``utf-8-sig`` | |
| encoding as ``utf-8`` in the XML declaration. | |
| .. | |
| .. date: 2026-08-12-21-34-12 | |
| .. gh-issue: 44871 | |
| .. nonce: Rt7Nv2 | |
| .. section: Library | |
| Parser objects of the :mod:`XML parser <xml.parsers.expat>` have a new | |
| method :meth:`!GetSpecifiedAttributeCount`. It tells how many of the | |
| attributes reported to :attr:`!StartElementHandler` were given in the start | |
| tag rather than defaulted from the DTD. | |
| .. | |
| .. date: 2026-08-12-21-34-12 | |
| .. gh-issue: 44871 | |
| .. nonce: Qw3Lm8 | |
| .. section: Library | |
| :mod:`xml.dom.minidom` now conforms closer to the DOM Level 1 specification. | |
| The factory methods now raise :exc:`~xml.dom.InvalidCharacterErr` if the | |
| name is not a valid XML name. Removing an absent attribute with | |
| :meth:`!Element.removeAttribute` or :meth:`!Element.removeAttributeNS` no | |
| longer raises :exc:`~xml.dom.NotFoundErr`, it has no effect as the DOM | |
| specifies. Inserting or setting a node created by another document now | |
| raises :exc:`~xml.dom.WrongDocumentErr`, setting an attribute node which | |
| belongs to another element now raises :exc:`~xml.dom.InuseAttributeErr`, and | |
| inserting a node into itself or its descendant now raises | |
| :exc:`~xml.dom.HierarchyRequestErr`. A document can no longer have two | |
| element or two document type children, and a document fragment can no longer | |
| have notation children. Attributes defaulted in the DTD are no longer | |
| omitted when parsing, and :attr:`!Attr.specified` now reports whether the | |
| attribute was given in the start tag. :class:`!EntityReference` nodes and | |
| :meth:`!Document.createEntityReference` are now implemented. | |
| .. | |
| .. date: 2026-08-12-14-30-00 | |
| .. gh-issue: 80762 | |
| .. nonce: Kp3vQa | |
| .. section: Library | |
| Fix :func:`dir` on :class:`unittest.mock.Mock` objects created with a tuple | |
| *spec*: it raised :exc:`TypeError`. Such *spec* is now also documented. | |
| .. | |
| .. date: 2026-08-12-09-30-00 | |
| .. gh-issue: 61366 | |
| .. nonce: Wr7cKm | |
| .. section: Library | |
| :meth:`!http.cookiejar.MozillaCookieJar.save` now writes ``0`` in the | |
| expiration time field for session cookies, as curl and Wget do. Previously | |
| this field was left empty, and such lines were ignored by curl and Wget. | |
| .. | |
| .. date: 2026-08-10-22-23-29 | |
| .. gh-issue: 153400 | |
| .. nonce: nucElC | |
| .. section: Library | |
| On Linux, :func:`os.copy_file_range` and :func:`os.memfd_create` now fall | |
| back to the raw syscall when the libc Python is built against does not | |
| provide the wrapper function, so they stay available on interpreters built | |
| against a libc older than glibc 2.27. | |
| .. | |
| .. date: 2026-08-10-22-11-15 | |
| .. gh-issue: 153400 | |
| .. nonce: Ds3GI3 | |
| .. section: Library | |
| :mod:`os` and :mod:`signal`: Use glibc functions instead of ``syscall()``: | |
| ``pidfd_open()``, ``pidfd_getfd()`` and ``pidfd_send_signal()`` (glibc | |
| 2.36), ``gettid()`` and ``getdents64()`` (glibc 2.30), and ``getrandom()`` | |
| (glibc 2.25). Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-08-10-19-49-12 | |
| .. gh-issue: 155496 | |
| .. nonce: tJtiAt | |
| .. section: Library | |
| The ``ctypes.set_errno`` and ``ctypes.set_last_error`` auditing events are | |
| now raised after the argument is converted to an integer, therefore they are | |
| no longer raised if the argument is invalid. | |
| .. | |
| .. date: 2026-08-10-19-49-11 | |
| .. gh-issue: 155496 | |
| .. nonce: B4rMR1 | |
| .. section: Library | |
| :meth:`io.RawIOBase.readinto` and :meth:`io.RawIOBase.write` now raise | |
| :exc:`TypeError` instead of :exc:`NotImplementedError` if they are called | |
| without the required argument. | |
| .. | |
| .. date: 2026-08-10-15-24-13 | |
| .. gh-issue: 155468 | |
| .. nonce: W7qL2p | |
| .. section: Library | |
| Fix :mod:`netrc` to distinguish empty quoted tokens from end-of-file, so | |
| malformed files no longer cause the remaining content to be silently | |
| ignored. | |
| .. | |
| .. date: 2026-08-10-13-27-36 | |
| .. gh-issue: 155519 | |
| .. nonce: 9M6SFX | |
| .. section: Library | |
| Avoid a data-race in free-threaded builds when reading and writing context | |
| variables from different threads. | |
| .. | |
| .. date: 2026-08-10-09-00-18 | |
| .. gh-issue: 155336 | |
| .. nonce: vrTXoU | |
| .. section: Library | |
| Fix error handling in :func:`socket.gethostbyaddr` and | |
| :func:`socket.gethostbyname_ex` when hostname resolution fails. | |
| .. | |
| .. date: 2026-08-09-21-30-00 | |
| .. gh-issue: 118318 | |
| .. nonce: Xr4Kd8 | |
| .. section: Library | |
| Remove the ``write_c14n()`` method of | |
| :class:`xml.etree.ElementTree.ElementTree` and the support of | |
| ``method="c14n"`` in :meth:`~xml.etree.ElementTree.ElementTree.write` and | |
| :func:`~xml.etree.ElementTree.tostring`. They never worked and always | |
| raised :exc:`ValueError`. Use :func:`xml.etree.ElementTree.canonicalize` | |
| instead. | |
| .. | |
| .. date: 2026-08-09-16-14-38 | |
| .. gh-issue: 155433 | |
| .. nonce: KL7tHV | |
| .. section: Library | |
| Fix :class:`asyncio.TaskGroup` losing outside cancellation after | |
| ``cancel()``. | |
| .. | |
| .. date: 2026-08-09-14-27-23 | |
| .. gh-issue: 155418 | |
| .. nonce: kCXUIG | |
| .. section: Library | |
| Fix :class:`asyncio.TaskGroup` hang when a task created by | |
| :func:`asyncio.eager_task_factory` cancels the group before suspending. | |
| .. | |
| .. date: 2026-08-09-01-30-00 | |
| .. gh-issue: 102475 | |
| .. nonce: rpjoin | |
| .. section: Library | |
| Fix :func:`os.path.realpath` on Windows: the unresolved part of the path is | |
| now appended, not joined, so a file name which looks like a drive (e.g. | |
| ``spam:eggs``) no longer discards the resolved part. A path relative to | |
| another drive is now resolved against the root directory of that drive. | |
| .. | |
| .. date: 2026-08-09-00-30-00 | |
| .. gh-issue: 89760 | |
| .. nonce: rpvol | |
| .. section: Library | |
| Fix :func:`os.path.realpath` on Windows: the ``\\?\`` prefix is no longer | |
| stripped from a volume GUID path, which made the result invalid. | |
| .. | |
| .. date: 2026-08-08-21-40-00 | |
| .. gh-issue: 84419 | |
| .. nonce: statexe | |
| .. section: Library | |
| Fix :func:`os.stat` on Windows: trailing dots and spaces, which are ignored | |
| by the operating system, are no longer taken into account when the execute | |
| permissions are guessed from the file extension. | |
| .. | |
| .. date: 2026-08-08-18-30-00 | |
| .. gh-issue: 111331 | |
| .. nonce: bioclose | |
| .. section: Library | |
| Closing a :class:`io.BytesIO` object which has exported buffers no longer | |
| fails with :exc:`BufferError`. The exported buffers keep the data alive and | |
| stay usable. As a result, destroying or garbage collecting such object no | |
| longer emits an unraisable exception. | |
| .. | |
| .. date: 2026-08-08-09-14-22 | |
| .. gh-issue: 108885 | |
| .. nonce: C4ktfw | |
| .. section: Library | |
| Doctests run by the :mod:`unittest` test runner now report every example, as | |
| in verbose mode, if the runner reports more than the test names, i.e. its | |
| verbosity is 3 or higher. The :option:`!-v` option of :mod:`unittest` can | |
| now be repeated, so ``python -m unittest -vv`` asks for this. Added also | |
| the :attr:`~unittest.TestResult.verbosity` attribute of | |
| :class:`unittest.TestResult`. | |
| .. | |
| .. date: 2026-08-07-02-20-00 | |
| .. gh-issue: 155319 | |
| .. nonce: srcline | |
| .. section: Library | |
| :func:`warnings.warn_explicit` now displays the source line taken from the | |
| loader of the module whose globals are passed as *module_globals*. It also | |
| no longer raises :exc:`IndexError` if *lineno* is out of the range of the | |
| module source. | |
| .. | |
| .. date: 2026-08-07-01-10-00 | |
| .. gh-issue: 123011 | |
| .. nonce: warnexp | |
| .. section: Library | |
| :func:`warnings.warn_explicit` no longer emits a spurious | |
| :exc:`DeprecationWarning` or raises :exc:`ImportError` when it is called | |
| with the globals of the :mod:`__main__` module. | |
| .. | |
| .. date: 2026-08-05-17-30-00 | |
| .. gh-issue: 69370 | |
| .. nonce: inspCLI | |
| .. section: Library | |
| :program:`python -m inspect --details` no longer fails with | |
| :exc:`UnicodeEncodeError` if the path of the module contains characters | |
| unencodable in the encoding of :data:`sys.stdout`. Such characters are now | |
| escaped with backslashes. | |
| .. | |
| .. date: 2026-08-05-16-40-00 | |
| .. gh-issue: 69371 | |
| .. nonce: pyDocU | |
| .. section: Library | |
| Fix :mod:`pydoc` for modules whose path contains undecodable bytes. | |
| :func:`!pydoc.writedoc` and the pydoc HTTP server no longer fail with | |
| :exc:`UnicodeEncodeError`: the file URL is now percent-encoded using the | |
| filesystem encoding, and characters unencodable in the generated HTML page | |
| are escaped with backslashes. | |
| .. | |
| .. date: 2026-08-05-16-30-12 | |
| .. gh-issue: 155236 | |
| .. nonce: Kd7pQr | |
| .. section: Library | |
| Add the *dedent* parameter in :func:`inspect.cleandoc` and | |
| :func:`inspect.getdoc`. :mod:`pydoc` no longer dedents documentation | |
| strings, so the indentation of the parameter descriptions generated by | |
| Argument Clinic is preserved. | |
| .. | |
| .. date: 2026-08-05-02-36-18 | |
| .. gh-issue: 155009 | |
| .. nonce: YiJAiP | |
| .. section: Library | |
| Fix :class:`argparse.ArgumentParser` to preserve the program name from | |
| ``sys.argv[0]`` when a named module is executed as the main program without | |
| replacing ``sys.argv[0]``. | |
| .. | |
| .. date: 2026-08-04-19-50-52 | |
| .. gh-issue: 150942 | |
| .. nonce: B8ytes | |
| .. section: Library | |
| Improve the performance of :meth:`~io.IOBase.readlines` for | |
| :class:`io.BytesIO`. | |
| .. | |
| .. date: 2026-08-04-19-03-20 | |
| .. gh-issue: 155063 | |
| .. nonce: gN_mCU | |
| .. section: Library | |
| Bump the version of pip bundled in ensurepip to version 26.2.1 | |
| .. | |
| .. date: 2026-08-04-14-14-31 | |
| .. gh-issue: 153711 | |
| .. nonce: PBpc1g | |
| .. section: Library | |
| On macOS, add run-time checks around the syscalls :manpage:`pipe2 (2)` and | |
| :manpage:`dup3 (2)`, in addition to the existing build-time checks. This | |
| means that Python built on macOS 27 (where these calls are available) can | |
| run on macOS 26 (where they aren't). | |
| .. | |
| .. date: 2026-08-03-22-46-07 | |
| .. gh-issue: 155143 | |
| .. nonce: 9-byZp | |
| .. section: Library | |
| Fix :func:`asyncio.shield` leaking the calling task via the await-graph and | |
| callbacks when called on a future that never resolves. | |
| .. | |
| .. date: 2026-08-01-23-50-47 | |
| .. gh-issue: 75008 | |
| .. nonce: 0Boa3r | |
| .. section: Library | |
| :meth:`csv.Sniffer.sniff` now detects the *lineterminator* parameter by a | |
| majority vote among the line endings of the sample. | |
| .. | |
| .. date: 2026-08-01-21-00-00 | |
| .. gh-issue: 155051 | |
| .. nonce: Lc1Non | |
| .. section: Library | |
| :func:`decimal.localcontext` now raises :exc:`TypeError` if a keyword | |
| argument is ``None``, as the pure Python implementation already did. | |
| Previously the C implementation silently ignored it. | |
| .. | |
| .. date: 2026-08-01-20-21-37 | |
| .. gh-issue: 99772 | |
| .. nonce: q7M3vP | |
| .. section: Library | |
| Fix comparisons and hashing of :class:`datetime.time` objects with | |
| sub-minute UTC offsets. | |
| .. | |
| .. date: 2026-08-01-19-05-00 | |
| .. gh-issue: 155044 | |
| .. nonce: Op1Val | |
| .. section: Library | |
| :class:`optparse.Values` objects now support :func:`copy.replace`. | |
| .. | |
| .. date: 2026-08-01-19-04-00 | |
| .. gh-issue: 155043 | |
| .. nonce: Ar1Nsp | |
| .. section: Library | |
| :class:`argparse.Namespace` objects now support :func:`copy.replace`. | |
| .. | |
| .. date: 2026-08-01-19-02-00 | |
| .. gh-issue: 155041 | |
| .. nonce: Dc1Ctx | |
| .. section: Library | |
| :class:`decimal.Context` objects now support :func:`copy.replace`. | |
| .. | |
| .. date: 2026-08-01-19-01-00 | |
| .. gh-issue: 155040 | |
| .. nonce: Tr1nFo | |
| .. section: Library | |
| :class:`tarfile.TarInfo` objects now support :func:`copy.replace`. | |
| .. | |
| .. date: 2026-08-01-18-37-56 | |
| .. gh-issue: 155063 | |
| .. nonce: xC9PcH | |
| .. section: Library | |
| Bump the version of pip bundled in ensurepip to version 26.2 | |
| .. | |
| .. date: 2026-08-01-12-00-00 | |
| .. gh-issue: 155033 | |
| .. nonce: dR3pLc | |
| .. section: Library | |
| CSV dialects (instances of :class:`csv.Dialect` subclasses and dialect | |
| objects returned by :func:`csv.get_dialect`) now support | |
| :func:`copy.replace`. | |
| .. | |
| .. date: 2026-07-30-23-29-56 | |
| .. gh-issue: 154936 | |
| .. nonce: a90443 | |
| .. section: Library | |
| Fix the pure Python :mod:`json` decoder to report the correct position for | |
| invalid literal control characters in JSON strings. | |
| .. | |
| .. date: 2026-07-30-02-15-00 | |
| .. gh-issue: 154904 | |
| .. nonce: Kx9mAq | |
| .. section: Library | |
| Speed up :mod:`shutil` import by probing the ``_bz2``, ``_lzma`` and | |
| ``_zstd`` extension modules instead of importing the :mod:`bz2`, :mod:`lzma` | |
| and :mod:`compression.zstd` wrappers, which are now only imported when an | |
| archive is actually created or extracted. | |
| .. | |
| .. date: 2026-07-29-21-37-39 | |
| .. gh-issue: 154892 | |
| .. nonce: eQyJ3Z | |
| .. section: Library | |
| Fix a bug in the C accelerator for :mod:`zoneinfo` where | |
| :class:`datetime.datetime` subclasses returning ``-1`` for ``hour``, | |
| ``minute``, or ``second`` could incorrectly raise a :exc:`SystemError`. | |
| .. | |
| .. date: 2026-07-29-19-48-59 | |
| .. gh-issue: 154871 | |
| .. nonce: tgZILS | |
| .. section: Library | |
| Fixed a crash in :meth:`asyncio.Task.get_context` when called on an | |
| uninitialized task. | |
| .. | |
| .. date: 2026-07-29-18-30-00 | |
| .. gh-issue: 154848 | |
| .. nonce: Fr4meB | |
| .. section: Library | |
| The :mod:`pickle` C accelerator now enforces frame boundaries when | |
| unpickling, as the pure Python implementation already did. An argument that | |
| straddles a frame boundary, or a frame that begins before the previous one | |
| has ended, now raises :exc:`pickle.UnpicklingError` instead of being | |
| silently read across the boundary. This prevents the loaded data from | |
| diverging from the :mod:`pickletools` disassembly of the same pickle. | |
| .. | |
| .. date: 2026-07-29-16-53-50 | |
| .. gh-issue: 154885 | |
| .. nonce: ptofmI | |
| .. section: Library | |
| :func:`os.get_terminal_size` now checks ``isatty`` before calling ``ioctl``, | |
| which reduces log noise on Android. | |
| .. | |
| .. date: 2026-07-29-14-20-40 | |
| .. gh-issue: 154855 | |
| .. nonce: vfF453 | |
| .. section: Library | |
| Fix :meth:`curses.window.instr`, :meth:`~curses.window.in_wstr` and | |
| :meth:`~curses.window.in_wchstr` returning one character too few when the | |
| :mod:`curses` module is built against a curses library that counts the | |
| terminator in the requested length, such as the NetBSD one. | |
| .. | |
| .. date: 2026-07-29-11-58-17 | |
| .. gh-issue: 154874 | |
| .. nonce: NAPdBp | |
| .. section: Library | |
| Fix :func:`curses.termattrs` returning a negative value on a terminal that | |
| supports :const:`curses.A_ITALIC`, which left its result unusable as an | |
| attribute mask. | |
| .. | |
| .. date: 2026-07-29-11-05-00 | |
| .. gh-issue: 151728 | |
| .. nonce: Kq3vTn | |
| .. section: Library | |
| Clear the internal :mod:`typing` caches from an exit handler. Previously, an | |
| extension module that leaked a reference to :mod:`typing` would also keep | |
| every subscripted type alive past interpreter shutdown, including types | |
| owned by unrelated extension modules. | |
| .. | |
| .. date: 2026-07-28-08-02-41 | |
| .. gh-issue: 154791 | |
| .. nonce: ey7POa | |
| .. section: Library | |
| Fix :class:`asyncio.Future` (C implementation) losing the initial exception | |
| traceback frames when ``Future.result()`` is called more than once. | |
| Previously, the C implementation cleared the stored traceback after the | |
| first call, causing subsequent raises to omit the original raise site. The | |
| pure-Python implementation was unaffected. | |
| .. | |
| .. date: 2026-07-27-12-00-00 | |
| .. gh-issue: 94984 | |
| .. nonce: Xr3vFq | |
| .. section: Library | |
| Add the *mode* parameter to :meth:`asyncio.loop.create_unix_server` and | |
| :func:`asyncio.start_unix_server` to set the permissions of the Unix socket | |
| file created for *path*, applied before the server starts accepting | |
| connections. | |
| .. | |
| .. date: 2026-07-26-13-40-00 | |
| .. gh-issue: 154744 | |
| .. nonce: Sk1Psp | |
| .. section: Library | |
| Improve detection of ``skipinitialspace`` in :meth:`csv.Sniffer.sniff`. | |
| .. | |
| .. date: 2026-07-26-11-45-34 | |
| .. gh-issue: 154726 | |
| .. nonce: hLJk5- | |
| .. section: Library | |
| Fix :func:`shutil.copyfile` to copy a symbolic link to a special file when | |
| ``follow_symlinks=False`` instead of raising | |
| :exc:`~shutil.SpecialFileError`. | |
| .. | |
| .. date: 2026-07-26-00-00-00 | |
| .. gh-issue: 154738 | |
| .. nonce: Rd5Pxe | |
| .. section: Library | |
| Fix :meth:`!ExternalEntityParserCreate` not propagating the reparse-deferral | |
| setting to the subparser, which left :meth:`!GetReparseDeferralEnabled` | |
| returning an uninitialized value. Patch by tonghuaroot. | |
| .. | |
| .. date: 2026-07-25-13-30-00 | |
| .. gh-issue: 93251 | |
| .. nonce: gAiErr | |
| .. section: Library | |
| Fix :exc:`UnicodeDecodeError` in :mod:`socket` functions (such as | |
| :func:`~socket.getaddrinfo` and :func:`~socket.gethostbyaddr`) when the | |
| localized error message of the C library is not UTF-8: decode it from the | |
| locale encoding. | |
| .. | |
| .. date: 2026-07-24-21-49-45 | |
| .. gh-issue: 148468 | |
| .. nonce: pHoF_Q | |
| .. section: Library | |
| Fix a regression in :mod:`argparse` where colorized argument help containing | |
| format specifiers did not accept string-like proxy objects. | |
| .. | |
| .. date: 2026-07-24-17-02-46 | |
| .. gh-issue: 154638 | |
| .. nonce: 7YnFHH | |
| .. section: Library | |
| Improve import time of :mod:`argparse` by lazily importing several | |
| dependencies. | |
| .. | |
| .. date: 2026-07-24-15-54-35 | |
| .. gh-issue: 142035 | |
| .. nonce: ZpNfl6 | |
| .. section: Library | |
| Fix incorrect wrapping of :mod:`argparse` help text when color is enabled. | |
| .. | |
| .. date: 2026-07-24-12-29-15 | |
| .. gh-issue: 135736 | |
| .. nonce: DyvA2m | |
| .. section: Library | |
| Fix ::class:`asyncio.TaskGroup` to not wrap a :exc:`GeneratorExit` into a | |
| :exc:`BaseExceptionGroup` if it was raised by the body of the task group and | |
| none of the tasks in the group raised exceptions. | |
| .. | |
| .. date: 2026-07-24-00-02-00 | |
| .. gh-issue: 154594 | |
| .. nonce: Xk7mQ2 | |
| .. section: Library | |
| Fix :func:`copy.deepcopy` so that an object whose deep copy is ``None`` is | |
| still memoized. Patch by tonghuaroot. | |
| .. | |
| .. date: 2026-07-23-21-00-00 | |
| .. gh-issue: 154568 | |
| .. nonce: float16-reconstructor | |
| .. section: Library | |
| Fix :mod:`array` unpickling of little-endian float16. | |
| .. | |
| .. date: 2026-07-23-20-00-00 | |
| .. gh-issue: 154566 | |
| .. nonce: byteswap-zd | |
| .. section: Library | |
| Fix :meth:`array.array.byteswap` corrupting data for ``'Zd'`` (complex | |
| double) arrays with more than one element: the 16-byte item loop advanced | |
| the buffer pointer by only 8 bytes per iteration, causing items after the | |
| first to be scrambled. | |
| .. | |
| .. date: 2026-07-23-19-45-00 | |
| .. gh-issue: 154551 | |
| .. nonce: Ct7pL9 | |
| .. section: Library | |
| Fix :func:`ctypes.util.find_library` returning ``None`` in non-UTF-8 | |
| locales. | |
| .. | |
| .. date: 2026-07-23-18-53-48 | |
| .. gh-issue: 154523 | |
| .. nonce: XUSRBO | |
| .. section: Library | |
| Fixed data-race when calling :meth:`io.TextIOBase.detach` in | |
| :term:`free-threaded build`. | |
| .. | |
| .. date: 2026-07-23-14-13-39 | |
| .. gh-issue: 135683 | |
| .. nonce: droBu7 | |
| .. section: Library | |
| :class:`logging.FileHandler` and | |
| :class:`logging.handlers.WatchedFileHandler` now honor | |
| :data:`logging.raiseExceptions` for errors that occur while opening the | |
| file, like for other errors during logging. | |
| .. | |
| .. date: 2026-07-23-13-09-25 | |
| .. gh-issue: 154199 | |
| .. nonce: hmBfrS | |
| .. section: Library | |
| Make :func:`ctypes.util.find_msvcrt` always return ``None`` for | |
| compatibility reasons. | |
| .. | |
| .. date: 2026-07-23-12-27-52 | |
| .. gh-issue: 135736 | |
| .. nonce: hkuGvu | |
| .. section: Library | |
| Fix :class:`asyncio.TaskGroup` silently discarding errors from sibling tasks | |
| whenever the ``async with`` block exits with a :exc:`SystemExit` or | |
| :exc:`KeyboardInterrupt`. These errors are now reported via | |
| :meth:`loop.call_exception_handler() <asyncio.loop.call_exception_handler>` | |
| instead of being lost. | |
| .. | |
| .. date: 2026-07-23-06-53-01 | |
| .. gh-issue: 79366 | |
| .. nonce: 3gMT7I | |
| .. section: Library | |
| Fixed a race condition in :mod:`logging`: if a handler was removed while a | |
| record was being emitted, the following handlers of the same logger could be | |
| skipped. | |
| .. | |
| .. date: 2026-07-22-19-21-20 | |
| .. gh-issue: 82535 | |
| .. nonce: METFqd | |
| .. section: Library | |
| :class:`logging.handlers.SysLogHandler` no longer fails if the address | |
| cannot be resolved when the handler is created. The address is resolved | |
| again when a record is emitted. | |
| .. | |
| .. date: 2026-07-22-17-35-24 | |
| .. gh-issue: 70990 | |
| .. nonce: xVHKwt | |
| .. section: Library | |
| :class:`logging.handlers.SysLogHandler` now accepts a :class:`bytes` address | |
| of a Unix domain socket, including an address in the abstract namespace. | |
| Previously only :class:`str` was recognized, and a :class:`bytes` address | |
| raised :exc:`ValueError`. | |
| .. | |
| .. date: 2026-07-22-15-56-11 | |
| .. gh-issue: 154189 | |
| .. nonce: 7zWWNZ | |
| .. section: Library | |
| Fixed a potential use-after-free when calling :func:`functools.partial`. | |
| Now, when invoking a :func:`~functools.partial` object, the stored function, | |
| positional arguments, and keyword arguments are preserved for the duration | |
| of the call in case of reentrancy. | |
| .. | |
| .. date: 2026-07-22-13-39-58 | |
| .. gh-issue: 154470 | |
| .. nonce: zGcz6K | |
| .. section: Library | |
| Fixed a spurious ``^J`` printed at the end of every source line by the | |
| ``list`` command of :mod:`pdb` when the output is colorized (for example | |
| when attaching to a running process). The source line is now stripped before | |
| it is colorized, like the ``where`` command already did. | |
| .. | |
| .. date: 2026-07-22-13-01-24 | |
| .. gh-issue: 73458 | |
| .. nonce: byxSPi | |
| .. section: Library | |
| Fix :func:`logging.config.listen`: it left the caller waiting for the | |
| ``ready`` event forever if the server could not be started, for example if | |
| the port was invalid or already in use. It now also binds to an IPv6 address | |
| if the host has no IPv4 address, for example if ``localhost`` is only | |
| aliased to ``::1``. | |
| .. | |
| .. date: 2026-07-22-13-00-00 | |
| .. gh-issue: 154460 | |
| .. nonce: wCsFtM | |
| .. section: Library | |
| Fix :func:`time.strftime` and :meth:`datetime.datetime.strftime` returning a | |
| wrong ISO 8601 week number (``%V``) on OpenBSD. | |
| .. | |
| .. date: 2026-07-22-12-59-26 | |
| .. gh-issue: 154467 | |
| .. nonce: AA9w1D | |
| .. section: Library | |
| Fixed :mod:`pdb` remote attaching (``python -m pdb -p PID``) sending an | |
| empty prompt to the client instead of ``(Pdb)`` when the target process has | |
| an interactive terminal. | |
| .. | |
| .. date: 2026-07-22-12-00-00 | |
| .. gh-issue: 153970 | |
| .. nonce: Kq7Wn3 | |
| .. section: Library | |
| Calling :func:`str` on a :exc:`subprocess.CalledProcessError` no longer | |
| raises :exc:`TypeError` when its :attr:`!returncode` is not an integer, such | |
| as ``None``. | |
| .. | |
| .. date: 2026-07-22-10-30-08 | |
| .. gh-issue: 154435 | |
| .. nonce: xCxm0T | |
| .. section: Library | |
| Fix :func:`os.posix_fadvise` and :func:`os.posix_fallocate` on DragonFly | |
| BSD: they raised :exc:`OSError` with a meaningless error code, because these | |
| functions return -1 and set ``errno`` there. | |
| .. | |
| .. date: 2026-07-21-21-36-59 | |
| .. gh-issue: 154399 | |
| .. nonce: VSa6oH | |
| .. section: Library | |
| Fix :mod:`venv` activation in a non-interactive csh: ``activate.csh`` no | |
| longer fails when the ``prompt`` variable is not set. | |
| .. | |
| .. date: 2026-07-21-20-34-05 | |
| .. gh-issue: 154389 | |
| .. nonce: DlTiii | |
| .. section: Library | |
| Fix :func:`uuid.uuid1` on OpenBSD: it returned a version 4 UUID, because | |
| ``uuid_create()`` generates random UUIDs on this platform. | |
| .. | |
| .. date: 2026-07-21-12-23-48 | |
| .. gh-issue: 154335 | |
| .. nonce: SRf8Gr | |
| .. section: Library | |
| The :mod:`profiling.sampling` profiler now respects ``NO_COLOR``, | |
| ``FORCE_COLOR``, and ``PYTHON_COLORS`` and avoids colored output when not | |
| writing to a terminal. | |
| .. | |
| .. date: 2026-07-21-08-31-55 | |
| .. gh-issue: 154324 | |
| .. nonce: vDxV5U | |
| .. section: Library | |
| Fix :func:`os.sendfile` on illumos: it no longer reports a successful | |
| transfer when the underlying system call failed without writing any data. | |
| .. | |
| .. date: 2026-07-21-01-13-39 | |
| .. gh-issue: 154307 | |
| .. nonce: UNFKL4 | |
| .. section: Library | |
| Fix :meth:`tempfile.TemporaryDirectory.cleanup` on DragonFly BSD, where | |
| removing a file with the ``UF_NOUNLINK`` flag failed with ``EISDIR`` instead | |
| of ``EPERM``. | |
| .. | |
| .. date: 2026-07-20-22-03-44 | |
| .. gh-issue: 154291 | |
| .. nonce: Mi5HeQ | |
| .. section: Library | |
| Fix :func:`socket.has_dualstack_ipv6` to return ``False`` on platforms such | |
| as DragonFly BSD where setting ``IPV6_V6ONLY`` to 0 silently has no effect. | |
| .. | |
| .. date: 2026-07-20-21-36-40 | |
| .. gh-issue: 154283 | |
| .. nonce: Xip7xE | |
| .. section: Library | |
| On DragonFly BSD, :func:`threading.get_native_id` now returns a value that | |
| is unique across processes, matching the other platforms. | |
| .. | |
| .. date: 2026-07-20-18-30-00 | |
| .. gh-issue: 154258 | |
| .. nonce: mmapresize | |
| .. section: Library | |
| Fix a crash in :meth:`mmap.mmap.resize` on NetBSD when growing a shared | |
| anonymous mapping. :meth:`!resize` now raises :exc:`ValueError` in this | |
| case, as it already did on Linux. | |
| .. | |
| .. date: 2026-07-20-17-15-00 | |
| .. gh-issue: 131565 | |
| .. nonce: dllist | |
| .. section: Library | |
| :func:`ctypes.util.dllist` now works on NetBSD. It is implemented in the | |
| :mod:`!_ctypes` extension module so that ``dl_iterate_phdr()`` reports all | |
| loaded shared libraries: on NetBSD it only reports the link-map group of the | |
| calling object, which excluded them when called through ctypes. | |
| .. | |
| .. date: 2026-07-20-14-10-00 | |
| .. gh-issue: 154225 | |
| .. nonce: openpty | |
| .. section: Library | |
| Fix :func:`os.openpty` on Solaris and illumos: it no longer leaves the | |
| pseudo-terminal as the controlling terminal of the calling process. | |
| .. | |
| .. date: 2026-07-20-14-00-00 | |
| .. gh-issue: 154227 | |
| .. nonce: openpt | |
| .. section: Library | |
| Fix :func:`os.posix_openpt` on OpenBSD, where it rejected the | |
| :data:`~os.O_CLOEXEC` flag. | |
| .. | |
| .. date: 2026-07-20-12-45-00 | |
| .. gh-issue: 139373 | |
| .. nonce: qL7xKm | |
| .. section: Library | |
| Fix :meth:`asyncio.subprocess.Process.communicate` losing already-read | |
| output when it is cancelled; the output is now retained and returned by a | |
| subsequent ``communicate()`` call. Patch by Kumar Aditya. | |
| .. | |
| .. date: 2026-07-20-12-40-00 | |
| .. gh-issue: 145030 | |
| .. nonce: TFJm6k | |
| .. section: Library | |
| Fix :mod:`asyncio` write pipe transports for named FIFOs on macOS and | |
| Solaris. Unread data sitting in the FIFO made the transport misinterpret a | |
| poll event as the reader disconnecting, wrongly closing the transport. | |
| .. | |
| .. date: 2026-07-19-22-08-05 | |
| .. gh-issue: 154194 | |
| .. nonce: 1bqRdx | |
| .. section: Library | |
| Fix the sampling profiler dropping entire samples when a non-fatal read | |
| fails; frames now keep any readable metadata, and long funcnames and | |
| filenames are truncated instead. Patch by Maurycy Pawłowski-Wieroński. | |
| .. | |
| .. date: 2026-07-19-21-30-00 | |
| .. gh-issue: 154176 | |
| .. nonce: strxfrm | |
| .. section: Library | |
| Fix a crash in :func:`locale.strxfrm` on DragonFly BSD, whose ``wcsxfrm()`` | |
| does not support the zero size. | |
| .. | |
| .. date: 2026-07-19-20-00-00 | |
| .. gh-issue: 154836 | |
| .. nonce: kqWait | |
| .. section: Library | |
| Fix :meth:`subprocess.Popen.wait` raising :exc:`TypeError` (macOS and other | |
| BSDs) or :exc:`OverflowError` (Linux) for very large *timeout* values such | |
| as ``float('inf')``, a 3.15 regression in the new event-driven wait. Also | |
| fix :meth:`select.kqueue.control` masking :exc:`OverflowError` for | |
| out-of-range timeouts as :exc:`TypeError`. | |
| .. | |
| .. date: 2026-07-19-19-05-00 | |
| .. gh-issue: 154146 | |
| .. nonce: acospi | |
| .. section: Library | |
| Fix accuracy of :func:`math.acospi` for arguments close to 1 on platforms | |
| that do not provide ``acospi()`` in libm. | |
| .. | |
| .. date: 2026-07-19-17-45-00 | |
| .. gh-issue: 153005 | |
| .. nonce: F6WH92 | |
| .. section: Library | |
| :meth:`!concurrent.interpreters.Queue.get` and | |
| :meth:`!concurrent.interpreters.Queue.put` now compute their ``timeout`` | |
| deadline from :func:`time.monotonic` instead of the wall clock, so adjusting | |
| the system clock during the call no longer makes them over- or under-wait. | |
| .. | |
| .. date: 2026-07-19-17-05-00 | |
| .. gh-issue: 153772 | |
| .. nonce: cobjTK | |
| .. section: Library | |
| :func:`isinstance` checks against :mod:`collections.abc` classes such as | |
| :class:`~collections.abc.Mapping` no longer raise :exc:`AttributeError` when | |
| the instance has no ``__class__``. The abstract base class machinery now | |
| falls back to the object's type in that case, matching the behaviour of the | |
| built-in :func:`isinstance`. | |
| .. | |
| .. date: 2026-07-19-14-00-00 | |
| .. gh-issue: 154090 | |
| .. nonce: q2kH1b | |
| .. section: Library | |
| Record the profiling mode in Tachyon binary profiles and reject differential | |
| comparisons whose known modes do not match. | |
| .. | |
| .. date: 2026-07-19-13-00-00 | |
| .. gh-issue: 154086 | |
| .. nonce: MJKrQV | |
| .. section: Library | |
| Store per-thread sample counts in Tachyon flamegraphs so filtering a thread | |
| updates frame widths and totals. | |
| .. | |
| .. date: 2026-07-19-12-10-00 | |
| .. gh-issue: 154060 | |
| .. nonce: cR6tYn | |
| .. section: Library | |
| Store measured duration and sampling rate in Tachyon binary profiles so they | |
| remain available in replayed flamegraphs. | |
| .. | |
| .. date: 2026-07-19-12-00-00 | |
| .. gh-issue: 154085 | |
| .. nonce: Qm8fLd | |
| .. section: Library | |
| Prevent differential flamegraphs from duplicating self time across line | |
| nodes for the same function. | |
| .. | |
| .. date: 2026-07-19-11-30-00 | |
| .. gh-issue: 154088 | |
| .. nonce: pC7nRa | |
| .. section: Library | |
| Make Tachyon count and render elided stacks consistently in differential | |
| flamegraphs. | |
| .. | |
| .. date: 2026-07-19-11-20-00 | |
| .. gh-issue: 154089 | |
| .. nonce: Vp2qHx | |
| .. section: Library | |
| Do not show unavailable sampling efficiency statistics in replayed Tachyon | |
| flamegraphs. | |
| .. | |
| .. date: 2026-07-19-11-00-00 | |
| .. gh-issue: 154062 | |
| .. nonce: N5ks3A | |
| .. section: Library | |
| Stop normalizing differential flamegraph baselines to the duration of the | |
| current profile. | |
| .. | |
| .. date: 2026-07-19-00-00-00 | |
| .. gh-issue: 154053 | |
| .. nonce: LibreSSLsigalgs | |
| .. section: Library | |
| Fix compilation of the :mod:`ssl` module against LibreSSL, which does not | |
| provide ``SSL_CTX_set1_sigalgs_list()`` and | |
| ``SSL_CTX_set1_client_sigalgs_list()``. The :meth:`!set_server_sigalgs` and | |
| :meth:`!set_client_sigalgs` methods of :class:`ssl.SSLContext` now raise | |
| :exc:`NotImplementedError` on LibreSSL. | |
| .. | |
| .. date: 2026-07-18-18-12-44 | |
| .. gh-issue: 154002 | |
| .. nonce: Qw9zTn | |
| .. section: Library | |
| The pure-Python :mod:`pickle` unpickler no longer replaces a | |
| :exc:`TypeError` raised by an old-style instance constructor with a new one | |
| carrying the traceback object in its ``args``. The original error now | |
| propagates, as it already did in the C implementation. | |
| .. | |
| .. date: 2026-07-18-17-09-49 | |
| .. gh-issue: 154001 | |
| .. nonce: 3brrUv | |
| .. section: Library | |
| Fix :func:`random.binomialvariate` raising :exc:`ZeroDivisionError` when | |
| :func:`random.random` returns zero. | |
| .. | |
| .. date: 2026-07-18-16-43-02 | |
| .. gh-issue: 118150 | |
| .. nonce: x0mV8P | |
| .. section: Library | |
| Expose automated junk heuristic kwarg-only flag ``autojunk`` from | |
| :class:`difflib.SequenceMatcher` to the public functions and class methods | |
| in the :mod:`difflib`. See :class:`difflib.SequenceMatcher` documentation | |
| for details and issue :gh:`118150` for the motivation. | |
| .. | |
| .. date: 2026-07-18-16-05-38 | |
| .. gh-issue: 153967 | |
| .. nonce: -OUNXe | |
| .. section: Library | |
| :meth:`argparse.ArgumentParser.print_usage` and | |
| :meth:`argparse.ArgumentParser.print_help` won't silently fail when an | |
| invalid file object is specified. Patch by Timothy Poon. | |
| .. | |
| .. date: 2026-07-18-13-30-00 | |
| .. gh-issue: 153906 | |
| .. nonce: mHtNdY | |
| .. section: Library | |
| Modernize the HTML output of :mod:`pydoc`: use semantic HTML5 markup and a | |
| new style sheet based on the python-docs-theme used by docs.python.org, with | |
| dark mode support. Class members inherited from other classes are now | |
| collapsed by default. | |
| .. | |
| .. date: 2026-07-18-11-16-41 | |
| .. gh-issue: 153908 | |
| .. nonce: 82FiGk | |
| .. section: Library | |
| Fix data race when calling :func:`repr` on :class:`itertools.count` under | |
| the :term:`free-threaded build`. | |
| .. | |
| .. date: 2026-07-18-10-52-10 | |
| .. gh-issue: 153896 | |
| .. nonce: 87oevp | |
| .. section: Library | |
| Deduplicate unhashable args in :data:`typing.Literal`. | |
| .. | |
| .. date: 2026-07-18-06-16-55 | |
| .. gh-issue: 153903 | |
| .. nonce: mJFrs8 | |
| .. section: Library | |
| Add :func:`ctypes.util.wrap_dll_function` for creating | |
| :class:`~ctypes._CFuncPtr` objects from a function signature. | |
| .. | |
| .. date: 2026-07-18-04-09-44 | |
| .. gh-issue: 81241 | |
| .. nonce: gGRbBr | |
| .. section: Library | |
| Fix :exc:`OSError` when importing :mod:`ctypes` from a statically linked | |
| interpreter. | |
| .. | |
| .. date: 2026-07-17-20-56-32 | |
| .. gh-issue: 153864 | |
| .. nonce: WmA9By | |
| .. section: Library | |
| On a wide :mod:`curses` build, :meth:`curses.window.insch` now inserts a | |
| non-ASCII byte as the character it encodes in the window's encoding, | |
| consistently with :meth:`~curses.window.addch`, instead of its code point. | |
| .. | |
| .. date: 2026-07-17-20-31-00 | |
| .. gh-issue: 153862 | |
| .. nonce: X3kjoY | |
| .. section: Library | |
| On a wide :mod:`curses` build, :meth:`curses.window.inch` now returns the | |
| locale-encoded byte of a non-ASCII character, matching | |
| :meth:`~curses.window.instr`, instead of the low byte of its code point. | |
| .. | |
| .. date: 2026-07-17-14-30-00 | |
| .. gh-issue: 153856 | |
| .. nonce: JEHepm | |
| .. section: Library | |
| Add :data:`os.RWF_NOSIGNAL` constant for Linux 6.18+. | |
| .. | |
| .. date: 2026-07-17-14-30-00 | |
| .. gh-issue: 153844 | |
| .. nonce: pYs7Kq | |
| .. section: Library | |
| :func:`symtable.symtable` now accepts an AST object, like the builtin | |
| :func:`compile`. | |
| .. | |
| .. date: 2026-07-17-12-00-00 | |
| .. gh-issue: 153838 | |
| .. nonce: HmCp5s | |
| .. section: Library | |
| Skip non-regular files in the ``profiling.sampling`` heatmap exporter | |
| instead of reading them unconditionally. Patch by tonghuaroot. | |
| .. | |
| .. date: 2026-07-15-21-56-40 | |
| .. gh-issue: 146011 | |
| .. nonce: nWmHif | |
| .. section: Library | |
| Fix a heap-use-after-free in the C implementation of :mod:`decimal` when | |
| calling :func:`repr` after deleting the :class:`~decimal.Context`. | |
| .. | |
| .. date: 2026-07-15-21-45-33 | |
| .. gh-issue: 141276 | |
| .. nonce: xH7qP2 | |
| .. section: Library | |
| Fix duplicate :exc:`SyntaxWarning` messages when importing source modules | |
| from ZIP archives. :meth:`zipimport.zipimporter.get_filename`, and therefore | |
| :meth:`~zipimport.zipimporter.find_spec`, no longer compile source modules. | |
| A :exc:`SyntaxError` in a zipped source module is now raised when the module | |
| is executed rather than when it is found, matching the behavior of | |
| filesystem-based loaders. | |
| .. | |
| .. date: 2026-07-15-15-19-08 | |
| .. gh-issue: 104533 | |
| .. nonce: pQJxCk | |
| .. section: Library | |
| Add :func:`ctypes.util.struct` and :class:`ctypes.util.CFieldInfo` for | |
| generating structure types using annotations. | |
| .. | |
| .. date: 2026-07-15-14-24-18 | |
| .. gh-issue: 153761 | |
| .. nonce: 8jqs67 | |
| .. section: Library | |
| Fix cancelling :meth:`asyncio.loop.sock_accept` dropping a pending | |
| connection. | |
| .. | |
| .. date: 2026-07-14-19-45-21 | |
| .. gh-issue: 153695 | |
| .. nonce: UYdZJZ | |
| .. section: Library | |
| Hashing a :class:`sqlite3.Row` that contains an unhashable value now raises | |
| :exc:`TypeError` instead of :exc:`SystemError`. Patch by tonghuaroot. | |
| .. | |
| .. date: 2026-07-14-15-00-00 | |
| .. gh-issue: 127049 | |
| .. nonce: pQw7Rk | |
| .. section: Library | |
| Fix a race condition in :mod:`asyncio` on Unix where | |
| :meth:`asyncio.subprocess.Process.send_signal`, | |
| :meth:`~asyncio.subprocess.Process.terminate` or | |
| :meth:`~asyncio.subprocess.Process.kill` could signal an unrelated process | |
| that was recycled onto the PID of the already-reaped child when | |
| ThreadedChildWatcher is used. Patch by Kumar Aditya. | |
| .. | |
| .. date: 2026-07-14-12-00-00 | |
| .. gh-issue: 83273 | |
| .. nonce: SnifQ7 | |
| .. section: Library | |
| :meth:`csv.Sniffer.sniff` now deduces the dialect by trial parsing with the | |
| actual CSV parser instead of heuristics based on matching isolated fragments | |
| and on character frequencies. It can now detect the *escapechar* parameter, | |
| accepts non-ASCII delimiters in the *delimiters* argument, no longer | |
| misdetects the delimiter when the sample contains delimiter characters | |
| inside quoted fields, handles samples truncated at an arbitrary point, and | |
| no longer takes quadratic time on quoted samples. A sample consisting of a | |
| single column of quoted fields now raises :exc:`csv.Error` instead of | |
| guessing a delimiter from the content of the fields. | |
| .. | |
| .. date: 2026-07-13-10-27-08 | |
| .. gh-issue: 153658 | |
| .. nonce: A6o4n5 | |
| .. section: Library | |
| Fix :meth:`sqlite3.Connection.iterdump` raising | |
| :exc:`sqlite3.OperationalError` when a table name contains a single quote. | |
| Patch by tonghuaroot. | |
| .. | |
| .. date: 2026-07-12-10-00-00 | |
| .. gh-issue: 98078 | |
| .. nonce: fA3lRt | |
| .. section: Library | |
| Fix :mod:`asyncio` SSL transports not sending the fatal TLS alert to the | |
| peer when the TLS handshake fails or when receiving corrupted data, and not | |
| sending the ``close_notify`` alert to the peer when the TLS shutdown fails. | |
| The peer can now tell why the connection was dropped (for example, | |
| certificate verification failure or no TLS version in common) instead of | |
| seeing the connection abruptly closed. | |
| .. | |
| .. date: 2026-07-12-00-00-00 | |
| .. gh-issue: 85943 | |
| .. nonce: 8f906e | |
| .. section: Library | |
| Fix :mod:`struct` functions raising :exc:`BytesWarning` under the ``-bb`` | |
| command line option when a :class:`str` format is used after an equal | |
| :class:`bytes` format (or vice versa). The internal format cache no longer | |
| mixes :class:`str` and :class:`bytes` keys. | |
| .. | |
| .. date: 2026-07-11-13-24-49 | |
| .. gh-issue: 153603 | |
| .. nonce: YbKlry | |
| .. section: Library | |
| Fix a crash in the ISO-2022 decoders when decoding a byte after an unknown | |
| charset designation is set via the decoder's ``setstate`` method. Patch by | |
| tonghuaroot. | |
| .. | |
| .. date: 2026-07-11-12-21-12 | |
| .. gh-issue: 153539 | |
| .. nonce: gBs2T5 | |
| .. section: Library | |
| Fix a crash in the C implementation of :meth:`io.TextIOWrapper.tell` when | |
| the decoder's ``getstate`` method triggers a reentrant seek, or when another | |
| thread seeks the same stream concurrently. Patch by tonghuaroot. | |
| .. | |
| .. date: 2026-07-10-18-30-00 | |
| .. gh-issue: 153502 | |
| .. nonce: uIdKw0 | |
| .. section: Library | |
| :meth:`imaplib.IMAP4.copy`, :meth:`~imaplib.IMAP4.move`, | |
| :meth:`~imaplib.IMAP4.fetch`, :meth:`~imaplib.IMAP4.store`, | |
| :meth:`~imaplib.IMAP4.search`, :meth:`~imaplib.IMAP4.sort`, | |
| :meth:`~imaplib.IMAP4.thread` and :meth:`~imaplib.IMAP4.expunge` now accept | |
| a keyword-only *uid* argument that selects the corresponding ``UID`` | |
| command, as a more convenient alternative to :meth:`~imaplib.IMAP4.uid`. | |
| .. | |
| .. date: 2026-07-10-16-00-00 | |
| .. gh-issue: 153494 | |
| .. nonce: qCh8rT | |
| .. section: Library | |
| :meth:`imaplib.IMAP4.search`, :meth:`~imaplib.IMAP4.sort` and | |
| :meth:`~imaplib.IMAP4.thread` (and the corresponding ``uid`` commands) now | |
| encode :class:`str` search criteria to the declared *charset*, so | |
| international search text can be passed as ordinary :class:`str`. When | |
| *charset* is ``None`` (as it must be under ``UTF8=ACCEPT``), the criteria | |
| are sent using the connection encoding instead. A criterion passed as | |
| :class:`bytes` is sent unchanged, for use with a charset that Python has no | |
| codec for. | |
| .. | |
| .. date: 2026-07-10-12-33-30 | |
| .. gh-issue: 153513 | |
| .. nonce: GxrPuY | |
| .. section: Library | |
| Values of several Tcl object types returned by :mod:`tkinter` are now | |
| converted to the corresponding Python type instead of being wrapped in a | |
| :class:`!_tkinter.Tcl_Obj`: ``index``, ``window``, ``nsName`` and | |
| ``parsedVarName`` objects to :class:`str`, and ``pixel`` screen distances | |
| with no unit suffix to :class:`int` or :class:`float`. | |
| .. | |
| .. date: 2026-07-09-16-35-47 | |
| .. gh-issue: 153404 | |
| .. nonce: daRkes | |
| .. section: Library | |
| :class:`urllib.robotparser.RobotFileParser` now silently ignores a | |
| ``Crawl-delay`` or ``Request-rate`` value written with non-decimal digits | |
| (such as ``U+00B2 SUPERSCRIPT TWO``) instead of raising :exc:`ValueError` | |
| and aborting the parse of the whole ``robots.txt`` file. | |
| .. | |
| .. date: 2026-07-09-15-18-23 | |
| .. gh-issue: 151292 | |
| .. nonce: f4NQSW | |
| .. section: Library | |
| Store the sample count in :mod:`profiling.sampling` binary format, as a | |
| 64-bit integer, widening from previously used 32-bit integer. This breaks | |
| the existing recordings. Long or thread-heavy profiling sessions will no | |
| longer fail because of :exc:`OverflowError`. Patch by Maurycy | |
| Pawłowski-Wieroński. | |
| .. | |
| .. date: 2026-07-09-14-56-24 | |
| .. gh-issue: 152754 | |
| .. nonce: CyyC5j | |
| .. section: Library | |
| Fix a crash when the same :func:`os.scandir` iterator is used concurrently | |
| from multiple threads. It no longer releases the directory handle while | |
| another thread is reading from it. Sharing an iterator between threads | |
| remains subject to race conditions: which entries each thread receives is | |
| unspecified. | |
| .. | |
| .. date: 2026-07-09-14-00-00 | |
| .. gh-issue: 153417 | |
| .. nonce: Bw7Rq2 | |
| .. section: Library | |
| Error messages from :meth:`imaplib.IMAP4.select` and | |
| :meth:`imaplib.IMAP4.uid` no longer raise :exc:`BytesWarning` under | |
| :option:`!-bb` when the mailbox or command argument is :class:`bytes`. | |
| .. | |
| .. date: 2026-07-09-12-35-19 | |
| .. gh-issue: 153422 | |
| .. nonce: tKb0Xq | |
| .. section: Library | |
| :meth:`!winfo_exists`, :meth:`!winfo_ismapped` and :meth:`!winfo_viewable` | |
| methods of :mod:`tkinter` widgets and :meth:`!edit_modified` of | |
| :class:`tkinter.Text` now return a :class:`bool` instead of an integer or, | |
| depending on ``wantobjects``, a string. | |
| .. | |
| .. date: 2026-07-09-12-00-00 | |
| .. gh-issue: 49555 | |
| .. nonce: Ka9Lm2 | |
| .. section: Library | |
| :mod:`imaplib` now encodes non-ASCII mailbox names as modified UTF-7 | |
| (:rfc:`3501`, section 5.1.3) in the default mode, so international mailbox | |
| names can be passed as ordinary :class:`str`; under ``UTF8=ACCEPT`` they are | |
| sent as UTF-8 instead. A name that is not valid modified UTF-7, such as one | |
| with a bare ``&``, is now encoded correctly instead of being sent as is. A | |
| ``str`` that is already valid modified UTF-7, or a :class:`bytes` object, is | |
| sent unchanged. | |
| .. | |
| .. date: 2026-07-09-10-14-08 | |
| .. gh-issue: 153395 | |
| .. nonce: N8FuG3 | |
| .. section: Library | |
| :mod:`curses.ascii` predicates and the :func:`~curses.ascii.ctrl` and | |
| :func:`~curses.ascii.unctrl` functions now accept a | |
| :class:`curses.complexchar`. :func:`~curses.ascii.ctrl` now returns a | |
| non-ASCII argument unchanged instead of masking it to a control character. | |
| .. | |
| .. date: 2026-07-09-08-40-00 | |
| .. gh-issue: 153290 | |
| .. nonce: GTzSEa | |
| .. section: Library | |
| Fix a data race on the free-threaded build when | |
| :meth:`!io.BytesIO.__setstate__` installs the instance dictionary while | |
| another thread concurrently calls a method on the same object. | |
| .. | |
| .. date: 2026-07-09-00-00-00 | |
| .. gh-issue: 153406 | |
| .. nonce: vyMmB6 | |
| .. section: Library | |
| :func:`email.utils.parsedate_to_datetime` now raises :exc:`ValueError` | |
| instead of :exc:`OverflowError` when the parsed year or timezone offset is | |
| out of range, matching its documented behavior. | |
| .. | |
| .. date: 2026-07-08-23-20-00 | |
| .. gh-issue: 152907 | |
| .. nonce: oyPV9Y | |
| .. section: Library | |
| Restore cooked-mode terminal output flags around :c:data:`PyOS_InputHook` | |
| callbacks in the new :term:`REPL` (:mod:`!_pyrepl`), so that output written | |
| by an input hook (for example a GUI toolkit event loop) is no longer emitted | |
| with ``OPOST`` disabled and keeps its carriage returns. | |
| .. | |
| .. date: 2026-07-08-22-18-04 | |
| .. gh-issue: 153364 | |
| .. nonce: JBFHEg | |
| .. section: Library | |
| Make frame, coroutine and task-waiter walks iterative and bounded, avoiding | |
| potential hangs and stack overflows. Fix asyncio task inspection when | |
| awaited-by sets contain removed entries. Patch by Maurycy | |
| Pawłowski-Wieroński. | |
| .. | |
| .. date: 2026-07-08-21-15-00 | |
| .. gh-issue: 153333 | |
| .. nonce: Kp3mZq | |
| .. section: Library | |
| The ``readprofile`` method of :class:`tkinter.Tk` now reads the user's | |
| profile scripts using the encoding declared in the file, instead of the | |
| locale encoding. | |
| .. | |
| .. date: 2026-07-08-19-40-00 | |
| .. gh-issue: 153319 | |
| .. nonce: Qk7bE2 | |
| .. section: Library | |
| The :mod:`turtledemo` viewer now reads each demo script as UTF-8 instead of | |
| the locale encoding. | |
| .. | |
| .. date: 2026-07-08-15-26-00 | |
| .. gh-issue: 153296 | |
| .. nonce: Twix12 | |
| .. section: Library | |
| Fix a data race and use-after-free when iterating over an | |
| :class:`io.StringIO` object while it is being concurrently mutated. The | |
| ``__next__`` method now properly acquires the object's lock. | |
| .. | |
| .. date: 2026-07-08-06-54-57 | |
| .. gh-issue: 152936 | |
| .. nonce: TaFl0J | |
| .. section: Library | |
| :func:`os.chroot`, :func:`os.initgroups`, :func:`os.setegid`, | |
| :func:`os.seteuid`, :func:`os.setgid`, :func:`os.setregid`, | |
| :func:`os.setresgid`, :func:`os.setresuid`, :func:`os.setreuid`, | |
| :func:`os.setuid`, and :func:`socket.sethostname` are now available on | |
| Android. Calling them without sufficient privileges now raises | |
| :exc:`PermissionError` instead of the functions being unavailable. | |
| .. | |
| .. date: 2026-07-08-01-47-15 | |
| .. gh-issue: 153083 | |
| .. nonce: XbKZCp | |
| .. section: Library | |
| Defer GC tracking of an :class:`array.array` to the end of its construction. | |
| Patch by Donghee Na. | |
| .. | |
| .. date: 2026-07-08-01-03-17 | |
| .. gh-issue: 153292 | |
| .. nonce: oHDt3l | |
| .. section: Library | |
| Fix data race in repr of :class:`threading.RLock` in free-threading build. | |
| .. | |
| .. date: 2026-07-08-00-00-00 | |
| .. gh-issue: 153291 | |
| .. nonce: rdlnCS | |
| .. section: Library | |
| Fix a data race in :func:`readline.get_completer` and | |
| :func:`readline.get_pre_input_hook` on the :term:`free-threaded <free | |
| threading>` build: the getters read the stored hook without the critical | |
| section that the corresponding setters hold. | |
| .. | |
| .. date: 2026-07-07-22-06-52 | |
| .. gh-issue: 153293 | |
| .. nonce: 0DvYdc | |
| .. section: Library | |
| Fix the live sampling profiler TUI keeping stale aggregated opcode | |
| statistics after a stats reset. | |
| .. | |
| .. date: 2026-07-07-17-50-54 | |
| .. gh-issue: 143990 | |
| .. nonce: FoNtCf | |
| .. section: Library | |
| A :class:`tkinter.font.Font` created from a named font, including by | |
| :meth:`~tkinter.font.Font.copy`, now copies its configured options rather | |
| than the options resolved by Tcl's ``font actual``, preserving a size | |
| specified in pixels (a negative size). | |
| .. | |
| .. date: 2026-07-07-13-31-52 | |
| .. gh-issue: 148286 | |
| .. nonce: -qu-em | |
| .. section: Library | |
| Fix undefined behavior in | |
| :attr:`compression.zstd.ZstdDecompressor.unused_data` when a complete frame | |
| was decompressed in a single call. | |
| .. | |
| .. date: 2026-07-07-02-26-43 | |
| .. gh-issue: 153210 | |
| .. nonce: LUXIcm | |
| .. section: Library | |
| Fix crash on :mod:`array` import under a memory pressure. | |
| .. | |
| .. date: 2026-07-06-14-30-00 | |
| .. gh-issue: 153521 | |
| .. nonce: iMaP47 | |
| .. section: Library | |
| Add support for structured arguments in :mod:`imaplib` command methods. A | |
| *message_set* and lists of flags or other atoms can now be passed as | |
| sequences instead of preformatted strings, and the | |
| :meth:`~imaplib.IMAP4.search`, :meth:`~imaplib.IMAP4.fetch`, | |
| :meth:`~imaplib.IMAP4.sort`, :meth:`~imaplib.IMAP4.thread` and | |
| :meth:`~imaplib.IMAP4.uid` methods accept a *params* keyword argument that | |
| substitutes and quotes ``?`` placeholders. | |
| .. | |
| .. date: 2026-07-06-14-18-33 | |
| .. gh-issue: 153256 | |
| .. nonce: tkPrnt | |
| .. section: Library | |
| Added the :meth:`!tk_print` method to :class:`tkinter.Canvas` and | |
| :class:`tkinter.Text` which prints the contents of the widget using the | |
| native print dialog. It requires Tk 8.7/9.0 or newer. | |
| .. | |
| .. date: 2026-07-06-14-05-40 | |
| .. gh-issue: 153259 | |
| .. nonce: sysTr1 | |
| .. section: Library | |
| Added the :mod:`tkinter.systray` module which provides the | |
| :class:`~tkinter.systray.SysTrayIcon` class as an interface to the system | |
| tray icon and the :func:`~tkinter.systray.notify` function which sends a | |
| desktop notification. They require Tk 8.7/9.0 or newer. | |
| .. | |
| .. date: 2026-07-06-13-42-17 | |
| .. gh-issue: 72880 | |
| .. nonce: fcXhWr | |
| .. section: Library | |
| Added the :mod:`tkinter.fontchooser` module which provides the | |
| :class:`~tkinter.fontchooser.FontChooser` class as an interface to the | |
| native font selection dialog. | |
| .. | |
| .. date: 2026-07-06-12-00-00 | |
| .. gh-issue: 153200 | |
| .. nonce: isqrtLt | |
| .. section: Library | |
| Fix :func:`math.isqrt` returning an incorrect result for arguments not less | |
| than 2**64 that are instances of an :class:`int` subclass with an overridden | |
| comparison operator. | |
| .. | |
| .. date: 2026-07-06-10-30-00 | |
| .. gh-issue: 153158 | |
| .. nonce: m0nthP | |
| .. section: Library | |
| Remove the erroneous *width* argument of | |
| :meth:`!calendar.HTMLCalendar.formatmonthpage`, which could drop the year | |
| from the heading. | |
| .. | |
| .. date: 2026-07-05-22-30-00 | |
| .. gh-issue: 66788 | |
| .. nonce: tM7pQ2 | |
| .. section: Library | |
| Add the ``utf-7-imap`` codec, implementing the modified UTF-7 encoding used | |
| for international IMAP4 mailbox names (:rfc:`3501`, section 5.1.3). | |
| .. | |
| .. date: 2026-07-05-21-40-00 | |
| .. gh-issue: 89869 | |
| .. nonce: XG7aHz | |
| .. section: Library | |
| Add :meth:`imaplib.IMAP4.login_plain`, which authenticates using the | |
| ``PLAIN`` SASL mechanism (:rfc:`4616`). Unlike | |
| :meth:`~imaplib.IMAP4.login`, it supports non-ASCII user names and | |
| passwords. | |
| .. | |
| .. date: 2026-07-05-20-15-00 | |
| .. gh-issue: 98092 | |
| .. nonce: iDcmd1 | |
| .. section: Library | |
| Add :meth:`imaplib.IMAP4.id`, a wrapper for the IMAP ``ID`` command | |
| (:rfc:`2971`). | |
| .. | |
| .. date: 2026-07-05-17-39-16 | |
| .. gh-issue: 153133 | |
| .. nonce: kKSH7g | |
| .. section: Library | |
| Fix a socket leak in :meth:`asyncio.loop.create_connection` when the | |
| transport cannot be created. | |
| .. | |
| .. date: 2026-07-05-16-09-31 | |
| .. gh-issue: 153068 | |
| .. nonce: huY9Jh | |
| .. section: Library | |
| Fix :meth:`!cProfile.Profile.enable` to no longer overwrite errors from | |
| :mod:`sys.monitoring`. | |
| .. | |
| .. date: 2026-07-05-14-30-00 | |
| .. gh-issue: 153062 | |
| .. nonce: teeFT1 | |
| .. section: Library | |
| Fix a crash when concurrently iterating an :func:`itertools.tee` iterator on | |
| the free-threaded build. | |
| .. | |
| .. date: 2026-07-05-12-00-00 | |
| .. gh-issue: 153056 | |
| .. nonce: tMpLat | |
| .. section: Library | |
| Fix :class:`string.Template` raising a spurious :exc:`ValueError` when the | |
| *pattern* attribute is a compiled regular expression object, which the | |
| documentation allows. On the free-threaded build this also occurred as a | |
| data race on the first concurrent use. | |
| .. | |
| .. date: 2026-07-05-11-36-51 | |
| .. gh-issue: 59396 | |
| .. nonce: Apl7sI | |
| .. section: Library | |
| :class:`tkinter.scrolledtext.ScrolledText` gained a *use_ttk* parameter to | |
| use the themed :mod:`tkinter.ttk` frame and scroll bar instead of the | |
| classic :mod:`tkinter` widgets. | |
| .. | |
| .. date: 2026-07-05-10-24-30 | |
| .. gh-issue: 143921 | |
| .. nonce: wQx3Tn | |
| .. section: Library | |
| Narrow the control character check in :mod:`imaplib` commands: only NUL, CR | |
| and LF are now rejected. Other control characters are valid in quoted | |
| strings and can occur in mailbox names returned by the server, so they are | |
| now accepted and sent quoted. | |
| .. | |
| .. date: 2026-07-04-20-28-51 | |
| .. gh-issue: 153037 | |
| .. nonce: XUSp_g | |
| .. section: Library | |
| Fix :class:`~compression.zstd.ZstdFile` raising :exc:`AttributeError` | |
| instead of :exc:`io.UnsupportedOperation` when iterating over a file that is | |
| not open for reading. | |
| .. | |
| .. date: 2026-07-04-13-00-00 | |
| .. gh-issue: 135661 | |
| .. nonce: CIkADG | |
| .. section: Library | |
| Fix :class:`html.parser.HTMLParser`: an abruptly closed empty comment | |
| (``<!-->`` or ``<!--->``) no longer extends up to a later ``-->`` in the | |
| same :meth:`~html.parser.HTMLParser.feed` call. | |
| .. | |
| .. date: 2026-07-04-11-26-24 | |
| .. gh-issue: 153009 | |
| .. nonce: KGl-nQ | |
| .. section: Library | |
| Fix compilation of :mod:`curses` on platforms that define the ``stdscr`` | |
| macro. Patch by Bénédikt Tran. | |
| .. | |
| .. date: 2026-07-04-11-14-06 | |
| .. gh-issue: 152851 | |
| .. nonce: diYvTf | |
| .. section: Library | |
| Prevent a crash when allocation fails while copying a :func:`BLAKE-2s/2b | |
| <hashlib.blake2b>` object. Patch by Bénédikt Tran. | |
| .. | |
| .. date: 2026-07-04-00-19-23 | |
| .. gh-issue: 127636 | |
| .. nonce: o_uD9U | |
| .. section: Library | |
| Fix :meth:`tarfile.TarFile.extract` to accept archive member names with a | |
| trailing forward slash, including those returned by | |
| :meth:`tarfile.TarFile.getnames`. Contributed by Xiao Yuan. | |
| .. | |
| .. date: 2026-07-03-21-10-00 | |
| .. gh-issue: 54930 | |
| .. nonce: hq09Er | |
| .. section: Library | |
| Error responses of :class:`http.server.BaseHTTPRequestHandler` to malformed | |
| request lines now include a status line and headers instead of being sent in | |
| the bare HTTP/0.9 style. Only a valid HTTP/0.9 request (a two-word ``GET`` | |
| request line) now receives an HTTP/0.9 style response. | |
| .. | |
| .. date: 2026-07-03-19-51-47 | |
| .. gh-issue: 152997 | |
| .. nonce: i1ErzB | |
| .. section: Library | |
| On platforms providing the C library's :manpage:`iconv(3)` function, the | |
| :mod:`codecs` module now exposes every encoding known to ``iconv`` for which | |
| Python has no built-in codec. Such an encoding can be used by its name (for | |
| example ``"cp1133"``) or, to force the ``iconv``-based engine even when a | |
| built-in codec exists, with an ``"iconv:"`` prefix (for example | |
| ``"iconv:latin1"``). | |
| .. | |
| .. date: 2026-07-03-18-30-00 | |
| .. gh-issue: 119592 | |
| .. nonce: mQr3Vx | |
| .. section: Library | |
| Fix :class:`concurrent.futures.ProcessPoolExecutor` stranding submitted work | |
| forever when a worker process exited upon reaching its *max_tasks_per_child* | |
| limit after :meth:`~concurrent.futures.Executor.shutdown` was called with | |
| ``wait=False``: a replacement worker is now spawned and the remaining work | |
| executed as documented. If the executor has instead been garbage collected | |
| without ``shutdown()`` (:gh:`152967`), or a replacement worker cannot be | |
| started, the remaining futures now fail with | |
| :exc:`~concurrent.futures.process.BrokenProcessPool` instead of never | |
| resolving. A worker exit racing ``shutdown(wait=False)`` can also no longer | |
| crash the executor management thread. | |
| .. | |
| .. date: 2026-07-03-17-29-34 | |
| .. gh-issue: 150579 | |
| .. nonce: 0tLpQukIU | |
| .. section: Library | |
| :mod:`concurrent.futures` now uses lazy imports for its executor submodules | |
| instead of a module ``__getattr__`` hook. | |
| .. | |
| .. date: 2026-07-03-14-54-33 | |
| .. gh-issue: 152951 | |
| .. nonce: u8tPCI | |
| .. section: Library | |
| :class:`collections.deque` prevent rare crash when calling ``extend`` under | |
| high memory pressure conditions. | |
| .. | |
| .. date: 2026-07-03-02-11-00 | |
| .. gh-issue: 152912 | |
| .. nonce: Mv3KpR | |
| .. section: Library | |
| ``sys.addaudithook()`` now correctly suppresses only :exc:`RuntimeError` | |
| instead of all :exc:`Exception` subclasses when an existing audit hook | |
| raises during hook registration. Patch by Yeongu Kim. | |
| .. | |
| .. date: 2026-07-02-22-19-53 | |
| .. gh-issue: 150880 | |
| .. nonce: vPZ7jK | |
| .. section: Library | |
| Normalize non-extended Windows paths before appending the wildcard used by | |
| ``os.listdir()`` and ``os.scandir()``, making paths with trailing spaces | |
| behave consistently with other filesystem APIs. | |
| .. | |
| .. date: 2026-07-02-19-21-15 | |
| .. gh-issue: 152068 | |
| .. nonce: ThsmJU | |
| .. section: Library | |
| Fixes a bug when a line was split (particularly on macOS Terminal.app) in | |
| the middle of a colorized keyword, causing the ANSI Color Reset sequence | |
| (ESC0m) to not be properly printed, causing the output to be colored when it | |
| shouldn't | |
| .. | |
| .. date: 2026-07-02-15-26-51 | |
| .. gh-issue: 151292 | |
| .. nonce: nmnQlp | |
| .. section: Library | |
| Fix ``profiling.sampling --binary`` leaving unreadable profile files when | |
| the binary format reaches a size limit. Preserve collected samples when the | |
| writer can still finalize safely. Patch by Maurycy Pawłowski-Wieroński. | |
| .. | |
| .. date: 2026-07-02-13-30-00 | |
| .. gh-issue: 152849 | |
| .. nonce: K9dRvP | |
| .. section: Library | |
| Out-of-range float and integer timestamps now raise :exc:`OverflowError` | |
| with the same message. Patch by tonghuaroot. | |
| .. | |
| .. date: 2026-07-02-12-00-00 | |
| .. gh-issue: 152847 | |
| .. nonce: PitKqc | |
| .. section: Library | |
| Reject a POSIX TZ transition rule with non-digit characters in the | |
| day-of-year field in the pure-Python :mod:`zoneinfo` parser. Patch by | |
| tonghuaroot. | |
| .. | |
| .. date: 2026-07-01-23-17-27 | |
| .. gh-issue: 152905 | |
| .. nonce: wLnGqR | |
| .. section: Library | |
| On glibc, :func:`locale.nl_langinfo` now decodes the ``LC_TIME`` items (such | |
| as the month and day names) using the wide locale data, so the result no | |
| longer depends on the ``LC_CTYPE`` encoding. | |
| .. | |
| .. date: 2026-07-01-22-59-25 | |
| .. gh-issue: 152586 | |
| .. nonce: WuEae6 | |
| .. section: Library | |
| :class:`!tempfile._TemporaryFileWrapper` has been renamed to the public | |
| :class:`tempfile.TemporaryFileWrapper`. The old private name is kept as a | |
| deprecated alias and will be removed in Python 3.21. | |
| .. | |
| .. date: 2026-07-01-18-00-00 | |
| .. gh-issue: 152721 | |
| .. nonce: rlequad | |
| .. section: Library | |
| Fix quadratic replay time in the :mod:`profiling.sampling` binary reader | |
| when a profile's run-length-encoded samples alternate thread status. | |
| .. | |
| .. date: 2026-07-01-15-30-00 | |
| .. gh-issue: 77508 | |
| .. nonce: Bn2kXt | |
| .. section: Library | |
| Add :meth:`imaplib.IMAP4.move`, a wrapper for the IMAP ``MOVE`` command | |
| (:rfc:`6851`), analogous to :meth:`~imaplib.IMAP4.copy`. | |
| .. | |
| .. date: 2026-07-01-14-00-00 | |
| .. gh-issue: 49680 | |
| .. nonce: Lm5rQv | |
| .. section: Library | |
| Add the *translate_line_endings* parameter to :meth:`imaplib.IMAP4.append`. | |
| By default line endings in the message are translated to CRLF, as before; | |
| passing ``False`` sends the message literal exactly as given, preserving | |
| bare CR or LF octets. | |
| .. | |
| .. date: 2026-07-01-12-00-00 | |
| .. gh-issue: 152718 | |
| .. nonce: pr0f1l | |
| .. section: Library | |
| Fix unbounded memory allocation in the :mod:`profiling.sampling` binary | |
| profile reader when a file declares more string or frame entries than it | |
| contains. | |
| .. | |
| .. date: 2026-07-01-12-00-00 | |
| .. gh-issue: 108280 | |
| .. nonce: Nq8vTr | |
| .. section: Library | |
| Connecting :mod:`imaplib` to a server that does not send a valid IMAP4 | |
| greeting (for example a POP3 server answering on the IMAP port) now raises | |
| an error reporting the server's response instead of ``imaplib.IMAP4.error: | |
| None``. | |
| .. | |
| .. date: 2026-07-01-11-29-13 | |
| .. gh-issue: 151126 | |
| .. nonce: eElGy5 | |
| .. section: Library | |
| Fix a crash caused by failing to set :exc:`MemoryError` on allocation | |
| failure when passing :class:`ctypes.Structure` or :class:`ctypes.Union` | |
| instances by value to ctypes foreign functions. | |
| .. | |
| .. date: 2026-07-01-10-30-00 | |
| .. gh-issue: 63121 | |
| .. nonce: Rm4tZp | |
| .. section: Library | |
| :mod:`imaplib` now refreshes the cached capability list after a successful | |
| :meth:`~imaplib.IMAP4.login` or :meth:`~imaplib.IMAP4.authenticate`, using | |
| the ``CAPABILITY`` response sent by the server or, if none was sent, by | |
| querying it, so that capabilities that become available only after | |
| authentication (such as ``ENABLE`` on Gmail) are recognized. Capabilities | |
| advertised in the server greeting are now also used, avoiding a redundant | |
| ``CAPABILITY`` command. | |
| .. | |
| .. date: 2026-07-01-10-00-00 | |
| .. gh-issue: 88574 | |
| .. nonce: Kz3wQm | |
| .. section: Library | |
| :mod:`imaplib` no longer fails when a server sends a spurious blank line | |
| after the counted data of a literal, including after a literal that | |
| terminates a response (such as a mailbox name returned by ``LIST``). Such | |
| blank lines are now skipped without swallowing the following line. | |
| .. | |
| .. date: 2026-06-30-15-00-00 | |
| .. gh-issue: 152692 | |
| .. nonce: tr3pr0 | |
| .. section: Library | |
| Fix :func:`annotationlib.type_repr` returning a string such as | |
| ``None.list.append`` for bound built-in methods, whose ``__module__`` is | |
| ``None``. It now returns the qualified name, as it already did for other | |
| builtins. | |
| .. | |
| .. date: 2026-06-30-14-30-00 | |
| .. gh-issue: 152502 | |
| .. nonce: Mq7Kx2 | |
| .. section: Library | |
| Detect the :mod:`curses` mouse interface (:func:`~curses.getmouse`, | |
| :func:`~curses.has_mouse`, the ``BUTTON*`` constants, and others) and the | |
| window ``is_*`` state-query methods with configure capability probes or | |
| library macros instead of gating them on ncurses-specific macros. They are | |
| now also available with other curses implementations that provide them, such | |
| as NetBSD curses and PDCurses (the latter underpins ``windows-curses``). | |
| .. | |
| .. date: 2026-06-30-13-00-00 | |
| .. gh-issue: 151842 | |
| .. nonce: OOM31g | |
| .. section: Library | |
| Fix a crash in :func:`!_interpreters.capture_exception` when | |
| :exc:`MemoryError` happens. Patch by Amrutha Modela. | |
| .. | |
| .. date: 2026-06-30-12-00-00 | |
| .. gh-issue: 40038 | |
| .. nonce: qK7mGv | |
| .. section: Library | |
| :mod:`imaplib` now again quotes command arguments when necessary, for | |
| example mailbox names containing a space. Such quoting was inadvertently | |
| disabled when the module was ported to Python 3, and the arguments are now | |
| quoted according to the :rfc:`3501` grammar. For backward compatibility, an | |
| argument already enclosed in double quotes is left unchanged, so code that | |
| quotes arguments itself keeps working. | |
| .. | |
| .. date: 2026-06-29-22-16-57 | |
| .. gh-issue: 50966 | |
| .. nonce: Tq5mLp | |
| .. section: Library | |
| Fix unbounded recursion in :mod:`turtle` when a mouse event handler that | |
| moves the turtle is reentered while the screen is being redrawn, for example | |
| with ``screen.ondrag(turtle.goto)``. This could previously crash the | |
| interpreter. | |
| .. | |
| .. date: 2026-06-29-21-59-08 | |
| .. gh-issue: 152638 | |
| .. nonce: 92dpzo | |
| .. section: Library | |
| Deprecate :func:`tkinter.filedialog.askopenfiles`. Opening several files at | |
| once is error-prone and the returned list cannot be used in a | |
| :keyword:`with` statement; iterate over the names returned by | |
| :func:`tkinter.filedialog.askopenfilenames` and open them one by one | |
| instead. | |
| .. | |
| .. date: 2026-06-29-12-50-28 | |
| .. gh-issue: 152587 | |
| .. nonce: Lq8wVn | |
| .. section: Library | |
| In :mod:`tkinter`, the *name* parameter of the | |
| :meth:`~tkinter.Misc.wait_variable`, :meth:`~tkinter.Misc.setvar` and | |
| :meth:`~tkinter.Misc.getvar` methods and the *value* parameter of | |
| :meth:`!setvar` are now required. Their former default values (``'PY_VAR'`` | |
| and ``'1'``) were not meaningful. | |
| .. | |
| .. date: 2026-06-29-09-45-00 | |
| .. gh-issue: 152569 | |
| .. nonce: Kf7Lq2 | |
| .. section: Library | |
| Fix :func:`asyncio.wait` leaking waiting tasks via the await-graph when | |
| racing a future that never resolves. The waiting task is now discarded from | |
| every future's ``awaited_by`` set once :func:`~asyncio.wait` returns, even | |
| for pending futures. | |
| .. | |
| .. date: 2026-06-29-01-08-53 | |
| .. gh-issue: 110357 | |
| .. nonce: QGWdZQ | |
| .. section: Library | |
| Importing :mod:`hashlib` no longer logs an error to stderr when a normally | |
| guaranteed hash algorithm is unavailable in the current runtime (for example | |
| under an OpenSSL FIPS configuration or a build using | |
| :option:`--without-builtin-hashlib-hashes <--with-builtin-hashlib-hashes>`). | |
| Code that actually uses the missing algorithm still gets a clear | |
| :exc:`ValueError`. | |
| .. | |
| .. date: 2026-06-28-16-20-07 | |
| .. gh-issue: 152503 | |
| .. nonce: N55ose | |
| .. section: Library | |
| Fix :meth:`curses.window.in_wch`, :meth:`curses.window.in_wchstr` and | |
| :meth:`curses.window.getbkgrnd` returning garbage text when :mod:`curses` is | |
| built against a curses library that does not NUL-terminate the ``cchar_t`` | |
| text array (such as NetBSD curses). | |
| .. | |
| .. date: 2026-06-28-12-45-09 | |
| .. gh-issue: 152356 | |
| .. nonce: Dr4w2Q | |
| .. section: Library | |
| Fix a hang in ``profiling.sampling run --blocking`` on Windows when the | |
| target process exits. The profiler now finalizes binary profiles instead of | |
| continuing to sample the exited process. | |
| .. | |
| .. date: 2026-06-28-12-00-00 | |
| .. gh-issue: 152470 | |
| .. nonce: Wn7Kp3 | |
| .. section: Library | |
| The wide-character :mod:`curses` functions and methods | |
| :meth:`curses.window.get_wch`, :meth:`curses.window.get_wstr`, | |
| :func:`curses.unget_wch`, :func:`curses.erasewchar`, | |
| :func:`curses.killwchar` and :func:`curses.wunctrl` now also work when | |
| Python is not built against a wide-character-aware curses library, on an | |
| 8-bit locale, where each character is a single byte in the relevant | |
| encoding. :func:`curses.ungetch` now also accepts a one-character string, | |
| like :func:`curses.unget_wch`; on a wide-character build it can be any | |
| character (previously a multibyte character raised :exc:`OverflowError`). | |
| .. | |
| .. date: 2026-06-28-11-00-40 | |
| .. gh-issue: 78335 | |
| .. nonce: Kp3mWq | |
| .. section: Library | |
| Update the docstrings of :mod:`tkinter` and :mod:`tkinter.ttk` widget | |
| classes to list all supported widget options, including options added in Tk | |
| 9.0 and 9.1. ``tkinter.Menubutton`` and ``tkinter.Message`` previously had | |
| no option list at all. | |
| .. | |
| .. date: 2026-06-28-00-00-00 | |
| .. gh-issue: 152431 | |
| .. nonce: Ja3K9m | |
| .. section: Library | |
| Fix ``asyncio.StreamWriter.start_tls()`` to keep the linked ``StreamReader`` | |
| transport in sync with the upgraded transport. | |
| .. | |
| .. date: 2026-06-27-19-02-17 | |
| .. gh-issue: 103878 | |
| .. nonce: 216fa7 | |
| .. section: Library | |
| The :mod:`tkinter.filedialog` functions that return a filename | |
| (:func:`~tkinter.filedialog.askopenfilename`, | |
| :func:`~tkinter.filedialog.asksaveasfilename` and | |
| :func:`~tkinter.filedialog.askdirectory`) now consistently return an empty | |
| string when the dialog is cancelled, instead of an empty tuple or ``b''`` on | |
| some platforms. :func:`~tkinter.filedialog.askopenfilenames` likewise | |
| always returns an empty tuple, and :func:`~tkinter.filedialog.askopenfiles` | |
| an empty list. | |
| .. | |
| .. date: 2026-06-27-17-19-09 | |
| .. gh-issue: 151126 | |
| .. nonce: huUyOM | |
| .. section: Library | |
| Fix two crashes in :mod:`tkinter` and :mod:`socket` modules initialization | |
| under a memory pressure. Sets missing :exc:`MemoryError`. | |
| .. | |
| .. date: 2026-06-27-12-45-00 | |
| .. gh-issue: 133031 | |
| .. nonce: Wide00 | |
| .. section: Library | |
| :class:`curses.textpad.Textbox` now supports entering and reading back the | |
| full Unicode range, including combining characters, when curses is built | |
| with wide-character support. | |
| .. | |
| .. date: 2026-06-27-12-30-00 | |
| .. gh-issue: 133031 | |
| .. nonce: Na8Bit | |
| .. section: Library | |
| :class:`curses.textpad.Textbox` now enters and reads back the non-ASCII | |
| characters of an 8-bit locale encoding, instead of mangling them with a | |
| 7-bit mask. | |
| .. | |
| .. date: 2026-06-27-12-00-00 | |
| .. gh-issue: 43699 | |
| .. nonce: Zt46MI | |
| .. section: Library | |
| The drag cursor in :mod:`tkinter.dnd` is now changed only once the pointer | |
| starts moving rather than on the initial button press, so that a plain click | |
| no longer flashes it. | |
| .. | |
| .. date: 2026-06-27-11-32-37 | |
| .. gh-issue: 50409 | |
| .. nonce: Pw3Kq9 | |
| .. section: Library | |
| Deprecate the *tagOrId* parameter of | |
| :meth:`!tkinter.PanedWindow.paneconfigure` (and its :meth:`!paneconfig` | |
| alias) in favor of *child*, for consistency with the other pane methods; it | |
| will be removed in Python 3.18. | |
| .. | |
| .. date: 2026-06-27-10-30-00 | |
| .. gh-issue: 152409 | |
| .. nonce: Tr8cE2 | |
| .. section: Library | |
| Fix the :mod:`trace` command-line tool not saving the ``--file`` counts when | |
| ``--no-report`` is used, which prevented accumulating counts over several | |
| runs. Patch by tonghuaroot. | |
| .. | |
| .. date: 2026-06-26-23-56-40 | |
| .. gh-issue: 71880 | |
| .. nonce: 782D31 | |
| .. section: Library | |
| :class:`curses.textpad.Textbox` now lets the lower-right cell of the window | |
| be edited. Writing it with :meth:`~curses.window.addch` would move the | |
| cursor past the end of the window, raising an error and scrolling a | |
| scrollable window, so it is now written with :meth:`~curses.window.insch`, | |
| which keeps the cursor in place. | |
| .. | |
| .. date: 2026-06-26-22-50-00 | |
| .. gh-issue: 152334 | |
| .. nonce: Mt7vQx | |
| .. section: Library | |
| Add the :func:`curses.define_key`, :func:`curses.key_defined` and | |
| :func:`curses.keyok` key-management functions. | |
| .. | |
| .. date: 2026-06-26-22-15-00 | |
| .. gh-issue: 152332 | |
| .. nonce: Lp3WqN | |
| .. section: Library | |
| Add the :func:`curses.term_attrs` function, the counterpart of | |
| :func:`curses.termattrs` for the ``WA_*`` attributes. | |
| .. | |
| .. date: 2026-06-26-22-06-07 | |
| .. gh-issue: 87904 | |
| .. nonce: F71C70 | |
| .. section: Library | |
| The :mod:`curses` types and exceptions now report their public module in | |
| :attr:`~type.__module__`, :func:`repr` and :func:`help` -- for example | |
| ``curses.window`` instead of ``_curses.window`` and ``curses.panel.error`` | |
| instead of ``_curses_panel.error``. | |
| .. | |
| .. date: 2026-06-26-21-30-00 | |
| .. gh-issue: 152325 | |
| .. nonce: Km9xQr | |
| .. section: Library | |
| Add the :func:`curses.has_mouse` function and the | |
| :meth:`curses.window.mouse_trafo` method. | |
| .. | |
| .. date: 2026-06-26-19-01-13 | |
| .. gh-issue: 121249 | |
| .. nonce: p1SBW0 | |
| .. section: Library | |
| Deprecate using ``'F'`` and ``'D'`` type codes in the :mod:`struct` module. | |
| .. | |
| .. date: 2026-06-26-17-18-01 | |
| .. gh-issue: 152275 | |
| .. nonce: V64zKa | |
| .. section: Library | |
| The :mod:`curses` module now raises :exc:`OverflowError` instead of silently | |
| truncating an out-of-range value: :func:`curses.color_pair` rejects a color | |
| pair number that does not fit in the ``chtype`` color field, and the | |
| ``attr`` argument of the character-cell and attribute methods | |
| (:meth:`~curses.window.addch`, :meth:`~curses.window.addstr`, | |
| :meth:`~curses.window.attron`, :meth:`~curses.window.attrset` and others) is | |
| checked against the ``chtype`` range. | |
| .. | |
| .. date: 2026-06-26-16-30-00 | |
| .. gh-issue: 83274 | |
| .. nonce: Kx9mQv | |
| .. section: Library | |
| Deallocating a :mod:`tkinter` application from a thread other than the one | |
| it was created in no longer crashes the interpreter. The underlying Tcl | |
| interpreter is leaked instead, and a :exc:`RuntimeWarning` is reported. | |
| .. | |
| .. date: 2026-06-26-16-15-55 | |
| .. gh-issue: 81954 | |
| .. nonce: MfUjgS | |
| .. section: Library | |
| Deleting a writable, open :class:`zipfile.ZipFile` now emits a | |
| :exc:`ResourceWarning`. Use as a :term:`context manager` or call | |
| :meth:`~zipfile.ZipFile.close` explicitly. | |
| .. | |
| .. date: 2026-06-26-15-41-34 | |
| .. gh-issue: 152305 | |
| .. nonce: WnbbBc | |
| .. section: Library | |
| Fix the pure-Python :meth:`datetime.time.strftime` implementation raising | |
| :exc:`AttributeError` for the year directives. Patch by tonghuaroot. | |
| .. | |
| .. date: 2026-06-26-15-30-00 | |
| .. gh-issue: 88758 | |
| .. nonce: Qw7nLp | |
| .. section: Library | |
| :meth:`!tkinter.Misc.focus_get`, :meth:`!focus_displayof`, | |
| :meth:`!focus_lastfor` and :meth:`!winfo_containing` now return ``None`` | |
| instead of raising :exc:`KeyError` when the widget was not created by | |
| :mod:`tkinter` (for example a torn-off menu). | |
| .. | |
| .. date: 2026-06-26-15-10-00 | |
| .. gh-issue: 152260 | |
| .. nonce: Rk4nP9 | |
| .. section: Library | |
| Add the :mod:`curses` functions :func:`~curses.scr_dump`, | |
| :func:`~curses.scr_restore`, :func:`~curses.scr_init` and | |
| :func:`~curses.scr_set`, which dump the whole screen to a file and restore | |
| it. | |
| .. | |
| .. date: 2026-06-26-15-00-00 | |
| .. gh-issue: 38464 | |
| .. nonce: yDPjKH | |
| .. section: Library | |
| :meth:`!tkinter.Misc.nametowidget` now resolves the auto-generated names of | |
| cloned menus (a menu used as a menubar or a cascade) back to the original | |
| widget. | |
| .. | |
| .. date: 2026-06-26-14-34-28 | |
| .. gh-issue: 152263 | |
| .. nonce: 5PHQP4 | |
| .. section: Library | |
| Add the soft-label-key functions to the :mod:`curses` module: | |
| :func:`~curses.slk_init`, :func:`~curses.slk_set`, | |
| :func:`~curses.slk_label`, :func:`~curses.slk_refresh`, | |
| :func:`~curses.slk_noutrefresh`, :func:`~curses.slk_clear`, | |
| :func:`~curses.slk_restore`, :func:`~curses.slk_touch`, | |
| :func:`~curses.slk_attron`, :func:`~curses.slk_attroff`, | |
| :func:`~curses.slk_attrset`, :func:`~curses.slk_attr`, | |
| :func:`~curses.slk_attr_on`, :func:`~curses.slk_attr_off`, | |
| :func:`~curses.slk_attr_set` and :func:`~curses.slk_color`. | |
| .. | |
| .. date: 2026-06-26-14-05-00 | |
| .. gh-issue: 116946 | |
| .. nonce: Kp7raZ | |
| .. section: Library | |
| The internal :mod:`!_tkinter` ``tkapp`` and ``tktimertoken`` types now | |
| implement the garbage collector protocol, so reference cycles involving a | |
| Tcl interpreter or a timer handler can be collected. | |
| .. | |
| .. date: 2026-06-26-13-40-00 | |
| .. gh-issue: 152258 | |
| .. nonce: Qe7Lm3 | |
| .. section: Library | |
| Add the :mod:`curses` window method :meth:`~curses.window.dupwin`, which | |
| returns a new window that is an independent duplicate of an existing one. | |
| .. | |
| .. date: 2026-06-26-13-39-11 | |
| .. gh-issue: 152248 | |
| .. nonce: N2Rmaf | |
| .. section: Library | |
| Make the C and pure-Python :mod:`zoneinfo` parsers validate POSIX TZ | |
| abbreviations consistently, rejecting unquoted abbreviations with non-letter | |
| characters and empty quoted abbreviations. Patch by tonghuaroot. | |
| .. | |
| .. date: 2026-06-26-13-10-00 | |
| .. gh-issue: 80937 | |
| .. nonce: Hq3mNp | |
| .. section: Library | |
| Fix a memory leak in :mod:`tkinter` when a Tcl command created with | |
| ``createcommand`` was not explicitly removed before the interpreter was | |
| deleted. The command no longer keeps the interpreter alive through a | |
| reference cycle. | |
| .. | |
| .. date: 2026-06-26-13-00-46 | |
| .. gh-issue: 111330 | |
| .. nonce: DBcCXA | |
| .. section: Library | |
| Update pure-Python :class:`io.BytesIO` to close cleanly when the data has an | |
| export such as a :class:`memoryview`. | |
| .. | |
| .. date: 2026-06-26-12-50-26 | |
| .. gh-issue: 152246 | |
| .. nonce: MfXMd1 | |
| .. section: Library | |
| Fix the pure-Python :mod:`zoneinfo` parser accepting an invalid POSIX TZ | |
| transition rule with a non-period separator. Patch by tonghuaroot. | |
| .. | |
| .. date: 2026-06-26-11-20-00 | |
| .. gh-issue: 152233 | |
| .. nonce: Kp7mQ2 | |
| .. section: Library | |
| Add the :class:`curses.complexstr` type, an immutable string of styled | |
| character cells (the counterpart of :class:`curses.complexchar`), and the | |
| :mod:`curses` window method :meth:`~curses.window.in_wchstr` that returns | |
| one. The string-cell methods :meth:`~curses.window.addstr`, | |
| :meth:`~curses.window.addnstr`, :meth:`~curses.window.insstr` and | |
| :meth:`~curses.window.insnstr` now also accept a | |
| :class:`~curses.complexstr`. Like :class:`curses.complexchar`, it works | |
| whether or not Python was built against a wide-character-aware curses | |
| library. | |
| .. | |
| .. date: 2026-06-25-22-41-49 | |
| .. gh-issue: 152233 | |
| .. nonce: pEhm3q | |
| .. section: Library | |
| Add the :class:`curses.complexchar` type, representing a styled character | |
| cell (text, attributes and color pair), and the :mod:`curses` window methods | |
| :meth:`~curses.window.in_wch` and :meth:`~curses.window.getbkgrnd` that | |
| return one. The character-cell methods (:meth:`~curses.window.addch`, | |
| :meth:`~curses.window.bkgd`, :meth:`~curses.window.border`, | |
| :meth:`~curses.window.hline` and others) now also accept a | |
| :class:`~curses.complexchar`. This works whether or not Python was built | |
| against a wide-character-aware curses library; on a narrow build a cell | |
| holds a single character representable as one byte in the window's encoding. | |
| .. | |
| .. date: 2026-06-25-22-19-04 | |
| .. gh-issue: 152099 | |
| .. nonce: L7fKq9 | |
| .. section: Library | |
| ``asyncio``'s ``loop.sendfile(..., fallback=False)`` now consistently raises | |
| :exc:`asyncio.SendfileNotAvailableError` for fallback-only transports, such | |
| as SSL/TLS transports, when native sendfile cannot be used. Previously, this | |
| case raised :exc:`RuntimeError`. | |
| .. | |
| .. date: 2026-06-25-20-00-00 | |
| .. gh-issue: 151496 | |
| .. nonce: kMnT3x | |
| .. section: Library | |
| Fixed ``profiling.sampling --gecko`` with ``--async-aware`` by flattening | |
| async task stacks before generating Gecko samples. ``--binary`` now rejects | |
| ``--async-aware`` until the binary format supports async task data. | |
| .. | |
| .. date: 2026-06-25-19-44-16 | |
| .. gh-issue: 152219 | |
| .. nonce: ndj4Ib | |
| .. section: Library | |
| Add the :mod:`curses` window methods :meth:`~curses.window.attr_get`, | |
| :meth:`~curses.window.attr_set`, :meth:`~curses.window.attr_on`, | |
| :meth:`~curses.window.attr_off` and :meth:`~curses.window.color_set`, which | |
| use a separate color pair argument instead of packing it into the attribute | |
| value, and the corresponding ``WA_*`` attribute constants. | |
| .. | |
| .. date: 2026-06-25-14-32-43 | |
| .. gh-issue: 139816 | |
| .. nonce: Lq2vXa | |
| .. section: Library | |
| Fix a hang in :mod:`tkinter` on interactive Python built without | |
| :mod:`readline`. An exception raised in a callback no longer causes the | |
| event loop to stop and wait for the user to press Enter; pending callbacks | |
| now keep running until input is actually available on stdin. | |
| .. | |
| .. date: 2026-06-25-14-32-42 | |
| .. gh-issue: 139145 | |
| .. nonce: kT9rmP | |
| .. section: Library | |
| Fix a busy loop in :mod:`tkinter` on interactive Python. When a Tcl command | |
| running its own event loop (such as ``vwait`` or :meth:`!wait_variable`) was | |
| active and input arrived on stdin, the event loop kept spinning at 100% CPU. | |
| The stdin file handler is now removed as soon as input is available. Based | |
| on a patch by Michiel de Hoon. | |
| .. | |
| .. date: 2026-06-25-14-05-00 | |
| .. gh-issue: 152204 | |
| .. nonce: k9Qm3v | |
| .. section: Library | |
| Fix the pure-Python implementations of :meth:`datetime.date.fromisoformat`, | |
| :meth:`datetime.time.fromisoformat` and | |
| :meth:`datetime.datetime.fromisoformat` silently accepting some malformed | |
| ISO 8601 strings, such as non-ASCII digits or a sign in a fixed-width field | |
| (for example ``'2020+12'`` or ``'20201212T0102٣٤'``). Each field is now | |
| required to be exactly *N* ASCII digits, matching the C implementation. | |
| .. | |
| .. date: 2026-06-25-12-00-00 | |
| .. gh-issue: 152212 | |
| .. nonce: Zk7Qm2 | |
| .. section: Library | |
| Fix the pure-Python :mod:`zoneinfo` parser accepting a POSIX TZ string with | |
| a ``std`` abbreviation but no offset. This is invalid per POSIX and now | |
| raises :exc:`ValueError`, matching the C accelerator. Patch by tonghuaroot. | |
| .. | |
| .. date: 2026-06-25-10-07-54 | |
| .. gh-issue: 152156 | |
| .. nonce: gscPU9 | |
| .. section: Library | |
| Fix a possible crash in :func:`concurrent.interpreters.create` under limited | |
| memory conditions. | |
| .. | |
| .. date: 2026-06-25-07-08-17 | |
| .. gh-issue: 152157 | |
| .. nonce: dt5Ef0 | |
| .. section: Library | |
| The C implementations of :meth:`~datetime.datetime.fromisoformat` and | |
| :meth:`~datetime.time.fromisoformat` now reject a decimal separator that is | |
| not followed by any fractional digit before a timezone designator. | |
| .. | |
| .. date: 2026-06-25-01-00-43 | |
| .. gh-issue: 151763 | |
| .. nonce: wWeHBe | |
| .. section: Library | |
| Fix crash in :func:`!_interpqueues.create` whe :exc:`MemoryError` happens on | |
| queue creation. | |
| .. | |
| .. date: 2026-06-24-23-28-42 | |
| .. gh-issue: 151669 | |
| .. nonce: tPUavQ | |
| .. section: Library | |
| On Windows, when populating tar archives from filesystem content, to conform | |
| to the tar format standard, backslashes in symlink targets are be replaced | |
| by slashes. | |
| .. | |
| .. date: 2026-06-24-22-16-35 | |
| .. gh-issue: 105895 | |
| .. nonce: hRkuEw | |
| .. section: Library | |
| Add :keyword:`match` and :keyword:`case` to the list of supported topics by | |
| :func:`help`. | |
| .. | |
| .. date: 2026-06-24-16-40-15 | |
| .. gh-issue: 151378 | |
| .. nonce: iYWa_6 | |
| .. section: Library | |
| Fix a bug in the binary collector in Tachyon that caused unbounded memory | |
| growth while profiling a thread that stayed asleep. Patch by Maurycy | |
| Pawłowski-Wieroński. | |
| .. | |
| .. date: 2026-06-24-16-08-44 | |
| .. gh-issue: 152074 | |
| .. nonce: PsbS-I | |
| .. section: Library | |
| Increase the buffer size to 256 KiB in :meth:`asyncio.loop.sendfile` method | |
| fallback. | |
| .. | |
| .. date: 2026-06-24-12-00-00 | |
| .. gh-issue: 152100 | |
| .. nonce: Set0ps | |
| .. section: Library | |
| Support set operations and nested sets in regular expression character | |
| classes, as described in Unicode Technical Standard #18: set difference | |
| (``[A--B]``), intersection (``[A&&B]``) and union (``[A||B]``). | |
| .. | |
| .. date: 2026-06-24-12-00-00 | |
| .. gh-issue: 152079 | |
| .. nonce: f1tzus | |
| .. section: Library | |
| Fix :meth:`datetime.datetime.fromisoformat` in the C implementation dropping | |
| the sub-second part of a UTC offset whose whole-second part is zero, | |
| matching the pure-Python implementation. | |
| .. | |
| .. date: 2026-06-24-12-00-00 | |
| .. gh-issue: 152052 | |
| .. nonce: yBssDE | |
| .. section: Library | |
| The :mod:`json` C accelerator now correctly reports an unterminated string | |
| for a ``\uXXXX`` escape at the end of the input. | |
| .. | |
| .. date: 2026-06-24-10-46-35 | |
| .. gh-issue: 152060 | |
| .. nonce: f2asrt | |
| .. section: Library | |
| Fix :meth:`datetime.datetime.fromisoformat` raising :exc:`AssertionError` | |
| instead of :exc:`ValueError` for some malformed strings in the pure-Python | |
| implementation, matching the C implementation. | |
| .. | |
| .. date: 2026-06-24-10-30-00 | |
| .. gh-issue: 152056 | |
| .. nonce: Qk7mZ2 | |
| .. section: Library | |
| Optimize matching of a character set that contains a single character | |
| category, such as ``[\d]`` or ``[^\s]``: it is now compiled to a single | |
| ``CATEGORY`` opcode, the same as the corresponding ``\d`` or ``\S`` escape, | |
| instead of being wrapped in an ``IN`` block. This speeds up matching and | |
| reduces the size of the compiled byte code. Patch by Pieter Eendebak. | |
| .. | |
| .. date: 2026-06-23-22-15-00 | |
| .. gh-issue: 152033 | |
| .. nonce: Ct1Egy | |
| .. section: Library | |
| Optimize matching of character class escapes (``\d``, ``\D``, ``\s``, | |
| ``\S``, ``\w`` and ``\W``) that occur outside a character set: they are now | |
| compiled to a single ``CATEGORY`` opcode instead of being wrapped in an | |
| ``IN`` block. This speeds up patterns such as ``\d+`` and reduces the size | |
| of the compiled byte code. | |
| .. | |
| .. date: 2026-06-23-18-42-37 | |
| .. gh-issue: 143990 | |
| .. nonce: o65v7O | |
| .. section: Library | |
| :class:`tkinter.font.Font` can now wrap a font description without creating | |
| a new named font, by passing it as *font* with ``exists=True`` and no | |
| *name*. This avoids a loss of precision in | |
| :meth:`~tkinter.font.Font.actual`, :meth:`~tkinter.font.Font.measure` and | |
| :meth:`~tkinter.font.Font.metrics`. Keyword options now override the | |
| corresponding settings of the given *font* instead of being ignored. | |
| .. | |
| .. date: 2026-06-23-17-14-04 | |
| .. gh-issue: 127802 | |
| .. nonce: nGSxo6 | |
| .. section: Library | |
| The deprecated :class:`tkinter.Variable` methods :meth:`!trace_variable`, | |
| :meth:`!trace`, :meth:`!trace_vdelete` and :meth:`!trace_vinfo` are now | |
| scheduled for removal in Python 3.17. | |
| .. | |
| .. date: 2026-06-23-13-27-14 | |
| .. gh-issue: 126219 | |
| .. nonce: kOfv2g | |
| .. section: Library | |
| Fixed a crash in :class:`tkinter.Tk` when *className* contains a non-BMP | |
| character and tkinter is built against Tcl/Tk 8.x. Such a name is now | |
| rejected with a :exc:`ValueError`. | |
| .. | |
| .. date: 2026-06-23-12-00-00 | |
| .. gh-issue: 101284 | |
| .. nonce: Ab3Xy9 | |
| .. section: Library | |
| :class:`tkinter.OptionMenu` now accepts arbitrary | |
| :class:`!tkinter.Menubutton` options as keyword arguments and uses them to | |
| override its default appearance. | |
| .. | |
| .. date: 2026-06-23-11-00-03 | |
| .. gh-issue: 143070 | |
| .. nonce: fV5w7s | |
| .. section: Library | |
| Automatically generated :mod:`tkinter` widget names now start with ``"+"`` | |
| instead of ``"!"``, so that they can be used as tags in the | |
| :class:`!tkinter.Canvas` and :class:`!tkinter.Text` widgets. | |
| .. | |
| .. date: 2026-06-22-18-01-00 | |
| .. gh-issue: 151955 | |
| .. nonce: 6u5iwm | |
| .. section: Library | |
| Allow more types to be used in the ``bound`` argument to | |
| :class:`typing.ParamSpec` and :class:`typing.TypeVarTuple`. | |
| .. | |
| .. date: 2026-06-22-14-30-00 | |
| .. gh-issue: 151920 | |
| .. nonce: Th3mSt | |
| .. section: Library | |
| Add the :meth:`ttk.Style.theme_styles <tkinter.ttk.Style.theme_styles>` | |
| method, wrapping the Tk ``ttk::style theme styles`` subcommand, which | |
| returns the list of styles defined in a theme. | |
| .. | |
| .. date: 2026-06-22-12-00-00 | |
| .. gh-issue: 95555 | |
| .. nonce: Pr0p18 | |
| .. section: Library | |
| Regular expressions now support Unicode property escapes ``\p{...}`` and | |
| ``\P{...}`` for properties that the engine can resolve without the | |
| unicodedata database: many ``General_Category`` values, a number of binary | |
| properties, the POSIX compatibility classes, and properties derivable from | |
| the code point. | |
| .. | |
| .. date: 2026-06-22-10-30-22 | |
| .. gh-issue: 151910 | |
| .. nonce: ayi8xK | |
| .. section: Library | |
| Added :class:`tkinter.ttk.Treeview` methods wrapping the enhanced | |
| ``ttk::treeview`` widget commands added in Tk 9.1 (and the ``detached`` | |
| query added in Tk 9.0): item navigation and queries, opening, hiding, | |
| sorting and searching of items, and cell focus, selection and tagging. The | |
| :meth:`~tkinter.ttk.Treeview.expand` and | |
| :meth:`~tkinter.ttk.Treeview.collapse` methods (without recursion) also work | |
| on Tk older than 9.1. | |
| .. | |
| .. date: 2026-06-22-02-29-02 | |
| .. gh-issue: 151890 | |
| .. nonce: gT6JwI | |
| .. section: Library | |
| Add the *format* parameter to the :meth:`tkinter.PhotoImage.put` method, the | |
| *metadata* parameter to the :meth:`~tkinter.PhotoImage.put`, | |
| :meth:`~tkinter.PhotoImage.read`, :meth:`~tkinter.PhotoImage.write` and | |
| :meth:`~tkinter.PhotoImage.data` methods, and the *withalpha* parameter to | |
| the :meth:`~tkinter.PhotoImage.get` method. The *metadata* and *withalpha* | |
| parameters require Tcl/Tk 9.0 or newer. | |
| .. | |
| .. date: 2026-06-22-01-57-55 | |
| .. gh-issue: 151888 | |
| .. nonce: hO7mxi | |
| .. section: Library | |
| Add the :meth:`!tkinter.PhotoImage.redither` method, wrapping the photo | |
| image ``redither`` Tk command. | |
| .. | |
| .. date: 2026-06-22-01-51-06 | |
| .. gh-issue: 151886 | |
| .. nonce: MsLlNz | |
| .. section: Library | |
| Add the :meth:`!tkinter.Misc.tk_appname`, | |
| :meth:`!tkinter.Misc.tk_useinputmethods` and :meth:`!tkinter.Misc.tk_caret` | |
| methods, wrapping the ``tk appname``, ``tk useinputmethods`` and ``tk | |
| caret`` Tk commands. | |
| .. | |
| .. date: 2026-06-22-01-39-38 | |
| .. gh-issue: 151881 | |
| .. nonce: ShACSZ | |
| .. section: Library | |
| Add the :meth:`tkinter.Menu.postcascade` method and the | |
| :meth:`!tkinter.Misc.tk_scaling` and :meth:`!tkinter.Misc.tk_inactive` | |
| methods, wrapping the ``postcascade``, ``tk scaling`` and ``tk inactive`` Tk | |
| commands. | |
| .. | |
| .. date: 2026-06-22-01-02-33 | |
| .. gh-issue: 151878 | |
| .. nonce: IFIA5C | |
| .. section: Library | |
| Add the :meth:`!validate` method to the :class:`tkinter.Entry` and | |
| :class:`tkinter.Spinbox` widgets, forcing an evaluation of the validation | |
| command. | |
| .. | |
| .. date: 2026-06-22-00-55-07 | |
| .. gh-issue: 151876 | |
| .. nonce: sVe0xx | |
| .. section: Library | |
| Add the :class:`tkinter.Canvas` methods :meth:`!rchars` and :meth:`!rotate`, | |
| wrapping the ``rchars`` and ``rotate`` Tk canvas commands. | |
| .. | |
| .. date: 2026-06-22-00-46-57 | |
| .. gh-issue: 151874 | |
| .. nonce: 8VtTrq | |
| .. section: Library | |
| Add the :mod:`tkinter` methods :meth:`!Misc.winfo_isdark`, | |
| :meth:`!Wm.wm_iconbadge` and :meth:`!Wm.wm_stackorder`, wrapping the ``winfo | |
| isdark``, ``wm iconbadge`` and ``wm stackorder`` Tk commands. | |
| .. | |
| .. date: 2026-06-21-23-17-12 | |
| .. gh-issue: 59396 | |
| .. nonce: Fd9Tk2 | |
| .. section: Library | |
| The :class:`!tkinter.filedialog.FileDialog` dialog and its | |
| :class:`!tkinter.filedialog.LoadFileDialog` and | |
| :class:`!tkinter.filedialog.SaveFileDialog` subclasses, which follow the | |
| layout of the classic Motif file selection dialog, were modernized to match | |
| its look and feel more closely. They are now built from the themed | |
| :mod:`tkinter.ttk` widgets instead of the classic :mod:`tkinter` widgets, | |
| and gained a *use_ttk* parameter that selects between the classic Tk widgets | |
| and the themed ttk widgets. The buttons and field labels gained :kbd:`Alt` | |
| key accelerators, the default ring follows the keyboard focus, and the | |
| :kbd:`Escape` key cancels the dialog. The directory and file lists gained a | |
| horizontal scrollbar and type-ahead selection. The dialog is now centered | |
| over its parent, and the overwrite confirmation of :class:`!SaveFileDialog` | |
| uses a themed message box. | |
| .. | |
| .. date: 2026-06-21-15-50-24 | |
| .. gh-issue: 86165 | |
| .. nonce: dyac1G | |
| .. section: Library | |
| Fix :func:`imaplib.Time2Internaldate` to use the local timezone offset for | |
| ``time.struct_time`` values with ``tm_gmtoff`` set to ``None``, as returned | |
| by ``datetime.datetime.timetuple()``. Contributed by Xiao Yuan. | |
| .. | |
| .. date: 2026-06-21-00-00-57 | |
| .. gh-issue: 151822 | |
| .. nonce: bOC2G56F | |
| .. section: Library | |
| Colorize ``exit``, ``quit``, ``copyright``, ``help``, and ``clear`` as | |
| commands in the :term:`REPL` when typed alone on a line. Patch by Bartosz | |
| Sławecki. | |
| .. | |
| .. date: 2026-06-20-22-55-22 | |
| .. gh-issue: 59396 | |
| .. nonce: kT9wPq | |
| .. section: Library | |
| The :mod:`tkinter.simpledialog` dialogs were modernized to match the look | |
| and feel of the native Tk dialogs. | |
| :class:`!tkinter.simpledialog.SimpleDialog` and the | |
| :func:`~tkinter.simpledialog.askinteger`, | |
| :func:`~tkinter.simpledialog.askfloat` and | |
| :func:`~tkinter.simpledialog.askstring` dialogs are now built from the | |
| themed :mod:`tkinter.ttk` widgets instead of the classic :mod:`tkinter` | |
| widgets; the :class:`!tkinter.simpledialog.Dialog` base class still defaults | |
| to the classic widgets for compatibility. Both :class:`!Dialog` and | |
| :class:`!SimpleDialog` gained a *use_ttk* parameter that selects between the | |
| classic Tk widgets and the themed ttk widgets. :class:`!SimpleDialog` also | |
| gained *bitmap* and *detail* parameters, draws the standard icons with | |
| themed images in the ttk version, and accepts mappings of button options as | |
| *buttons* entries, where an ``underline`` option adds an :kbd:`Alt` key | |
| accelerator. The font and wrap length of the message and the detail message | |
| are taken from the Tk option database and can be overridden by the | |
| application. The dialogs also follow the keyboard conventions of the Tk | |
| message box: the default ring follows the keyboard focus, the Return key | |
| activates the focused button, and the :class:`!Dialog` OK and Cancel buttons | |
| gained :kbd:`Alt` key accelerators. Several bugs were also fixed. | |
| .. | |
| .. date: 2026-06-20-21-15-13 | |
| .. gh-issue: 151814 | |
| .. nonce: OIbgsO | |
| .. section: Library | |
| Fix unbounded memory growth in :class:`io.TextIOWrapper` when repeatedly | |
| writing an empty string. | |
| .. | |
| .. date: 2026-06-20-20-24-03 | |
| .. gh-issue: 133998 | |
| .. nonce: nkqhMz | |
| .. section: Library | |
| Fix :func:`tarfile.open` in streaming write mode (``w|gz``) raising | |
| :exc:`struct.error` when given an *mtime* outside the range of the gzip | |
| header's 32-bit timestamp field. Out-of-range values are now stored as | |
| ``0``, matching :mod:`gzip`. | |
| .. | |
| .. date: 2026-06-20-15-00-00 | |
| .. gh-issue: 75666 | |
| .. nonce: Kt9xQ2 | |
| .. section: Library | |
| Fix a reference leak in :mod:`tkinter`: the Tcl commands created for event | |
| callbacks are now deleted when a binding is replaced or unbound. | |
| .. | |
| .. date: 2026-06-20-15-00-00 | |
| .. gh-issue: 151770 | |
| .. nonce: dtiso0 | |
| .. section: Library | |
| Fix :meth:`datetime.datetime.fromisoformat` raising :exc:`AssertionError` | |
| instead of :exc:`ValueError` for an out-of-range month combined with a | |
| ``24:00`` time. | |
| .. | |
| .. date: 2026-06-20-12-10-02 | |
| .. gh-issue: 151776 | |
| .. nonce: BtsXIF | |
| .. section: Library | |
| Add :mod:`curses` functions and window methods that report state which could | |
| previously only be set: the window methods | |
| :meth:`~curses.window.is_cleared`, :meth:`~curses.window.is_idcok`, | |
| :meth:`~curses.window.is_idlok`, :meth:`~curses.window.is_immedok`, | |
| :meth:`~curses.window.is_keypad`, :meth:`~curses.window.is_leaveok`, | |
| :meth:`~curses.window.is_nodelay`, :meth:`~curses.window.is_notimeout`, | |
| :meth:`~curses.window.is_pad`, :meth:`~curses.window.is_scrollok`, | |
| :meth:`~curses.window.is_subwin`, :meth:`~curses.window.is_syncok`, | |
| :meth:`~curses.window.getdelay`, :meth:`~curses.window.getparent` and | |
| :meth:`~curses.window.getscrreg`, and the functions | |
| :func:`curses.is_cbreak`, :func:`curses.is_echo`, :func:`curses.is_nl` and | |
| :func:`curses.is_raw`. They are only available when built against an | |
| ncurses with ``NCURSES_EXT_FUNCS``. | |
| .. | |
| .. date: 2026-06-20-11-11-22 | |
| .. gh-issue: 151774 | |
| .. nonce: O6nrvs | |
| .. section: Library | |
| Add the :mod:`curses` functions :func:`curses.alloc_pair`, | |
| :func:`curses.find_pair`, :func:`curses.free_pair` and | |
| :func:`curses.reset_color_pairs` for dynamic color-pair management. They | |
| are only available when Python is built against a wide-character version of | |
| the underlying curses library with extended-color support. | |
| .. | |
| .. date: 2026-06-20-02-14-55 | |
| .. gh-issue: 151757 | |
| .. nonce: TP9A2x | |
| .. section: Library | |
| The :mod:`curses` character-cell window methods now accept a full character | |
| cell -- a spacing character optionally followed by combining characters -- | |
| in addition to a single integer or byte character. Add the wide-character | |
| read methods :meth:`curses.window.get_wstr` and | |
| :meth:`curses.window.in_wstr`, and the functions :func:`curses.erasewchar`, | |
| :func:`curses.killwchar` and :func:`curses.wunctrl`. On a narrow | |
| (non-ncursesw) build the character cell holds a single character without | |
| combining marks, representable as one byte in the window's encoding, and | |
| :meth:`curses.window.in_wstr` returns its decoded text. | |
| .. | |
| .. date: 2026-06-19-18-40-00 | |
| .. gh-issue: 151744 | |
| .. nonce: Kp7mNq | |
| .. section: Library | |
| Add :func:`curses.nofilter`, which undoes the effect of | |
| :func:`curses.filter`. | |
| .. | |
| .. date: 2026-06-19-12-19-30 | |
| .. gh-issue: 90092 | |
| .. nonce: yBVc0C | |
| .. section: Library | |
| Add support for multiple terminals to the :mod:`curses` module: the new | |
| functions :func:`curses.newterm`, :func:`curses.set_term` and | |
| :func:`curses.new_prescr`, the corresponding :ref:`screen | |
| <curses-screen-objects>` object, and the :meth:`curses.window.use` method. | |
| .. | |
| .. date: 2026-06-19-12-00-01 | |
| .. gh-issue: 151675 | |
| .. nonce: acLD7L | |
| .. section: Library | |
| Add the :meth:`~tkinter.Text.sync` and :meth:`~tkinter.Text.pendingsync` | |
| methods of :class:`!tkinter.Text`, wrapping the Tk ``sync`` and | |
| ``pendingsync`` subcommands. | |
| .. | |
| .. date: 2026-06-19-12-00-00 | |
| .. gh-issue: 151674 | |
| .. nonce: FCYTvs | |
| .. section: Library | |
| Add the :meth:`~tkinter.Text.edit_canundo` and | |
| :meth:`~tkinter.Text.edit_canredo` methods of :class:`!tkinter.Text`, | |
| wrapping the Tk ``edit canundo`` and ``edit canredo`` subcommands. | |
| .. | |
| .. date: 2026-06-19-08-30-00 | |
| .. gh-issue: 151627 | |
| .. nonce: xY7kLm | |
| .. section: Library | |
| Fix a crash in :class:`collections.OrderedDict` iterators in free-threaded | |
| builds when the dictionary is concurrently cleared or updated. | |
| .. | |
| .. date: 2026-06-19-07-26-20 | |
| .. gh-issue: 151695 | |
| .. nonce: IBDlkN | |
| .. section: Library | |
| Fix a use-after-free in the :mod:`curses` module. The encoding of the | |
| initial screen, used by :func:`curses.unctrl` and :func:`curses.ungetch` to | |
| encode non-ASCII characters, is now kept as a private copy instead of a | |
| borrowed pointer to a window object that may be deallocated. | |
| .. | |
| .. date: 2026-06-18-23-59-46 | |
| .. gh-issue: 151596 | |
| .. nonce: 5ma144 | |
| .. section: Library | |
| Add missing ``size`` positional argument to the pure-Python implementation | |
| of :meth:`io.TextIOBase.readline`. | |
| .. | |
| .. date: 2026-06-18-12-48-03 | |
| .. gh-issue: 151640 | |
| .. nonce: R4c3Fx | |
| .. section: Library | |
| Fix a data race in :class:`io.BytesIO` in free-threaded builds when | |
| whole-buffer reads or peeks, or :meth:`~io.BytesIO.getvalue`, share the | |
| internal buffer with concurrent writes. | |
| .. | |
| .. date: 2026-06-18-00-39-58 | |
| .. gh-issue: 151615 | |
| .. nonce: PBsCE1 | |
| .. section: Library | |
| Fix :mod:`asyncio` servers repeatedly logging and rescheduling on a single | |
| event loop iteration when ``accept()`` fails with a resource errors. | |
| .. | |
| .. date: 2026-06-17-22-31-57 | |
| .. gh-issue: 151613 | |
| .. nonce: n0nua1 | |
| .. section: Library | |
| Fix another way the Tachyon profiler frame cache could produce impossible | |
| mixed stack traces when ``_PyInterpreterFrame`` addresses are reused, by | |
| validating cached frame anchors with a sequence counter. | |
| .. | |
| .. date: 2026-06-17-00-00-00 | |
| .. gh-issue: 148660 | |
| .. nonce: odcopy | |
| .. section: Library | |
| Fix a crash in :meth:`!collections.OrderedDict.copy` when a key's ``__eq__`` | |
| or a subclass method mutates the dict during the copy. Now raises | |
| :exc:`RuntimeError` instead, as iteration does. | |
| .. | |
| .. date: 2026-06-15-15-32-36 | |
| .. gh-issue: 151497 | |
| .. nonce: 1cfmSV | |
| .. section: Library | |
| Opening a :mod:`tarfile` archive no longer attempts to pre-allocate a huge | |
| buffer when a crafted or truncated member claims an oversized extended | |
| header (a GNU long name/link or a pax header). The extended header is now | |
| read in bounded chunks, so its size field can no longer trigger memory | |
| exhaustion. | |
| .. | |
| .. date: 2026-06-15-07-42-12 | |
| .. gh-issue: 151485 | |
| .. nonce: NiYQPZ | |
| .. section: Library | |
| Fix command quoting in :exc:`subprocess.CalledProcessError`. Contributed by | |
| Benjy Wiener. | |
| .. | |
| .. date: 2026-06-13-11-57-48 | |
| .. gh-issue: 151436 | |
| .. nonce: UEDowO | |
| .. section: Library | |
| Fix skewed stack traces in the Tachyon profiler when caching is enabled and | |
| when generators and coroutines are profiled, by updating | |
| ``tstate->last_profiled_frame`` at every frame-removal site. The issue | |
| resulted in total erasure of some callers. Patch by Maurycy | |
| Pawłowski-Wieroński. | |
| .. | |
| .. date: 2026-06-13-04-11-00 | |
| .. gh-issue: 151426 | |
| .. nonce: f2V67e | |
| .. section: Library | |
| Fix impossible stack traces (callers and callees cross called, orphans and | |
| incorrect lines) in the Tachyon profiler when caching frames, by | |
| snapshotting the stack chunks before walking the frame chain on a cache | |
| miss. Patch by Maurycy Pawłowski-Wieroński. | |
| .. | |
| .. date: 2026-06-12-22-46-31 | |
| .. gh-issue: 151403 | |
| .. nonce: DalZWh | |
| .. section: Library | |
| Fixed a crash in :class:`subprocess.Popen` (and | |
| ``_posixsubprocess.fork_exec``) when an ``argv`` item's | |
| :meth:`~os.PathLike.__fspath__` concurrently mutates the ``args`` sequence | |
| being converted. | |
| .. | |
| .. date: 2026-06-12-07-20-08 | |
| .. gh-issue: 151390 | |
| .. nonce: CmYN9EeJ | |
| .. section: Library | |
| Colorize ``match`` in the :term:`REPL` when followed by a unary ``+`` or | |
| ``-`` operator. Patch by Bartosz Sławecki. | |
| .. | |
| .. date: 2026-06-12-00-17-29 | |
| .. gh-issue: 151128 | |
| .. nonce: -LYO3a | |
| .. section: Library | |
| Cross-language keyword suggestions are now shown for :exc:`SyntaxError` | |
| messages. For example, ``switch x:`` suggests ``match``, ``delete x`` | |
| suggests ``del``, ``function f():`` suggests ``def``. Contributed by Zang | |
| Langyan. | |
| .. | |
| .. date: 2026-06-12-00-04-34 | |
| .. gh-issue: 151126 | |
| .. nonce: aHaBYq | |
| .. section: Library | |
| Fix crash on unset :exc:`MemoryError` on allocation failure in | |
| :func:`ctypes.get_errno`. | |
| .. | |
| .. date: 2026-06-12-00-00-00 | |
| .. gh-issue: 151416 | |
| .. nonce: spawnUA | |
| .. section: Library | |
| Fix a crash in :func:`os.spawnv` and :func:`os.spawnve` when an *argv* | |
| item's :meth:`~os.PathLike.__fspath__` method mutates the *argv* list during | |
| argument conversion. :func:`!os.spawnv` argument conversion errors other | |
| than :exc:`TypeError`, such as the :exc:`ValueError` for an embedded null, | |
| are no longer replaced with a generic :exc:`TypeError`. | |
| .. | |
| .. date: 2026-06-11-21-43-24 | |
| .. gh-issue: 151337 | |
| .. nonce: JSVV18 | |
| .. section: Library | |
| Avoid possible memory leak in ``tkinter.c`` on Windows. | |
| .. | |
| .. date: 2026-06-11-19-46-16 | |
| .. gh-issue: 150285 | |
| .. nonce: wuhAsL | |
| .. section: Library | |
| :mod:`pydoc` now uses all available space (80 columns) for formatting reprs | |
| of module and class data, but ensure that they do not overflow. | |
| .. | |
| .. date: 2026-06-11-16-25-38 | |
| .. gh-issue: 151126 | |
| .. nonce: bh_Usy | |
| .. section: Library | |
| Fix a crash when :exc:`MemoryError` in :func:`!os._path_splitroot` was not | |
| set properly. | |
| .. | |
| .. date: 2026-06-11-11-52-23 | |
| .. gh-issue: 149671 | |
| .. nonce: 6Rpr5r | |
| .. section: Library | |
| Restore compatibility with setuptools ``-nspkg.pth`` files in the | |
| :mod:`site` module. Inject ``sitedir`` variable in the frame which executes | |
| pth code. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-06-11-10-00-00 | |
| .. gh-issue: 119710 | |
| .. nonce: Qz7Kp2 | |
| .. section: Library | |
| Fix :mod:`asyncio` subprocess :meth:`~asyncio.subprocess.Process.wait` | |
| hanging when the process has exited but one of its pipes is kept open by an | |
| inherited child process (so the pipe never reaches EOF). ``wait()`` now | |
| returns as soon as the process exits, regardless of the pipes' state. | |
| .. | |
| .. date: 2026-06-11-00-00-00 | |
| .. gh-issue: 151295 | |
| .. nonce: NQYUzW | |
| .. section: Library | |
| Fixed a crash (use-after-free) in :meth:`bytes.join` and | |
| :meth:`bytearray.join` that could occur if an item's | |
| :meth:`~object.__buffer__` concurrently mutates the sequence being joined. | |
| The mutation is now reported as a :exc:`RuntimeError` instead. | |
| .. | |
| .. date: 2026-06-10-00-00-02 | |
| .. gh-issue: 109940 | |
| .. nonce: Cx1099 | |
| .. section: Library | |
| Fix Windows :mod:`venv` activation in ``cmd.exe`` to respect | |
| ``VIRTUAL_ENV_DISABLE_PROMPT``. | |
| .. | |
| .. date: 2026-06-10-00-00-01 | |
| .. gh-issue: 117807 | |
| .. nonce: Cx1178 | |
| .. section: Library | |
| Fix :mod:`mimetypes` initialization from MIME map files containing invalid | |
| UTF-8 bytes. | |
| .. | |
| .. date: 2026-06-09-19-43-24 | |
| .. gh-issue: 151179 | |
| .. nonce: hl_6Z0 | |
| .. section: Library | |
| Fix a pidfd leak in ``_PidfdChildWatcher`` on Linux: the watcher no longer | |
| leaks the process file descriptor when ``waitpid()`` fails with an error | |
| other than :exc:`ChildProcessError`. | |
| .. | |
| .. date: 2026-06-09-14-49-17 | |
| .. gh-issue: 80384 | |
| .. nonce: ttRAja | |
| .. section: Library | |
| :func:`weakref.ref` and :func:`weakref.proxy` now raise :exc:`TypeError` if | |
| the *callback* argument is not callable or ``None``. | |
| .. | |
| .. date: 2026-06-09-12-00-00 | |
| .. gh-issue: 150771 | |
| .. nonce: K7mNx2 | |
| .. section: Library | |
| Fix :mod:`email` messages created with ``shift_jis`` or ``euc-jp`` charsets. | |
| ``set_content()`` now stores the payload using the output charset | |
| (``iso-2022-jp``) so printing the message no longer raises | |
| :exc:`UnicodeEncodeError`. | |
| .. | |
| .. date: 2026-06-08-15-04-35 | |
| .. gh-issue: 150285 | |
| .. nonce: -Tj94n | |
| .. section: Library | |
| :mod:`pydoc` now wraps long single-line summary in text output. | |
| .. | |
| .. date: 2026-06-07-23-30-34 | |
| .. gh-issue: 151049 | |
| .. nonce: mBlToO | |
| .. section: Library | |
| :mod:`ipaddress`: fix ``is_global`` and ``is_private`` for the | |
| ``2001:1::3/128`` (DNS-SD Service Registration Protocol Anycast) address, | |
| which IANA registered as globally reachable per :rfc:`9665`. It is now | |
| correctly reported with ``is_global`` ``True`` and ``is_private`` ``False``. | |
| .. | |
| .. date: 2026-06-07-17-29-33 | |
| .. gh-issue: 151039 | |
| .. nonce: AZ0qBn | |
| .. section: Library | |
| Fix a crash when static :mod:`datetime` types outlive the ``_datetime`` | |
| module. | |
| .. | |
| .. date: 2026-06-07-13-47-05 | |
| .. gh-issue: 151042 | |
| .. nonce: NMdzF2 | |
| .. section: Library | |
| Fixed venv exporting mixed path styles to PATH on Windows inside fish (via | |
| Cygwin, MinGW or MSYS2) | |
| .. | |
| .. date: 2026-06-06-15-20-54 | |
| .. gh-issue: 151021 | |
| .. nonce: J4qk2A | |
| .. section: Library | |
| Fix :meth:`mmap.mmap.find` and :meth:`~mmap.mmap.rfind` to return ``-1`` | |
| when searching for an empty subsequence with a start position past the end | |
| of the mapping. | |
| .. | |
| .. date: 2026-06-06-15-04-37 | |
| .. gh-issue: 151022 | |
| .. nonce: 1Aw8Tk | |
| .. section: Library | |
| Fix ``_remote_debugging`` stack traces for code objects with large line | |
| tables. | |
| .. | |
| .. date: 2026-06-06-06-29-17 | |
| .. gh-issue: 150994 | |
| .. nonce: I2119M | |
| .. section: Library | |
| Make the type annotations in the private ``_colorize`` module resolvable. | |
| .. | |
| .. date: 2026-06-05-16-57-03 | |
| .. gh-issue: 143768 | |
| .. nonce: RbLnkFx | |
| .. section: Library | |
| :mod:`venv`: Replace a dangling interpreter symlink in an existing virtual | |
| environment instead of failing or silently leaving it broken. Fix by Clay | |
| Dugo. | |
| .. | |
| .. date: 2026-06-04-23-10-31 | |
| .. gh-issue: 62825 | |
| .. nonce: BtG_yQ | |
| .. section: Library | |
| Encodings "KS_C_5601-1987", "KS X 1001", etc are now aliases of "CP949" | |
| instead of "EUC-KR". | |
| .. | |
| .. date: 2026-06-04-21-49-18 | |
| .. gh-issue: 150913 | |
| .. nonce: EmptyBl | |
| .. section: Library | |
| Fix :class:`sqlite3.Blob` slice assignment to raise :exc:`TypeError` and | |
| :exc:`IndexError` for type and size mismatches respectively, even when the | |
| target slice is empty. | |
| .. | |
| .. date: 2026-06-04-19-24-13 | |
| .. gh-issue: 140006 | |
| .. nonce: TD8HKl | |
| .. section: Library | |
| The :mod:`venv` ``activate.fish`` script now calls fish builtins through | |
| ``builtin`` so a user function that shadows ``.``/``source``, ``echo``, | |
| ``printf``, ``set_color``, or ``functions`` can no longer hijack the virtual | |
| environment prompt or break exit-status reporting. | |
| .. | |
| .. date: 2026-06-04-18-22-56 | |
| .. gh-issue: 143008 | |
| .. nonce: z5tw-J | |
| .. section: Library | |
| Fix race conditions when re-initializing a :class:`io.TextIOWrapper` object. | |
| .. | |
| .. date: 2026-06-04-10-44-36 | |
| .. gh-issue: 150889 | |
| .. nonce: UYNLR_ | |
| .. section: Library | |
| Speed up :func:`unicodedata.normalize` for the NFC and NFKC forms of | |
| non-ASCII text up to a factor 2. | |
| .. | |
| .. date: 2026-06-04-06-50-06 | |
| .. gh-issue: 150898 | |
| .. nonce: 1LkLA3 | |
| .. section: Library | |
| Unconditionally assume :attr:`ssl.SSLContext.keylog_filename` exists. | |
| .. | |
| .. date: 2026-06-03-21-59-11 | |
| .. gh-issue: 150886 | |
| .. nonce: r2c25g | |
| .. section: Library | |
| Remove the private, undocumented function | |
| ``importlib._bootstrap._object_name()``. It had no caller after | |
| ``load_module()`` and its deprecation warnings were removed from | |
| :mod:`importlib`. | |
| .. | |
| .. date: 2026-06-03-19-35-32 | |
| .. gh-issue: 150583 | |
| .. nonce: dedI24 | |
| .. section: Library | |
| Correctly set the default compression level in :mod:`compression.zstd` when | |
| passing a digested dictionary during compression. | |
| .. | |
| .. date: 2026-06-03-18-41-42 | |
| .. gh-issue: 150866 | |
| .. nonce: gXGyX- | |
| .. section: Library | |
| Fix :meth:`asyncio.loop.shutdown_asyncgens` to report any | |
| :exc:`BaseException` raised during asynchronous generator cleanup. | |
| .. | |
| .. date: 2026-06-03-13-51-29 | |
| .. gh-issue: 150662 | |
| .. nonce: ELT8Vg | |
| .. section: Library | |
| Fix the ``--gecko`` collector in :mod:`profiling.sampling` that kept every | |
| sample in memory. It now writes sample and marker data to temporary files | |
| and reads them back, ultimately building the output file at the end. Patch | |
| by Pablo Galindo and Maurycy Pawłowski-Wieroński. | |
| .. | |
| .. date: 2026-06-02-15-45-00 | |
| .. gh-issue: 150820 | |
| .. nonce: W7tpO7 | |
| .. section: Library | |
| Speed up :func:`json.dumps` for small documents. Patch by Bernát Gábor. | |
| .. | |
| .. date: 2026-06-02-15-44-58 | |
| .. gh-issue: 150818 | |
| .. nonce: Orcefu | |
| .. section: Library | |
| Speed up :func:`logging.getLogger` with a lock-free fast path that returns | |
| an already-registered logger without acquiring the logging lock. Patch by | |
| Bernát Gábor. | |
| .. | |
| .. date: 2026-06-02-15-44-57 | |
| .. gh-issue: 150817 | |
| .. nonce: lpFCh0 | |
| .. section: Library | |
| Speed up the ``|``, ``&`` and ``^`` operations on :class:`enum.Flag` | |
| members. Patch by Bernát Gábor. | |
| .. | |
| .. date: 2026-06-02-14-21-46 | |
| .. gh-issue: 150750 | |
| .. nonce: SVS2o0 | |
| .. section: Library | |
| Fix a race condition in :meth:`collections.deque.index` with free-threading. | |
| .. | |
| .. date: 2026-06-02-13-10-00 | |
| .. gh-issue: 150751 | |
| .. nonce: Hk2Vw9 | |
| .. section: Library | |
| :mod:`http.client` now validates the ``Content-Length`` header and the | |
| chunked ``chunk-size`` against the RFC 9112 grammar (``1*DIGIT`` and | |
| ``1*HEXDIG``) before parsing them, rejecting values such as ``+5``, ``5_0`` | |
| or a ``0x``-prefixed or negative chunk size that :func:`int` would otherwise | |
| accept. This avoids framing a response differently from a strict peer. | |
| .. | |
| .. date: 2026-06-01-08-12-34 | |
| .. gh-issue: 150717 | |
| .. nonce: LVRJXH | |
| .. section: Library | |
| Avoid an unnecessary per-call memory allocation when matching :mod:`re` | |
| patterns that have no capturing groups. Patch by Bernát Gábor. | |
| .. | |
| .. date: 2026-05-31-17-47-30 | |
| .. gh-issue: 150685 | |
| .. nonce: EBB2mU | |
| .. section: Library | |
| Update bundled pip to 26.1.2 | |
| .. | |
| .. date: 2026-05-31-14-39-25 | |
| .. gh-issue: 150641 | |
| .. nonce: LLIhd1 | |
| .. section: Library | |
| Fix bug where :func:`typing.evaluate_forward_ref` with the ``STRING`` format | |
| could leak internal names used by the annotation machinery. | |
| .. | |
| .. date: 2026-05-31-12-00-00 | |
| .. gh-issue: 150942 | |
| .. nonce: Re7Ref | |
| .. section: Library | |
| Speed up :func:`re.findall`, :func:`re.sub` and :func:`re.subn` by appending | |
| result items to the output list without an extra reference-count round-trip | |
| (using the internal reference-stealing list append helper). | |
| .. | |
| .. date: 2026-05-31-10-00-00 | |
| .. gh-issue: 150942 | |
| .. nonce: Tk9aRef | |
| .. section: Library | |
| Speed up :func:`json.loads` decoding of arrays and objects by storing parsed | |
| values into the result list/dict without an extra reference-count round-trip | |
| (using the internal reference-stealing append/insert helpers). | |
| .. | |
| .. date: 2026-05-29-10-11-34 | |
| .. gh-issue: 117404 | |
| .. nonce: EeP6xe | |
| .. section: Library | |
| Add a number of constants in modules :mod:`zlib`, :mod:`bz2`, :mod:`lzma`, | |
| and :mod:`compression.zstd`, which provide information about the version of | |
| libraries that were used for building the module and that are actually | |
| loaded. Make :const:`compression.zstd.zstd_version_info` a named tuple. | |
| .. | |
| .. date: 2026-05-28-23-38-46 | |
| .. gh-issue: 150478 | |
| .. nonce: qEr0E- | |
| .. section: Library | |
| Add ``show_jit`` option to ``dis.dis`` to show JIT entry points in the | |
| bytecode. This is useful for visualizing where JIT traces are entered from | |
| the interpreter. | |
| .. | |
| .. date: 2026-05-27-23-47-31 | |
| .. gh-issue: 148932 | |
| .. nonce: Y1xmvA | |
| .. section: Library | |
| Fix ``profiling.sampling`` on Windows virtual environments to resolve the | |
| actual Python PID from a virtual environment shim. | |
| .. | |
| .. date: 2026-05-27-15-51-29 | |
| .. gh-issue: 150534 | |
| .. nonce: 3Nan6S | |
| .. section: Library | |
| Added trigonometric functions that work in units of half turns, rather than | |
| radians. The new functions :func:`math.acospi`, :func:`math.asinpi`, | |
| :func:`math.atanpi`, and :func:`math.atan2pi` return half-turn angles. The | |
| new functions :func:`math.cospi`, :func:`math.sinpi`, and :func:`math.tanpi` | |
| take half-turn angle arguments. These functions are recommended by IEEE | |
| 754-2019 and standardized in C23. | |
| .. | |
| .. date: 2026-05-27-11-18-36 | |
| .. gh-issue: 150228 | |
| .. nonce: pNPiO- | |
| .. section: Library | |
| The new :class:`site.StartupState` class lets callers batch-process | |
| :pep:`829` startup configuration files across multiple site directories | |
| before any startup code runs, with public | |
| :meth:`~site.StartupState.addsitedir`, | |
| :meth:`~site.StartupState.addusersitepackages`, | |
| :meth:`~site.StartupState.addsitepackages`, and | |
| :meth:`~site.StartupState.process` methods. The signature of | |
| :func:`site.addsitedir` is unchanged from Python 3.14. The | |
| :data:`!defer_processing_start_files` argument and the | |
| ``process_startup_files()`` function added earlier in the 3.15 cycle have | |
| been removed; use :class:`!site.StartupState` instead. | |
| .. | |
| .. date: 2026-05-26-19-30-00 | |
| .. gh-issue: 150479 | |
| .. nonce: Kq7Lm2 | |
| .. section: Library | |
| :func:`email.utils.formataddr` now raises :exc:`ValueError` when the name or | |
| address contains a carriage return or line feed, matching | |
| :class:`email.headerregistry.Address`. This check can be disabled by | |
| passing ``strict=False``. | |
| .. | |
| .. date: 2026-05-26-15-53-50 | |
| .. gh-issue: 150449 | |
| .. nonce: GfDWxl | |
| .. section: Library | |
| :class:`sqlite3.Blob` now supports negative-step slices for reading and | |
| writing (e.g. ``blob[9:0:-2]``). Previously, such slices would raise | |
| :exc:`SystemError` or :exc:`ValueError`. | |
| .. | |
| .. date: 2026-05-25-17-00-00 | |
| .. gh-issue: 150406 | |
| .. nonce: jF3g63 | |
| .. section: Library | |
| Fix a possible crash occurring during :mod:`socket` module initialization | |
| when the system is out of memory on platforms without a reentrant | |
| ``gethostbyname``. | |
| .. | |
| .. date: 2026-05-25-07-22-05 | |
| .. gh-issue: 150372 | |
| .. nonce: 9hLqhe | |
| .. section: Library | |
| :mod:`readline`: Fix a potential crash during tab completion caused by an | |
| out-of-memory error during module initialization. | |
| .. | |
| .. date: 2026-05-22-15-30-00 | |
| .. gh-issue: 132372 | |
| .. nonce: YP4a6x | |
| .. section: Library | |
| Speed up :func:`logging.config.fileConfig` and | |
| :func:`logging.config.dictConfig` when handling many existing loggers. | |
| .. | |
| .. date: 2026-05-21-20-47-45 | |
| .. gh-issue: 150157 | |
| .. nonce: ZvmO-bQZ | |
| .. section: Library | |
| Fix a crash in free-threaded builds that occurs when pickling by name | |
| objects without a ``__module__`` attribute while :data:`sys.modules` is | |
| concurrently being modified. | |
| .. | |
| .. date: 2026-05-21-11-25-58 | |
| .. gh-issue: 150175 | |
| .. nonce: 8H4Caz | |
| .. section: Library | |
| Fix race condition in :class:`unittest.mock.ThreadingMock` where concurrent | |
| calls could lose increments to ``call_count`` and other attributes due to a | |
| missing lock in ``_increment_mock_call``. | |
| .. | |
| .. date: 2026-05-20-14-00-00 | |
| .. gh-issue: 145856 | |
| .. nonce: Pl5kZx | |
| .. section: Library | |
| Fix :func:`plistlib.dumps` and :func:`plistlib.dump` so that | |
| ``skipkeys=True`` together with ``sort_keys=True`` correctly drops | |
| non-string keys when the dictionary contains a mix of string and non-string | |
| keys. Previously the sort ran before the filter and raised | |
| :exc:`TypeError`. | |
| .. | |
| .. date: 2026-05-19-19-00-49 | |
| .. gh-issue: 84353 | |
| .. nonce: ZU5zaQ | |
| .. section: Library | |
| Preserve non-UTF-8 encoded filenames when appending to a | |
| :class:`zipfile.ZipFile`. Previously, non-ASCII names stored in a legacy | |
| encoding (without the UTF-8 flag bit set) could be corrupted when the | |
| central directory was rewritten: they were decoded as cp437 and then | |
| re-stored as UTF-8. | |
| .. | |
| .. date: 2026-05-19-18-25-00 | |
| .. gh-issue: 150077 | |
| .. nonce: zstopen-close | |
| .. section: Library | |
| Fix ``tarfile.TarFile.zstopen`` to close the underlying zstd file object | |
| when opening the tar archive is interrupted by a :exc:`BaseException` | |
| subclass such as :exc:`KeyboardInterrupt`. | |
| .. | |
| .. date: 2026-05-19-12-00-00 | |
| .. gh-issue: 149980 | |
| .. nonce: Kx7p2A | |
| .. section: Library | |
| Fix :mod:`tarfile` so that GNU long-name directory entries have all trailing | |
| slashes stripped from their names, matching the behavior for short-name | |
| entries. Previously, only a single trailing slash was removed. | |
| .. | |
| .. date: 2026-05-19-11-42-37 | |
| .. gh-issue: 127949 | |
| .. nonce: Ab3kZq | |
| .. section: Library | |
| Remove the deprecated :mod:`asyncio` event loop policy system. Patch by | |
| Kumar Aditya. | |
| .. | |
| .. date: 2026-05-18-22-45-54 | |
| .. gh-issue: 149816 | |
| .. nonce: T68vc_ | |
| .. section: Library | |
| Fix race condition in :attr:`ssl.SSLContext.sni_callback` | |
| .. | |
| .. date: 2026-05-18-17-17-20 | |
| .. gh-issue: 149189 | |
| .. nonce: a8IooK | |
| .. section: Library | |
| Revert the changes to :mod:`pprint` defaults. Patch by Hugo van Kemenade. | |
| .. | |
| .. date: 2026-05-18-13-43-06 | |
| .. gh-issue: 79413 | |
| .. nonce: OpTXbV | |
| .. section: Library | |
| Update :func:`dataclasses.make_dataclass` to add a *qualname* parameter. The | |
| *qualname* parameter will be used to set the :attr:`!__qualname__` of the | |
| created ``dataclass``. | |
| .. | |
| .. date: 2026-05-18-12-42-31 | |
| .. gh-issue: 149816 | |
| .. nonce: F98iME | |
| .. section: Library | |
| Fix a potential use after free condition in :func:`pickle.dumps` in | |
| free-threaded mode when serializing lists. | |
| .. | |
| .. date: 2026-05-18-07-44-46 | |
| .. gh-issue: 149995 | |
| .. nonce: vvtFHn | |
| .. section: Library | |
| Update various docstrings in :mod:`typing`. | |
| .. | |
| .. date: 2026-05-17-22-37-02 | |
| .. gh-issue: 88726 | |
| .. nonce: BAoL6j | |
| .. section: Library | |
| The :mod:`email` package now uses standard MIME charset names "gb2312" and | |
| "big5" instead of non-standard names "eucgb2312_cn" and "big5_tw". | |
| .. | |
| .. date: 2026-05-17-12-37-59 | |
| .. gh-issue: 53144 | |
| .. nonce: c5tr1p | |
| .. section: Library | |
| The :mod:`email` package now supports all aliases of Python codecs and uses | |
| MIME/IANA names for all IANA registered charsets. | |
| .. | |
| .. date: 2026-05-17-02-25-56 | |
| .. gh-issue: 149571 | |
| .. nonce: LNyuWJ | |
| .. section: Library | |
| Fix the C implementation of :meth:`xml.etree.ElementTree.Element.itertext`: | |
| it no longer emits text for comments and processing instructions. | |
| .. | |
| .. date: 2026-05-16-22-00-00 | |
| .. gh-issue: 146406 | |
| .. nonce: 10e0da | |
| .. section: Library | |
| Add cross-language hints for ``.clear()`` on :class:`tuple`, | |
| :class:`frozenset`, and :class:`frozendict`, suggesting the mutable | |
| counterpart. Follow-up to :gh:`146406`. | |
| .. | |
| .. date: 2026-05-16-21-08-33 | |
| .. gh-issue: 149921 | |
| .. nonce: I1yNML | |
| .. section: Library | |
| Fix reference leaks in error paths of the :mod:`!_interpchannels` and | |
| :mod:`!_interpqueues` extension modules. | |
| .. | |
| .. date: 2026-05-15-19-52-41 | |
| .. gh-issue: 149891 | |
| .. nonce: BJUIGB | |
| .. section: Library | |
| Add support for more encoding aliases `officially registered in IANA | |
| <https://www.iana.org/assignments/character-sets/character-sets.xhtml>`__. | |
| .. | |
| .. date: 2026-05-15-18-44-20 | |
| .. gh-issue: 142349 | |
| .. nonce: fHK3v1 | |
| .. section: Library | |
| Add :keyword:`lazy` to the list of support topic by :func:`help`. | |
| .. | |
| .. date: 2026-05-15-16-28-00 | |
| .. gh-issue: 149819 | |
| .. nonce: fixpth | |
| .. section: Library | |
| Fix regression in :func:`site.addsitedir` where ``.pth`` files were no | |
| longer processed in Python subprocesses. This happened because | |
| :func:`site.main` seeded ``known_paths`` with entries inherited from the | |
| parent process, causing ``addsitedir`` to skip ``.pth`` processing. | |
| .. | |
| .. date: 2026-05-14-17-01-19 | |
| .. gh-issue: 62259 | |
| .. nonce: ytlFD5 | |
| .. section: Library | |
| Add support for multiple multi-byte encodings in the :mod:`XML parser | |
| <xml.parsers.expat>`: "cp932", "cp949", "cp950", "Big5","EUC-JP", "GB2312", | |
| "GBK", "johab", and "Shift_JIS". Add partial support (only BMP characters) | |
| for multi-byte encodings "Big5-HKSCS", "EUC_JIS-2004", "EUC_JISX0213", | |
| "Shift_JIS-2004", "Shift_JISX0213", "utf-8-sig" and non-standard aliases | |
| like "UTF8" (without hyphen). The parser now raises :exc:`ValueError` for | |
| known unsupported multi-byte encodings such us "ISO-2022-JP" or | |
| "raw-unicode-escape" instead of failing later, when encounter non-ASCII | |
| data. | |
| .. | |
| .. date: 2026-05-14-15-55-28 | |
| .. gh-issue: 149816 | |
| .. nonce: ZaXQ0q | |
| .. section: Library | |
| Fix a race condition in ``_random.Random.__init__`` method in free-threading | |
| mode. | |
| .. | |
| .. date: 2026-05-13-23-18-39 | |
| .. gh-issue: 149801 | |
| .. nonce: S_FfGr | |
| .. section: Library | |
| Add IANA registered names and aliases with leading zeros before number (like | |
| IBM00858, CP00858, IBM01140, CP01140) for corresponding codecs. | |
| .. | |
| .. date: 2026-05-13-12-16-54 | |
| .. gh-issue: 149473 | |
| .. nonce: nOQZqn | |
| .. section: Library | |
| Calling ``os.environ.clear()`` now emits ``os._clearenv`` auditing event. | |
| Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-05-12-14-44-39 | |
| .. gh-issue: 149720 | |
| .. nonce: ccsoW- | |
| .. section: Library | |
| Remove support for undotted *ext* in :meth:`mimetypes.MimeTypes.add_type`. | |
| .. | |
| .. date: 2026-05-12-13-03-45 | |
| .. gh-issue: 149718 | |
| .. nonce: SaM1NJ | |
| .. section: Library | |
| Coalesce consecutive identical stack frames in Tachyon, so aggregating | |
| collectors (pstats, collapsed, flamegraph, gecko) receive one collect. | |
| Improves sample rate 3x, error rate and missed rate drop by 70%. Patch by | |
| Maurycy Pawłowski-Wieroński. | |
| .. | |
| .. date: 2026-05-12-06-24-54 | |
| .. gh-issue: 149701 | |
| .. nonce: 8v9RTm | |
| .. section: Library | |
| Fix bad return code from Lib/venv/bin/activate if hashing is disabled | |
| .. | |
| .. date: 2026-05-10-23-51-23 | |
| .. gh-issue: 149504 | |
| .. nonce: pDSCbn | |
| .. section: Library | |
| Fix :func:`site.addsitedir` to allow re-entrant calls from within startup | |
| files. Previously, a ``.pth`` file containing an ``import`` line that | |
| called :func:`site.addsitedir` (or a ``.start`` entry point doing the same) | |
| could crash with ``RuntimeError: dictionary changed size during iteration`` | |
| during site initialization, breaking tools such as ``uv run --with``. | |
| .. | |
| .. date: 2026-05-10-19-26-50 | |
| .. gh-issue: 149584 | |
| .. nonce: x7Qm9A | |
| .. section: Library | |
| Fix excessive overhead in the Tachyon profiler when inspecting a remote | |
| process by avoiding repeated remote page-cache scans, batching predicted | |
| remote reads, and reusing cached profiler result objects. Patch by Pablo | |
| Galindo and Maurycy Pawłowski-Wieroński. | |
| .. | |
| .. date: 2026-05-10-16-06-27 | |
| .. gh-issue: 149609 | |
| .. nonce: yLKPXo | |
| .. section: Library | |
| Raise :exc:`DeprecationWarning` on using :class:`abc.abstractclassmethod`, | |
| :class:`abc.abstractstaticmethod`, and :class:`abc.abstractproperty`, | |
| schedule its removal for Python 3.21. | |
| .. | |
| .. date: 2026-05-10-14-10-00 | |
| .. gh-issue: 149634 | |
| .. nonce: iT5cwC | |
| .. section: Library | |
| Remove deprecated and unused :attr:`!tarfile.TarInfo.tarfile` attribute. | |
| .. | |
| .. date: 2026-05-10-12-00-00 | |
| .. gh-issue: 149578 | |
| .. nonce: 5cgq7iV | |
| .. section: Library | |
| Fix :func:`tarfile.open` failing with :exc:`~tarfile.ReadError` when opening | |
| a PAX format tar archive that contains only global headers and no regular | |
| members. | |
| .. | |
| .. date: 2026-05-10-07-21-51 | |
| .. gh-issue: 139489 | |
| .. nonce: rS7LTA | |
| .. section: Library | |
| Add :func:`xml.is_valid_text` to ``xml.__all__``. | |
| .. | |
| .. date: 2026-05-09-21-02-08 | |
| .. gh-issue: 149614 | |
| .. nonce: U4snj3 | |
| .. section: Library | |
| Fix a regression that broke the ability to deepcopy | |
| :class:`argparse.ArgumentParser` instances. | |
| .. | |
| .. date: 2026-05-09-15-42-54 | |
| .. gh-issue: 149600 | |
| .. nonce: ZbL-iv | |
| .. section: Library | |
| Remove deprecated :func:`!asyncio.iscoroutinefunction` function. | |
| .. | |
| .. date: 2026-05-09-15-17-59 | |
| .. gh-issue: 149598 | |
| .. nonce: aLrXRw | |
| .. section: Library | |
| Remove support of deprecated *strm* argument for :mod:`logging` handlers. | |
| .. | |
| .. date: 2026-05-09-11-22-29 | |
| .. gh-issue: 149595 | |
| .. nonce: 1nuYXw | |
| .. section: Library | |
| Remove the :func:`!sys._enablelegacywindowsfsencoding` function which has | |
| been deprecated since Python 3.13. | |
| .. | |
| .. date: 2026-05-08-16-44-20 | |
| .. gh-issue: 149567 | |
| .. nonce: iiZKEj | |
| .. section: Library | |
| Remove the :exc:`!shutil.ExecError` exception which has been deprecated | |
| since Python 3.14. | |
| .. | |
| .. date: 2026-05-08-15-08-35 | |
| .. gh-issue: 112821 | |
| .. nonce: t9T1YD | |
| .. section: Library | |
| In the REPL, autocompletion might run arbitrary code in the getter of a | |
| descriptor. If that getter raised an exception, autocompletion would fail to | |
| present any options for the entire object. Autocompletion now works as | |
| expected for these objects. | |
| .. | |
| .. date: 2026-05-08-14-24-16 | |
| .. gh-issue: 149436 | |
| .. nonce: dEV02X | |
| .. section: Library | |
| Improve performance of :meth:`inspect.getattr_static`. | |
| .. | |
| .. date: 2026-05-08-09-11-48 | |
| .. gh-issue: 149534 | |
| .. nonce: Tw7eeY | |
| .. section: Library | |
| Fix merging of :class:`collections.defaultdict` and :class:`frozendict`. | |
| .. | |
| .. date: 2026-05-08-08-24-01 | |
| .. gh-issue: 149537 | |
| .. nonce: hVFVnt | |
| .. section: Library | |
| Remove kw parameters from python version of :func:`functools.reduce` | |
| function. | |
| .. | |
| .. date: 2026-05-08-07-51-54 | |
| .. gh-issue: 80480 | |
| .. nonce: nnA4p1 | |
| .. section: Library | |
| Remove deprecated ``'u'`` type code (:c:type:`wchar_t`) for the :mod:`array` | |
| module. Use ``'w'`` format code instead (:c:type:`Py_UCS4`, always 4 | |
| bytes). | |
| .. | |
| .. date: 2026-05-08-06-56-57 | |
| .. gh-issue: 149530 | |
| .. nonce: cl2AJ8 | |
| .. section: Library | |
| Removed :meth:`!symtable.Class.get_methods` which has been deprecated since | |
| 3.14. | |
| .. | |
| .. date: 2026-05-08-06-12-26 | |
| .. gh-issue: 149528 | |
| .. nonce: AxdDxa | |
| .. section: Library | |
| Remove ``annotationlib.ForwardRef._evaludate`` deprecated method. | |
| .. | |
| .. date: 2026-05-07-21-58-17 | |
| .. gh-issue: 149388 | |
| .. nonce: DDBPeA | |
| .. section: Library | |
| Make :class:`!asyncio.windows_utils.PipeHandle` closing idempotent. | |
| .. | |
| .. date: 2026-05-07-17-35-47 | |
| .. gh-issue: 149499 | |
| .. nonce: G2ER-R | |
| .. section: Library | |
| Removed the :func:`!sysconfig.expand_makefile_vars` function which has been | |
| deprecated since Python 3.14. Use the ``vars`` argument of | |
| :func:`sysconfig.get_paths` instead. | |
| .. | |
| .. date: 2026-05-07-14-18-47 | |
| .. gh-issue: 149489 | |
| .. nonce: bX9iHe | |
| .. section: Library | |
| Fix :mod:`~xml.etree.ElementTree` serialization to HTML. The content of | |
| comments, processing instructions and elements "xmp", "iframe", "noembed", | |
| "noframes", and "plaintext" is no longer escaped. The "plaintext" element no | |
| longer have the closing tag. Add support of empty attributes (with value | |
| ``None``). | |
| .. | |
| .. date: 2026-05-06-23-13-40 | |
| .. gh-issue: 149319 | |
| .. nonce: PLM93t | |
| .. section: Library | |
| The :mod:`asyncio` REPL now ignores :envvar:`PYTHONSTARTUP` and | |
| :envvar:`PYTHON_BASIC_REPL` when :option:`-E` or :option:`-I` is used. Patch | |
| by Jonathan Dung. | |
| .. | |
| .. date: 2026-05-06-20-10-44 | |
| .. gh-issue: 149464 | |
| .. nonce: 3mPhcr | |
| .. section: Library | |
| Add :func:`os.pidfd_getfd` for duplicating a file descriptor from another | |
| process via a pidfd. Available on Linux 5.6+. Patch by Maurycy | |
| Pawłowski-Wieroński. | |
| .. | |
| .. date: 2026-04-29-08-10-17 | |
| .. gh-issue: 149056 | |
| .. nonce: jnaD4W | |
| .. section: Library | |
| Fix :func:`json.load` not forwarding the *array_hook* argument to | |
| :func:`json.loads`. Patch by Thomas Kowalski. | |
| .. | |
| .. date: 2026-04-27-11-12-00 | |
| .. gh-issue: 149046 | |
| .. nonce: 74shDd | |
| .. section: Library | |
| :mod:`io`: Fix :class:`io.StringIO` serialization: no longer call | |
| ``str(obj)`` on :class:`str` subclasses. Patch by Thomas Kowalski. | |
| .. | |
| .. date: 2026-04-26-11-25-38 | |
| .. gh-issue: 118158 | |
| .. nonce: xIy05H | |
| .. section: Library | |
| Ensure py_compile CLI error messages end with a newline. Contributed by Xiao | |
| Yuan. | |
| .. | |
| .. date: 2026-04-24-19-54-00 | |
| .. gh-issue: 148954 | |
| .. nonce: v1 | |
| .. section: Library | |
| Fix XML injection vulnerability in :func:`xmlrpc.client.dumps` where the | |
| ``methodname`` was not being escaped before interpolation into the XML body. | |
| .. | |
| .. date: 2026-04-23-12-50-15 | |
| .. gh-issue: 148441 | |
| .. nonce: zvpCkR | |
| .. section: Library | |
| :mod:`xml.parsers.expat`: prevent a crash in | |
| :meth:`~xml.parsers.expat.xmlparser.CharacterDataHandler` when the character | |
| data size exceeds the parser's :attr:`buffer size | |
| <xml.parsers.expat.xmlparser.buffer_size>`. | |
| .. | |
| .. date: 2026-04-21-06-30-59 | |
| .. gh-issue: 119670 | |
| .. nonce: pMWZfY | |
| .. section: Library | |
| Add keyword-only parameter *force* to :func:`shlex.quote` to force quoting a | |
| string, even if it is already safe for a shell without being quoted. | |
| .. | |
| .. date: 2026-04-20-01-24-22 | |
| .. gh-issue: 92455 | |
| .. nonce: vXhmad | |
| .. section: Library | |
| Fix :mod:`mimetypes` to prefer case-sensitive matches for suffix mappings | |
| and MIME type suffixes before falling back to case-insensitive matches. | |
| Contributed by Xiao Yuan. | |
| .. | |
| .. date: 2026-04-18-12-00-00 | |
| .. gh-issue: 148736 | |
| .. nonce: ag-frame | |
| .. section: Library | |
| Fix a latent :exc:`AttributeError` in :mod:`asyncio` call-graph capture when | |
| walking an async generator's ``ag_await`` chain: the walker referenced | |
| ``cr_frame`` instead of ``ag_frame``. | |
| .. | |
| .. date: 2026-04-17-05-58-27 | |
| .. gh-issue: 148665 | |
| .. nonce: AlUajE | |
| .. section: Library | |
| socket.shutdown function is now enabled for Emscripten builds. However, if | |
| the runtime does not implement the shutdown syscall, it will show "Function | |
| not implemented" error. | |
| .. | |
| .. date: 2026-04-04-14-25-43 | |
| .. gh-issue: 148085 | |
| .. nonce: o97yTo | |
| .. section: Library | |
| Speed up :meth:`~datetime.date.timetuple` and | |
| :meth:`~datetime.date.strftime` by caching the ``time.struct_time`` and | |
| ``time.strftime`` lookups, and :meth:`~datetime.datetime.today` by reading | |
| the clock directly instead of calling :func:`time.time`. Patching | |
| :mod:`time` after importing :mod:`datetime` no longer affects these methods. | |
| Patch by Maurycy Pawłowski-Wieroński. | |
| .. | |
| .. date: 2026-03-31-21-25-44 | |
| .. gh-issue: 147950 | |
| .. nonce: 5JR0sK | |
| .. section: Library | |
| Bind ``yank-arg`` to :kbd:`M-_` in the REPL. | |
| .. | |
| .. date: 2026-03-26-09-30-00 | |
| .. gh-issue: 146452 | |
| .. nonce: Y2N6qZ8J | |
| .. section: Library | |
| Fix segfault in :mod:`pickle` when pickling a dictionary concurrently | |
| mutated by another thread in the free-threaded build. | |
| .. | |
| .. date: 2026-03-26-00-00-00 | |
| .. gh-issue: 47005 | |
| .. nonce: xxc89c | |
| .. section: Library | |
| Fix :meth:`!urllib.request.AbstractHTTPHandler.do_open` to give regular | |
| headers set via :meth:`~urllib.request.Request.add_header` priority over | |
| unredirected headers, consistent with | |
| :meth:`~urllib.request.Request.get_header` and | |
| :meth:`~urllib.request.Request.header_items`. | |
| .. | |
| .. date: 2026-02-22-11-27-57 | |
| .. gh-issue: 145107 | |
| .. nonce: ZlQXEZ | |
| .. section: Library | |
| Simplify ``asyncio.staggered_race`` by using ``eager_start=False``. | |
| .. | |
| .. date: 2026-02-11-16-47-27 | |
| .. gh-issue: 140729 | |
| .. nonce: 2uTPQp | |
| .. section: Library | |
| Fix a pickling error in the ``cProfile`` module when profiling a script that | |
| uses :class:`multiprocessing.Process` with the ``spawn`` and ``forkserver`` | |
| start methods. | |
| .. | |
| .. date: 2026-01-18-06-42-47 | |
| .. gh-issue: 143988 | |
| .. nonce: MtLtCP | |
| .. section: Library | |
| Fixed crashes in :meth:`socket.socket.sendmsg` and | |
| :meth:`socket.socket.recvmsg_into` that could occur if buffer sequences are | |
| concurrently mutated. | |
| .. | |
| .. date: 2025-12-21-17-56-37 | |
| .. gh-issue: 143008 | |
| .. nonce: aakErJ | |
| .. section: Library | |
| Fix crash in :class:`io.TextIOWrapper` when reentrant | |
| :meth:`io.TextIOBase.detach` is called reentrantly from the underlying | |
| buffer. | |
| .. | |
| .. date: 2025-12-14-06-44-34 | |
| .. gh-issue: 81881 | |
| .. nonce: qancdQ | |
| .. section: Library | |
| :func:`shutil.copyfile` now raises :exc:`~shutil.SpecialFileError` for | |
| sockets and device files. | |
| .. | |
| .. date: 2025-11-02-22-24-13 | |
| .. gh-issue: 140924 | |
| .. nonce: NQVbR_ | |
| .. section: Library | |
| Add :func:`locale.localize`, :func:`locale.delocalize` and platform-specific | |
| locale constants from the :mod:`!_locale` module to ``locale.__all__``. | |
| .. | |
| .. date: 2025-11-02-05-28-56 | |
| .. gh-issue: 115634 | |
| .. nonce: JbcNnF | |
| .. section: Library | |
| Fix a deadlock in :class:`concurrent.futures.ProcessPoolExecutor` when using | |
| ``max_tasks_per_child``, present since the feature was introduced in Python | |
| 3.11. The executor stopped scheduling queued tasks after a worker process | |
| exited upon reaching its task limit. Based on a fix proposed by Tabrez | |
| Mohammed. | |
| .. | |
| .. date: 2025-10-20-09-12-18 | |
| .. gh-issue: 140344 | |
| .. nonce: WjbYg- | |
| .. section: Library | |
| The classes ``ast.slice``, ``ast.ExtSlice``, ``ast.Index``, ``ast.Suite``, | |
| ``ast.AugLoad``, ``ast.AugStore``, and ``ast.Param``, deprecated since | |
| Python 3.9, now issue deprecation warnings on use. They are now scheduled | |
| for removal in Python 3.21. | |
| The ``dims`` property of ``ast.Tuple`` objects, deprecated since Python 3.9, | |
| now issues a deprecation warning when accessed. The property is scheduled | |
| for removal in Python 3.21. Use the (non-deprecated) ``elts`` property of | |
| ``ast.Tuple`` objects instead. | |
| The deprecated global names are also no longer imported by ``from ast import | |
| *``. | |
| .. | |
| .. date: 2025-10-19-17-34-07 | |
| .. gh-issue: 140326 | |
| .. nonce: kZM0pV | |
| .. section: Library | |
| Fix the :mod:`asyncio` REPL namespace so that relative imports no longer | |
| resolve against the :mod:`asyncio` package and ``__file__`` is no longer | |
| set. | |
| .. | |
| .. date: 2025-10-12-08-46-26 | |
| .. gh-issue: 139398 | |
| .. nonce: hESOMl | |
| .. section: Library | |
| Add supported ``_sunder_`` names to the :func:`dir` method of the | |
| :mod:`enum` module to support them in :term:`REPL` autocompletion. | |
| .. | |
| .. date: 2025-10-09-12-13-29 | |
| .. gh-issue: 139819 | |
| .. nonce: YxUDyH | |
| .. section: Library | |
| :mod:`rlcompleter`: Avoid suggesting attributes that are not accessible on | |
| instances (e.g., Enum members showing ``__name__``). Patch by Peter | |
| (ttw225). | |
| .. | |
| .. date: 2025-09-05-20-50-35 | |
| .. gh-issue: 79638 | |
| .. nonce: Y-JfaH | |
| .. section: Library | |
| Disallow all access in :mod:`urllib.robotparser` if the ``robots.txt`` file | |
| is unreachable due to server or network errors. | |
| .. | |
| .. date: 2025-08-30-07-44-30 | |
| .. gh-issue: 86533 | |
| .. nonce: pathlib | |
| .. section: Library | |
| The :func:`os.makedirs` function and :meth:`pathlib.Path.mkdir` method now | |
| have a *parent_mode* parameter to specify the mode for intermediate | |
| directories when creating parent directories. This allows one to match the | |
| behavior from Python 3.6 and earlier for :func:`os.makedirs`. | |
| .. | |
| .. date: 2025-07-28-11-00-49 | |
| .. gh-issue: 64192 | |
| .. nonce: 7htLtg | |
| .. section: Library | |
| Add the optional ``buffersize`` parameter to | |
| :meth:`multiprocessing.pool.Pool.imap` and | |
| :meth:`multiprocessing.pool.Pool.imap_unordered` to limit the number of | |
| submitted tasks whose results have not yet been yielded. If the buffer is | |
| full, iteration over the *iterables* pauses until a result is yielded from | |
| the buffer. To fully utilize pool's capacity when using this feature, set | |
| *buffersize* at least to the number of processes in pool (to consume | |
| *iterable* as you go), or even higher (to prefetch the next | |
| ``N=buffersize-processes`` arguments). | |
| .. | |
| .. date: 2025-05-24-11-17-34 | |
| .. gh-issue: 51067 | |
| .. nonce: yHOgfy | |
| .. section: Library | |
| Add :meth:`~zipfile.ZipFile.remove` and :meth:`~zipfile.ZipFile.repack` to | |
| :class:`~zipfile.ZipFile`. | |
| .. | |
| .. date: 2025-05-19-21-08-25 | |
| .. gh-issue: 134261 | |
| .. nonce: ravGYm | |
| .. section: Library | |
| zip: On reproducible builds, ZipFile uses UTC instead of the local time when | |
| writing file datetimes to avoid underflows. | |
| .. | |
| .. date: 2025-05-19-20-29-35 | |
| .. gh-issue: 133998 | |
| .. nonce: KmElUw | |
| .. section: Library | |
| Fix :exc:`struct.error` exception when creating a file with | |
| :class:`gzip.GzipFile` or compressing data with :func:`gzip.compress` if the | |
| system time is outside the range 00:00:00 UTC, January 1, 1970 through | |
| 06:28:15 UTC, February 7, 2106, or explicitly passed *mtime* argument is | |
| outside the range ``0`` to ``2**32-1``. | |
| .. | |
| .. date: 2025-05-19-07-32-51 | |
| .. gh-issue: 68164 | |
| .. nonce: XhFbJD | |
| .. section: Library | |
| Fix :func:`zipfile.ZipFile.writestr` so it sets the "regular file" bit by | |
| default. | |
| .. | |
| .. date: 2025-05-07-18-31-31 | |
| .. gh-issue: 46927 | |
| .. nonce: sF02gj | |
| .. section: Library | |
| Prevent :mod:`readline` from overriding the ``COLUMNS`` and ``LINES`` | |
| environment variables, as values are not updated on terminal resize. | |
| .. | |
| .. date: 2025-05-01-16-44-16 | |
| .. gh-issue: 72902 | |
| .. nonce: 19qwJW | |
| .. section: Library | |
| Optimize (~x1.4 speedup) :meth:`fractions.Fraction.from_decimal` and | |
| :meth:`fractions.Fraction.from_float` for :class:`~decimal.Decimal` and | |
| :class:`float` inputs, respectively. Patch by Sergey B Kirpichev. | |
| .. | |
| .. date: 2025-03-01-13-36-02 | |
| .. gh-issue: 128110 | |
| .. nonce: 9wx_G0 | |
| .. section: Library | |
| Fix bug in the parsing of :mod:`email` address headers that could result in | |
| extraneous spaces in the decoded text when using a modern email policy. | |
| Space between pairs of adjacent :rfc:`2047` encoded-words is now ignored, | |
| per section 6.2 (and consistent with existing parsing of unstructured | |
| headers like *Subject*). | |
| .. | |
| .. date: 2025-01-31-02-27-53 | |
| .. gh-issue: 129382 | |
| .. nonce: GI93CM | |
| .. section: Library | |
| The :class:`venv.EnvBuilder` and :func:`venv.create` APIs now use the | |
| platform-dependent default for symlinks from :mod:`venv`'s command-line | |
| interface. | |
| .. | |
| .. date: 2024-11-08-18-39-50 | |
| .. gh-issue: 125763 | |
| .. nonce: F2p5_U | |
| .. section: Library | |
| Remove the broken spacebar quit binding from :mod:`turtledemo`\s | |
| ``sorting_animate`` example. | |
| .. | |
| .. date: 2024-11-02-02-02-31 | |
| .. gh-issue: 107398 | |
| .. nonce: uUtA6Q | |
| .. section: Library | |
| Fix :mod:`tarfile` stream mode exception when process the file with the gzip | |
| extra field. | |
| .. | |
| .. date: 2024-07-02-20-57-43 | |
| .. gh-issue: 121109 | |
| .. nonce: Tp6R2s | |
| .. section: Library | |
| Fix :mod:`tarfile` performance issue when reading archives in streaming mode | |
| (e.g. ``r|*``). | |
| .. | |
| .. date: 2024-06-18-04-08-37 | |
| .. gh-issue: 120665 | |
| .. nonce: x7T1hV | |
| .. section: Library | |
| Fixed an issue where ``unittest`` loaders would load and instantiate | |
| :class:`unittest.TestCase`-derived subclasses that are also abstract base | |
| classes, which can't be instantiated. | |
| .. | |
| .. date: 2024-03-17-22-16-53 | |
| .. gh-issue: 115988 | |
| .. nonce: EshSDM | |
| .. section: Library | |
| :mod:`lzma` adds constants to support the newer BCJ filters for ARM64 and | |
| RISC-V. | |
| .. | |
| .. date: 2024-02-04-13-56-48 | |
| .. gh-issue: 108518 | |
| .. nonce: 6NCPk_ | |
| .. section: Library | |
| The iterator returned by :meth:`concurrent.futures.Executor.map` is no | |
| longer automatically closed if a function call raises an exception. Use | |
| method :meth:`!close` to explicitly close the iterator. | |
| .. | |
| .. date: 2023-12-20-22-05-40 | |
| .. gh-issue: 113329 | |
| .. nonce: 1CJy3o | |
| .. section: Library | |
| Fix :exc:`OSError` being raised when trying to run doctests on a class | |
| objects in the REPL. Patch by Sten Wessel. | |
| .. | |
| .. date: 2023-06-12-21-31-02 | |
| .. gh-issue: 105708 | |
| .. nonce: 5fFwP8 | |
| .. section: Library | |
| Accept an uppercase V prefix in IPvFuture addresses in | |
| :func:`urllib.parse.urlsplit`. | |
| .. | |
| .. date: 2023-04-27-14-50-03 | |
| .. gh-issue: 103925 | |
| .. nonce: khC-El | |
| .. section: Library | |
| Fix :meth:`csv.Sniffer.sniff` for a sample with ``\r\n`` line endings in | |
| which a quoted field ends a line: a letter could be detected as the | |
| delimiter. | |
| .. | |
| .. date: 2023-04-24-11-12-00 | |
| .. gh-issue: 60055 | |
| .. nonce: UjP6aX | |
| .. section: Library | |
| Let ``urllib.robotparser.RobotFileParser`` accept a | |
| ``urllib.request.Request`` object as well as a url string when setting a | |
| robots.txt url. | |
| .. | |
| .. date: 2023-03-23-19-47-05 | |
| .. gh-issue: 102967 | |
| .. nonce: gfIYkN | |
| .. section: Library | |
| A bug in :func:`!doctest._SpoofOut.truncate` was causing None to be passed | |
| to :func:`!StringIO.seek` when no size was given. A simple fix skips the | |
| seek call when no size is given so the buffer can be truncated from the | |
| current position. | |
| .. | |
| .. date: 2023-02-26-14-07-18 | |
| .. gh-issue: 91099 | |
| .. nonce: _QPbEL | |
| .. section: Library | |
| :meth:`imaplib.IMAP4.login` now raises exceptions with :class:`str` instead | |
| of :class:`bytes`. Patch by Florian Best. | |
| .. | |
| .. date: 2023-02-11-09-49-49 | |
| .. gh-issue: 82039 | |
| .. nonce: caTE7O | |
| .. section: Library | |
| :meth:`http.cookiejar.FileCookieJar.load` now checks the first, format | |
| signature line in a case-insensitive manner. Patch by Ashley Harvey. | |
| .. | |
| .. date: 2023-01-23-21-23-50 | |
| .. gh-issue: 101267 | |
| .. nonce: _f-cFH | |
| .. section: Library | |
| When a worker process terminates unexpectedly, | |
| :class:`concurrent.futures.ProcessPoolExecutor` now sets a separate | |
| :exc:`~concurrent.futures.process.BrokenProcessPool` exception on each | |
| pending future instead of sharing a single instance among them all. Sharing | |
| one exception produced malformed tracebacks: each :meth:`Future.result() | |
| <concurrent.futures.Future.result>` call re-raised the same object, | |
| appending another copy of the traceback to it. | |
| .. | |
| .. bpo: 46375 | |
| .. date: 2022-04-10-20-10-59 | |
| .. nonce: 8j1ogZ | |
| .. section: Library | |
| Add :meth:`io.BytesIO.peek` method to read without advancing position. | |
| .. | |
| .. bpo: 47216 | |
| .. date: 2022-04-04-17-58-05 | |
| .. nonce: gPyPte | |
| .. section: Library | |
| Added *mtime* option to :func:`gzip.open`, which will be passed to the | |
| constructor of :class:`~gzip.GzipFile`. | |
| .. | |
| .. date: 2022-01-03-12-50-42 | |
| .. gh-issue: 70758 | |
| .. nonce: 2NjFW_ | |
| .. section: Library | |
| Creating a new :mod:`turtle` screen after the previous one was closed no | |
| longer raises ``turtle.Terminator`` on the first turtle command. | |
| .. | |
| .. bpo: 45509 | |
| .. date: 2021-10-18-13-46-55 | |
| .. nonce: Upwb60 | |
| .. section: Library | |
| Gzip headers are now checked for corrupted NAME, COMMENT and HCRC fields. | |
| .. | |
| .. date: 2021-09-09-10-15-54 | |
| .. gh-issue: 75245 | |
| .. nonce: tLeTkn | |
| .. section: Library | |
| :meth:`socket.socket.makefile` now supports line buffering (``buffering=1``) | |
| in text mode, as :func:`open` does and as it worked in Python 2. Previously | |
| it silently used block buffering. In binary mode it now emits a | |
| :exc:`RuntimeWarning` and uses the default buffer size, also as :func:`open` | |
| does. | |
| .. | |
| .. bpo: 44012 | |
| .. date: 2021-06-03-22-23-38 | |
| .. nonce: BK3HfA | |
| .. section: Library | |
| The ``exploded`` attribute of :class:`ipaddress.IPv6Address` and | |
| :class:`ipaddress.IPv6Interface` now supports addresses with a scope ID | |
| (link-local addresses). Previously the former raised | |
| :exc:`~ipaddress.AddressValueError` and the latter omitted the scope ID. | |
| .. | |
| .. bpo: 40469 | |
| .. date: 2021-02-26-13-17-57 | |
| .. nonce: yJHeQg | |
| .. section: Library | |
| :class:`~logging.handlers.TimedRotatingFileHandler` now uses the creation | |
| time instead of the last modification time of an existing log file as the | |
| basis for the first rotation after handler creation, if supported by the OS | |
| and file system. This allows it to be used in short-running programs that | |
| start and end before the rotation interval expires. | |
| .. | |
| .. bpo: 42861 | |
| .. date: 2021-01-09-18-40-15 | |
| .. nonce: T7Ge9O | |
| .. section: Library | |
| Add :meth:`IPv4Network.next_network() <ipaddress.IPv4Network.next_network>` | |
| and :meth:`IPv6Network.next_network() <ipaddress.IPv6Network.next_network>`. | |
| Patch by Faisal Mahmood. | |
| .. | |
| .. date: 2020-05-05-06-05-24 | |
| .. gh-issue: 84687 | |
| .. nonce: ggjoGl | |
| .. section: Library | |
| The :func:`os.exec\* <os.execl>` functions now set the | |
| :attr:`~OSError.filename` attribute of the raised :exc:`FileNotFoundError` | |
| or :exc:`NotADirectoryError` to the program name passed by the caller. | |
| .. | |
| .. date: 2020-02-19-16-35-52 | |
| .. gh-issue: 83869 | |
| .. nonce: EPD_zn | |
| .. section: Library | |
| Fix :mod:`tarfile` reading an archive with a GNU sparse 1.0 member whose | |
| size is set in the pax extended header. The offset of the next header was | |
| computed from the offset of the data, which is already past the sparse map, | |
| and from the size of the member, which can be the apparent size of the | |
| sparse file. All following members were unreachable. | |
| .. | |
| .. date: 2019-02-08-17-33-49 | |
| .. gh-issue: 61366 | |
| .. nonce: k6W5Sp | |
| .. section: Library | |
| :class:`http.cookiejar.MozillaCookieJar` now reads session cookies written | |
| by curl and Wget, which use ``0`` in the expiration time field. Contributed | |
| by Jérémie Detrey. | |
| .. | |
| .. date: 2026-09-24-10-10-15 | |
| .. gh-issue: 57491 | |
| .. nonce: UA-2uN | |
| .. section: Documentation | |
| Reduce the depth of the table of contents in the EPUB documentation from | |
| three levels to two, making it much shorter and easier to navigate in e-book | |
| readers. | |
| .. | |
| .. date: 2026-09-24-01-20-36 | |
| .. gh-issue: 142083 | |
| .. nonce: WOlkvr | |
| .. section: Documentation | |
| Document the ``'w'`` type code in the :class:`array.array` docstring, so | |
| that it lists the same type codes as :data:`array.typecodes` and the | |
| :mod:`array` module documentation. | |
| .. | |
| .. date: 2026-07-17-22-33-43 | |
| .. gh-issue: 118150 | |
| .. nonce: m7iFdP | |
| .. section: Documentation | |
| Clarify in the :mod:`difflib` documentation what *junk* actually does, its | |
| drawbacks, and how to control it. | |
| .. | |
| .. date: 2026-06-18-16-58-52 | |
| .. gh-issue: 59551 | |
| .. nonce: oNkjTG | |
| .. section: Documentation | |
| Rename Doc/library/dialog.rst to tkinter.dialogs.rst. | |
| .. | |
| .. date: 2026-06-17-12-00-00 | |
| .. gh-issue: 86726 | |
| .. nonce: __bOgH | |
| .. section: Documentation | |
| Greatly expand the :mod:`tkinter` documentation to cover the full public API | |
| of the package and its submodules. The descriptions are oriented towards | |
| Python rather than Tcl/Tk, with corrected return types and | |
| ``versionadded``/``versionchanged`` information. | |
| .. | |
| .. date: 2026-05-23-17-27-41 | |
| .. gh-issue: 150319 | |
| .. nonce: ol9tWK | |
| .. section: Documentation | |
| Generic builtin and standard library types now document the meaning of their | |
| type parameters. | |
| .. | |
| .. date: 2023-09-16-23-42-27 | |
| .. gh-issue: 109503 | |
| .. nonce: mZ-kdU | |
| .. section: Documentation | |
| Fix documentation for :func:`shutil.move` on usage of :func:`os.rename` | |
| since nonatomic move might be used even if the files are on the same | |
| filesystem. Patch by Fang Li | |
| .. | |
| .. date: 2026-10-12-11-26-01 | |
| .. gh-issue: 159211 | |
| .. nonce: FWFj-p | |
| .. section: Tests | |
| The iOS testbed no longer gathers simulator diagnostics when a test run | |
| fails. | |
| .. | |
| .. date: 2026-09-24-10-40-28 | |
| .. gh-issue: 158051 | |
| .. nonce: B1ZBTA | |
| .. section: Tests | |
| The iOS testbed has been updated for compatibilty with Xcode 27. | |
| .. | |
| .. date: 2026-09-16-17-06-54 | |
| .. gh-issue: 157628 | |
| .. nonce: KAwhlY | |
| .. section: Tests | |
| In regrtest, only consider that a test leaks if all test runs leak at least | |
| one file descriptor. For example, ignore "[0, 1, -1] file descriptors, | |
| sum=0" deltas, instead of reporting a leak. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-14-14-50-42 | |
| .. gh-issue: 140550 | |
| .. nonce: 7jirEN | |
| .. section: Tests | |
| Enable limited C API tests on Free Threading in test_cext and test_cppext: | |
| test the :c:macro:`Py_TARGET_ABI3T` macro. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-08-18-19-40-22 | |
| .. gh-issue: 75876 | |
| .. nonce: IOiCcK | |
| .. section: Tests | |
| In verbose mode, a test decorated with :func:`~test.support.bigmemtest` now | |
| reports how much memory it really used, and the number of major page faults | |
| it took, if any. | |
| .. | |
| .. date: 2026-08-18-10-16-44 | |
| .. gh-issue: 75876 | |
| .. nonce: PEZplM | |
| .. section: Tests | |
| A test decorated with :func:`~test.support.bigmemtest` now runs in a | |
| subprocess if it really allocates the memory it asks for (that is, if the | |
| ``-M`` option is used), so that the memory it uses and the address space it | |
| fragments are released when it ends. A dummy run stays in the process. The | |
| separate memory watchdog process is no longer needed: the parent process | |
| watches the memory usage of the subprocess. | |
| .. | |
| .. date: 2026-08-12-20-52-16 | |
| .. gh-issue: 109817 | |
| .. nonce: GZHUNg | |
| .. section: Tests | |
| Add the ``--single-process-per-case`` option to libregrtest to run every | |
| test case in a separate process. Test cases from the same test module are | |
| run sequentially. This helps to detect order dependencies and environment | |
| leaks between test cases. | |
| .. | |
| .. date: 2026-08-09-14-00-00 | |
| .. gh-issue: 155411 | |
| .. nonce: Qw8Lm2 | |
| .. section: Tests | |
| Fix :func:`!test.support.subTests` for asynchronous test methods. They were | |
| wrapped in a synchronous function, which discarded the coroutine without | |
| awaiting it, so the test silently did not run at all. | |
| .. | |
| .. date: 2026-08-08-09-15-08 | |
| .. gh-issue: 108885 | |
| .. nonce: Qm3vLp | |
| .. section: Tests | |
| Running the Python test suite with ``-vv`` now reports every example of a | |
| doctest. A single ``-v`` reports the test names, as before. | |
| .. | |
| .. date: 2026-08-06-18-20-00 | |
| .. gh-issue: 132581 | |
| .. nonce: envchg | |
| .. section: Tests | |
| The list of tests which altered the execution environment now includes the | |
| reasons why the environment was considered altered, for example an | |
| unraisable exception or a modified :data:`sys.path`. The final result no | |
| longer repeats the same state twice (like ``ENV CHANGED then ENV CHANGED``). | |
| .. | |
| .. date: 2026-08-03-20-15-00 | |
| .. gh-issue: 155109 | |
| .. nonce: limstack | |
| .. section: Tests | |
| Add ``test.support.run_with_limited_c_stack()`` and use it in tests that | |
| exhaust the C stack with a fixed number of recursive calls, so that their | |
| outcome no longer depends on the C stack size. | |
| .. | |
| .. date: 2026-07-24-12-00-00 | |
| .. gh-issue: 76595 | |
| .. nonce: KfF5xR | |
| .. section: Tests | |
| Add C API tests for :c:func:`PyCapsule_Import`. | |
| .. | |
| .. date: 2026-07-20-11-30-00 | |
| .. gh-issue: 154211 | |
| .. nonce: hugestack | |
| .. section: Tests | |
| Add ``test.support.skip_if_huge_c_stack()`` and use it to skip tests that | |
| exhaust the C stack if the stack limit is very large (e.g. on DragonFly BSD | |
| or with ``ulimit -s unlimited``). | |
| .. | |
| .. date: 2026-07-19-20-15-00 | |
| .. gh-issue: 154167 | |
| .. nonce: sigint | |
| .. section: Tests | |
| The test runner (regrtest) now restores the default SIGINT handler if it was | |
| inherited as ignored, so the test suite no longer hangs when run as a shell | |
| background job. | |
| .. | |
| .. date: 2026-07-19-18-20-00 | |
| .. gh-issue: 154144 | |
| .. nonce: tcbool | |
| .. section: Tests | |
| Fix building the :mod:`!_testcapi` module on NetBSD. | |
| .. | |
| .. date: 2026-07-19-15-59-41 | |
| .. gh-issue: 154137 | |
| .. nonce: N689bE | |
| .. section: Tests | |
| Check for Windows handle leaks in regrtest. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-06-29-10-14-09 | |
| .. gh-issue: 152548 | |
| .. nonce: Khw9J7 | |
| .. section: Tests | |
| Add the :func:`test.support.isolation.runInSubprocess` decorator to run a | |
| test method or ``TestCase`` subclass in a fresh interpreter subprocess, | |
| isolated from the rest of the test run. | |
| .. | |
| .. date: 2026-06-22-19-45-00 | |
| .. gh-issue: 151626 | |
| .. nonce: K9pZ2x | |
| .. section: Tests | |
| Fix several tests in ``test.test_inspect``, ``test.test_import``, | |
| ``test.test_importlib``, ``test.test_py_compile`` and | |
| ``test.test_compileall`` that failed when the test suite was run with | |
| :envvar:`PYTHONPYCACHEPREFIX` set. These tests now neutralize the pycache | |
| prefix where they assume the default ``__pycache__`` bytecode layout. | |
| .. | |
| .. date: 2026-06-16-05-11-38 | |
| .. gh-issue: 151096 | |
| .. nonce: Kq3Lp9 | |
| .. section: Tests | |
| Fix ``test_embed`` failing when CPython is configured with a split exec | |
| prefix (``--exec-prefix`` differing from ``--prefix``). | |
| .. | |
| .. date: 2026-06-09-11-52-52 | |
| .. gh-issue: 151130 | |
| .. nonce: 1vslPH | |
| .. section: Tests | |
| Add more tests for ``PyWeakref_*`` C API. | |
| .. | |
| .. date: 2026-06-06-16-22-00 | |
| .. gh-issue: 150966 | |
| .. nonce: 7N9x5Q | |
| .. section: Tests | |
| Avoid prematurely terminating failing live sampling profiler test targets, | |
| which made stderr assertions flaky on ASAN buildbots. | |
| .. | |
| .. date: 2026-05-25-15-39-53 | |
| .. gh-issue: 150387 | |
| .. nonce: yzZ7jq | |
| .. section: Tests | |
| Fix hang in | |
| ``test.test_profiling.test_sampling_profiler.test_live_collector_ui.TestLiveModeErrors.test_run_failed_script_live`` | |
| on slow buildbots. The test now always queues a final ``q`` keystroke so the | |
| live TUI loop exits even when the profiler collects enough samples to enter | |
| the post-finished input loop. | |
| .. | |
| .. date: 2026-05-22-16-41-45 | |
| .. gh-issue: 150114 | |
| .. nonce: UdMikH | |
| .. section: Tests | |
| On Linux, regrtest now logs the total memory usage of all Python processes. | |
| Read the private memory in ``/proc/pid/smaps``. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-05-13-14-53-23 | |
| .. gh-issue: 149776 | |
| .. nonce: orqgsn | |
| .. section: Tests | |
| Fix test_socket on Linux kernel 7.1 and newer: skip UDP Lite tests if it's | |
| not supported. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-04-24-01-38-56 | |
| .. gh-issue: 148853 | |
| .. nonce: _uM4_Q | |
| .. section: Tests | |
| Fix tests failing on FreeBSD in test.support's | |
| in_systemd_nspawn_sync_suppressed() due to unreadable /run directory. | |
| .. | |
| .. date: 2026-01-21-02-03-31 | |
| .. gh-issue: 142414 | |
| .. nonce: CfcgiR | |
| .. section: Tests | |
| Isolate reloading modules in test_interpreters to avoid having broken | |
| references. | |
| .. | |
| .. date: 2026-10-05-12-15-57 | |
| .. gh-issue: 158878 | |
| .. nonce: KWLqLy | |
| .. section: Build | |
| Stop creating an empty Modules/Setup.local file as it no longer seems to be | |
| required to statically link the extension modules. | |
| .. | |
| .. date: 2026-10-03-23-23-12 | |
| .. gh-issue: 158683 | |
| .. nonce: eMlp60 | |
| .. section: Build | |
| Fix the :file:`Modules/Setup` entry for the :mod:`!_zstd` module by adding | |
| missing source files. | |
| .. | |
| .. date: 2026-10-02-12-18-20 | |
| .. gh-issue: 129040 | |
| .. nonce: 6wJPY6 | |
| .. section: Build | |
| Added support for function call adaptor trampolines for wasi to prevent | |
| traps when C handlers take the wrong number of arguments. Dropped Emscripten | |
| function call adaptors support for JS runtimes that don't support wasm-gc. | |
| .. | |
| .. date: 2026-09-29-09-40-25 | |
| .. gh-issue: 158010 | |
| .. nonce: H4Top_ | |
| .. section: Build | |
| Update Android and iOS build scripts to use OpenSSL 3.5.9. | |
| .. | |
| .. date: 2026-09-21-19-20-42 | |
| .. gh-issue: 136872 | |
| .. nonce: a2tSc_ | |
| .. section: Build | |
| Python built with :option:`--with-address-sanitizer` or | |
| :option:`--with-memory-sanitizer` now includes pymalloc, but uses ``malloc`` | |
| as the default memory allocator. Set :envvar:`PYTHONMALLOC=pymalloc | |
| <PYTHONMALLOC>` to use pymalloc. | |
| .. | |
| .. date: 2026-09-21-10-50-31 | |
| .. gh-issue: 157923 | |
| .. nonce: OffPYn | |
| .. section: Build | |
| Support WASI SDK 34. | |
| .. | |
| .. date: 2026-09-19-16-54-58 | |
| .. gh-issue: 157549 | |
| .. nonce: uk6QNH | |
| .. section: Build | |
| Use ``sysconf(_SC_PAGESIZE)`` instead of ``getpagesize()`` in | |
| ``remote_debug.h`` so ``_remote_debugging`` builds on Darwin with | |
| ``-Werror=implicit-function-declaration``. | |
| .. | |
| .. date: 2026-09-07-23-40-00 | |
| .. gh-issue: 157142 | |
| .. nonce: gpnoop | |
| .. section: Build | |
| Fix the link of ``Programs/_freeze_module`` when extension modules are built | |
| in (``MODULE_BUILDTYPE=static``) and the test modules are enabled: | |
| ``Modules/getpath_noop.c`` now defines ``_Py_Get_Getpath_CodeObject()``, | |
| which ``_testinternalcapi`` uses. | |
| .. | |
| .. date: 2026-09-07-15-13-19 | |
| .. gh-issue: 155292 | |
| .. nonce: _WNxL7 | |
| .. section: Build | |
| In ``makeunicodedata.py``, the script for updating Unicode data, skip | |
| generating ``stringprep.py`` if the current interpreter's Unicode data | |
| version does not match the target version. | |
| .. | |
| .. date: 2026-08-31-15-50-04 | |
| .. gh-issue: 156049 | |
| .. nonce: FCf6hP | |
| .. section: Build | |
| Add :option:`--with-hwaddress-sanitizer` to build with `HWAddressSanitizer | |
| <https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html>`_. | |
| .. | |
| .. date: 2026-08-29-15-14-45 | |
| .. gh-issue: 156554 | |
| .. nonce: 64SZb1 | |
| .. section: Build | |
| Update ``PY_SUPPORT_TIER`` according to :pep:`11` for these target triples: | |
| ``aarch64-*-linux-gnu/gcc``, ``aarch64-pc-windows-msvc/msvc``, | |
| ``x86_64-apple-darwin*/clang``, and ``powerpc64le-*-linux-gnu/gcc``. | |
| .. | |
| .. date: 2026-08-23-12-10-45 | |
| .. gh-issue: 156244 | |
| .. nonce: Rv6qXt | |
| .. section: Build | |
| Update :program:`configure` to reflect that the | |
| ``riscv64-unknown-linux-gnu`` target triple is now a :pep:`11` tier 3 | |
| supported platform. | |
| .. | |
| .. date: 2026-08-20-17-41-11 | |
| .. gh-issue: 155911 | |
| .. nonce: yL3z8q | |
| .. section: Build | |
| Fix curses detection with libraries in ``LIBS`` and | |
| :option:`--without-curses`. Patch by Shamil Abdulaev. | |
| .. | |
| .. date: 2026-08-20-14-02-33 | |
| .. gh-issue: 156115 | |
| .. nonce: KXr8wU | |
| .. section: Build | |
| iOS simulator builds are now configured with ``-mios-simulator-version-min`` | |
| instead of the device's ``-mios-version-min``. The device flag made the | |
| linker reject libraries resolved from the simulator SDK, so library | |
| detection silently failed. | |
| .. | |
| .. date: 2026-08-20-13-32-54 | |
| .. gh-issue: 156109 | |
| .. nonce: ZTJHi9 | |
| .. section: Build | |
| iOS builds may now be configured without a framework, producing a static | |
| ``libpython`` for embedding in an app binary. Such a build cannot load | |
| extension modules at runtime, and requires ``MODULE_BUILDTYPE=static`` and | |
| ``--disable-test-modules`` to be requested explicitly. A shared iOS build | |
| must still be a framework build. | |
| .. | |
| .. date: 2026-08-14-20-16-55 | |
| .. gh-issue: 153400 | |
| .. nonce: 9Oxi-N | |
| .. section: Build | |
| Support os.getrandom() when building Python with old glibc versions and | |
| recent Linux kernel (glibc 2.25 or older and Linux kernel 3.17 or newer). | |
| Get the syscall number from kernel headers, rather than glibc headers. | |
| .. | |
| .. date: 2026-08-10-12-00-00 | |
| .. gh-issue: 90604 | |
| .. nonce: Kx7pQn | |
| .. section: Build | |
| ``configure`` no longer sets ``MULTIARCH`` on OpenBSD platforms. | |
| .. | |
| .. date: 2026-08-02-12-00-01 | |
| .. gh-issue: 152023 | |
| .. nonce: pT7dKb | |
| .. section: Build | |
| Update Android builds to SQLite 3.53.4. Additionally, enable the | |
| ``median()`` and ``percentile()`` functions. | |
| .. | |
| .. date: 2026-07-20-20-30-00 | |
| .. gh-issue: 154271 | |
| .. nonce: solxopen | |
| .. section: Build | |
| Define ``_XOPEN_SOURCE=600`` on Solaris and illumos, so that on illumos the | |
| socket module is built with :meth:`~socket.socket.sendmsg`, | |
| :meth:`~socket.socket.recvmsg` and the ``CMSG_*`` helpers. This also | |
| enables the ``forkserver`` :mod:`multiprocessing` start method. | |
| .. | |
| .. date: 2026-07-19-16-45-00 | |
| .. gh-issue: 154136 | |
| .. nonce: mathpi | |
| .. section: Build | |
| Fix building the :mod:`math` module on FreeBSD. Define ``_ISOC23_SOURCE`` to | |
| make the C23 library declarations (such as ``sinpi()`` in ``math.h``) | |
| visible. | |
| .. | |
| .. date: 2026-07-19-12-16-31 | |
| .. gh-issue: 154070 | |
| .. nonce: f5da07 | |
| .. section: Build | |
| Build the :mod:`curses` module against a wide-character capable ncurses even | |
| when it is not named ``ncursesw`` -- for example the pkgsrc ncurses on | |
| NetBSD and illumos, or the system ncurses on macOS. Such a library | |
| previously produced a narrow build. | |
| .. | |
| .. date: 2026-07-19-12-06-45 | |
| .. gh-issue: 152902 | |
| .. nonce: 0BXdab | |
| .. section: Build | |
| Added Intel ``icx`` compiler support to ``configure.ac``. Contributed by | |
| High Performance Kernels LLC. | |
| .. | |
| .. date: 2026-07-19-07-48-43 | |
| .. gh-issue: 154055 | |
| .. nonce: FemUJU | |
| .. section: Build | |
| The :mod:`curses` and :mod:`curses.panel` modules can now be built against a | |
| curses library that lacks the X/Open ``attr_t`` and soft-label attribute | |
| functions, ``scr_set()`` or ``resizeterm()`` -- such as the native SVr4 | |
| curses of illumos and Solaris. These functions are probed and used only | |
| when present. | |
| .. | |
| .. date: 2026-07-18-14-30-12 | |
| .. gh-issue: 136687 | |
| .. nonce: teaPCG | |
| .. section: Build | |
| Add the :option:`--with-curses` option to :program:`configure` to select the | |
| curses backend (``ncursesw``, ``ncurses`` or the system's native ``curses``) | |
| or, as :option:`--without-curses`, to exclude the :mod:`curses` and | |
| :mod:`curses.panel` modules from the build. | |
| .. | |
| .. date: 2026-07-11-07-26-16 | |
| .. gh-issue: 126877 | |
| .. nonce: Zt7Kq2 | |
| .. section: Build | |
| Fix the :program:`configure` check for Tcl/Tk which could wrongly succeed | |
| with optimizing compilers when the libraries are missing. | |
| .. | |
| .. date: 2026-07-10-13-25-55 | |
| .. gh-issue: 153511 | |
| .. nonce: dCPBwU | |
| .. section: Build | |
| Removes the legacy MSI and Nuget build scripts, the legacy ``py.exe`` | |
| launcher (now replaced by the Python install manager), and adds a | |
| ``PC/layout`` readme. | |
| .. | |
| .. date: 2026-07-09-22-45-00 | |
| .. gh-issue: 153438 | |
| .. nonce: Qr7N2p | |
| .. section: Build | |
| Update Windows build and installer tooling and documentation to use the | |
| current download URL for ``nuget.exe``. | |
| .. | |
| .. date: 2026-07-02-16-25-13 | |
| .. gh-issue: 152870 | |
| .. nonce: oh9eD1 | |
| .. section: Build | |
| Fix a compilation error in the :mod:`decimal` C extension (``_decimal``) | |
| when it is built with ``EXTRA_FUNCTIONALITY``. ``Context.apply()`` called | |
| the internal ``_apply`` helper using its pre-Argument-Clinic signature; the | |
| call is now made through the generated ``_impl`` function. | |
| .. | |
| .. date: 2026-07-01-17-53-00 | |
| .. gh-issue: 152769 | |
| .. nonce: Kp7mQ2 | |
| .. section: Build | |
| Enable the :ref:`perf profiler <perf_profiling>` trampoline on Alpine Linux | |
| with the musl C library on ``x86_64`` and ``aarch64``. The trampoline is | |
| architecture-specific and does not depend on the C library, so the same | |
| assembly trampoline used for glibc is reused for musl. | |
| .. | |
| .. date: 2026-06-28-16-17-55 | |
| .. gh-issue: 152502 | |
| .. nonce: 6SNqMg | |
| .. section: Build | |
| The :mod:`curses` module now detects its optional functions with | |
| :program:`configure` capability probes instead of assuming ncurses, so it | |
| builds against narrow (non-wide) ncurses and other curses implementations | |
| such as NetBSD curses, exposing exactly the functions they provide. | |
| .. | |
| .. date: 2026-06-26-16-30-00 | |
| .. gh-issue: 152240 | |
| .. nonce: loongarch | |
| .. section: Build | |
| Fix C stack unwinding tests on Linux LoongArch builds by teaching the manual | |
| frame pointer unwinder to recognize the LoongArch frame layout. | |
| .. | |
| .. date: 2026-06-09-11-54-13 | |
| .. gh-issue: 151163 | |
| .. nonce: vFAtjv | |
| .. section: Build | |
| Updated Android build to include SQLite version 3.53.2. | |
| .. | |
| .. date: 2026-05-27-14-28-36 | |
| .. gh-issue: 115119 | |
| .. nonce: wotFWh | |
| .. section: Build | |
| Fix the detection of libmpdec header when no .pc files are available. | |
| .. | |
| .. date: 2026-05-21-15-14-59 | |
| .. gh-issue: 148294 | |
| .. nonce: VtFaW4 | |
| .. section: Build | |
| Corrected the use of ``AC_PATH_TOOL`` in ``configure.ac`` to allow a C++ | |
| compiler to be found on :envvar:`!PATH`. | |
| .. | |
| .. date: 2026-05-19-12-45-23 | |
| .. gh-issue: 131372 | |
| .. nonce: oJykeB | |
| .. section: Build | |
| Add a :option:`--with-build-details-suffix` configure flag to allow Linux | |
| distributions that co-install multiple versions of Python in the same tree | |
| to avoid ``build-details.json`` clashes. | |
| .. | |
| .. date: 2026-05-18-16-00-41 | |
| .. gh-issue: 148260 | |
| .. nonce: UwFiIX | |
| .. section: Build | |
| On Linux when Python is linked to the musl C library, use a thread stack | |
| size of at least 1 MiB instead of musl default which is 128 kiB. Patch by | |
| Victor Stinner. | |
| .. | |
| .. date: 2026-04-21-17-27-52 | |
| .. gh-issue: 148832 | |
| .. nonce: Kx9aQ1 | |
| .. section: Build | |
| Fix :option:`--enable-bolt` build by switching the default BOLT flag from | |
| ``-icf=1`` to ``-icf=0``. ``-icf=1`` folds address-taken functions and | |
| breaks type-slot dispatch, crashing on :mod:`list` and :mod:`tuple` | |
| concatenation. Patched by Shamil Abdulaev. | |
| .. | |
| .. date: 2026-03-11-17-23-39 | |
| .. gh-issue: 144712 | |
| .. nonce: fix-jit-entry | |
| .. section: Build | |
| Fix ``_testinternalcapi`` import failure due to missing ``_Py_jit_entry`` | |
| symbol when built with :option:`--enable-experimental-jit`. Patch by Shamil | |
| Abdulaev. | |
| .. | |
| .. date: 2026-03-07-02-09-57 | |
| .. gh-issue: 138800 | |
| .. nonce: VD8qbz | |
| .. section: Build | |
| Fix library name in python3.pc on Android. | |
| .. | |
| .. date: 2025-09-25-01-33-12 | |
| .. gh-issue: 139314 | |
| .. nonce: _m9BUl | |
| .. section: Build | |
| Add the :option:`--with-zlib` and :option:`--with-bzip2` | |
| :program:`configure` options to select the zlib and bzip2 implementations | |
| used to build the :mod:`zlib` and :mod:`bz2` modules. In addition to the | |
| default system libraries, they can build against `zlib-rs | |
| <https://github.com/trifectatechfoundation/zlib-rs/>`__ and `libbzip2-rs | |
| <https://github.com/trifectatechfoundation/libbzip2-rs>`__, and | |
| ``--with-zlib=zlib-ng`` verifies that the detected zlib is `zlib-ng | |
| <https://github.com/zlib-ng/zlib-ng>`__. :option:`--without-zlib` and | |
| :option:`--without-bzip2` exclude the modules from the build. | |
| .. | |
| .. date: 2025-05-13-12-38-26 | |
| .. gh-issue: 115119 | |
| .. nonce: 7n0nx3 | |
| .. section: Build | |
| Removed bundled copy of the libmpdec, use system library if it's available. | |
| Patch by Sergey B Kirpichev. | |
| .. | |
| .. date: 2026-09-29-09-56-14 | |
| .. gh-issue: 158010 | |
| .. nonce: MPQX4w | |
| .. section: Windows | |
| Updated Windows builds to use OpenSSL 3.5.9. | |
| .. | |
| .. date: 2026-09-21-20-54-37 | |
| .. gh-issue: 157906 | |
| .. nonce: RlyLkY | |
| .. section: Windows | |
| Fix an incorrect architecture macro check that prevented CPU prefetching in | |
| the free-threaded garbage collector on 32-bit Windows builds. | |
| .. | |
| .. date: 2026-09-19-13-18-48 | |
| .. gh-issue: 157789 | |
| .. nonce: o6-rmo | |
| .. section: Windows | |
| Use compiler option ``-Og`` in case of clang-cl debug builds on Windows to | |
| reduce stack usage. Patch by Chris Eibl. | |
| .. | |
| .. date: 2026-09-12-18-59-21 | |
| .. gh-issue: 157368 | |
| .. nonce: 2DirHP | |
| .. section: Windows | |
| Fix truncated :data:`sys.version` in the case of clang-cl versions 22 or | |
| newer on Windows. Also fixes the Windows on Arm case, where the Microsoft | |
| compiler was reported instead of clang. Patch by Chris Eibl. | |
| .. | |
| .. date: 2026-09-10-02-00-00 | |
| .. gh-issue: 157212 | |
| .. nonce: x18TEB | |
| .. section: Windows | |
| Fix ``_Py_ThreadId()`` compilation on Windows ARM64 with MinGW toolchains, | |
| where ``__getReg()`` is unavailable. The TEB address is now read directly | |
| from ``x18``. Patch by Christian Aurich. | |
| .. | |
| .. date: 2026-09-05-10-14-50 | |
| .. gh-issue: 152433 | |
| .. nonce: _LtjIg | |
| .. section: Windows | |
| Allow build :mod:`socket` module for Universal Windows Platform. | |
| .. | |
| .. date: 2026-08-09-17-30-00 | |
| .. gh-issue: 68048 | |
| .. nonce: Mq8Vd4 | |
| .. section: Windows | |
| Creating a :class:`mmap.mmap` object on Windows no longer resets the | |
| position of the underlying file to zero, as on other platforms. | |
| .. | |
| .. date: 2026-08-09-15-40-00 | |
| .. gh-issue: 85470 | |
| .. nonce: Lm4Xt9 | |
| .. section: Windows | |
| Importing :mod:`ctypes` on Windows no longer loads ``user32.dll``, which | |
| made the system treat the process as a GUI process and stop sending logoff | |
| and shutdown console control events to it. ``ole32.dll``, which pulled | |
| ``user32.dll`` in, is now delay loaded. | |
| .. | |
| .. date: 2026-08-09-14-20-00 | |
| .. gh-issue: 72353 | |
| .. nonce: Vw7Kq2 | |
| .. section: Windows | |
| Reading from the console on Windows now continues if the read was cancelled | |
| by Ctrl+C, but the :const:`~signal.SIGINT` handler did not raise an | |
| exception. Previously the read ended as if at end of file. | |
| .. | |
| .. date: 2026-08-09-05-30-00 | |
| .. gh-issue: 86427 | |
| .. nonce: legacystdio | |
| .. section: Windows | |
| Fix the encoding of the standard streams in the legacy Windows stdio mode | |
| (:envvar:`PYTHONLEGACYWINDOWSSTDIO`). It is now the encoding of the device | |
| the stream is connected to, as in Python 3.7, not the ANSI code page. | |
| .. | |
| .. date: 2026-08-09-04-00-00 | |
| .. gh-issue: 87587 | |
| .. nonce: devenc | |
| .. section: Windows | |
| :func:`os.device_encoding` on Windows now returns the code page of any | |
| console file descriptor, not only 0, 1 and 2, and returns ``None`` for other | |
| character devices like ``NUL``. The UTF-8 code page is now reported as | |
| ``"utf-8"`` instead of ``"cp65001"``. | |
| .. | |
| .. date: 2026-08-02-12-00-00 | |
| .. gh-issue: 152023 | |
| .. nonce: wXn4Qs | |
| .. section: Windows | |
| Update Windows builds to SQLite 3.53.4. Additionally, enable the | |
| ``median()`` and ``percentile()`` functions. | |
| .. | |
| .. date: 2026-07-31-18-40-43 | |
| .. gh-issue: 152433 | |
| .. nonce: Pq3-U- | |
| .. section: Windows | |
| Changed :mod:`!winreg` to conditional import for Universal Windows Platform | |
| compatibility. | |
| .. | |
| .. date: 2026-07-21-10-42-18 | |
| .. gh-issue: 69573 | |
| .. nonce: Kv7QpX | |
| .. section: Windows | |
| :func:`msvcrt.putch` and :func:`msvcrt.putwch` now check the return value of | |
| the underlying ``_putch()`` and ``_putwch()`` C functions and raise | |
| :exc:`OSError` on failure, for example when the process has no console | |
| attached, instead of silently ignoring the error. | |
| .. | |
| .. date: 2026-07-18-11-56-53 | |
| .. gh-issue: 124111 | |
| .. nonce: m4OBX8 | |
| .. section: Windows | |
| Updated Windows builds to use Tcl/Tk 9.0.4. | |
| .. | |
| .. date: 2026-07-17-16-21-17 | |
| .. gh-issue: 152433 | |
| .. nonce: 45rR2A | |
| .. section: Windows | |
| Modernize fileutils removing GetFileInformationByHandle API calls and allow | |
| build for Universal Windows Platform. | |
| .. | |
| .. date: 2026-07-04-20-12-24 | |
| .. gh-issue: 152433 | |
| .. nonce: NtWEoL | |
| .. section: Windows | |
| Allow build ``ceval.c`` for Windows UWP. | |
| .. | |
| .. date: 2026-07-04-18-57-47 | |
| .. gh-issue: 152433 | |
| .. nonce: tO5k5t | |
| .. section: Windows | |
| Allow build :mod:`!_overlapped` module for Universal Windows Platform. | |
| .. | |
| .. date: 2026-07-03-17-07-40 | |
| .. gh-issue: 152433 | |
| .. nonce: Lc6HmG | |
| .. section: Windows | |
| ``_winapi`` module: improve UWP compatibility | |
| .. | |
| .. date: 2026-07-01-17-31-05 | |
| .. gh-issue: 152433 | |
| .. nonce: dod-DF | |
| .. section: Windows | |
| make ``dynload_win.c`` UWP compatible. | |
| .. | |
| .. date: 2026-07-01-17-00-52 | |
| .. gh-issue: 152433 | |
| .. nonce: kSd1bW | |
| .. section: Windows | |
| Allow build :mod:`!_ctypes` for Universal Windows Platform. | |
| .. | |
| .. date: 2026-07-01-16-38-24 | |
| .. gh-issue: 152433 | |
| .. nonce: jvEiHh | |
| .. section: Windows | |
| :mod:`ssl`: improve UWP build compatibility. | |
| .. | |
| .. date: 2026-06-30-16-40-00 | |
| .. gh-issue: 152433 | |
| .. nonce: VaeEwR | |
| .. section: Windows | |
| ``_winapi``: implement ``GetVersion()`` UWP alternative. | |
| .. | |
| .. date: 2026-06-29-17-17-10 | |
| .. gh-issue: 152433 | |
| .. nonce: AhW--j | |
| .. section: Windows | |
| Fix errors in :func:`sys.getwindowsversion` for Universal Windows Platform | |
| build. | |
| .. | |
| .. date: 2026-06-29-16-29-50 | |
| .. gh-issue: 152433 | |
| .. nonce: _nhCjt | |
| .. section: Windows | |
| Restores the ``mmap`` module when CPython is built from source for specific | |
| Windows API sets. | |
| .. | |
| .. date: 2026-06-28-13-03-57 | |
| .. gh-issue: 152433 | |
| .. nonce: jUXFwC | |
| .. section: Windows | |
| Use the Windows API ``GetFileSizeEx()`` for memory mapped files, rather than | |
| the older ``GetFileSize()``. | |
| .. | |
| .. date: 2026-06-28-12-37-08 | |
| .. gh-issue: 152433 | |
| .. nonce: FTMgqF | |
| .. section: Windows | |
| Implement :func:`os.cpu_count` for Universal Windows Platform. | |
| .. | |
| .. date: 2026-06-09-11-55-41 | |
| .. gh-issue: 151163 | |
| .. nonce: oizZYV | |
| .. section: Windows | |
| Updated Windows builds to include SQLite version 3.53.2. | |
| .. | |
| .. date: 2026-06-04-18-53-18 | |
| .. gh-issue: 150836 | |
| .. nonce: Wci7bZ | |
| .. section: Windows | |
| Make installed tkinter work with Tcl/Tk 9 builds that embed the Tk script | |
| library in the Tk DLL on Windows. | |
| .. | |
| .. date: 2026-05-14-22-09-46 | |
| .. gh-issue: 149786 | |
| .. nonce: UI-HZM | |
| .. section: Windows | |
| Fixes virtual environment launchers on Windows free-threaded builds. | |
| .. | |
| .. date: 2026-04-29-14-44-51 | |
| .. gh-issue: 138489 | |
| .. nonce: 234aj6 | |
| .. section: Windows | |
| Windows distributions now include a :file:`build-details.json` file (see | |
| :pep:`739`). The legacy installer does not install it, but all other | |
| distributions from python.org and all preset configurations in the | |
| ``PC\layout`` script will include one. | |
| .. | |
| .. date: 2026-04-21-16-07-11 | |
| .. gh-issue: 140146 | |
| .. nonce: TAcUHA | |
| .. section: Windows | |
| Prevent :mod:`tkinter` from hanging on Windows if stdin is redirected to a | |
| pipe in an interactive session. This is helpful for testing interactive | |
| usage of tkinter from a script, for example as part of the cpython test | |
| suite. | |
| .. | |
| .. date: 2025-04-29-17-55-55 | |
| .. gh-issue: 86768 | |
| .. nonce: uIDTHc | |
| .. section: Windows | |
| :func:`os.lseek` and :meth:`~io.IOBase.seek` of file objects now raise | |
| :exc:`OSError` for pipes on Windows, and :meth:`~io.IOBase.seekable` now | |
| returns ``False`` for them. Previously seeking a pipe silently appeared to | |
| succeed. As a consequence, opening a pipe in a read-write binary mode | |
| (``'r+b'`` or ``'w+b'``) now raises :exc:`io.UnsupportedOperation` unless | |
| buffering is disabled. | |
| .. | |
| .. bpo: 40851 | |
| .. date: 2020-06-19-00-14-52 | |
| .. nonce: 0-3EJP | |
| .. section: Windows | |
| :class:`subprocess.Popen` with ``shell=True`` on Windows now honors | |
| ``wShowWindow`` of the *startupinfo* argument, so the console window of the | |
| started program can be shown. Previously it was always hidden. | |
| .. | |
| .. date: 2026-09-29-09-29-17 | |
| .. gh-issue: 158010 | |
| .. nonce: 2zJnoj | |
| .. section: macOS | |
| Update macOS installer to use OpenSSL 3.5.9. | |
| .. | |
| .. date: 2026-08-27-04-10-12 | |
| .. gh-issue: 152023 | |
| .. nonce: RNIecw | |
| .. section: macOS | |
| Update macOS installer builds to SQLite 3.53.4. | |
| .. | |
| .. date: 2026-07-17-23-35-36 | |
| .. gh-issue: 124111 | |
| .. nonce: dmM4lk | |
| .. section: macOS | |
| Update macOS installer to use Tcl/Tk 9.0.4. | |
| .. | |
| .. date: 2026-07-17-23-20-27 | |
| .. gh-issue: 152023 | |
| .. nonce: QAAgdj | |
| .. section: macOS | |
| Update macOS installer builds to SQLite 3.53.3. Enable median() and | |
| percentile() functions. | |
| .. | |
| .. date: 2026-06-09-11-52-35 | |
| .. gh-issue: 151163 | |
| .. nonce: RlPXHq | |
| .. section: macOS | |
| Updated macOS installer to include SQLite version 3.53.2. | |
| .. | |
| .. date: 2026-05-31-10-40-00 | |
| .. gh-issue: 150644 | |
| .. nonce: zLWyjj | |
| .. section: macOS | |
| When system logging is enabled (with ``config.use_system_logger``, messages | |
| are now tagged as public. This allows the macOS 26 system logger to view | |
| messages without special configuration. | |
| .. | |
| .. date: 2026-09-24-12-00-00 | |
| .. gh-issue: 158067 | |
| .. nonce: opnPy1 | |
| .. section: IDLE | |
| Fix the IDLE File Open dialog listing text files before Python files when | |
| opened from the Shell or an Output window. | |
| .. | |
| .. date: 2026-09-17-23-00-00 | |
| .. gh-issue: 56596 | |
| .. nonce: capslock | |
| .. section: IDLE | |
| Make IDLE keyboard shortcuts with ascii letters work when Caps Lock is on | |
| even when only one of the upper and lowercase versions are defined. | |
| .. | |
| .. date: 2026-09-17-22-00-00 | |
| .. gh-issue: 75512 | |
| .. nonce: asyncout | |
| .. section: IDLE | |
| Output from a thread printed in the IDLE Shell while a statement is being | |
| entered no longer takes over the prompt of the statement. | |
| .. | |
| .. date: 2026-09-17-21-00-00 | |
| .. gh-issue: 64007 | |
| .. nonce: inputcolor | |
| .. section: IDLE | |
| IDLE no longer applies syntax coloring to the text entered for :func:`input` | |
| in the Shell. | |
| .. | |
| .. date: 2026-09-17-18-00-00 | |
| .. gh-issue: 85560 | |
| .. nonce: elseexpr | |
| .. section: IDLE | |
| Fix IDLE failing to find the opening parenthesis when a continuation line | |
| inside the parentheses starts with ``else`` of a conditional expression or | |
| with ``yield``. | |
| .. | |
| .. date: 2026-09-17-17-00-00 | |
| .. gh-issue: 75487 | |
| .. nonce: blankint | |
| .. section: IDLE | |
| Fix saving a truncated number when an integer entry in the IDLE Settings | |
| dialog is blanked with the Backspace key. | |
| .. | |
| .. date: 2026-09-17-12-00-00 | |
| .. gh-issue: 74112 | |
| .. nonce: sigint | |
| .. section: IDLE | |
| Ctrl-C in the IDLE Shell now interrupts blocking calls such as | |
| :func:`time.sleep` and :meth:`socket.recv <socket.socket.recv>`. | |
| .. | |
| .. date: 2026-09-17-08-53-12 | |
| .. gh-issue: 151471 | |
| .. nonce: -yvE03 | |
| .. section: IDLE | |
| Colorize the soft keyword ``type`` in IDLE. | |
| .. | |
| .. date: 2026-09-17-02-00-00 | |
| .. gh-issue: 103089 | |
| .. nonce: longline | |
| .. section: IDLE | |
| IDLE no longer hangs when opening a file with very long lines. Only the | |
| first 2,000 characters of a line are colorized. | |
| .. | |
| .. date: 2026-09-17-01-00-00 | |
| .. gh-issue: 89544 | |
| .. nonce: rstbuf | |
| .. section: IDLE | |
| Fix IDLE hanging after Restart Shell while receiving a large output from the | |
| user process. | |
| .. | |
| .. date: 2026-09-16-22-00-00 | |
| .. gh-issue: 70331 | |
| .. nonce: shadow | |
| .. section: IDLE | |
| IDLE no longer fails to start with ``python -m idlelib``, and its user | |
| process no longer fails to start, when the current directory contains user | |
| files with the same names as standard library modules that IDLE imports, | |
| such as ``random.py`` or ``tkinter.py``. | |
| .. | |
| .. date: 2026-09-16-20-00-00 | |
| .. gh-issue: 93016 | |
| .. nonce: cliarg | |
| .. section: IDLE | |
| Fix parsing of command line arguments in the IDLE "Run... Customized" dialog | |
| on Windows: backslashes are no longer treated as escape characters. Fix also | |
| display of the previous arguments in the dialog. | |
| .. | |
| .. date: 2026-09-16-18-00-00 | |
| .. gh-issue: 59568 | |
| .. nonce: tilde1 | |
| .. section: IDLE | |
| Fix "Save As" and "Open" dialogs in IDLE for a file whose name starts with | |
| ``~`` on Windows and X11 with Tcl/Tk older than 9. | |
| .. | |
| .. date: 2026-09-15-23-27-38 | |
| .. gh-issue: 69004 | |
| .. nonce: Z7Ym9G | |
| .. section: IDLE | |
| The Debugger item of the IDLE Debug menu is now disabled while user code | |
| runs, like Stack Viewer. | |
| .. | |
| .. date: 2026-09-15-22-34-33 | |
| .. gh-issue: 69365 | |
| .. nonce: KehjZN | |
| .. section: IDLE | |
| The IDLE search dialogs now show a regular expression error below the entry | |
| instead of in a message box. | |
| .. | |
| .. date: 2026-09-15-22-10-17 | |
| .. gh-issue: 93966 | |
| .. nonce: ch4fTB | |
| .. section: IDLE | |
| The highlighting of a syntax error in the IDLE Shell is now removed when the | |
| next statement is entered, not only when the next syntax error occurs. | |
| .. | |
| .. date: 2026-09-15-21-54-04 | |
| .. gh-issue: 105689 | |
| .. nonce: ASoU37 | |
| .. section: IDLE | |
| Fix calltips, parenthesis matching and auto-indent in the IDLE Shell after | |
| output containing unbalanced quotes or parentheses. | |
| .. | |
| .. date: 2026-09-15-21-44-35 | |
| .. gh-issue: 60402 | |
| .. nonce: iFz6X6 | |
| .. section: IDLE | |
| In IDLE, Tab in a string that is not the start of a file name inserts a tab | |
| instead of opening the completion list. | |
| .. | |
| .. date: 2026-09-15-21-20-04 | |
| .. gh-issue: 68453 | |
| .. nonce: hlxbog | |
| .. section: IDLE | |
| Fix running IDLE with the -s option together with -c, -r or -: the command | |
| or script now runs after the startup file, without an error dialog and | |
| without restarting the shell. | |
| .. | |
| .. date: 2026-09-15-20-14-08 | |
| .. gh-issue: 75234 | |
| .. nonce: O8ZNFV | |
| .. section: IDLE | |
| Fix editing help sources and key bindings in the IDLE Settings dialog after | |
| selecting them with the keyboard. | |
| .. | |
| .. date: 2026-09-15-16-37-19 | |
| .. gh-issue: 69919 | |
| .. nonce: f6AamT | |
| .. section: IDLE | |
| IDLE now reports any exception raised by compiling the source, such as | |
| :exc:`MemoryError` for too deeply nested source, instead of hanging the | |
| Shell. | |
| .. | |
| .. date: 2026-09-15-16-19-25 | |
| .. gh-issue: 91398 | |
| .. nonce: PBdiDB | |
| .. section: IDLE | |
| Remove the border around the IDLE Shell sidebar, which was drawn in the | |
| window background color and stood out with dark themes. | |
| .. | |
| .. date: 2026-09-15-15-46-35 | |
| .. gh-issue: 71136 | |
| .. nonce: vwGO0v | |
| .. section: IDLE | |
| Fix a hang of the IDLE Shell when code run under the debugger raises | |
| :exc:`KeyboardInterrupt`. | |
| .. | |
| .. date: 2026-09-05-16-00-00 | |
| .. gh-issue: 154511 | |
| .. nonce: hV2wQn | |
| .. section: IDLE | |
| Consolidate IDLE's mouse wheel handling in ``idlelib.util``. ``wheel_event`` | |
| moves there from ``idlelib.tree`` and joins ``x11_buttons``, which tells | |
| whether Tk reports wheel rotations to a widget as | |
| ``<Button-4>``/``<Button-5>`` events, and ``bind_wheel``, which binds | |
| whichever events Tk sends. | |
| .. | |
| .. date: 2026-09-03-17-16-26 | |
| .. gh-issue: 156896 | |
| .. nonce: XTQJlq | |
| .. section: IDLE | |
| Stop deleting tkinter submodules when idlelib.run is imported. | |
| .. | |
| .. date: 2026-07-10-19-41-00 | |
| .. gh-issue: 153480 | |
| .. nonce: EdMt1x | |
| .. section: IDLE | |
| Fix IDLE failing to start when opening a file which does not exist yet. Fix | |
| a traceback when a file open in the IDLE editor is deleted by another | |
| program; IDLE now asks whether to close the window, save the file elsewhere, | |
| or ignore it. | |
| .. | |
| .. date: 2026-07-01-21-00-00 | |
| .. gh-issue: 55646 | |
| .. nonce: kBind9 | |
| .. section: IDLE | |
| Fix IDLE crash at startup when the user configuration contains an invalid | |
| key binding, such as ``<Alt-Key-up>`` instead of ``<Alt-Key-Up>``. The | |
| invalid binding is now ignored with a warning. | |
| .. | |
| .. date: 2026-07-01-19-00-00 | |
| .. gh-issue: 82183 | |
| .. nonce: rNsTrt | |
| .. section: IDLE | |
| When the shell is busy running code, using "Run... Customized" with "Restart | |
| shell" unchecked now reports that the shell is executing instead of | |
| restarting it anyway. | |
| .. | |
| .. date: 2026-07-01-18-00-00 | |
| .. gh-issue: 83653 | |
| .. nonce: cFgInt | |
| .. section: IDLE | |
| Blanking an integer entry in IDLE's Settings dialog, such as "Auto squeeze | |
| min lines", no longer saves an empty string as an invalid configuration | |
| value. | |
| .. | |
| .. date: 2026-07-01-17-00-00 | |
| .. gh-issue: 65339 | |
| .. nonce: oUtTxt | |
| .. section: IDLE | |
| Saving the IDLE Shell or an Output window now defaults to a ``.txt`` | |
| extension and lists text files before Python files, since their content is | |
| not Python source. | |
| .. | |
| .. date: 2026-07-01-16-00-00 | |
| .. gh-issue: 80504 | |
| .. nonce: gReP | |
| .. section: IDLE | |
| The "In files:" field of IDLE's Find in Files dialog now always contains a | |
| full directory path, even for an unsaved editor or the Shell. This shows in | |
| the grep output which directory was searched. | |
| .. | |
| .. date: 2026-07-01-15-00-00 | |
| .. gh-issue: 134300 | |
| .. nonce: iDlPaT | |
| .. section: IDLE | |
| Do not add the ``idlelib`` directory to the path of the IDLE user process. | |
| User code run in IDLE can no longer import ``idlelib`` submodules as | |
| top-level modules, such as ``import help``. | |
| .. | |
| .. date: 2026-07-01-14-00-00 | |
| .. gh-issue: 89360 | |
| .. nonce: mUlTiC | |
| .. section: IDLE | |
| Fix a rare crash in the IDLE editor when the completion window is closed: | |
| deleting a key binding for a sequence that is not bound to the virtual event | |
| is now ignored instead of raising a ``ValueError``. | |
| .. | |
| .. date: 2026-07-01-13-30-00 | |
| .. gh-issue: 66172 | |
| .. nonce: Qm4xR7 | |
| .. section: IDLE | |
| IDLE no longer fails to start when a user configuration file is corrupt. The | |
| unparsable file is renamed with a ".bad" suffix, default settings are used | |
| instead, and a warning lists the affected files. | |
| .. | |
| .. date: 2026-07-01-12-00-00 | |
| .. gh-issue: 71956 | |
| .. nonce: rPlAlL | |
| .. section: IDLE | |
| Fix Replace All in the IDLE editor's Replace dialog when the search | |
| direction is "Up" and "Wrap around" is off: it now replaces all matches | |
| above the current position instead of only the first one. | |
| .. | |
| .. date: 2026-07-01-00-15-58 | |
| .. gh-issue: 152728 | |
| .. nonce: yxIhMN | |
| .. section: IDLE | |
| Move functions run.fix_scaling, editor.fixwordbreaks (as fix_word_breaks) | |
| and pyshell.fix_x11_paste to idlelib.util. | |
| .. | |
| .. date: 2026-07-01-00-00-00 | |
| .. gh-issue: 66331 | |
| .. nonce: wMcLaS | |
| .. section: IDLE | |
| Set the ``WM_CLASS`` window property of IDLE's windows to ``Idle`` on X11, | |
| so that window managers group and label them correctly instead of using the | |
| default ``Toplevel``. | |
| .. | |
| .. date: 2026-06-28-06-46-46 | |
| .. gh-issue: 85320 | |
| .. nonce: Hq2vKn | |
| .. section: IDLE | |
| IDLE now reads and writes its configuration files and the breakpoints file | |
| using UTF-8 instead of the locale encoding. This keeps non-ASCII data (such | |
| as non-ASCII paths) from being corrupted and makes the files portable | |
| between environments. | |
| .. | |
| .. date: 2026-06-27-17-27-21 | |
| .. gh-issue: 90304 | |
| .. nonce: 464d22 | |
| .. section: IDLE | |
| Prevent IDLE from failing to start when a font reports a zero width for the | |
| ``'0'`` character. Such a broken font caused a :exc:`ZeroDivisionError`; | |
| the editor now falls back to the configured width. | |
| .. | |
| .. date: 2025-08-08-10-50-59 | |
| .. gh-issue: 135511 | |
| .. nonce: 9Rw5Zg | |
| .. section: IDLE | |
| Fix display of :exc:`NameError` and :exc:`AttributeError` with multi-line | |
| message. | |
| .. | |
| .. bpo: 6699 | |
| .. date: 2019-12-12-03-18-02 | |
| .. nonce: 1CqJFG | |
| .. section: IDLE | |
| Warn the user if a file will be overwritten when saving. | |
| .. | |
| .. date: 2026-09-30-06-55-37 | |
| .. gh-issue: 158451 | |
| .. nonce: pZE56z | |
| .. section: Tools/Demos | |
| ``python-gdb.py`` is now able to format an invalid Unicode string: render | |
| invalid characters as ``\Uhhhhhhhh`` instead of raising an exception. Patch | |
| by Victor Stinner. | |
| .. | |
| .. date: 2026-08-23-18-10-00 | |
| .. gh-issue: 156261 | |
| .. nonce: Rw8pKd | |
| .. section: Tools/Demos | |
| Argument Clinic: the ``pid_t``, ``uid_t``, ``gid_t``, ``Py_off_t``, | |
| ``HANDLE``, ``DWORD`` and ``BOOL`` converters, previously defined in | |
| individual files, are now provided by Argument Clinic itself. | |
| .. | |
| .. date: 2026-08-22-11-00-00 | |
| .. gh-issue: 156219 | |
| .. nonce: Wq2nRt | |
| .. section: Tools/Demos | |
| Fix Argument Clinic generating code which reads an optional positional | |
| argument which was not passed, if the function has a ``**kwds`` parameter. | |
| .. | |
| .. date: 2026-08-14-13-15-35 | |
| .. gh-issue: 113318 | |
| .. nonce: oHjvUR | |
| .. section: Tools/Demos | |
| The value of a setter generated by Argument Clinic is now a parameter, which | |
| can use a converter, and a getter can define a return converter. It is | |
| optional to declare the value of the setter. The accessors of the same | |
| attribute are now identified by the Python name of that attribute instead of | |
| the C basename, so they can use different C basenames, and several | |
| implementations of the same accessor can be defined in different | |
| preprocessor conditional blocks. | |
| .. | |
| .. date: 2026-08-14-12-45-57 | |
| .. gh-issue: 113318 | |
| .. nonce: G1B0oH | |
| .. section: Tools/Demos | |
| Fix Argument Clinic for ``@getter`` and ``@setter`` in a preprocessor | |
| conditional block. It failed with an internal error. Argument Clinic now | |
| also rejects the accessors of the same attribute with different C basenames, | |
| and the same accessor defined twice, which silently generated invalid or | |
| duplicated entries of :c:type:`PyGetSetDef`. | |
| .. | |
| .. date: 2026-08-08-12-40-00 | |
| .. gh-issue: 155373 | |
| .. nonce: Wq3xTm | |
| .. section: Tools/Demos | |
| Argument Clinic now generates the inlined code of the converters for | |
| functions with optional groups, instead of a ``PyArg_ParseTuple()`` call for | |
| every number of arguments. Every argument is now parsed once, most such | |
| functions now use the fastcall convention, and the errors for a wrong type | |
| of an argument are the same as in other functions. | |
| .. | |
| .. date: 2026-08-06-11-40-49 | |
| .. gh-issue: 64660 | |
| .. nonce: MswRQB | |
| .. section: Tools/Demos | |
| Argument Clinic return converters no longer need to hardcode the name of the | |
| variable returned by the parsing function. It is now available as | |
| ``data.parser_retval``. | |
| .. | |
| .. date: 2026-08-06-10-54-12 | |
| .. gh-issue: 155266 | |
| .. nonce: NEngp9 | |
| .. section: Tools/Demos | |
| Fix Argument Clinic for a function whose only parameter is in an optional | |
| group. It generated ``METH_O``, which made the argument mandatory and did | |
| not pass the flag of the group. | |
| .. | |
| .. date: 2026-08-06-09-43-16 | |
| .. gh-issue: 64595 | |
| .. nonce: W75XZK | |
| .. section: Tools/Demos | |
| Argument Clinic now touches the source file if a file generated from it was | |
| changed, and keeps the generated files newer than the source file. The build | |
| system does not know that the source file depends on the files generated | |
| from it, so it did not recompile the source file if only the generated file | |
| was changed. | |
| .. | |
| .. date: 2026-08-06-08-32-53 | |
| .. gh-issue: 155263 | |
| .. nonce: RCcjtk | |
| .. section: Tools/Demos | |
| Add the ``--list`` option to Argument Clinic. It prints the modules, classes | |
| and functions which Argument Clinic defines in the specified files, each | |
| function with its signature. | |
| .. | |
| .. date: 2026-08-05-18-56-17 | |
| .. gh-issue: 107570 | |
| .. nonce: wXxtw2 | |
| .. section: Tools/Demos | |
| Argument Clinic: report errors on the offending line. Errors in a docstring | |
| were reported on the line which ends the block, and errors detected when | |
| generating the code were reported without any position. | |
| .. | |
| .. date: 2026-08-05-18-16-24 | |
| .. gh-issue: 108270 | |
| .. nonce: kVDJSS | |
| .. section: Tools/Demos | |
| Argument Clinic: add support for deprecating a parameter with the ``[until | |
| X.Y]`` marker. Passing such argument emits a :exc:`DeprecationWarning`. | |
| .. | |
| .. date: 2026-08-05-18-16-23 | |
| .. gh-issue: 108271 | |
| .. nonce: Yvq2Tv | |
| .. section: Tools/Demos | |
| Argument Clinic: add support for parameter aliases. A keyword-only parameter | |
| with a default value which shares the C name of a preceding parameter | |
| declares an alternative name for it. | |
| .. | |
| .. date: 2026-08-05-14-02-55 | |
| .. gh-issue: 155218 | |
| .. nonce: Nq4xZv | |
| .. section: Tools/Demos | |
| Fix Argument Clinic generating the flags of the optional groups in different | |
| order on 32-bit and 64-bit platforms. | |
| .. | |
| .. date: 2026-08-05-12-40-08 | |
| .. gh-issue: 155212 | |
| .. nonce: Lx8vTm | |
| .. section: Tools/Demos | |
| The ``--converters`` option of Argument Clinic now accepts file names and | |
| can be used with ``--make``. It prints the converters and return converters | |
| which the specified files define, instead of the built-in ones. | |
| .. | |
| .. date: 2026-08-05-10-24-17 | |
| .. gh-issue: 155207 | |
| .. nonce: Wv3nKq | |
| .. section: Tools/Demos | |
| Argument Clinic now supports the ``--dry-run`` and ``--diff`` options. They | |
| list the files which would be changed, or write a unified diff of the | |
| changes to the standard output, without modifying any file. | |
| .. | |
| .. date: 2026-08-04-19-05-41 | |
| .. gh-issue: 64502 | |
| .. nonce: Rb2wKt | |
| .. section: Tools/Demos | |
| Argument Clinic now supports several optional groups on the same nesting | |
| level, like in ``[y, x,] [n,] attr``. Such groups can be omitted | |
| independently of each other. | |
| .. | |
| .. date: 2026-08-04-17-12-33 | |
| .. gh-issue: 64502 | |
| .. nonce: Qv7mLp | |
| .. section: Tools/Demos | |
| Fix Argument Clinic support of parameters with a default value used together | |
| with optional groups. Such parameters were always required in the generated | |
| parsing code. | |
| .. | |
| .. date: 2026-07-24-09-30-00 | |
| .. gh-issue: 154580 | |
| .. nonce: Kp3nQ2 | |
| .. section: Tools/Demos | |
| Fix ``python-gdb.py`` raising :exc:`UnicodeEncodeError` when pretty-printing | |
| a non-ASCII :class:`str` in a locale whose host charset cannot encode it, | |
| such as any non-ASCII string in the C locale. | |
| .. | |
| .. date: 2026-07-19-00-00-00 | |
| .. gh-issue: 154059 | |
| .. nonce: JiBcOM | |
| .. section: Tools/Demos | |
| Fix the time units in Tachyon flame graph tooltips by accounting for the | |
| sampling interval when converting samples to milliseconds. | |
| .. | |
| .. date: 2026-07-16-11-38-15 | |
| .. gh-issue: 153804 | |
| .. nonce: KSTYg7 | |
| .. section: Tools/Demos | |
| Add ``Tools/inspection/oracle_external_inspection.py``, a harness for | |
| measuring the accuracy of Tachyon. It reports impossible-stack rates, speed, | |
| error rates and the statistical distance from the blocking non-cached best | |
| reference on selected snippets. Patch by Maurycy Pawłowski-Wieroński. | |
| .. | |
| .. date: 2026-07-10-14-38-31 | |
| .. gh-issue: 152384 | |
| .. nonce: uaPADM | |
| .. section: Tools/Demos | |
| The CPython Pixi packages are now all accessible at the same | |
| ``Tools/pixi-packages`` subdirectory, rather than at | |
| ``Tools/pixi-packages/{variant}`` as before. Variants are now selected not | |
| via subdirectory but via ``flags``; see | |
| https://pixi.prefix.dev/latest/concepts/package_specifications/#extras-and-flags | |
| for usage instructions. The ``tsan-freethreading`` variant has been renamed | |
| to ``tsan_freethreading``, while the ``default``, ``asan``, and | |
| ``freethreading`` variants retain their previous names. | |
| .. | |
| .. date: 2026-05-22-18-51-09 | |
| .. gh-issue: 150258 | |
| .. nonce: dh8GVK | |
| .. section: Tools/Demos | |
| Update the tooltip on the Tachyon flame graph to show both absolute and | |
| relative percentages. | |
| .. | |
| .. date: 2026-02-28-20-35-47 | |
| .. gh-issue: 87613 | |
| .. nonce: Nwzu6U | |
| .. section: Tools/Demos | |
| Add a ``@vectorcall`` decorator to Argument Clinic to generate | |
| :ref:`vectorcall` parsing code for :func:`object.__init__` and | |
| :func:`object.__new__`. | |
| .. | |
| .. date: 2025-02-27-19-00-00 | |
| .. gh-issue: 130647 | |
| .. nonce: uwda2h | |
| .. section: Tools/Demos | |
| Add ``--omit-header`` option to :program:`pygettext`. | |
| .. | |
| .. date: 2024-06-17-13-52-04 | |
| .. gh-issue: 111501 | |
| .. nonce: syFLAV | |
| .. section: Tools/Demos | |
| PS1 is no longer exported by venv activate script | |
| .. | |
| .. date: 2026-10-11-06-20-11 | |
| .. gh-issue: 129724 | |
| .. nonce: Wq3nTb | |
| .. section: C API | |
| Make :c:func:`PyMarshal_WriteObjectToFile` write nothing to the file if the | |
| object cannot be marshalled, instead of partial data. | |
| .. | |
| .. date: 2026-10-05-17-09-35 | |
| .. gh-issue: 149044 | |
| .. nonce: 1HUiag | |
| .. section: C API | |
| Fix the :c:macro:`PySlot_END` macro for C++: initialize all members to avoid | |
| compiler warnings. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-10-05-15-24-22 | |
| .. gh-issue: 158842 | |
| .. nonce: g7eLtE | |
| .. section: C API | |
| Add :c:macro:`Py_SETREF` and :c:macro:`Py_XSETREF` macros to the limited C | |
| API. Patch by Nathan Goldbaum and Victor Stinner. | |
| .. | |
| .. date: 2026-10-05-01-09-32 | |
| .. gh-issue: 158810 | |
| .. nonce: F1p-PK | |
| .. section: C API | |
| Fix :c:macro:`Py_ARRAY_LENGTH()` macro on C++: do not use | |
| ``__builtin_types_compatible_p()`` on C++. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-30-03-19-34 | |
| .. gh-issue: 158451 | |
| .. nonce: pUb2BJ | |
| .. section: C API | |
| Fix :c:func:`!_PyUnicodeWriter_WriteLatin1String` when the writer buffer | |
| kind is UCS-2 or UCS-4. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-29-19-01-56 | |
| .. gh-issue: 158439 | |
| .. nonce: ybKo_6 | |
| .. section: C API | |
| If :c:func:`PyUnicodeWriter_WriteUTF8` or :c:func:`PyUnicodeWriter_Format` | |
| fails, :c:func:`PyUnicodeWriter_Finish` now checks if the string uses the | |
| most efficient storage. Previously, :c:func:`PyUnicodeWriter_Finish` could | |
| return a string with an inefficient storage. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-24-15-27-35 | |
| .. gh-issue: 158080 | |
| .. nonce: YIqypf | |
| .. section: C API | |
| Deprecate :c:func:`PyInitConfig_GetExitCode`, :c:func:`PyStatus_Exit`, and | |
| :c:func:`PyStatus_IsExit` functions, and :c:member:`PyStatus.exitcode` | |
| member. :c:func:`Py_InitializeFromInitConfig` and | |
| :c:func:`Py_InitializeFromConfig` can no longer return an exit code. | |
| Instead, if a command line option wants to exit Python, the option is now | |
| processed in :c:func:`Py_RunMain`. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-24-14-14-34 | |
| .. gh-issue: 154757 | |
| .. nonce: -b-Fs7 | |
| .. section: C API | |
| :c:func:`PyModule_GetFilename` is no longer deprecated, but using | |
| :c:func:`PyModule_GetFilenameObject` instead is still recommended. Patch by | |
| Victor Stinner. | |
| .. | |
| .. date: 2026-09-24-11-47-32 | |
| .. gh-issue: 157649 | |
| .. nonce: 3HSU2h | |
| .. section: C API | |
| Fix :c:macro:`Py_CLEAR` and :c:macro:`Py_SETREF` macros on C++: implement | |
| them using ``auto`` instead of ``decltype()``. Using ``decltype()`` | |
| produced invalid code when clearing/setting an array item. Patch by Victor | |
| Stinner. | |
| .. | |
| .. date: 2026-09-23-23-52-55 | |
| .. gh-issue: 154757 | |
| .. nonce: EUVFeZ | |
| .. section: C API | |
| Remove :c:func:`!PyEval_InitThreads` function which did nothing since Python | |
| 3.7 and was deprecated since Python 3.9. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-23-21-45-43 | |
| .. gh-issue: 158001 | |
| .. nonce: R_wX4E | |
| .. section: C API | |
| Remove :c:func:`!Py_SetProgramName`, :c:func:`!Py_SetPythonHome`, | |
| :c:func:`!PySys_SetArgv` and :c:func:`!PySys_SetArgvEx` functions, | |
| deprecated since Python 3.11. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-23-19-37-53 | |
| .. gh-issue: 158001 | |
| .. nonce: X_Xamm | |
| .. section: C API | |
| Remove 21 global configuration variables: | |
| * :c:var:`!Py_BytesWarningFlag`, | |
| * :c:var:`!Py_DebugFlag`, | |
| * :c:var:`!Py_DontWriteBytecodeFlag`, | |
| * :c:var:`!Py_FileSystemDefaultEncodeErrors`, | |
| * :c:var:`!Py_FileSystemDefaultEncoding`, | |
| * :c:var:`!Py_FrozenFlag`, | |
| * :c:var:`!Py_HasFileSystemDefaultEncoding`, | |
| * :c:var:`!Py_HashRandomizationFlag`, | |
| * :c:var:`!Py_IgnoreEnvironmentFlag`, | |
| * :c:var:`!Py_InspectFlag`, | |
| * :c:var:`!Py_InteractiveFlag`, | |
| * :c:var:`!Py_IsolatedFlag`, | |
| * :c:var:`!Py_LegacyWindowsFSEncodingFlag`, | |
| * :c:var:`!Py_LegacyWindowsStdioFlag`, | |
| * :c:var:`!Py_NoSiteFlag`, | |
| * :c:var:`!Py_NoUserSiteDirectory`, | |
| * :c:var:`!Py_OptimizeFlag`, | |
| * :c:var:`!Py_QuietFlag`, | |
| * :c:var:`!Py_UTF8Mode`, | |
| * :c:var:`!Py_UnbufferedStdioFlag`, | |
| * :c:var:`!Py_VerboseFlag`. | |
| Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-22-23-20-53 | |
| .. gh-issue: 148233 | |
| .. nonce: U_2x-F | |
| .. section: C API | |
| Add :c:func:`Py_HashBuffer` to the limited C API. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-18-00-29-49 | |
| .. gh-issue: 157710 | |
| .. nonce: Q_AD8D | |
| .. section: C API | |
| When Python is built in debug mode, :c:func:`PyUnicodeWriter_Finish` now | |
| checks if the trailing null byte has been overridden to detect buffer | |
| overflow. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-17-23-18-12 | |
| .. gh-issue: 157710 | |
| .. nonce: 1xKQAH | |
| .. section: C API | |
| Soft deprecate functions modifying Unicode strings: :c:func:`PyUnicode_New`, | |
| :c:func:`PyUnicode_CopyCharacters`, :c:func:`PyUnicode_Fill`, | |
| :c:func:`PyUnicode_Resize`, :c:func:`PyUnicode_WRITE` and | |
| :c:func:`PyUnicode_WriteChar`. Use the :c:type:`PyUnicodeWriter` API | |
| instead. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-16-21-24-36 | |
| .. gh-issue: 142217 | |
| .. nonce: 44sqt4 | |
| .. section: C API | |
| Add tests on the undocumented and deprecated ``_Py_Identifier`` C API. Patch | |
| by Victor Stinner. | |
| .. | |
| .. date: 2026-09-14-18-07-43 | |
| .. gh-issue: 140550 | |
| .. nonce: fLVOGn | |
| .. section: C API | |
| Fix the :c:macro:`PyABIInfo_VAR` macro: remove redundant ``;``. Before, | |
| ``PyABIInfo_VAR(abi_info);`` code added two ``;;`` which is illegal in | |
| C++03. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-14-16-10-23 | |
| .. gh-issue: 157495 | |
| .. nonce: LzMLtE | |
| .. section: C API | |
| If ``typeof()`` is available, implement :c:macro:`Py_MIN`, :c:macro:`Py_MAX` | |
| and :c:macro:`Py_ABS` using ``typeof()`` and statement expression to only | |
| evaluate each argument once. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-12-18-37-22 | |
| .. gh-issue: 157384 | |
| .. nonce: LGsy8K | |
| .. section: C API | |
| :c:func:`PyImport_CreateModuleFromInitfunc` now sets the package context | |
| while calling *initfunc*, so that a single-phase init submodule created with | |
| only the last component of its name gets the full name from the spec. | |
| .. | |
| .. date: 2026-09-10-15-19-16 | |
| .. gh-issue: 155526 | |
| .. nonce: kMKhyp | |
| .. section: C API | |
| :c:func:`_Py_c_abs` no longer sets :c:data:`errno` to zero on success, but | |
| rather leaves it unchanged. Patch by Sergey B Kirpichev. | |
| .. | |
| .. date: 2026-09-10-02-51-26 | |
| .. gh-issue: 157242 | |
| .. nonce: tfXIsf | |
| .. section: C API | |
| Fix :c:func:`PyBytesWriter_Resize` to handle properly memory allocation | |
| failure. Leave the writer unchanged on error, instead of leaving it in an | |
| inconsistent state. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-09-04-16-41-07 | |
| .. gh-issue: 156939 | |
| .. nonce: bKaQuE | |
| .. section: C API | |
| When Python is built in debug mode, :c:type:`PyBytesWriter` now detects | |
| buffer overflow. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-08-31-19-14-15 | |
| .. gh-issue: 156101 | |
| .. nonce: d4PSIF | |
| .. section: C API | |
| Don't set the result in error in :c:func:`PyLong_AsInt32`, | |
| :c:func:`PyLong_AsUInt32`, :c:func:`PyLong_AsInt64` and | |
| :c:func:`PyLong_AsUInt64`. Leave the result unchanged in this case. Patch by | |
| Victor Stinner. | |
| .. | |
| .. date: 2026-08-25-12-00-00 | |
| .. gh-issue: 131740 | |
| .. nonce: Ft7Rz2 | |
| .. section: C API | |
| On the free-threaded build, :c:func:`PyUnstable_GC_VisitObjects` now also | |
| visits frozen objects (objects moved to the permanent generation by | |
| :func:`gc.freeze`), matching the behavior of the default build. | |
| .. | |
| .. date: 2026-08-16-20-48-08 | |
| .. gh-issue: 155907 | |
| .. nonce: Vb3xTn | |
| .. section: C API | |
| :c:func:`PyMarshal_ReadObjectFromFile` and other functions reading | |
| marshalled data from a :c:expr:`FILE*` now raise :exc:`OSError` for I/O | |
| errors and :exc:`KeyboardInterrupt` for interrupted reading, instead of | |
| :exc:`EOFError`. :c:func:`PyMarshal_WriteObjectToFile` and | |
| :c:func:`PyMarshal_WriteLongToFile` now detect I/O errors and interrupted | |
| writing instead of ignoring them. :c:func:`PyMarshal_WriteObjectToFile` now | |
| also sets the error indicator if the value cannot be marshalled. | |
| .. | |
| .. date: 2026-08-14-14-47-08 | |
| .. gh-issue: 155742 | |
| .. nonce: UGI3Pn | |
| .. section: C API | |
| :c:func:`PyBytesWriter_FinishWithSize` now returns single byte singletons if | |
| *size* equals to ``1``. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-07-30-16-58-36 | |
| .. gh-issue: 152105 | |
| .. nonce: 1Jz1YH | |
| .. section: C API | |
| Remove the :c:var:`!PyUnstable_ExecutableKinds` array, as well as the macros | |
| :c:macro:`!PyUnstable_EXECUTABLE_KIND_SKIP`, | |
| :c:macro:`!PyUnstable_EXECUTABLE_KIND_PY_FUNCTION`, | |
| :c:macro:`!PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION`, | |
| :c:macro:`!PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR` and | |
| :c:macro:`!PyUnstable_EXECUTABLE_KINDS`, from the C API. | |
| .. | |
| .. date: 2026-07-28-04-29-52 | |
| .. gh-issue: 153740 | |
| .. nonce: 7_LMSA | |
| .. section: C API | |
| If available on the platform, use native :c:type:`_Float16` in | |
| :c:func:`PyFloat_Pack2` and :c:func:`PyFloat_Unpack2` functions. Patch by | |
| Sergey B Kirpichev. | |
| .. | |
| .. date: 2026-07-09-17-33-29 | |
| .. gh-issue: 152132 | |
| .. nonce: Ma8MJZ | |
| .. section: C API | |
| Fix :c:func:`Py_RunMain` to return an exit code, rather than calling | |
| :c:func:`Py_Exit`, when running a script, a command, or the REPL. Patch by | |
| Victor Stinner. | |
| .. | |
| .. date: 2026-07-09-16-46-30 | |
| .. gh-issue: 145633 | |
| .. nonce: jyNwAs | |
| .. section: C API | |
| :c:func:`PyFloat_Pack8` and ``PyFloat_Unpack*`` functions are no longer | |
| guaranteed to always succeed on CPython. | |
| .. | |
| .. date: 2026-07-08-00-38-32 | |
| .. gh-issue: 153300 | |
| .. nonce: lVoWyR | |
| .. section: C API | |
| :c:func:`PyConfig_Set()` now also set global configuration variables. For | |
| example, ``PyConfig_Set("inspect", value)`` now also sets | |
| :c:var:`!Py_InspectFlag`. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-06-18-18-24-11 | |
| .. gh-issue: 141510 | |
| .. nonce: -EOHJ1 | |
| .. section: C API | |
| Add :class:`frozendict` to the fast paths of | |
| :c:func:`PyMapping_GetOptionalItem`, :c:func:`PyMapping_Keys`, | |
| :c:func:`PyMapping_Values`, and :c:func:`PyMapping_Items`. | |
| .. | |
| .. date: 2026-06-10-16-43-37 | |
| .. gh-issue: 123619 | |
| .. nonce: dV82r6 | |
| .. section: C API | |
| :c:func:`PyUnstable_Object_EnableDeferredRefcount` now returns ``0`` if the | |
| object is not tracked by the garbage collector: if :func:`gc.is_tracked` is | |
| false. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-06-10-15-22-44 | |
| .. gh-issue: 149044 | |
| .. nonce: O7KEcs | |
| .. section: C API | |
| Improved error message when specifying non-type base classes in | |
| :c:macro:`Py_tp_bases`, :c:macro:`Py_tp_base`, and *bases* argument to | |
| :c:func:`PyType_FromMetaclass` and other ``PyType_From*`` functions. | |
| .. | |
| .. date: 2026-06-09-14-50-35 | |
| .. gh-issue: 80384 | |
| .. nonce: UEGyvB | |
| .. section: C API | |
| :c:func:`PyWeakref_NewRef` and :c:func:`PyWeakref_NewProxy` now raise | |
| :exc:`TypeError` if the *callback* argument is not callable, ``None``, or | |
| ``NULL``. | |
| .. | |
| .. date: 2026-06-04-14-26-17 | |
| .. gh-issue: 150907 | |
| .. nonce: CA91_B | |
| .. section: C API | |
| Fix ``dynamic_annotations.h`` header file when built with C++ and Valgrind: | |
| add ``extern "C++" scope`` for the C++ template. Patch by Victor Stinner. | |
| .. | |
| .. date: 2026-05-31-15-39-58 | |
| .. gh-issue: 150671 | |
| .. nonce: bTkDVC | |
| .. section: C API | |
| Deprecate these C-API functions: :c:func:`PyGen_New`, | |
| :c:func:`PyGen_NewWithQualName`, :c:func:`PyCoro_New`, and | |
| :c:func:`PyAsyncGen_New`. Schedule them for removal in 3.18 | |
| .. | |
| .. date: 2026-05-12-16-47-21 | |
| .. gh-issue: 149725 | |
| .. nonce: HZLBTZ | |
| .. section: C API | |
| Add :c:func:`PySentinel_CheckExact` for exact :class:`sentinel` type tests | |
| to accompany the existing :c:func:`PySentinel_Check`. | |
| .. | |
| .. date: 2026-02-25-13-37-10 | |
| .. gh-issue: 145235 | |
| .. nonce: -1ySNR | |
| .. section: C API | |
| Made :c:func:`PyDict_AddWatcher`, :c:func:`PyDict_ClearWatcher`, | |
| :c:func:`PyDict_Watch`, and :c:func:`PyDict_Unwatch` thread-safe on the | |
| :term:`free threaded <free threading>` build. | |
| .. | |
| .. date: 2024-08-12-09-48-04 | |
| .. gh-issue: 122931 | |
| .. nonce: x435Mb | |
| .. section: C API | |
| Allow importing stable ABI C extensions that include a multiarch tuple in | |
| their filename, e.g. ``foo.abi3-x86-64-linux-gnu.so``. | |
| .. | |
| .. bpo: 32414 | |
| .. date: 2018-05-16-13-47-18 | |
| .. nonce: NODPbj | |
| .. section: C API | |
| :c:func:`PyCapsule_Import` now imports submodules if needed. Previously | |
| names like ``package.module.attribute`` worked only if ``package.module`` | |
| was already imported. |