.. date: 2024-12-22-08-54-30
.. gh-issue: 127592
.. nonce: iyuFCC
.. release date: 2025-02-04
.. section: macOS

Usage of the unified Apple System Log APIs was disabled when the minimum
macOS version is earlier than 10.12.

..

.. date: 2024-11-28-15-55-48
.. gh-issue: 127353
.. nonce: i-XOXg
.. section: Windows

Allow to force color output on Windows using environment variables. Patch by
Andrey Efremov.

..

.. date: 2025-01-24-14-49-40
.. gh-issue: 129248
.. nonce: JAapG2
.. section: Tools/Demos

The iOS test runner now strips the log prefix from each line output by the
test suite.

..

.. date: 2025-01-03-23-51-07
.. gh-issue: 128152
.. nonce: IhzElS
.. section: Tools/Demos

Fix a bug where Argument Clinic's C pre-processor parser tried to parse
pre-processor directives inside C comments. Patch by Erlend Aasland.

..

.. date: 2024-12-13-13-41-34
.. gh-issue: 127906
.. nonce: NuRHlB
.. section: Tests

Test the limited C API in test_cppext. Patch by Victor Stinner.

..

.. date: 2024-12-09-12-35-44
.. gh-issue: 127637
.. nonce: KLx-9I
.. section: Tests

Add tests for the :mod:`dis` command-line interface. Patch by Bénédikt Tran.

..

.. date: 2024-12-04-15-03-24
.. gh-issue: 126925
.. nonce: uxAMK-
.. section: Tests

iOS test results are now streamed during test execution, and the deprecated
xcresulttool is no longer used.

..

.. date: 2025-01-28-14-08-03
.. gh-issue: 105704
.. nonce: EnhHxu
.. section: Security

When using :func:`urllib.parse.urlsplit` and :func:`urllib.parse.urlparse`
host parsing would not reject domain names containing square brackets (``[``
and ``]``). Square brackets are only valid for IPv6 and IPvFuture hosts
according to `RFC 3986 Section 3.2.2
<https://www.rfc-editor.org/rfc/rfc3986#section-3.2.2>`__.

..

.. date: 2024-12-05-21-35-19
.. gh-issue: 127655
.. nonce: xpPoOf
.. section: Security

Fixed the :class:`!asyncio.selector_events._SelectorSocketTransport`
transport not pausing writes for the protocol when the buffer reaches the
high water mark when using :meth:`asyncio.WriteTransport.writelines`.

..

.. date: 2024-10-29-09-15-10
.. gh-issue: 126108
.. nonce: eTIjHY
.. section: Security

Fix a possible ``NULL`` pointer dereference in
:c:func:`!PySys_AddWarnOptionUnicode`.

..

.. date: 2024-08-06-11-43-08
.. gh-issue: 80222
.. nonce: wfR4BU
.. section: Security

Fix bug in the folding of quoted strings when flattening an email message
using a modern email policy. Previously when a quoted string was folded so
that it spanned more than one line, the surrounding quotes and internal
escapes would be omitted. This could theoretically be used to spoof header
lines using a carefully constructed quoted string if the resulting rendered
email was transmitted or re-parsed.

..

.. date: 2024-05-24-21-00-52
.. gh-issue: 119511
.. nonce: jKrXQ8
.. section: Security

Fix a potential denial of service in the :mod:`imaplib` module. When
connecting to a malicious server, it could cause an arbitrary amount of
memory to be allocated. On many systems this is harmless as unused virtual
memory is only a mapping, but if this hit a virtual address size limit it
could lead to a :exc:`MemoryError` or other process crash. On unusual
systems or builds where all allocated memory is touched and backed by actual
ram or storage it could've consumed resources doing so until similarly
crashing.

..

.. date: 2025-01-31-11-14-05
.. gh-issue: 129502
.. nonce: j_ArNo
.. section: Library

Unlikely errors in preparing arguments for :mod:`ctypes` callback are now
handled in the same way as errors raised in the callback of in converting
the result of the callback -- using :func:`sys.unraisablehook` instead of
:func:`sys.excepthook` and not setting :data:`sys.last_exc` and other
variables.

..

.. date: 2025-01-29-17-10-00
.. gh-issue: 129403
.. nonce: 314159
.. section: Library

Corrected :exc:`ValueError` message for :class:`asyncio.Barrier` and
:class:`threading.Barrier`.

..

.. date: 2025-01-29-14-30-54
.. gh-issue: 129409
.. nonce: JZbOE6
.. section: Library

Fix an integer overflow in the :mod:`csv` module when writing a data field
larger than 2GB.

..

.. date: 2025-01-29-10-53-32
.. gh-issue: 118761
.. nonce: i8wjpV
.. section: Library

Improve import time of :mod:`subprocess` by lazy importing ``locale`` and
``signal``. Patch by Taneli Hukkinen.

..

.. date: 2025-01-27-14-05-19
.. gh-issue: 129346
.. nonce: gZRd3g
.. section: Library

In :mod:`sqlite3`, handle out-of-memory when creating user-defined SQL
functions.

..

.. date: 2025-01-21-18-52-32
.. gh-issue: 129061
.. nonce: 4idD_B
.. section: Library

Fix FORCE_COLOR and NO_COLOR when empty strings. Patch by Hugo van Kemenade.

..

.. date: 2025-01-20-13-12-39
.. gh-issue: 128550
.. nonce: AJ5TOL
.. section: Library

Removed an incorrect optimization relating to eager tasks in
:class:`asyncio.TaskGroup` that resulted in cancellations being missed.

..

.. date: 2025-01-18-16-58-10
.. gh-issue: 128991
.. nonce: EzJit9
.. section: Library

Release the enter frame reference within :mod:`bdb` callback

..

.. date: 2025-01-18-11-04-44
.. gh-issue: 128978
.. nonce: hwg7-w
.. section: Library

Fix a :exc:`NameError` in :func:`!sysconfig.expand_makefile_vars`. Patch by
Bénédikt Tran.

..

.. date: 2025-01-17-21-33-11
.. gh-issue: 128961
.. nonce: XwvyIZ
.. section: Library

Fix a crash when setting state on an exhausted :class:`array.array`
iterator.

..

.. date: 2025-01-17-17-20-51
.. gh-issue: 128894
.. nonce: gX1-8J
.. section: Library

Fix ``traceback.TracebackException._format_syntax_error`` not to fail on
exceptions with custom metadata.

..

.. date: 2025-01-17-11-46-16
.. gh-issue: 128916
.. nonce: GEePbO
.. section: Library

Do not attempt to set ``SO_REUSEPORT`` on sockets of address families other
than ``AF_INET`` and ``AF_INET6``, as it is meaningless with these address
families, and the call with fail with Linux kernel 6.12.9 and newer.

..

.. date: 2025-01-10-15-43-52
.. gh-issue: 128679
.. nonce: KcfVVR
.. section: Library

Fix :func:`tracemalloc.stop` race condition. Fix :mod:`tracemalloc` to
support calling :func:`tracemalloc.stop` in one thread, while another thread
is tracing memory allocations. Patch by Victor Stinner.

..

.. date: 2025-01-08-22-30-38
.. gh-issue: 128636
.. nonce: jQfWXj
.. section: Library

Fix PyREPL failure when :data:`os.environ` is overwritten with an invalid
value.

..

.. date: 2025-01-08-03-09-29
.. gh-issue: 128562
.. nonce: Mlv-yO
.. section: Library

Fix possible conflicts in generated :mod:`tkinter` widget names if the
widget class name ends with a digit.

..

.. date: 2025-01-07-21-48-32
.. gh-issue: 128498
.. nonce: n6jtlW
.. section: Library

Default to stdout isatty for color detection instead of stderr. Patch by
Hugo van Kemenade.

..

.. date: 2025-01-06-18-41-08
.. gh-issue: 128552
.. nonce: fV-f8j
.. section: Library

Fix cyclic garbage introduced by :meth:`asyncio.loop.create_task` and
:meth:`asyncio.TaskGroup.create_task` holding a reference to the created
task if it is eager.

..

.. date: 2025-01-04-11-10-04
.. gh-issue: 128479
.. nonce: jvOrF-
.. section: Library

Fix :func:`!asyncio.staggered.staggered_race` leaking tasks and issuing an
unhandled exception.

..

.. date: 2025-01-02-13-05-16
.. gh-issue: 128400
.. nonce: 5N43fF
.. section: Library

Fix crash when using :func:`faulthandler.dump_traceback` while other threads
are active on the :term:`free threaded <free threading>` build.

..

.. date: 2024-12-30-20-48-28
.. gh-issue: 88834
.. nonce: RIvgwc
.. section: Library

Unify the instance check for :class:`typing.Union` and
:class:`types.UnionType`: :class:`!Union` now uses the instance checks
against its parameters instead of the subclass checks.

..

.. date: 2024-12-29-13-49-46
.. gh-issue: 128302
.. nonce: psRpPN
.. section: Library

Fix :meth:`!xml.dom.xmlbuilder.DOMEntityResolver.resolveEntity`, which was
broken by the Python 3.0 transition.

..

.. date: 2024-12-27-16-28-57
.. gh-issue: 128302
.. nonce: 2GMvyl
.. section: Library

Allow :meth:`!xml.dom.xmlbuilder.DOMParser.parse` to correctly handle
:class:`!xml.dom.xmlbuilder.DOMInputSource` instances that only have a
:attr:`!systemId` attribute set.

..

.. date: 2024-12-26-11-00-03
.. gh-issue: 112064
.. nonce: mCcw3B
.. section: Library

Fix incorrect handling of negative read sizes in :meth:`HTTPResponse.read
<http.client.HTTPResponse.read>`. Patch by Yury Manushkin.

..

.. date: 2024-12-23-02-09-44
.. gh-issue: 58956
.. nonce: 4OdMdT
.. section: Library

Fixed a frame reference leak in :mod:`bdb`.

..

.. date: 2024-12-21-03-20-12
.. gh-issue: 128131
.. nonce: QpPmNt
.. section: Library

Completely support random access of uncompressed unencrypted read-only zip
files obtained by :meth:`ZipFile.open <zipfile.ZipFile.open>`.

..

.. date: 2024-12-20-15-19-38
.. gh-issue: 112328
.. nonce: d9GfLR
.. section: Library

:class:`enum.EnumDict` can now be used without resorting to private API.

..

.. date: 2024-12-20-08-44-12
.. gh-issue: 127975
.. nonce: 8HJwu9
.. section: Library

Avoid reusing quote types in :func:`ast.unparse` if not needed.

..

.. date: 2024-12-18-10-18-55
.. gh-issue: 128062
.. nonce: E9oU7-
.. section: Library

Revert the font of :mod:`turtledemo`'s menu bar to its default value and
display the shortcut keys in the correct position.

..

.. date: 2024-12-18-00-07-50
.. gh-issue: 128014
.. nonce: F3aUbz
.. section: Library

Fix resetting the default window icon by passing ``default=''`` to the
:mod:`tkinter` method :meth:`!wm_iconbitmap`.

..

.. date: 2024-12-17-16-48-02
.. gh-issue: 115514
.. nonce: 1yOJ7T
.. section: Library

Fix exceptions and incomplete writes after
:class:`!asyncio._SelectorTransport` is closed before writes are completed.

..

.. date: 2024-12-17-15-23-40
.. gh-issue: 41872
.. nonce: 31LjKY
.. section: Library

Fix quick extraction of module docstrings from a file in :mod:`pydoc`. It
now supports docstrings with single quotes, escape sequences, raw string
literals, and other Python syntax.

..

.. date: 2024-12-17-13-21-52
.. gh-issue: 127060
.. nonce: mv2bX6
.. section: Library

Set TERM environment variable to "dumb" to disable traceback colors in IDLE,
since IDLE doesn't understand ANSI escape sequences. Patch by Victor
Stinner.

..

.. date: 2024-12-17-12-41-07
.. gh-issue: 126742
.. nonce: l07qvT
.. section: Library

Fix support of localized error messages reported by :manpage:`dlerror(3)`
and :manpage:`gdbm_strerror <gdbm(3)>` in :mod:`ctypes` and :mod:`dbm.gnu`
functions respectively. Patch by Bénédikt Tran.

..

.. date: 2024-12-12-18-25-50
.. gh-issue: 127873
.. nonce: WJRwfz
.. section: Library

When ``-E`` is set, only ignore ``PYTHON_COLORS`` and not
``FORCE_COLOR``/``NO_COLOR``/``TERM`` when colourising output. Patch by Hugo
van Kemenade.

..

.. date: 2024-12-12-16-59-42
.. gh-issue: 127870
.. nonce: _NFG-3
.. section: Library

Detect recursive calls in ctypes ``_as_parameter_`` handling. Patch by
Victor Stinner.

..

.. date: 2024-12-12-07-27-51
.. gh-issue: 127847
.. nonce: ksfNKM
.. section: Library

Fix the position when doing interleaved seeks and reads in uncompressed,
unencrypted zip files returned by :meth:`zipfile.ZipFile.open`.

..

.. date: 2024-12-08-08-36-18
.. gh-issue: 127732
.. nonce: UEKxoa
.. section: Library

The :mod:`platform` module now correctly detects Windows Server 2025.

..

.. date: 2024-12-04-15-04-12
.. gh-issue: 126821
.. nonce: lKCLVV
.. section: Library

macOS and iOS apps can now choose to redirect stdout and stderr to the
system log during interpreter configuration.

..

.. date: 2024-12-04-11-01-16
.. gh-issue: 93312
.. nonce: 9sB-Qw
.. section: Library

Include ``<sys/pidfd.h>`` to get ``os.PIDFD_NONBLOCK`` constant. Patch by
Victor Stinner.

..

.. date: 2024-12-04-10-39-29
.. gh-issue: 83662
.. nonce: CG1s3m
.. section: Library

Add missing ``__class_getitem__`` method to the Python implementation of
:func:`functools.partial`, to make it compatible with the C version. This is
mainly relevant for alternative Python implementations like PyPy and
GraalPy, because CPython will usually use the C-implementation of that
function.

..

.. date: 2024-12-03-20-28-08
.. gh-issue: 127586
.. nonce: zgotYF
.. section: Library

:class:`multiprocessing.pool.Pool` now properly restores blocked signal
handlers of the parent thread when creating processes via either *spawn* or
*forkserver*.

..

.. date: 2024-12-03-14-45-16
.. gh-issue: 98188
.. nonce: GX9i2b
.. section: Library

Fix an issue in :meth:`email.message.Message.get_payload` where data cannot
be decoded if the Content Transfer Encoding mechanism contains trailing
whitespaces or additional junk text. Patch by Hui Liu.

..

.. date: 2024-11-28-14-14-46
.. gh-issue: 127257
.. nonce: n6-jU9
.. section: Library

In :mod:`ssl`, system call failures that OpenSSL reports using
``ERR_LIB_SYS`` are now raised as :exc:`OSError`.

..

.. date: 2024-11-24-22-06-42
.. gh-issue: 127096
.. nonce: R7LLpQ
.. section: Library

Do not recreate unnamed section on every read in
:class:`configparser.ConfigParser`. Patch by Andrey Efremov.

..

.. date: 2024-11-24-14-53-35
.. gh-issue: 127196
.. nonce: 8CBkUa
.. section: Library

Fix crash when dict with keys in invalid encoding were passed to several
functions in ``_interpreters`` module.

..

.. date: 2024-11-13-10-44-25
.. gh-issue: 126775
.. nonce: a3ubjh
.. section: Library

Make :func:`linecache.checkcache` thread safe and GC re-entrancy safe.

..

.. date: 2024-11-10-19-45-01
.. gh-issue: 126332
.. nonce: WCCKoH
.. section: Library

Fix _pyrepl crash when entering a double CTRL-Z on an overflowing line.

..

.. date: 2024-10-31-14-31-36
.. gh-issue: 126225
.. nonce: vTxGXm
.. section: Library

:mod:`getopt` and :mod:`optparse` are no longer marked as deprecated. There
are legitimate reasons to use one of these modules in preference to
:mod:`argparse`, and none of these modules are at risk of being removed from
the standard library. Of the three, ``argparse`` remains the recommended
default choice, *unless* one of the concerns noted at the top of the
``optparse`` module documentation applies.

..

.. date: 2024-10-26-16-59-02
.. gh-issue: 125553
.. nonce: 4pDLzt
.. section: Library

Fix round-trip invariance for backslash continuations in
:func:`tokenize.untokenize`.

..

.. date: 2024-09-12-14-24-25
.. gh-issue: 123987
.. nonce: 7_OD1p
.. section: Library

Fixed issue in NamespaceReader where a non-path item in a namespace path,
such as a sentinel added by an editable installer, would break resource
loading.

..

.. date: 2024-08-27-18-58-01
.. gh-issue: 123401
.. nonce: t4-FpI
.. section: Library

The :mod:`http.cookies` module now supports parsing obsolete :rfc:`850` date
formats, in accordance with :rfc:`9110` requirements. Patch by Nano Zheng.

..

.. date: 2024-07-30-11-37-40
.. gh-issue: 122431
.. nonce: lAzVtu
.. section: Library

:func:`readline.append_history_file` now raises a :exc:`ValueError` when
given a negative value.

..

.. date: 2024-07-14-23-19-20
.. gh-issue: 119257
.. nonce: 9OEzcN
.. section: Library

Show tab completions menu below the current line, which results in less
janky behaviour, and fixes a cursor movement bug. Patch by Daniel Hollas

..

.. date: 2025-01-16-18-59-11
.. gh-issue: 125722
.. nonce: eHHRga
.. section: Documentation

Require Sphinx 8.1.3 or later to build the Python documentation. Patch by
Adam Turner.

..

.. date: 2025-01-14-11-06-41
.. gh-issue: 67206
.. nonce: LYKmi5
.. section: Documentation

Document that :const:`string.printable` is not printable in the POSIX sense.
In particular, :meth:`string.printable.isprintable() <str.isprintable>`
returns :const:`False`. Patch by Bénédikt Tran.

..

.. date: 2025-01-28-06-23-59
.. gh-issue: 129345
.. nonce: uOjkML
.. section: Core and Builtins

Fix null pointer dereference in :func:`syslog.openlog` when an audit hook
raises an exception.

..

.. date: 2025-01-21-23-35-41
.. gh-issue: 129093
.. nonce: 0rvETC
.. section: Core and Builtins

Fix f-strings such as ``f'{expr=}'`` sometimes not displaying the full
expression when the expression contains ``!=``.

..

.. date: 2025-01-21-19-48-30
.. gh-issue: 124363
.. nonce: vOFhHW
.. section: Core and Builtins

Treat debug expressions in f-string as raw strings. Patch by Pablo Galindo

..

.. date: 2025-01-18-01-06-58
.. gh-issue: 128799
.. nonce: vSNagk
.. section: Core and Builtins

Add frame of ``except*`` to traceback when it wraps a naked exception.

..

.. date: 2025-01-13-12-48-30
.. gh-issue: 128078
.. nonce: qOsl9B
.. section: Core and Builtins

Fix a :exc:`SystemError` when using :func:`anext` with a default tuple
value. Patch by Bénédikt Tran.

..

.. date: 2025-01-11-12-39-17
.. gh-issue: 128717
.. nonce: i65d06
.. section: Core and Builtins

Fix a crash when setting the recursion limit while other threads are active
on the :term:`free threaded <free threading>` build.

..

.. date: 2024-12-29-15-09-21
.. gh-issue: 128330
.. nonce: IaYL7G
.. section: Core and Builtins

Restore terminal control characters on REPL exit.

..

.. date: 2024-12-18-14-22-48
.. gh-issue: 128079
.. nonce: SUD5le
.. section: Core and Builtins

Fix a bug where :keyword:`except* <except_star>` does not properly check the
return value of an :exc:`ExceptionGroup`'s :meth:`~BaseExceptionGroup.split`
function, leading to a crash in some cases. Now when
:meth:`~BaseExceptionGroup.split` returns an invalid object,
:keyword:`except* <except_star>` raises a :exc:`TypeError` with the original
raised :exc:`ExceptionGroup` object chained to it.

..

.. date: 2024-12-17-22-28-15
.. gh-issue: 128030
.. nonce: H1ptOD
.. section: Core and Builtins

Avoid error from calling ``PyModule_GetFilenameObject`` on a non-module
object when importing a non-existent symbol from a non-module object.

..

.. date: 2024-12-13-14-17-24
.. gh-issue: 127903
.. nonce: vemHSl
.. section: Core and Builtins

``Objects/unicodeobject.c``: fix a crash on DEBUG builds in
``_copy_characters`` when there is nothing to copy.

..

.. date: 2024-12-07-13-06-09
.. gh-issue: 127599
.. nonce: tXCZb_
.. section: Core and Builtins

Fix statistics for increments of object reference counts (in particular,
when a reference count was increased by more than 1 in a single operation).

..

.. date: 2024-12-06-01-09-40
.. gh-issue: 127651
.. nonce: 80cm6j
.. section: Core and Builtins

When raising :exc:`ImportError` for missing symbols in ``from`` imports, use
``__file__`` in the error message if ``__spec__.origin`` is not a location

..

.. date: 2024-12-05-19-25-00
.. gh-issue: 127582
.. nonce: ogUY2a
.. section: Core and Builtins

Fix non-thread-safe object resurrection when calling finalizers and watcher
callbacks in the free threading build.

..

.. date: 2024-12-04-09-52-08
.. gh-issue: 127434
.. nonce: RjkGT_
.. section: Core and Builtins

The iOS compiler shims can now accept arguments with spaces.

..

.. date: 2024-12-03-21-07-06
.. gh-issue: 127536
.. nonce: 3jMMrT
.. section: Core and Builtins

Add missing locks around some list assignment operations in the free
threading build.

..

.. date: 2024-12-02-18-15-37
.. gh-issue: 126862
.. nonce: fdIK7T
.. section: Core and Builtins

Fix a possible overflow when a class inherits from an absurd number of
super-classes. Reported by Valery Fedorenko. Patch by Bénédikt Tran.

..

.. date: 2024-11-30-16-13-31
.. gh-issue: 127349
.. nonce: ssYd6n
.. section: Core and Builtins

Fixed the error when resizing terminal in Python REPL. Patch by Semyon
Moroz.

..

.. date: 2024-10-28-13-18-16
.. gh-issue: 126076
.. nonce: MebZuS
.. section: Core and Builtins

Relocated objects such as ``tuple``, ``bytes`` and ``str`` objects are
properly tracked by :mod:`tracemalloc` and its associated hooks. Patch by
Pablo Galindo.

..

.. date: 2024-12-10-14-25-22
.. gh-issue: 127791
.. nonce: YRw4GU
.. section: C API

Fix loss of callbacks after more than one call to
:c:func:`PyUnstable_AtExit`.

..

.. date: 2025-02-02-09-11-45
.. gh-issue: 129539
.. nonce: SYXXCg
.. section: Build

Don't redefine ``EX_OK`` when the system has the ``sysexits.h`` header.

..

.. date: 2025-01-04-22-39-10
.. gh-issue: 128472
.. nonce: Wt5E6M
.. section: Build

Skip BOLT optimization of functions using computed gotos, fixing errors on
build with LLVM 19.

..

.. date: 2025-01-02-11-02-45
.. gh-issue: 123925
.. nonce: TLlyUi
.. section: Build

Fix building the :mod:`curses` module on platforms with libncurses but
without libncursesw.

..

.. date: 2024-12-28-21-05-19
.. gh-issue: 128321
.. nonce: 0UvbXw
.. section: Build

Set ``LIBS`` instead of ``LDFLAGS`` when checking if :mod:`sqlite3` library
functions are available. This fixes the ordering of linked libraries during
checks, which was incorrect when using a statically linked ``libsqlite3``.

..

.. date: 2024-12-12-17-21-45
.. gh-issue: 127865
.. nonce: 30GDzs
.. section: Build

Fix build failure on systems without thread-locals support.
