.. date: 2025-02-10-22-08-37
.. gh-issue: 91132
.. nonce: 00x1MI
.. release date: 2025-02-11
.. section: macOS

Update macOS installer to use ncurses 6.5.

..

.. 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: 2023-05-11-23-32-25
.. gh-issue: 104400
.. nonce: 23vxm7
.. section: Tools/Demos

Fix several bugs in extraction by switching to an AST parser in
:program:`pygettext`.

..

.. date: 2025-01-30-13-09-27
.. gh-issue: 129386
.. nonce: iNtbEi
.. section: Tests

Add ``test.support.reset_code``, which can be used to reset various
bytecode-level optimizations and local instrumentation for a function.

..

.. date: 2025-01-04-02-41-41
.. gh-issue: 128474
.. nonce: 0b-tl4
.. section: Tests

Disable ``test_embed`` test cases that segfault on BOLT instrument binaries.
The tests are only disabled when BOLT is enabled.

..

.. date: 2024-12-16-19-15-10
.. gh-issue: 128003
.. nonce: GVBrfa
.. section: Tests

Add an option ``--parallel-threads=N`` to the regression test runner that
runs individual tests in multiple threads in parallel in order to find
concurrency bugs.  Note that most of the test suite is not yet reviewed for
thread-safety or annotated with ``@thread_unsafe`` when necessary.

..

.. 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-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-02-10-14-34-34
.. gh-issue: 129939
.. nonce: B08L4e
.. section: Library

Comparison pages with highlighted changes generated by the
:class:`difflib.HtmlDiff` class now support dark mode.

..

.. date: 2025-02-10-08-44-11
.. gh-issue: 129928
.. nonce: QuiZEz
.. section: Library

Raise :exc:`sqlite3.ProgrammingError` if a user-defined SQL function with
invalid number of parameters is created. Patch by Erlend Aasland.

..

.. date: 2025-02-09-17-47-01
.. gh-issue: 129583
.. nonce: -130Ys
.. section: Library

Update bundled pip to 25.0.1

..

.. date: 2025-02-07-10-34-09
.. gh-issue: 129766
.. nonce: 6n5fQZ
.. section: Library

Fix crash in :mod:`warnings`, when calling ``_release_lock()`` with no
existing lock.

..

.. date: 2025-02-05-13-19-15
.. gh-issue: 129005
.. nonce: Sb69L_
.. section: Library

``_pyio.FileIO.readall()`` now allocates, resizes, and fills a data buffer
using the same algorithm ``_io.FileIO.readall()`` uses.

..

.. date: 2025-02-04-15-16-33
.. gh-issue: 129646
.. nonce: sapk1F
.. section: Library

Update the locale alias mapping in the :mod:`locale` module to match the
latest X Org locale alias mapping and support new locales in Glibc 2.41.

..

.. date: 2025-02-03-22-31-43
.. gh-issue: 128317
.. nonce: n2Swnh
.. section: Library

Put CLI calendar highlighting in private class, removing ``highlight_day``
from public :class:`calendar.TextCalendar` API. Patch by Hugo van Kemenade.

..

.. date: 2025-02-03-01-43-16
.. gh-issue: 129603
.. nonce: xge9Tx
.. section: Library

Fix bugs where :class:`sqlite3.Row` objects could segfault if their
inherited :attr:`~sqlite3.Cursor.description` was set to ``None``. Patch by
Erlend Aasland.

..

.. date: 2025-02-01-14-55-33
.. gh-issue: 129559
.. nonce: hQCeAz
.. section: Library

Add :meth:`bytearray.resize` method so :class:`bytearray` can be efficiently
resized in place.

..

.. 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-13-37-18
.. gh-issue: 126400
.. nonce: DaBaR3
.. section: Library

Add a socket *timeout* keyword argument to
:class:`logging.handlers.SysLogHandler`.

..

.. date: 2025-01-29-11-14-20
.. gh-issue: 118761
.. nonce: gMZwE1
.. section: Library

Always lazy import ``warnings`` in :mod:`threading`. Patch by Taneli
Hukkinen.

..

.. 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-26-10-01-21
.. gh-issue: 129005
.. nonce: ncpLvw
.. section: Library

Optimize ``_pyio.FileIO.readinto`` by avoiding unnecessary objects and
copies using :func:`os.readinto`.

..

.. date: 2025-01-24-10-48-32
.. gh-issue: 129195
.. nonce: 89d5NU
.. section: Library

Support reporting call graph information from
:func:`!asyncio.staggered.staggered_race`.

..

.. date: 2025-01-22-16-54-25
.. gh-issue: 129205
.. nonce: FMqrUt
.. section: Library

Add :func:`os.readinto` to read into a :ref:`buffer object <bufferobjects>`
from a file descriptor.

..

.. date: 2025-01-22-13-29-06
.. gh-issue: 128772
.. nonce: 6YrxYM
.. section: Library

Fix :mod:`pydoc` for methods with the ``__module__`` attribute equal to
``None``.

..

.. 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-20-59-26
.. gh-issue: 92897
.. nonce: G0xH8o
.. section: Library

Scheduled the deprecation of the ``check_home`` argument of
:func:`sysconfig.is_python_build` to Python 3.15.

..

.. date: 2025-01-20-16-02-38
.. gh-issue: 129064
.. nonce: JXasgJ
.. section: Library

Deprecate :func:`!sysconfig.expand_makefile_vars`, in favor of using
:func:`sysconfig.get_paths` with the ``vars`` argument.

..

.. 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-24-02
.. gh-issue: 118761
.. nonce: G8MmxY
.. section: Library

Reduce import time of :mod:`pstats` and :mod:`zipfile` by up to 20%, by
removing unnecessary imports to :mod:`typing`. Patch by Bénédikt Tran.

..

.. 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-16-10-06-40
.. gh-issue: 118761
.. nonce: z100LC
.. section: Library

Improve import time of :mod:`tomllib` by removing ``typing``, ``string``,
and ``tomllib._types`` imports. Patch by Taneli Hukkinen.

..

.. date: 2025-01-15-21-41-51
.. gh-issue: 128679
.. nonce: tq10F2
.. section: Library

:mod:`tracemalloc`: Fix race conditions when :func:`tracemalloc.stop` is
called by a thread, while other threads are tracing memory allocations.
Patch by Victor Stinner.

..

.. date: 2025-01-15-19-32-23
.. gh-issue: 128891
.. nonce: ojUxKo
.. section: Library

Add specialized opcodes to ``opcode.opname``.

..

.. date: 2025-01-15-19-16-50
.. gh-issue: 118761
.. nonce: cbW2ZL
.. section: Library

Reduce import time of :mod:`gettext` by up to ten times, by importing
:mod:`re` on demand. In particular, ``re`` is no longer implicitly exposed
as ``gettext.re``. Patch by Eli Schwartz.

..

.. date: 2025-01-15-18-54-48
.. gh-issue: 118761
.. nonce: G1dv6E
.. section: Library

Reduce the import time of :mod:`optparse` when no help text is printed.
Patch by Eli Schwartz.

..

.. date: 2025-01-15-15-45-21
.. gh-issue: 128657
.. nonce: P5LNQA
.. section: Library

Fix possible extra reference when using objects returned by
:func:`hashlib.sha256` under :term:`free threading`.

..

.. date: 2025-01-15-09-45-43
.. gh-issue: 118761
.. nonce: TvAC8E
.. section: Library

Reduce the import time of :mod:`csv` by up to five times, by importing
:mod:`re` on demand. In particular, ``re`` is no more implicitly exposed as
``csv.re``. Patch by Bénédikt Tran.

..

.. date: 2025-01-13-07-54-32
.. gh-issue: 128308
.. nonce: kYSDRF
.. section: Library

Support the *name* keyword argument for eager tasks in
:func:`asyncio.loop.create_task`,  :func:`asyncio.create_task` and
:func:`asyncio.TaskGroup.create_task`, by passing on all *kwargs* to the
task factory set by :func:`asyncio.loop.set_task_factory`.

..

.. date: 2025-01-10-13-06-54
.. gh-issue: 118761
.. nonce: f8oADD
.. section: Library

Improve the performance of :func:`base64.b16decode` by up to ten times by
more efficiently checking the byte-string for hexadecimal digits. Reduce the
import time of :mod:`base64` by up to six times, by no longer importing
:mod:`re`. Patch by Bénédikt Tran, Chris Markiewicz, and Adam Turner.

..

.. date: 2025-01-09-16-20-34
.. gh-issue: 128156
.. nonce: GfObBq
.. section: Library

When using macOS system ``libffi``, support for complex types in
:mod:`ctypes` is now checked at runtime (macOS 10.15 or newer). The types
must also be available at build time.

..

.. 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-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-10-37-27
.. gh-issue: 128384
.. nonce: V0xzwH
.. section: Library

Add locking to :mod:`warnings` to avoid some data races when free-threading
is used.  Change ``_warnings_runtime_state.mutex`` to be a recursive mutex
and expose it to :mod:`warnings`, via the :func:`!_acquire_lock` and
:func:`!_release_lock` functions. The lock is held when ``filters`` and
``_filters_version`` are updated.

..

.. date: 2025-01-04-20-51-48
.. gh-issue: 128509
.. nonce: 3gr_-O
.. section: Library

Add :func:`sys._is_immortal` for identifying :term:`immortal` objects at
runtime.

..

.. 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-20-34-04
.. gh-issue: 128427
.. nonce: onPoQZ
.. section: Library

:const:`uuid.NIL` and :const:`uuid.MAX` are now available to represent the
Nil and Max UUID formats as defined by :rfc:`9562`.

..

.. date: 2024-12-30-19-53-14
.. gh-issue: 91279
.. nonce: EeOJk1
.. section: Library

:meth:`zipfile.ZipFile.writestr` now respect ``SOURCE_DATE_EPOCH`` that
distributions can set centrally and have build tools consume this in order
to produce reproducible output.

..

.. 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-08-44-12
.. gh-issue: 127975
.. nonce: 8HJwu9
.. section: Library

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

..

.. 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-16-22-20-38
.. gh-issue: 121604
.. nonce: m3Xn4G
.. section: Library

Add missing Deprecation warnings for
:const:`importlib.machinery.DEBUG_BYTECODE_SUFFIXES`,
:const:`importlib.machinery.OPTIMIZED_BYTECODE_SUFFIXES`,
:class:`importlib.machinery.WindowsRegistryFinder`,
:class:`importlib.abc.ResourceLoader`,
:meth:`importlib.abc.SourceLoader.path_mtime`.

..

.. 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-10-19-39-35
.. gh-issue: 125413
.. nonce: wOb4yr
.. section: Library

Add :attr:`pathlib.Path.info` attribute, which stores an object implementing
the :class:`pathlib.types.PathInfo` protocol (also new). The object supports
querying the file type and internally caching :func:`~os.stat` results. Path
objects generated by :meth:`~pathlib.Path.iterdir` are initialized with file
type information gleaned from scanning the parent directory.

..

.. date: 2024-12-07-20-33-43
.. gh-issue: 127712
.. nonce: Uzsij4
.. section: Library

Fix handling of the ``secure`` argument of
:class:`logging.handlers.SMTPHandler`.

..

.. 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-23-21-17-28
.. gh-issue: 124369
.. nonce: Z0hQFQ
.. section: Library

Deprecate ``pdb.Pdb.curframe_locals``

..

.. 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-26-16-59-02
.. gh-issue: 125553
.. nonce: 4pDLzt
.. section: Library

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

..

.. date: 2024-10-02-11-17-23
.. gh-issue: 91048
.. nonce: QWY-b1
.. section: Library

Add :func:`asyncio.capture_call_graph` and :func:`asyncio.print_call_graph`
functions.

..

.. date: 2024-09-27-19-21-53
.. gh-issue: 124703
.. nonce: lYTLEv
.. section: Library

Quitting :mod:`pdb` in ``inline`` mode will emit a confirmation prompt and
exit gracefully now, instead of printing an exception traceback.

..

.. 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-12-11-58-15
.. gh-issue: 119349
.. nonce: -xTnHl
.. section: Library

Add the :func:`ctypes.util.dllist` function to list the loaded shared
libraries for the current process.

..

.. date: 2024-08-01-01-00-00
.. gh-issue: 55454
.. nonce: wy0vGw
.. section: Library

Add IMAP4 ``IDLE`` support to the :mod:`imaplib` module.  Patch by Forest.

..

.. 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: 2023-02-01-16-41-31
.. gh-issue: 101410
.. nonce: Dt2aQE
.. section: Library

Support custom messages for domain errors in the :mod:`math` module
(:func:`math.sqrt`, :func:`math.log` and :func:`math.atanh` were modified as
examples).  Patch by Charlie Zhao and Sergey B Kirpichev.

..

.. date: 2022-05-23-21-23-29
.. gh-issue: 81340
.. nonce: D11RkZ
.. section: Library

Use :func:`os.copy_file_range` in :func:`shutil.copy`, :func:`shutil.copy2`,
and :func:`shutil.copyfile` functions by default. An underlying Linux system
call gives filesystems an opportunity to implement the use of copy-on-write
(in case of btrfs and XFS) or server-side copy (in the case of NFS.) Patch
by Illia Volochii.

..

.. bpo: 27307
.. date: 2020-08-07-16-55-57
.. nonce: Xqzzda
.. section: Library

Add attribute and item access support to :class:`string.Formatter` in
auto-numbering mode, which allows format strings like '{.name}' and '{[1]}'.

..

.. date: 2025-02-08-23-42-24
.. gh-issue: 129873
.. nonce: -gofkd
.. section: IDLE

Simplify displaying the IDLE doc by only copying the text section of
idle.html to idlelib/help.html. Patch by Stan Ulbrych.

..

.. 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-02-07-17-06-39
.. gh-issue: 100239
.. nonce: WvBTPL
.. section: Core and Builtins

Replace the opcode BINARY_SUBSCR and its family by BINARY_OP with oparg
NB_SUBSCR.

..

.. date: 2025-02-06-17-57-33
.. gh-issue: 129732
.. nonce: yl97oq
.. section: Core and Builtins

Fixed a race in ``_Py_qsbr_reserve`` in the free threading build.

..

.. date: 2025-02-06-17-05-09
.. gh-issue: 129763
.. nonce: 6ZxQ8W
.. section: Core and Builtins

Remove the internal ``LLTRACE`` macro (use :c:macro:`Py_DEBUG` instead).

..

.. date: 2025-02-05-22-58-18
.. gh-issue: 129715
.. nonce: mLlpIO
.. section: Core and Builtins

Improve JIT performance for generators.

..

.. date: 2025-02-05-11-29-52
.. gh-issue: 129643
.. nonce: 4mGzvg
.. section: Core and Builtins

Fix thread safety of :c:func:`PyList_Insert` in free-threading builds.

..

.. date: 2025-02-04-21-26-05
.. gh-issue: 129668
.. nonce: zDanyM
.. section: Core and Builtins

Fix race condition when raising :exc:`MemoryError` in the free threaded
build.

..

.. date: 2025-02-04-12-42-40
.. gh-issue: 129643
.. nonce: K24Zow
.. section: Core and Builtins

Fix thread safety of :c:func:`PyList_SetItem` in free-threading builds.
Patch by Kumar Aditya.

..

.. date: 2025-01-28-11-13-41
.. gh-issue: 128563
.. nonce: xElppE
.. section: Core and Builtins

Fix an issue where the "lltrace" debug feature could have been incorrectly
enabled for some frames.

..

.. date: 2025-01-28-10-26-04
.. gh-issue: 129393
.. nonce: 0eICq6
.. section: Core and Builtins

On FreeBSD, :data:`sys.platform` doesn't contain the major version anymore.
It is always ``'freebsd'``, instead of ``'freebsd13'`` or ``'freebsd14'``.

..

.. 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-24-11-37-22
.. gh-issue: 129231
.. nonce: ZsAP9v
.. section: Core and Builtins

Improve memory layout of JIT traces. Patch by Diego Russo

..

.. date: 2025-01-22-14-24-44
.. gh-issue: 129149
.. nonce: wAYu43
.. section: Core and Builtins

Add fast path for medium-size integers in :c:func:`PyLong_FromUnsignedLong`,
:c:func:`PyLong_FromUnsignedLongLong` and :c:func:`PyLong_FromSize_t`.

..

.. date: 2025-01-22-14-22-34
.. gh-issue: 129201
.. nonce: wiZzEb
.. section: Core and Builtins

The free-threaded version of the cyclic garbage collector has been optimized
to conditionally use CPU prefetch instructions during the collection.  This
can reduce collection times by making it more likely that data is in the CPU
cache when it is needed.  The prefetch instructions are enabled if the
number of long-lived objects (objects surviving a full collection) exceeds a
threshold.

..

.. 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-19-09-07-44
.. gh-issue: 128714
.. nonce: m1fyCB
.. section: Core and Builtins

Fix the potential races in get/set dunder methods ``__annotations__``,
``__annotate__`` and ``__type_params__`` for function object, and add
related tests.

..

.. 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-17-13-16-14
.. gh-issue: 128842
.. nonce: OMs5X6
.. section: Core and Builtins

Collect JIT memory stats using pystats. Patch by Diego Russo.

..

.. date: 2025-01-16-22-54-12
.. gh-issue: 100239
.. nonce: 7_HpBU
.. section: Core and Builtins

Specialize ``BINARY_OP`` for bitwise logical operations on compact ints.

..

.. date: 2025-01-16-18-16-18
.. gh-issue: 128910
.. nonce: 9pqfab
.. section: Core and Builtins

Undocumented and unused private C-API functions ``_PyTrash_begin`` and
``_PyTrash_end`` are removed.

..

.. date: 2025-01-13-17-03-49
.. gh-issue: 128807
.. nonce: BGGBxD
.. section: Core and Builtins

Add a marking phase to the free-threaded GC.  This is similar to what was
done in GH-126491.  Since the free-threaded GC does not have generations and
is not incremental, the marking phase looks for all objects reachable from
known roots.  The roots are objects known to not be garbage, like the module
dictionary for :mod:`sys`.  For most programs, this marking phase should
make the GC a bit faster since typically less work is done per object.

..

.. date: 2025-01-10-23-54-16
.. gh-issue: 100239
.. nonce: ijOOUs
.. section: Core and Builtins

Add opcode ``BINARY_OP_EXTEND`` which executes a pair of functions (guard
and specialization functions) accessed from the inline cache.

..

.. date: 2025-01-10-18-56-20
.. gh-issue: 128563
.. nonce: baDvls
.. section: Core and Builtins

A new type of interpreter has been added to CPython. This interpreter uses
tail calls for its instruction handlers. Preliminary benchmark results
suggest 7-11% geometric mean faster on pyperformance (depending on
platform), and up to 30% faster on Python-intensive workloads. This
interpreter currently only works on newer compilers, such as ``clang-19``.
Other compilers will continue using the old interpreter. Patch by Ken Jin,
with ideas on how to implement this in CPython by Mark Shannon, Garret Gu,
Haoran Xu, and Josh Haberman.

..

.. date: 2025-01-07-19-26-40
.. gh-issue: 126703
.. nonce: 9i-S5t
.. section: Core and Builtins

Improve performance of iterating over lists and tuples by using a freelist
for the iterator objects.

..

.. date: 2024-12-30-15-49-31
.. gh-issue: 127953
.. nonce: B4_6L9
.. section: Core and Builtins

The time to handle a ``LINE`` event in sys.monitoring (and sys.settrace) is
now independent of the number of lines in the code object.

..

.. 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-17-09-28-17
.. gh-issue: 128016
.. nonce: DPqhah
.. section: Core and Builtins

Improved the ``SyntaxWarning`` message for invalid escape sequences to
clarify that such sequences will raise a ``SyntaxError`` in future Python
releases. The new message also suggests a potential fix, i.e., ``Did you
mean "\\e"?``.

..

.. date: 2024-12-06-11-32-58
.. gh-issue: 126004
.. nonce: CYAwTB
.. section: Core and Builtins

Fix handling of :attr:`UnicodeError.start` and :attr:`UnicodeError.end`
values in the :func:`codecs.replace_errors` error handler. Patch by Bénédikt
Tran.

..

.. date: 2024-12-06-11-30-58
.. gh-issue: 126004
.. nonce: -p8MAS
.. section: Core and Builtins

Fix handling of :attr:`UnicodeError.start` and :attr:`UnicodeError.end`
values in the :func:`codecs.backslashreplace_errors` error handler. Patch by
Bénédikt Tran.

..

.. date: 2024-12-06-11-17-46
.. gh-issue: 126004
.. nonce: -p8MAS
.. section: Core and Builtins

Fix handling of :attr:`UnicodeError.start` and :attr:`UnicodeError.end`
values in the :func:`codecs.xmlcharrefreplace_errors` error handler. Patch
by Bénédikt Tran.

..

.. date: 2024-12-04-22-14-40
.. gh-issue: 127119
.. nonce: _hpyFE
.. section: Core and Builtins

Slightly optimize the :class:`int` deallocator.

..

.. 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-11-18-12-17-45
.. gh-issue: 125723
.. nonce: tW_hFG
.. section: Core and Builtins

Fix crash with ``gi_frame.f_locals`` when generator frames outlive their
generator. Patch by Mikhail Efimov.

..

.. date: 2024-11-03-06-05-16
.. gh-issue: 126349
.. nonce: 7YwWsI
.. section: Core and Builtins

Add :func:`turtle.fill`, :func:`turtle.poly` and :func:`turtle.no_animation`
context managers. Patch by Marie Roald and Yngve Mardal Moe.

..

.. date: 2024-02-29-16-55-52
.. gh-issue: 115911
.. nonce: Vnkue_
.. section: Core and Builtins

If the current working directory cannot be determined due to permissions,
then import will no longer raise :exc:`PermissionError`. Patch by Alex
Willmer.

..

.. date: 2023-12-04-15-53-25
.. gh-issue: 112713
.. nonce: Zrhv77
.. section: Core and Builtins

Added support for the ``Partitioned`` cookie flag in :mod:`http.cookies`.

..

.. date: 2025-02-02-12-58-21
.. gh-issue: 129533
.. nonce: dFfqkT
.. section: C API

Update :c:func:`PyGC_Enable()`, :c:func:`PyGC_Disable()`,
:c:func:`PyGC_IsEnabled()` to use atomic operation for thread-safety at
free-threading build. Patch by Donghee Na.

..

.. date: 2025-01-29-11-58-38
.. gh-issue: 89188
.. nonce: BsfLr3
.. section: C API

Implement :c:func:`PyUnicode_KIND` and :c:func:`PyUnicode_DATA` as function,
in addition to the macros with the same names. The macros rely on C bit
fields which have compiler-specific layout. Patch by Victor Stinner.

..

.. date: 2025-01-28-13-21-17
.. gh-issue: 91417
.. nonce: AfiR0t
.. section: C API

Remove :c:func:`PySequence_Fast` from the limited C API, since this function
has to be used with :c:macro:`PySequence_Fast_GET_ITEM` which never worked
in the limited C API. Patch by Victor Stinner.

..

.. date: 2025-01-22-09-28-04
.. gh-issue: 128509
.. nonce: gqQ36L
.. section: C API

Add :c:func:`PyUnstable_IsImmortal` for determining whether an object is
:term:`immortal`.

..

.. date: 2025-01-20-10-40-11
.. gh-issue: 129033
.. nonce: d1jltB
.. section: C API

Remove ``_PyInterpreterState_GetConfigCopy()`` and
``_PyInterpreterState_SetConfig()`` private functions. Use instead
:c:func:`PyConfig_Get` and :c:func:`PyConfig_Set`, public C API added by
:pep:`741` "Python Configuration C API". Patch by Victor Stinner.

..

.. date: 2025-01-19-23-17-58
.. gh-issue: 129033
.. nonce: cpRivP
.. section: C API

Remove the private ``_Py_InitializeMain()`` function. It was a
:term:`provisional API` added to Python 3.8 by :pep:`587`. Patch by Victor
Stinner.

..

.. date: 2025-01-16-21-56-49
.. gh-issue: 128844
.. nonce: ZPiJuo
.. section: C API

Add :c:func:`PyUnstable_TryIncRef` and :c:func:`PyUnstable_EnableTryIncRef`
unstable APIs.  These are helpers for dealing with unowned references in a
thread-safe way, particularly in the free threading build.

..

.. date: 2025-01-16-12-47-01
.. gh-issue: 128911
.. nonce: mHVJ4x
.. section: C API

Add :c:func:`PyImport_ImportModuleAttr` and
:c:func:`PyImport_ImportModuleAttrString` helper functions to import a
module and get an attribute of the module. Patch by Victor Stinner.

..

.. date: 2025-01-15-11-42-07
.. gh-issue: 128863
.. nonce: C9MkB_
.. section: C API

The following private functions are deprecated and planned for removal in
Python 3.18:

* :c:func:`!_PyBytes_Join`: use :c:func:`PyBytes_Join`.
* :c:func:`!_PyDict_GetItemStringWithError`: use :c:func:`PyDict_GetItemStringRef`.
* :c:func:`!_PyDict_Pop()`: use :c:func:`PyDict_Pop`.
* :c:func:`!_PyLong_Sign()`: use :c:func:`PyLong_GetSign`.
* :c:func:`!_PyLong_FromDigits` and :c:func:`!_PyLong_New`:
  use :c:func:`PyLongWriter_Create`.
* :c:func:`!_PyThreadState_UncheckedGet`: use :c:func:`PyThreadState_GetUnchecked`.
* :c:func:`!_PyUnicode_AsString`: use :c:func:`PyUnicode_AsUTF8`.
* :c:func:`!_Py_HashPointer`: use :c:func:`Py_HashPointer`.
* :c:func:`!_Py_fopen_obj`: use :c:func:`Py_fopen`.

The `pythoncapi-compat project
<https://github.com/python/pythoncapi-compat/>`__ can be used to get these
new public functions on Python 3.13 and older.

Patch by Victor Stinner.

..

.. date: 2025-01-01-03-25-38
.. gh-issue: 126599
.. nonce: MRCYlH
.. section: C API

Remove some internal test APIs for the experimental JIT compiler.

..

.. date: 2024-12-14-03-40-15
.. gh-issue: 127925
.. nonce: FF7aov
.. section: C API

Convert the :mod:`decimal` module to use :pep:`757` C API (export-import
integers), offering some speed-up if the integer part of the
:class:`~decimal.Decimal` instance is small.  Patch by Sergey B Kirpichev.

..

.. date: 2025-02-04-12-30-43
.. gh-issue: 129660
.. nonce: SitXa7
.. section: Build

Drop ``test_embed`` from PGO training, whose contribution in recent versions
is considered to be ignorable.

..

.. date: 2025-01-16-03-35-37
.. gh-issue: 128902
.. nonce: Dt7xtV
.. section: Build

Fix compile errors with Clang 9 and older due to lack of
``__attribute__((fallthrough))`` support.
