``D`` (:class:`complex`) [Py_complex]
Convert a Python complex number to a C :c:type:`Py_complex` structure.
-.. deprecated:: next
+.. deprecated:: 3.15
For unsigned integer formats ``B``, ``H``, ``I``, ``k`` and ``K``,
:exc:`DeprecationWarning` is emitted when the value is larger than
The :c:type:`PyBytesWriter` API can be used to create a Python :class:`bytes`
object.
-.. versionadded:: next
+.. versionadded:: 3.15
.. c:type:: PyBytesWriter
The complex number value, using the C :c:type:`Py_complex` representation.
- .. deprecated-removed:: next 3.20
+ .. deprecated-removed:: 3.15 3.20
Use :c:func:`PyComplex_AsCComplex` and
:c:func:`PyComplex_FromCComplex` to convert a
Python complex number to/from the C :c:type:`Py_complex`
This case can arise from forgetting ``NULL`` checks and would delete the
attribute.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Must not be called with NULL value if an exception is set.
For more details, see :c:func:`PyUnicode_InternFromString`, which may be
used internally to create a key object.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Must not be called with NULL value if an exception is set.
ABI Checking
============
-.. versionadded:: next
+.. versionadded:: 3.15
Python includes a rudimentary check for ABI compatibility.
may lead to crashes.
In particular, it is not safe to examine the raised exception.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. c:macro:: PyABIInfo_VAR(NAME)
PyABIInfo_DEFAULT_ABI_VERSION
}
- .. versionadded:: next
+ .. versionadded:: 3.15
.. c:type:: PyABIInfo
values of macros such as :c:macro:`Py_LIMITED_API`,
:c:macro:`PY_VERSION_HEX` and :c:macro:`Py_GIL_DISABLED`.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. _limited-api-list:
If the non-existing object should not be treated as a failure, you can use
:c:func:`PySys_GetOptionalAttr` instead.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. c:function:: PyObject *PySys_GetAttrString(const char *name)
If the non-existing object should not be treated as a failure, you can use
:c:func:`PySys_GetOptionalAttrString` instead.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. c:function:: int PySys_GetOptionalAttr(PyObject *name, PyObject **result)
* Set an exception, set *\*result* to ``NULL``, and return ``-1``,
if an error occurred.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. c:function:: int PySys_GetOptionalAttrString(const char *name, PyObject **result)
specified as a :c:expr:`const char*` UTF-8 encoded bytes string,
rather than a :c:expr:`PyObject*`.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. c:function:: PyObject *PySys_GetObject(const char *name)
On success, return a new reference.
On error, set an exception and return ``NULL``.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. c:function:: PyObject* PyTuple_Pack(Py_ssize_t n, ...)
.. versionchanged:: 3.13
Added support for GNU/kFreeBSD.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added support for Solaris.
.. versionchanged:: 3.13
Added the *show_empty* option.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Omit optional ``Load()`` values by default.
in the standalone form if the locale provides one. Else it is equivalent
to :data:`month_name`.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. data:: standalone_month_abbr
locale in the standalone form if the locale provides one. Else it is
equivalent to :data:`month_abbr`.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. data:: JANUARY
.. versionchanged:: 3.9
Any characters except ASCII letters and digits and a dot are converted to underscore.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
No characters are converted to underscore anymore.
Spaces are converted to hyphens.
.. versionadded:: 3.3
Added support for unary plus, unary minus, and in-place multiset operations.
-.. versionadded:: next
+.. versionadded:: 3.15
Added support for the symmetric difference multiset operation, ``c ^ d``.
.. note::
:c:func:`localtime` function. Raise :exc:`OSError` instead of
:exc:`ValueError` on :c:func:`localtime` failure.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number as *timestamp*, not only integer or float.
.. versionchanged:: 3.6
:meth:`fromtimestamp` may return instances with :attr:`.fold` set to 1.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number as *timestamp*, not only integer or float.
Use :meth:`datetime.fromtimestamp` with :const:`UTC` instead.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number as *timestamp*, not only integer or float.
.. versionadded:: 3.12
``%:z`` was added for :meth:`~.datetime.strftime`
-.. versionadded:: next
+.. versionadded:: 3.15
``%:z`` was added for :meth:`~.datetime.strptime`
Technical Detail
While reorganizing, as much as two times the size of the original database is required
in free disk space. However, be aware that this factor changes for each :mod:`dbm` submodule.
- .. versionadded:: next
+ .. versionadded:: 3.15
:mod:`dbm.gnu` --- GNU database manager
While reorganizing, no additional free disk space is required. However, be aware
that this factor changes for each :mod:`dbm` submodule.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. method:: dumbdbm.sync()
See :ref:`difflib-interface` for a more detailed example.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added the *color* parameter.
The global ``__file__`` is added to the globals provided to doctests loaded
from a text file using :func:`DocFileSuite`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Run each example as a :ref:`subtest <subtests>`.
:func:`DocTestSuite` returns an empty :class:`unittest.TestSuite` if *module*
contains no docstrings instead of raising :exc:`ValueError`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Run each example as a :ref:`subtest <subtests>`.
Under the covers, :func:`DocTestSuite` creates a :class:`unittest.TestSuite` out
containing *example*. *out* is the output function that was passed to
:meth:`DocTestRunner.run`.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. method:: report_start(out, test, example)
:meth:`threading.Thread.join` can now raise this exception.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
This exception may be raised when acquiring :meth:`threading.Lock`
or :meth:`threading.RLock`.
Add support of arbitrary :term:`bytes-like objects <bytes-like object>`,
not only :class:`bytes`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
The size of bytes-like objects is no longer limited to 1024 bytes.
The GIL is always released during a system call.
System calls failing with EINTR are automatically retried.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
The size of not mutated bytes-like objects is no longer
limited to 1024 bytes.
.. versionchanged:: 3.6
Accepts a :term:`path-like object`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
The default compression level was reduced to 6 (down from 9).
It is the default level used by most compression tools and a better
tradeoff between speed and performance.
Remove the ``filename`` attribute, use the :attr:`~GzipFile.name`
attribute instead.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
The default compression level was reduced to 6 (down from 9).
It is the default level used by most compression tools and a better
tradeoff between speed and performance.
The *mtime* parameter now defaults to 0 for reproducible output.
For the previous behaviour of using the current time,
pass ``None`` to *mtime*.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
The default compression level was reduced to 6 (down from 9).
It is the default level used by most compression tools and a better
tradeoff between speed and performance.
.. versionchanged:: 3.7
*blocksize* parameter was added.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
*max_response_headers* parameter was added.
The deprecated *key_file*, *cert_file* and *check_hostname* parameters
have been removed.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
*max_response_headers* parameter was added.
The maximum number of allowed response headers to help prevent denial-of-service
attacks. By default, the maximum number of allowed headers is set to 100.
- .. versionadded:: next
+ .. versionadded:: 3.15
As an alternative to using the :meth:`~HTTPConnection.request` method described above, you can
.. versionchanged:: 3.3
Allowed '``:``' as a valid cookie name character.
-.. versionchanged:: next
+.. versionchanged:: 3.15
Allowed '``"``' as a valid cookie value character.
.. note::
the password. Will only work if the server ``CAPABILITY`` response includes the
phrase ``AUTH=CRAM-MD5``.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
An :exc:`IMAP4.error` is raised if MD5 support is not available.
specified in the :envvar:`LANG` environment variable). If the locale is not
changed thereafter, using multithreading should not cause problems.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Support language codes with ``@``-modifiers.
determined.
The "C" locale is represented as ``(None, None)``.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
``@``-modifier are no longer silently removed, but included in
the language code.
is, :func:`!fmax` is not required to be sensitive to the sign of such
operands (see Annex F of the C11 standard, §F.10.0.3 and §F.10.9.2).
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: fmin(x, y)
is, :func:`!fmin` is not required to be sensitive to the sign of such
operands (see Annex F of the C11 standard, §F.10.0.3 and §F.10.9.3).
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: fmod(x, y)
nonzero number that is not a subnormal (see :func:`issubnormal`).
Return ``False`` otherwise.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: issubnormal(x)
nonzero number with a magnitude smaller than :data:`sys.float_info.min`.
Return ``False`` otherwise.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: isinf(x)
This is useful to detect the sign bit of zeroes, infinities and NaNs.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: ulp(x)
This mode is useful to limit the number of open file handles.
The original file can be renamed (but not deleted) after closing *fileno*.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
The *trackfd* parameter was added.
.. audit-event:: mmap.__new__ fileno,length,access,offset mmap.mmap
on error under Windows. A zero value was returned on success; an
exception was raised on error under Unix.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Allow specifying *offset* without *size*. Previously, both *offset*
and *size* parameters were required together. Now *offset* can be
specified alone, and the flush operation will extend from *offset*
memory-mapped area.
For an anonymous mapping, return its size.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Anonymous mappings are now supported on Unix.
.. versionchanged:: 3.10
The *strict* parameter was added.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
The :data:`ALL_BUT_LAST` and :data:`ALLOW_MISSING` values for
the *strict* parameter was added.
Special value used for the *strict* argument in :func:`realpath`.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. data:: ALLOW_MISSING
Special value used for the *strict* argument in :func:`realpath`.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: relpath(path, start=os.curdir)
.. versionadded:: 3.7
See :pep:`540` for more details.
-.. versionchanged:: next
+.. versionchanged:: 3.15
Python UTF-8 mode is now enabled by default (:pep:`686`).
It may be disabled with by setting :envvar:`PYTHONUTF8=0 <PYTHONUTF8>` as
.. availability:: Linux >= 6.14
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: ptsname(fd, /)
Non-existent device.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: pathconf(path, name)
.. versionchanged:: 3.6
Accepts a :term:`path-like object`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real numbers as *times*, not only integers or floats.
threads, this now raises a :exc:`DeprecationWarning`. See the
longer explanation on :func:`os.fork`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
The returned file descriptor is now made non-inheritable.
.. availability:: Unix, not WASI, not Android, not iOS.
.. warning:: On macOS the use of this function is unsafe when mixed with using
higher-level system APIs, and that includes using :mod:`urllib.request`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
The returned file descriptor is now made non-inheritable.
Activation thresholds below 4 MiB are known to break support for DITA 1.3
payload and are hence not recommended.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. method:: xmlparser.SetBillionLaughsAttackProtectionMaximumAmplification(max_factor, /)
that can be adjusted by :meth:`.SetBillionLaughsAttackProtectionActivationThreshold`
is exceeded.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. method:: xmlparser.SetAllocTrackerActivationThreshold(threshold, /)
Check for availability using :func:`hasattr` if used in code running
across a variety of Python versions.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. method:: xmlparser.SetAllocTrackerMaximumAmplification(max_factor, /)
that can be adjusted by :meth:`.SetAllocTrackerActivationThreshold`
is exceeded.
- .. versionadded:: next
+ .. versionadded:: 3.15
:class:`xmlparser` objects have the following attributes:
Constant used to represent the limit for an unlimited resource.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
It is now always positive.
Previously, it could be negative, such as -1 or -3.
cannot be represented in the ``rlim_t`` value in C.
Can be equal to :data:`RLIM_INFINITY`.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: getrlimit(resource)
.. availability:: NetBSD >= 7.0.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. data:: RLIMIT_PIPEBUF
.. availability:: FreeBSD >= 14.2.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. data:: RLIMIT_THREADS
.. availability:: AIX.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. data:: RLIMIT_UMTXP
.. availability:: FreeBSD >= 11.
- .. versionadded:: next
+ .. versionadded:: 3.15
Resource Usage
:pep:`475` for the rationale), instead of raising
:exc:`InterruptedError`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number as *timeout*, not only integer or float.
:pep:`475` for the rationale), instead of raising
:exc:`InterruptedError`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number as *timeout*, not only integer or float.
:pep:`475` for the rationale), instead of raising
:exc:`InterruptedError`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number as *timeout*, not only integer or float.
:pep:`475` for the rationale), instead of raising
:exc:`InterruptedError`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number as *timeout*, not only integer or float.
:pep:`475` for the rationale), instead of raising
:exc:`InterruptedError`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number as *timeout*, not only integer or float.
.. versionchanged:: 3.11
Accepts :term:`path-like object` for filename.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts custom *serializer* and *deserializer* functions in place of
:func:`pickle.dumps` and :func:`pickle.loads`.
Calls :meth:`sync` and attempts to shrink space used on disk by removing empty
space resulting from deletions.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. method:: Shelf.close()
:const:`pickle.DEFAULT_PROTOCOL` is now used as the default pickle
protocol.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added the *serializer* and *deserializer* parameters.
optional *protocol*, *writeback*, *keyencoding*, *serializer* and *deserializer*
parameters have the same interpretation as in :func:`~shelve.open`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added the *serializer* and *deserializer* parameters.
and *deserializer* parameters have the same interpretation as in
:func:`~shelve.open`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added the *serializer* and *deserializer* parameters.
The *deserializer* and *serializer* arguments must be given together.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. seealso::
.. availability:: Unix.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real numbers as *seconds* and *interval*, not only integers
or floats.
by a signal not in *sigset* and the signal handler does not raise an
exception (see :pep:`475` for the rationale).
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number as *timeout*, not only integer or float.
:meth:`~socket.settimeout` for possible values and their respective
meanings.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number, not only integer or float.
The method no longer toggles :const:`SOCK_NONBLOCK` flag on
:attr:`socket.type`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number, not only integer or float.
:meth:`~BaseServer.server_activate`. The other parameters are passed to
the :class:`BaseServer` base class.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
The default queue size is now ``socket.SOMAXCONN`` for :class:`socketserver.TCPServer`.
.. class:: UDPServer(server_address, RequestHandlerClass, bind_and_activate=True)
This constant is only available if Python was compiled with SQLite
3.24.0 or greater.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. data:: threadsafety
If the *size* parameter is used, then it is best for it to retain the same
value from one :meth:`fetchmany` call to the next.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Negative *size* values are rejected by raising :exc:`ValueError`.
.. method:: fetchall()
Read/write attribute that controls the number of rows returned by :meth:`fetchmany`.
The default value is 1 which means a single row would be fetched per call.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Negative values are rejected by raising :exc:`ValueError`.
.. attribute:: connection
:meth:`SSLContext.set_client_sigalgs` and
:meth:`SSLContext.set_server_sigalgs` methods.
- .. versionadded:: next
+ .. versionadded:: 3.15
Exceptions
Whether the OpenSSL library has built-in support for External PSKs in TLS
1.3 as described in :rfc:`9258`.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. data:: HAS_PHA
functions support reading and writing of data larger than 2 GB. Writing
zero-length data no longer fails with a protocol violation error.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Python now uses ``SSL_sendfile`` internally when possible. The
function sends a file more efficiently because it performs TLS encryption
in the kernel to avoid additional context switches.
Return the group used for doing key agreement on this connection. If no
connection has been established, returns ``None``.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. method:: SSLSocket.client_sigalg()
authentication on this connection, or ``None`` if no connection has been
established or client authentication didn't occur.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. method:: SSLSocket.server_sigalg()
handshake on this connection, or ``None`` if no connection has been
established or the cipher suite has no signature.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. method:: SSLSocket.compression()
:const:`True` this method will also return any associated aliases such as
the ECDH curve names supported in older versions of OpenSSL.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. method:: SSLContext.set_default_verify_paths()
When connected, the :meth:`SSLSocket.cipher` method of SSL sockets will
return details about the negotiated cipher.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. method:: SSLContext.set_groups(groups, /)
When connected, the :meth:`SSLSocket.group` method of SSL sockets will
return the group used for key agreement on that connection.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. method:: SSLContext.set_client_sigalgs(sigalgs, /)
sockets will return the signature algorithm used for performing
certificate-based client authentication on that connection.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. method:: SSLContext.set_server_sigalgs(sigalgs, /)
sockets will return the signature algorithm used by the server to
complete the TLS handshake on that connection.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. method:: SSLContext.set_alpn_protocols(alpn_protocols)
.. data:: abi_info
- .. versionadded:: next
+ .. versionadded:: 3.15
An object containing information about the ABI of the currently running
Python interpreter.
:func:`sys.unraisablehook` can be overridden to control how unraisable
exceptions are handled.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Exceptions are now printed with colorful text.
.. seealso::
.. versionchanged:: 3.14
The *preset* keyword argument also works for streams.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
The default compression level was reduced to 6 (down from 9).
It is the default level used by most compression tools and a better
tradeoff between speed and performance.
The exception that was raised to reject the replacement member is available
as :attr:`!BaseException.__context__`.
- .. versionadded:: next
+ .. versionadded:: 3.15
The following constants are available at the module level:
Note that this filter does not block *all* dangerous archive features.
See :ref:`tarfile-further-verification` for details.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Link targets are now normalized.
.. versionchanged:: 3.13
Added support for GNU/kFreeBSD.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added support for Solaris.
May raise :exc:`PythonFinalizationError`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number as *timeout*, not only integer or float.
.. attribute:: name
.. versionchanged:: 3.14
Lock acquisition can now be interrupted by signals on Windows.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number as *timeout*, not only integer or float.
.. versionchanged:: 3.2
The *timeout* parameter is new.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number as *timeout*, not only integer or float.
.. versionchanged:: 3.2
The *timeout* parameter is new.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number as *timeout*, not only integer or float.
.. method:: release(n=1)
.. versionadded:: 3.3
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number as *time*, not only integer or float.
``asctime(localtime(secs))``. Locale information is not used by
:func:`ctime`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number, not only integer or float.
:class:`struct_time` object. See :func:`calendar.timegm` for the inverse of this
function.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number, not only integer or float.
:c:func:`gmtime` failure. It's common for this to be restricted to years
between 1970 and 2038.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number, not only integer or float.
.. versionchanged:: 3.13
Raises an auditing event.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts any real number, not only integer or float.
.. index::
The type of frame locals proxy objects, as found on the
:attr:`frame.f_locals` attribute.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. seealso:: :pep:`667`
.. versionadded:: 3.4
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Now accepts a *formatter* to control how messages are formatted.
.. method:: assertNoLogs(logger=None, level=None)
.. audit-event:: winreg.DeleteTree key,sub_key winreg.DeleteTree
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: DeleteValue(key, value)
corresponding :file:`.pyc` file, meaning that if a ZIP archive
doesn't contain :file:`.pyc` files, importing may be rather slow.
-.. versionchanged:: next
+.. versionchanged:: 3.15
Zstandard (*zstd*) compressed zip file entries are supported.
.. versionchanged:: 3.13
that were concurrently computed. To compute checksums sequentially, use
:func:`adler32` with the running checksum as the ``value`` argument.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: compress(data, /, level=-1, wbits=MAX_WBITS)
that were concurrently computed. To compute checksums sequentially, use
:func:`crc32` with the running checksum as the ``value`` argument.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: decompress(data, /, wbits=MAX_WBITS, bufsize=DEF_BUF_SIZE)
See :ref:`warning-filter` and :ref:`describing-warning-filters` for more
details.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added regular expression support for *message* and *module*.
See :ref:`warning-filter` and :ref:`describing-warning-filters` for more
details.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added regular expression support for *message* and *module*.
==========
.. versionadded:: 3.7
-.. versionchanged:: next
+.. versionchanged:: 3.15
Python UTF-8 mode is now enabled by default (:pep:`686`).
#define PY_MINOR_VERSION 15
#define PY_MICRO_VERSION 0
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA
-#define PY_RELEASE_SERIAL 0
+#define PY_RELEASE_SERIAL 1
/* Version as a string */
-#define PY_VERSION "3.15.0a0"
+#define PY_VERSION "3.15.0a1"
/*--end constants--*/
-# Autogenerated by Sphinx on Tue May 6 18:33:44 2025
+# Autogenerated by Sphinx on Tue Oct 14 13:46:01 2025
# as part of the release process.
topics = {
'atom-identifiers': r'''Identifiers (Names)
*******************
-An identifier occurring as an atom is a name. See section Identifiers
-and keywords for lexical definition and section Naming and binding for
-documentation of naming and binding.
+An identifier occurring as an atom is a name. See section Names
+(identifiers and keywords) for lexical definition and section Naming
+and binding for documentation of naming and binding.
When the name is bound to an object, evaluation of the atom yields
that object. When a name is not bound, an attempt to evaluate it
Python supports string and bytes literals and various numeric
literals:
- literal: stringliteral | bytesliteral
- | integer | floatnumber | imagnumber
+ literal: strings | NUMBER
Evaluation of a literal yields an object of the given type (string,
bytes, integer, floating-point number, complex number) with the given
value. The value may be approximated in the case of floating-point
-and imaginary (complex) literals. See section Literals for details.
+and imaginary (complex) literals. See section Literals for details.
+See section String literal concatenation for details on "strings".
All literals correspond to immutable data types, and hence the
object’s identity is less important than its value. Multiple
evaluations of literals with the same value (either the same
occurrence in the program text or a different occurrence) may obtain
the same object or a different object with the same value.
+
+
+String literal concatenation
+============================
+
+Multiple adjacent string or bytes literals (delimited by whitespace),
+possibly using different quoting conventions, are allowed, and their
+meaning is the same as their concatenation:
+
+ >>> "hello" 'world'
+ "helloworld"
+
+Formally:
+
+ strings: ( STRING | fstring)+ | tstring+
+
+This feature is defined at the syntactical level, so it only works
+with literals. To concatenate string expressions at run time, the ‘+’
+operator may be used:
+
+ >>> greeting = "Hello"
+ >>> space = " "
+ >>> name = "Blaise"
+ >>> print(greeting + space + name) # not: print(greeting space name)
+ Hello Blaise
+
+Literal concatenation can freely mix raw strings, triple-quoted
+strings, and formatted string literals. For example:
+
+ >>> "Hello" r', ' f"{name}!"
+ "Hello, Blaise!"
+
+This feature can be used to reduce the number of backslashes needed,
+to split long strings conveniently across long lines, or even to add
+comments to parts of strings. For example:
+
+ re.compile("[A-Za-z_]" # letter or underscore
+ "[A-Za-z0-9_]*" # letter, digit or underscore
+ )
+
+However, bytes literals may only be combined with other byte literals;
+not with string literals of any kind. Also, template string literals
+may only be combined with other template string literals:
+
+ >>> t"Hello" t"{name}!"
+ Template(strings=('Hello', '!'), interpolations=(...))
''',
'attribute-access': r'''Customizing attribute access
****************************
Customizing module attribute access
===================================
+module.__getattr__()
+module.__dir__()
+
Special names "__getattr__" and "__dir__" can be also used to
customize access to module attributes. The "__getattr__" function at
the module level should accept one argument which is the name of an
present, this function overrides the standard "dir()" search on a
module.
+module.__class__
+
For a more fine grained customization of the module behavior (setting
attributes, properties, etc.), one can set the "__class__" attribute
of a module object to a subclass of "types.ModuleType". For example:
'bltin-ellipsis-object': r'''The Ellipsis Object
*******************
-This object is commonly used by slicing (see Slicings). It supports
-no special operations. There is exactly one ellipsis object, named
-"Ellipsis" (a built-in name). "type(Ellipsis)()" produces the
-"Ellipsis" singleton.
+This object is commonly used used to indicate that something is
+omitted. It supports no special operations. There is exactly one
+ellipsis object, named "Ellipsis" (a built-in name).
+"type(Ellipsis)()" produces the "Ellipsis" singleton.
It is written as "Ellipsis" or "...".
+
+In typical use, "..." as the "Ellipsis" object appears in a few
+different places, for instance:
+
+* In type annotations, such as callable arguments or tuple elements.
+
+* As the body of a function instead of a pass statement.
+
+* In third-party libraries, such as Numpy’s slicing and striding.
+
+Python also uses three dots in ways that are not "Ellipsis" objects,
+for instance:
+
+* Doctest’s "ELLIPSIS", as a pattern for missing content.
+
+* The default Python prompt of the *interactive* shell when partial
+ input is incomplete.
+
+Lastly, the Python documentation often uses three dots in conventional
+English usage to mean omitted content, even in code examples that also
+use them as the "Ellipsis".
''',
'bltin-null-object': r'''The Null Object
***************
class Foo(object):
pass
+There may be one or more base classes; see Multiple inheritance below
+for more information.
+
The class’s suite is then executed in a new execution frame (see
Naming and binding), using a newly created local namespace and the
original global namespace. (Usually, the suite contains mostly
**PEP 3129** - Class Decorators
The proposal that added class decorators. Function and method
decorators were introduced in **PEP 318**.
+
+
+Multiple inheritance
+====================
+
+Python classes may have multiple base classes, a technique known as
+*multiple inheritance*. The base classes are specified in the class
+definition by listing them in parentheses after the class name,
+separated by commas. For example, the following class definition:
+
+ >>> class A: pass
+ >>> class B: pass
+ >>> class C(A, B): pass
+
+defines a class "C" that inherits from classes "A" and "B".
+
+The *method resolution order* (MRO) is the order in which base classes
+are searched when looking up an attribute on a class. See The Python
+2.3 Method Resolution Order for a description of how Python determines
+the MRO for a class.
+
+Multiple inheritance is not always allowed. Attempting to define a
+class with multiple inheritance will raise an error if one of the
+bases does not allow subclassing, if a consistent MRO cannot be
+created, if no valid metaclass can be determined, or if there is an
+instance layout conflict. We’ll discuss each of these in turn.
+
+First, all base classes must allow subclassing. While most classes
+allow subclassing, some built-in classes do not, such as "bool":
+
+ >>> class SubBool(bool): # TypeError
+ ... pass
+ Traceback (most recent call last):
+ ...
+ TypeError: type 'bool' is not an acceptable base type
+
+In the resolved MRO of a class, the class’s bases appear in the order
+they were specified in the class’s bases list. Additionally, the MRO
+always lists a child class before any of its bases. A class definition
+will fail if it is impossible to resolve a consistent MRO that
+satisfies these rules from the list of bases provided:
+
+ >>> class Base: pass
+ >>> class Child(Base): pass
+ >>> class Grandchild(Base, Child): pass # TypeError
+ Traceback (most recent call last):
+ ...
+ TypeError: Cannot create a consistent method resolution order (MRO) for bases Base, Child
+
+In the MRO of "Grandchild", "Base" must appear before "Child" because
+it is first in the base class list, but it must also appear after
+"Child" because it is a parent of "Child". This is a contradiction, so
+the class cannot be defined.
+
+If some of the bases have a custom *metaclass*, the metaclass of the
+resulting class is chosen among the metaclasses of the bases and the
+explicitly specified metaclass of the child class. It must be a
+metaclass that is a subclass of all other candidate metaclasses. If no
+such metaclass exists among the candidates, the class cannot be
+created, as explained in Determining the appropriate metaclass.
+
+Finally, the instance layouts of the bases must be compatible. This
+means that it must be possible to compute a *solid base* for the
+class. Exactly which classes are solid bases depends on the Python
+implementation.
+
+**CPython implementation detail:** In CPython, a class is a solid base
+if it has a nonempty "__slots__" definition. Many but not all classes
+defined in C are also solid bases, including most builtins (such as
+"int" or "BaseException") but excluding most concrete "Exception"
+classes. Generally, a C class is a solid base if its underlying struct
+is different in size from its base class.
+
+Every class has a solid base. "object", the base class, has itself as
+its solid base. If there is a single base, the child class’s solid
+base is that class if it is a solid base, or else the base class’s
+solid base. If there are multiple bases, we first find the solid base
+for each base class to produce a list of candidate solid bases. If
+there is a unique solid base that is a subclass of all others, then
+that class is the solid base. Otherwise, class creation fails.
+
+Example:
+
+ >>> class Solid1:
+ ... __slots__ = ("solid1",)
+ >>>
+ >>> class Solid2:
+ ... __slots__ = ("solid2",)
+ >>>
+ >>> class SolidChild(Solid1):
+ ... __slots__ = ("solid_child",)
+ >>>
+ >>> class C1: # solid base is `object`
+ ... pass
+ >>>
+ >>> # OK: solid bases are `Solid1` and `object`, and `Solid1` is a subclass of `object`.
+ >>> class C2(Solid1, C1): # solid base is `Solid1`
+ ... pass
+ >>>
+ >>> # OK: solid bases are `SolidChild` and `Solid1`, and `SolidChild` is a subclass of `Solid1`.
+ >>> class C3(SolidChild, Solid1): # solid base is `SolidChild`
+ ... pass
+ >>>
+ >>> # Error: solid bases are `Solid1` and `Solid2`, but neither is a subclass of the other.
+ >>> class C4(Solid1, Solid2): # error: no single solid base
+ ... pass
+ Traceback (most recent call last):
+ ...
+ TypeError: multiple bases have instance lay-out conflict
''',
'comparisons': r'''Comparisons
***********
The "for" statement is used to iterate over the elements of a sequence
(such as a string, tuple or list) or other iterable object:
- for_stmt: "for" target_list "in" starred_list ":" suite
+ for_stmt: "for" target_list "in" starred_expression_list ":" suite
["else" ":" suite]
-The "starred_list" expression is evaluated once; it should yield an
-*iterable* object. An *iterator* is created for that iterable. The
-first item provided by the iterator is then assigned to the target
-list using the standard rules for assignments (see Assignment
-statements), and the suite is executed. This repeats for each item
-provided by the iterator. When the iterator is exhausted, the suite
-in the "else" clause, if present, is executed, and the loop
+The "starred_expression_list" expression is evaluated once; it should
+yield an *iterable* object. An *iterator* is created for that
+iterable. The first item provided by the iterator is then assigned to
+the target list using the standard rules for assignments (see
+Assignment statements), and the suite is executed. This repeats for
+each item provided by the iterator. When the iterator is exhausted,
+the suite in the "else" clause, if present, is executed, and the loop
terminates.
A "break" statement executed in the first suite terminates the loop
"except*" clause
----------------
-The "except*" clause(s) are used for handling "ExceptionGroup"s. The
-exception type for matching is interpreted as in the case of "except",
-but in the case of exception groups we can have partial matches when
-the type matches some of the exceptions in the group. This means that
-multiple "except*" clauses can execute, each handling part of the
-exception group. Each clause executes at most once and handles an
-exception group of all matching exceptions. Each exception in the
-group is handled by at most one "except*" clause, the first that
-matches it.
+The "except*" clause(s) specify one or more handlers for groups of
+exceptions ("BaseExceptionGroup" instances). A "try" statement can
+have either "except" or "except*" clauses, but not both. The exception
+type for matching is mandatory in the case of "except*", so "except*:"
+is a syntax error. The type is interpreted as in the case of "except",
+but matching is performed on the exceptions contained in the group
+that is being handled. An "TypeError" is raised if a matching type is
+a subclass of "BaseExceptionGroup", because that would have ambiguous
+semantics.
+
+When an exception group is raised in the try block, each "except*"
+clause splits (see "split()") it into the subgroups of matching and
+non-matching exceptions. If the matching subgroup is not empty, it
+becomes the handled exception (the value returned from
+"sys.exception()") and assigned to the target of the "except*" clause
+(if there is one). Then, the body of the "except*" clause executes. If
+the non-matching subgroup is not empty, it is processed by the next
+"except*" in the same manner. This continues until all exceptions in
+the group have been matched, or the last "except*" clause has run.
+
+After all "except*" clauses execute, the group of unhandled exceptions
+is merged with any exceptions that were raised or re-raised from
+within "except*" clauses. This merged exception group propagates on.:
>>> try:
... raise ExceptionGroup("eg",
caught <class 'ExceptionGroup'> with nested (TypeError(2),)
caught <class 'ExceptionGroup'> with nested (OSError(3), OSError(4))
+ Exception Group Traceback (most recent call last):
- | File "<stdin>", line 2, in <module>
- | ExceptionGroup: eg
+ | File "<doctest default[0]>", line 2, in <module>
+ | raise ExceptionGroup("eg",
+ | [ValueError(1), TypeError(2), OSError(3), OSError(4)])
+ | ExceptionGroup: eg (1 sub-exception)
+-+---------------- 1 ----------------
| ValueError: 1
+------------------------------------
-Any remaining exceptions that were not handled by any "except*" clause
-are re-raised at the end, along with all exceptions that were raised
-from within the "except*" clauses. If this list contains more than one
-exception to reraise, they are combined into an exception group.
-
-If the raised exception is not an exception group and its type matches
-one of the "except*" clauses, it is caught and wrapped by an exception
-group with an empty message string.
+If the exception raised from the "try" block is not an exception group
+and its type matches one of the "except*" clauses, it is caught and
+wrapped by an exception group with an empty message string. This
+ensures that the type of the target "e" is consistently
+"BaseExceptionGroup":
>>> try:
... raise BlockingIOError
...
ExceptionGroup('', (BlockingIOError()))
-An "except*" clause must have a matching expression; it cannot be
-"except*:". Furthermore, this expression cannot contain exception
-group types, because that would have ambiguous semantics.
-
-It is not possible to mix "except" and "except*" in the same "try".
"break", "continue" and "return" cannot appear in an "except*" clause.
----------------
If "finally" is present, it specifies a ‘cleanup’ handler. The "try"
-clause is executed, including any "except" and "else" clauses. If an
+clause is executed, including any "except" and "else" clauses. If an
exception occurs in any of the clauses and is not handled, the
exception is temporarily saved. The "finally" clause is executed. If
there is a saved exception it is re-raised at the end of the "finally"
-clause. If the "finally" clause raises another exception, the saved
+clause. If the "finally" clause raises another exception, the saved
exception is set as the context of the new exception. If the "finally"
clause executes a "return", "break" or "continue" statement, the saved
exception is discarded. For example, this function returns 42.
The match statement is used for pattern matching. Syntax:
match_stmt: 'match' subject_expr ":" NEWLINE INDENT case_block+ DEDENT
- subject_expr: star_named_expression "," star_named_expressions?
- | named_expression
- case_block: 'case' patterns [guard] ":" block
+ subject_expr: `!star_named_expression` "," `!star_named_expressions`?
+ | `!named_expression`
+ case_block: 'case' patterns [guard] ":" `!block`
Note:
Guards
------
- guard: "if" named_expression
+ guard: "if" `!named_expression`
A "guard" (which is part of the "case") must succeed for code inside
the "case" block to execute. It takes the form: "if" followed by an
The rule "strings" and the token "NUMBER" are defined in the standard
Python grammar. Triple-quoted strings are supported. Raw strings and
-byte strings are supported. f-strings are not supported.
+byte strings are supported. f-strings and t-strings are not
+supported.
The forms "signed_number '+' NUMBER" and "signed_number '-' NUMBER"
are for expressing complex numbers; they require a real number on the
Note:
The length of the subject sequence is obtained via "len()" (i.e.
- via the "__len__()" protocol). This length may be cached by the
+ via the "__len__()" protocol). This length may be cached by the
interpreter in a similar manner as value patterns.
In simple terms "[P1, P2, P3," … ", P<N>]" matches only if all the
class Foo(object):
pass
+There may be one or more base classes; see Multiple inheritance below
+for more information.
+
The class’s suite is then executed in a new execution frame (see
Naming and binding), using a newly created local namespace and the
original global namespace. (Usually, the suite contains mostly
decorators were introduced in **PEP 318**.
+Multiple inheritance
+--------------------
+
+Python classes may have multiple base classes, a technique known as
+*multiple inheritance*. The base classes are specified in the class
+definition by listing them in parentheses after the class name,
+separated by commas. For example, the following class definition:
+
+ >>> class A: pass
+ >>> class B: pass
+ >>> class C(A, B): pass
+
+defines a class "C" that inherits from classes "A" and "B".
+
+The *method resolution order* (MRO) is the order in which base classes
+are searched when looking up an attribute on a class. See The Python
+2.3 Method Resolution Order for a description of how Python determines
+the MRO for a class.
+
+Multiple inheritance is not always allowed. Attempting to define a
+class with multiple inheritance will raise an error if one of the
+bases does not allow subclassing, if a consistent MRO cannot be
+created, if no valid metaclass can be determined, or if there is an
+instance layout conflict. We’ll discuss each of these in turn.
+
+First, all base classes must allow subclassing. While most classes
+allow subclassing, some built-in classes do not, such as "bool":
+
+ >>> class SubBool(bool): # TypeError
+ ... pass
+ Traceback (most recent call last):
+ ...
+ TypeError: type 'bool' is not an acceptable base type
+
+In the resolved MRO of a class, the class’s bases appear in the order
+they were specified in the class’s bases list. Additionally, the MRO
+always lists a child class before any of its bases. A class definition
+will fail if it is impossible to resolve a consistent MRO that
+satisfies these rules from the list of bases provided:
+
+ >>> class Base: pass
+ >>> class Child(Base): pass
+ >>> class Grandchild(Base, Child): pass # TypeError
+ Traceback (most recent call last):
+ ...
+ TypeError: Cannot create a consistent method resolution order (MRO) for bases Base, Child
+
+In the MRO of "Grandchild", "Base" must appear before "Child" because
+it is first in the base class list, but it must also appear after
+"Child" because it is a parent of "Child". This is a contradiction, so
+the class cannot be defined.
+
+If some of the bases have a custom *metaclass*, the metaclass of the
+resulting class is chosen among the metaclasses of the bases and the
+explicitly specified metaclass of the child class. It must be a
+metaclass that is a subclass of all other candidate metaclasses. If no
+such metaclass exists among the candidates, the class cannot be
+created, as explained in Determining the appropriate metaclass.
+
+Finally, the instance layouts of the bases must be compatible. This
+means that it must be possible to compute a *solid base* for the
+class. Exactly which classes are solid bases depends on the Python
+implementation.
+
+**CPython implementation detail:** In CPython, a class is a solid base
+if it has a nonempty "__slots__" definition. Many but not all classes
+defined in C are also solid bases, including most builtins (such as
+"int" or "BaseException") but excluding most concrete "Exception"
+classes. Generally, a C class is a solid base if its underlying struct
+is different in size from its base class.
+
+Every class has a solid base. "object", the base class, has itself as
+its solid base. If there is a single base, the child class’s solid
+base is that class if it is a solid base, or else the base class’s
+solid base. If there are multiple bases, we first find the solid base
+for each base class to produce a list of candidate solid bases. If
+there is a unique solid base that is a subclass of all others, then
+that class is the solid base. Otherwise, class creation fails.
+
+Example:
+
+ >>> class Solid1:
+ ... __slots__ = ("solid1",)
+ >>>
+ >>> class Solid2:
+ ... __slots__ = ("solid2",)
+ >>>
+ >>> class SolidChild(Solid1):
+ ... __slots__ = ("solid_child",)
+ >>>
+ >>> class C1: # solid base is `object`
+ ... pass
+ >>>
+ >>> # OK: solid bases are `Solid1` and `object`, and `Solid1` is a subclass of `object`.
+ >>> class C2(Solid1, C1): # solid base is `Solid1`
+ ... pass
+ >>>
+ >>> # OK: solid bases are `SolidChild` and `Solid1`, and `SolidChild` is a subclass of `Solid1`.
+ >>> class C3(SolidChild, Solid1): # solid base is `SolidChild`
+ ... pass
+ >>>
+ >>> # Error: solid bases are `Solid1` and `Solid2`, but neither is a subclass of the other.
+ >>> class C4(Solid1, Solid2): # error: no single solid base
+ ... pass
+ Traceback (most recent call last):
+ ...
+ TypeError: multiple bases have instance lay-out conflict
+
+
Coroutines
==========
introspects and uses the annotations (such as "dataclasses" or
"functools.singledispatch()").
-By default, annotations are lazily evaluated in a annotation scope.
+By default, annotations are lazily evaluated in an annotation scope.
This means that they are not evaluated when the code containing the
annotation is evaluated. Instead, the interpreter saves information
that can be used to evaluate the annotation later if requested. The
>>> f.__annotations__
{'param': 'annotation'}
+This future statement will be deprecated and removed in a future
+version of Python, but not before Python 3.13 reaches its end of life
+(see **PEP 749**). When it is used, introspection tools like
+"annotationlib.get_annotations()" and "typing.get_type_hints()" are
+less likely to be able to resolve annotations at runtime.
+
-[ Footnotes ]-
[1] The exception is propagated to the invocation stack unless there
You can also invoke "pdb" from the command line to debug other
scripts. For example:
- python -m pdb [-c command] (-m module | pyfile) [args ...]
+ python -m pdb [-c command] (-m module | -p pid | pyfile) [args ...]
When invoked as a module, pdb will automatically enter post-mortem
debugging if the program being debugged exits abnormally. After post-
Changed in version 3.7: Added the "-m" option.
+-p, --pid <pid>
+
+ Attach to the process with the specified PID.
+
+ Added in version 3.14.
+
+To attach to a running Python process for remote debugging, use the
+"-p" or "--pid" option with the target process’s PID:
+
+ python -m pdb -p 1234
+
+Note:
+
+ Attaching to a process that is blocked in a system call or waiting
+ for I/O will only work once the next bytecode instruction is
+ executed or when the process receives a signal.
+
Typical usage to execute a statement under control of the debugger is:
>>> import pdb
Deletion of a name removes the binding of that name from the local or
global namespace, depending on whether the name occurs in a "global"
-statement in the same code block. If the name is unbound, a
-"NameError" exception will be raised.
+statement in the same code block. Trying to delete an unbound name
+raises a "NameError" exception.
Deletion of attribute references, subscriptions and slicings is passed
to the primary object involved; deletion of a slicing is in general
See also the description of the "try" statement in section The try
statement and "raise" statement in section The raise statement.
-
--[ Footnotes ]-
-
-[1] This limitation occurs because the code that is executed by these
- operations is not available at the time the module is compiled.
''',
'execmodel': r'''Execution model
***************
See also the description of the "try" statement in section The try
statement and "raise" statement in section The raise statement.
+
+Runtime Components
+==================
+
+
+General Computing Model
+-----------------------
+
+Python’s execution model does not operate in a vacuum. It runs on a
+host machine and through that host’s runtime environment, including
+its operating system (OS), if there is one. When a program runs, the
+conceptual layers of how it runs on the host look something like this:
+
+ **host machine**
+ **process** (global resources)
+ **thread** (runs machine code)
+
+Each process represents a program running on the host. Think of each
+process itself as the data part of its program. Think of the process’
+threads as the execution part of the program. This distinction will
+be important to understand the conceptual Python runtime.
+
+The process, as the data part, is the execution context in which the
+program runs. It mostly consists of the set of resources assigned to
+the program by the host, including memory, signals, file handles,
+sockets, and environment variables.
+
+Processes are isolated and independent from one another. (The same is
+true for hosts.) The host manages the process’ access to its assigned
+resources, in addition to coordinating between processes.
+
+Each thread represents the actual execution of the program’s machine
+code, running relative to the resources assigned to the program’s
+process. It’s strictly up to the host how and when that execution
+takes place.
+
+From the point of view of Python, a program always starts with exactly
+one thread. However, the program may grow to run in multiple
+simultaneous threads. Not all hosts support multiple threads per
+process, but most do. Unlike processes, threads in a process are not
+isolated and independent from one another. Specifically, all threads
+in a process share all of the process’ resources.
+
+The fundamental point of threads is that each one does *run*
+independently, at the same time as the others. That may be only
+conceptually at the same time (“concurrently”) or physically (“in
+parallel”). Either way, the threads effectively run at a non-
+synchronized rate.
+
+Note:
+
+ That non-synchronized rate means none of the process’ memory is
+ guaranteed to stay consistent for the code running in any given
+ thread. Thus multi-threaded programs must take care to coordinate
+ access to intentionally shared resources. Likewise, they must take
+ care to be absolutely diligent about not accessing any *other*
+ resources in multiple threads; otherwise two threads running at the
+ same time might accidentally interfere with each other’s use of some
+ shared data. All this is true for both Python programs and the
+ Python runtime.The cost of this broad, unstructured requirement is
+ the tradeoff for the kind of raw concurrency that threads provide.
+ The alternative to the required discipline generally means dealing
+ with non-deterministic bugs and data corruption.
+
+
+Python Runtime Model
+--------------------
+
+The same conceptual layers apply to each Python program, with some
+extra data layers specific to Python:
+
+ **host machine**
+ **process** (global resources)
+ Python global runtime (*state*)
+ Python interpreter (*state*)
+ **thread** (runs Python bytecode and “C-API”)
+ Python thread *state*
+
+At the conceptual level: when a Python program starts, it looks
+exactly like that diagram, with one of each. The runtime may grow to
+include multiple interpreters, and each interpreter may grow to
+include multiple thread states.
+
+Note:
+
+ A Python implementation won’t necessarily implement the runtime
+ layers distinctly or even concretely. The only exception is places
+ where distinct layers are directly specified or exposed to users,
+ like through the "threading" module.
+
+Note:
+
+ The initial interpreter is typically called the “main” interpreter.
+ Some Python implementations, like CPython, assign special roles to
+ the main interpreter.Likewise, the host thread where the runtime was
+ initialized is known as the “main” thread. It may be different from
+ the process’ initial thread, though they are often the same. In
+ some cases “main thread” may be even more specific and refer to the
+ initial thread state. A Python runtime might assign specific
+ responsibilities to the main thread, such as handling signals.
+
+As a whole, the Python runtime consists of the global runtime state,
+interpreters, and thread states. The runtime ensures all that state
+stays consistent over its lifetime, particularly when used with
+multiple host threads.
+
+The global runtime, at the conceptual level, is just a set of
+interpreters. While those interpreters are otherwise isolated and
+independent from one another, they may share some data or other
+resources. The runtime is responsible for managing these global
+resources safely. The actual nature and management of these resources
+is implementation-specific. Ultimately, the external utility of the
+global runtime is limited to managing interpreters.
+
+In contrast, an “interpreter” is conceptually what we would normally
+think of as the (full-featured) “Python runtime”. When machine code
+executing in a host thread interacts with the Python runtime, it calls
+into Python in the context of a specific interpreter.
+
+Note:
+
+ The term “interpreter” here is not the same as the “bytecode
+ interpreter”, which is what regularly runs in threads, executing
+ compiled Python code.In an ideal world, “Python runtime” would refer
+ to what we currently call “interpreter”. However, it’s been called
+ “interpreter” at least since introduced in 1997 (CPython:a027efa5b).
+
+Each interpreter completely encapsulates all of the non-process-
+global, non-thread-specific state needed for the Python runtime to
+work. Notably, the interpreter’s state persists between uses. It
+includes fundamental data like "sys.modules". The runtime ensures
+multiple threads using the same interpreter will safely share it
+between them.
+
+A Python implementation may support using multiple interpreters at the
+same time in the same process. They are independent and isolated from
+one another. For example, each interpreter has its own "sys.modules".
+
+For thread-specific runtime state, each interpreter has a set of
+thread states, which it manages, in the same way the global runtime
+contains a set of interpreters. It can have thread states for as many
+host threads as it needs. It may even have multiple thread states for
+the same host thread, though that isn’t as common.
+
+Each thread state, conceptually, has all the thread-specific runtime
+data an interpreter needs to operate in one host thread. The thread
+state includes the current raised exception and the thread’s Python
+call stack. It may include other thread-specific resources.
+
+Note:
+
+ The term “Python thread” can sometimes refer to a thread state, but
+ normally it means a thread created using the "threading" module.
+
+Each thread state, over its lifetime, is always tied to exactly one
+interpreter and exactly one host thread. It will only ever be used in
+that thread and with that interpreter.
+
+Multiple thread states may be tied to the same host thread, whether
+for different interpreters or even the same interpreter. However, for
+any given host thread, only one of the thread states tied to it can be
+used by the thread at a time.
+
+Thread states are isolated and independent from one another and don’t
+share any data, except for possibly sharing an interpreter and objects
+or other resources belonging to that interpreter.
+
+Once a program is running, new Python threads can be created using the
+"threading" module (on platforms and Python implementations that
+support threads). Additional processes can be created using the "os",
+"subprocess", and "multiprocessing" modules. Interpreters can be
+created and used with the "interpreters" module. Coroutines (async)
+can be run using "asyncio" in each interpreter, typically only in a
+single thread (often the main thread).
+
-[ Footnotes ]-
[1] This limitation occurs because the code that is executed by these
'exprlists': r'''Expression lists
****************
- starred_expression: ["*"] or_expr
+ starred_expression: "*" or_expr | expression
flexible_expression: assignment_expression | starred_expression
flexible_expression_list: flexible_expression ("," flexible_expression)* [","]
starred_expression_list: starred_expression ("," starred_expression)* [","]
'floating': r'''Floating-point literals
***********************
-Floating-point literals are described by the following lexical
-definitions:
+Floating-point (float) literals, such as "3.14" or "1.5", denote
+approximations of real numbers.
+
+They consist of *integer* and *fraction* parts, each composed of
+decimal digits. The parts are separated by a decimal point, ".":
+
+ 2.71828
+ 4.0
- floatnumber: pointfloat | exponentfloat
- pointfloat: [digitpart] fraction | digitpart "."
- exponentfloat: (digitpart | pointfloat) exponent
- digitpart: digit (["_"] digit)*
- fraction: "." digitpart
- exponent: ("e" | "E") ["+" | "-"] digitpart
+Unlike in integer literals, leading zeros are allowed in the numeric
+parts. For example, "077.010" is legal, and denotes the same number as
+"77.10".
-Note that the integer and exponent parts are always interpreted using
-radix 10. For example, "077e010" is legal, and denotes the same number
-as "77e10". The allowed range of floating-point literals is
-implementation-dependent. As in integer literals, underscores are
-supported for digit grouping.
+As in integer literals, single underscores may occur between digits to
+help readability:
-Some examples of floating-point literals:
+ 96_485.332_123
+ 3.14_15_93
- 3.14 10. .001 1e100 3.14e-10 0e0 3.14_15_93
+Either of these parts, but not both, can be empty. For example:
+
+ 10. # (equivalent to 10.0)
+ .001 # (equivalent to 0.001)
+
+Optionally, the integer and fraction may be followed by an *exponent*:
+the letter "e" or "E", followed by an optional sign, "+" or "-", and a
+number in the same format as the integer and fraction parts. The "e"
+or "E" represents “times ten raised to the power of”:
+
+ 1.0e3 # (represents 1.0×10³, or 1000.0)
+ 1.166e-5 # (represents 1.166×10⁻⁵, or 0.00001166)
+ 6.02214076e+23 # (represents 6.02214076×10²³, or 602214076000000000000000.)
+
+In floats with only integer and exponent parts, the decimal point may
+be omitted:
+
+ 1e3 # (equivalent to 1.e3 and 1.0e3)
+ 0e0 # (equivalent to 0.)
+
+Formally, floating-point literals are described by the following
+lexical definitions:
+
+ floatnumber:
+ | digitpart "." [digitpart] [exponent]
+ | "." digitpart [exponent]
+ | digitpart exponent
+ digitpart: digit (["_"] digit)*
+ exponent: ("e" | "E") ["+" | "-"] digitpart
Changed in version 3.6: Underscores are now allowed for grouping
purposes in literals.
The "for" statement is used to iterate over the elements of a sequence
(such as a string, tuple or list) or other iterable object:
- for_stmt: "for" target_list "in" starred_list ":" suite
+ for_stmt: "for" target_list "in" starred_expression_list ":" suite
["else" ":" suite]
-The "starred_list" expression is evaluated once; it should yield an
-*iterable* object. An *iterator* is created for that iterable. The
-first item provided by the iterator is then assigned to the target
-list using the standard rules for assignments (see Assignment
-statements), and the suite is executed. This repeats for each item
-provided by the iterator. When the iterator is exhausted, the suite
-in the "else" clause, if present, is executed, and the loop
+The "starred_expression_list" expression is evaluated once; it should
+yield an *iterable* object. An *iterator* is created for that
+iterable. The first item provided by the iterator is then assigned to
+the target list using the standard rules for assignments (see
+Assignment statements), and the suite is executed. This repeats for
+each item provided by the iterator. When the iterator is exhausted,
+the suite in the "else" clause, if present, is executed, and the loop
terminates.
A "break" statement executed in the first suite terminates the loop
The "str.format()" method and the "Formatter" class share the same
syntax for format strings (although in the case of "Formatter",
subclasses can define their own format string syntax). The syntax is
-related to that of formatted string literals, but it is less
-sophisticated and, in particular, does not support arbitrary
-expressions.
+related to that of formatted string literals and template string
+literals, but it is less sophisticated and, in particular, does not
+support arbitrary expressions in interpolations.
Format strings contain “replacement fields” surrounded by curly braces
"{}". Anything that is not contained in braces is considered literal
“Format specifications” are used within replacement fields contained
within a format string to define how individual values are presented
-(see Format String Syntax and f-strings). They can also be passed
-directly to the built-in "format()" function. Each formattable type
-may define how the format specification is to be interpreted.
+(see Format String Syntax, f-strings, and t-strings). They can also be
+passed directly to the built-in "format()" function. Each formattable
+type may define how the format specification is to be interpreted.
Most built-in types implement the following options for format
specifications, although some of the formatting options are only
sign: "+" | "-" | " "
width_and_precision: [width_with_grouping][precision_with_grouping]
width_with_grouping: [width][grouping]
- precision_with_grouping: "." [precision][grouping]
+ precision_with_grouping: "." [precision][grouping] | "." grouping
width: digit+
precision: digit+
grouping: "," | "_"
without "global", although free variables may refer to globals without
being declared global.
-The "global" statement applies to the entire scope of a function or
-class body. A "SyntaxError" is raised if a variable is used or
-assigned to prior to its global declaration in the scope.
+The "global" statement applies to the entire current scope (module,
+function body or class definition). A "SyntaxError" is raised if a
+variable is used or assigned to prior to its global declaration in the
+scope.
+
+At the module level, all variables are global, so a "global" statement
+has no effect. However, variables must still not be used or assigned
+to prior to their "global" declaration. This requirement is relaxed in
+the interactive prompt (*REPL*).
**Programmer’s note:** "global" is a directive to the parser. It
applies only to code parsed at the same time as the "global"
to help avoid name clashes between “private” attributes of base and
derived classes. See section Identifiers (Names).
''',
- 'identifiers': r'''Identifiers and keywords
-************************
+ 'identifiers': r'''Names (identifiers and keywords)
+********************************
-Identifiers (also referred to as *names*) are described by the
-following lexical definitions.
-
-The syntax of identifiers in Python is based on the Unicode standard
-annex UAX-31, with elaboration and changes as defined below; see also
-**PEP 3131** for further details.
+"NAME" tokens represent *identifiers*, *keywords*, and *soft
+keywords*.
Within the ASCII range (U+0001..U+007F), the valid characters for
-identifiers include the uppercase and lowercase letters "A" through
-"Z", the underscore "_" and, except for the first character, the
-digits "0" through "9". Python 3.0 introduced additional characters
-from outside the ASCII range (see **PEP 3131**). For these
-characters, the classification uses the version of the Unicode
-Character Database as included in the "unicodedata" module.
+names include the uppercase and lowercase letters ("A-Z" and "a-z"),
+the underscore "_" and, except for the first character, the digits "0"
+through "9".
+
+Names must contain at least one character, but have no upper length
+limit. Case is significant.
+
+Besides "A-Z", "a-z", "_" and "0-9", names can also use “letter-like”
+and “number-like” characters from outside the ASCII range, as detailed
+below.
+
+All identifiers are converted into the normalization form NFKC while
+parsing; comparison of identifiers is based on NFKC.
+
+Formally, the first character of a normalized identifier must belong
+to the set "id_start", which is the union of:
-Identifiers are unlimited in length. Case is significant.
+* Unicode category "<Lu>" - uppercase letters (includes "A" to "Z")
- identifier: xid_start xid_continue*
- id_start: <all characters in general categories Lu, Ll, Lt, Lm, Lo, Nl, the underscore, and characters with the Other_ID_Start property>
- id_continue: <all characters in id_start, plus characters in the categories Mn, Mc, Nd, Pc and others with the Other_ID_Continue property>
- xid_start: <all characters in id_start whose NFKC normalization is in "id_start xid_continue*">
- xid_continue: <all characters in id_continue whose NFKC normalization is in "id_continue*">
+* Unicode category "<Ll>" - lowercase letters (includes "a" to "z")
-The Unicode category codes mentioned above stand for:
+* Unicode category "<Lt>" - titlecase letters
-* *Lu* - uppercase letters
+* Unicode category "<Lm>" - modifier letters
-* *Ll* - lowercase letters
+* Unicode category "<Lo>" - other letters
-* *Lt* - titlecase letters
+* Unicode category "<Nl>" - letter numbers
-* *Lm* - modifier letters
+* {""_""} - the underscore
-* *Lo* - other letters
+* "<Other_ID_Start>" - an explicit set of characters in PropList.txt
+ to support backwards compatibility
-* *Nl* - letter numbers
+The remaining characters must belong to the set "id_continue", which
+is the union of:
-* *Mn* - nonspacing marks
+* all characters in "id_start"
-* *Mc* - spacing combining marks
+* Unicode category "<Nd>" - decimal numbers (includes "0" to "9")
-* *Nd* - decimal numbers
+* Unicode category "<Pc>" - connector punctuations
-* *Pc* - connector punctuations
+* Unicode category "<Mn>" - nonspacing marks
-* *Other_ID_Start* - explicit list of characters in PropList.txt to
- support backwards compatibility
+* Unicode category "<Mc>" - spacing combining marks
-* *Other_ID_Continue* - likewise
+* "<Other_ID_Continue>" - another explicit set of characters in
+ PropList.txt to support backwards compatibility
-All identifiers are converted into the normal form NFKC while parsing;
-comparison of identifiers is based on NFKC.
+Unicode categories use the version of the Unicode Character Database
+as included in the "unicodedata" module.
-A non-normative HTML file listing all valid identifier characters for
-Unicode 16.0.0 can be found at
-https://www.unicode.org/Public/16.0.0/ucd/DerivedCoreProperties.txt
+These sets are based on the Unicode standard annex UAX-31. See also
+**PEP 3131** for further details.
+
+Even more formally, names are described by the following lexical
+definitions:
+
+ NAME: xid_start xid_continue*
+ id_start: <Lu> | <Ll> | <Lt> | <Lm> | <Lo> | <Nl> | "_" | <Other_ID_Start>
+ id_continue: id_start | <Nd> | <Pc> | <Mn> | <Mc> | <Other_ID_Continue>
+ xid_start: <all characters in id_start whose NFKC normalization is
+ in (id_start xid_continue*)">
+ xid_continue: <all characters in id_continue whose NFKC normalization is
+ in (id_continue*)">
+ identifier: <NAME, except keywords>
+
+A non-normative listing of all valid identifier characters as defined
+by Unicode is available in the DerivedCoreProperties.txt file in the
+Unicode Character Database.
Keywords
========
-The following identifiers are used as reserved words, or *keywords* of
-the language, and cannot be used as ordinary identifiers. They must
-be spelled exactly as written here:
+The following names are used as reserved words, or *keywords* of the
+language, and cannot be used as ordinary identifiers. They must be
+spelled exactly as written here:
False await else import pass
None break except in raise
Added in version 3.10.
-Some identifiers are only reserved under specific contexts. These are
-known as *soft keywords*. The identifiers "match", "case", "type" and
-"_" can syntactically act as keywords in certain contexts, but this
-distinction is done at the parser level, not when tokenizing.
+Some names are only reserved under specific contexts. These are known
+as *soft keywords*:
+
+* "match", "case", and "_", when used in the "match" statement.
+
+* "type", when used in the "type" statement.
+
+These syntactically act as keywords in their specific contexts, but
+this distinction is done at the parser level, not when tokenizing.
As soft keywords, their use in the grammar is possible while still
preserving compatibility with existing code that uses these names as
identifier names.
-"match", "case", and "_" are used in the "match" statement. "type" is
-used in the "type" statement.
-
Changed in version 3.12: "type" is now a soft keyword.
'imaginary': r'''Imaginary literals
******************
-Imaginary literals are described by the following lexical definitions:
+Python has complex number objects, but no complex literals. Instead,
+*imaginary literals* denote complex numbers with a zero real part.
- imagnumber: (floatnumber | digitpart) ("j" | "J")
+For example, in math, the complex number 3+4.2*i* is written as the
+real number 3 added to the imaginary number 4.2*i*. Python uses a
+similar syntax, except the imaginary unit is written as "j" rather
+than *i*:
+
+ 3+4.2j
+
+This is an expression composed of the integer literal "3", the
+operator ‘"+"’, and the imaginary literal "4.2j". Since these are
+three separate tokens, whitespace is allowed between them:
+
+ 3 + 4.2j
+
+No whitespace is allowed *within* each token. In particular, the "j"
+suffix, may not be separated from the number before it.
+
+The number before the "j" has the same syntax as a floating-point
+literal. Thus, the following are valid imaginary literals:
+
+ 4.2j
+ 3.14j
+ 10.j
+ .001j
+ 1e100j
+ 3.14e-10j
+ 3.14_15_93j
-An imaginary literal yields a complex number with a real part of 0.0.
-Complex numbers are represented as a pair of floating-point numbers
-and have the same restrictions on their range. To create a complex
-number with a nonzero real part, add a floating-point number to it,
-e.g., "(3+4j)". Some examples of imaginary literals:
+Unlike in a floating-point literal the decimal point can be omitted if
+the imaginary number only has an integer part. The number is still
+evaluated as a floating-point number, not an integer:
- 3.14j 10.j 10j .001j 1e100j 3.14e-10j 3.14_15_93j
+ 10j
+ 0j
+ 1000000000000000000000000j # equivalent to 1e+24j
+
+The "j" suffix is case-insensitive. That means you can use "J"
+instead:
+
+ 3.14J # equivalent to 3.14j
+
+Formally, imaginary literals are described by the following lexical
+definition:
+
+ imagnumber: (floatnumber | digitpart) ("j" | "J")
''',
'import': r'''The "import" statement
**********************
'integers': r'''Integer literals
****************
-Integer literals are described by the following lexical definitions:
+Integer literals denote whole numbers. For example:
+
+ 7
+ 3
+ 2147483647
+
+There is no limit for the length of integer literals apart from what
+can be stored in available memory:
+
+ 7922816251426433759354395033679228162514264337593543950336
+
+Underscores can be used to group digits for enhanced readability, and
+are ignored for determining the numeric value of the literal. For
+example, the following literals are equivalent:
+
+ 100_000_000_000
+ 100000000000
+ 1_00_00_00_00_000
+
+Underscores can only occur between digits. For example, "_123",
+"321_", and "123__321" are *not* valid literals.
+
+Integers can be specified in binary (base 2), octal (base 8), or
+hexadecimal (base 16) using the prefixes "0b", "0o" and "0x",
+respectively. Hexadecimal digits 10 through 15 are represented by
+letters "A"-"F", case-insensitive. For example:
+
+ 0b100110111
+ 0b_1110_0101
+ 0o177
+ 0o377
+ 0xdeadbeef
+ 0xDead_Beef
+
+An underscore can follow the base specifier. For example, "0x_1f" is a
+valid literal, but "0_x1f" and "0x__1f" are not.
- integer: decinteger | bininteger | octinteger | hexinteger
- decinteger: nonzerodigit (["_"] digit)* | "0"+ (["_"] "0")*
+Leading zeros in a non-zero decimal number are not allowed. For
+example, "0123" is not a valid literal. This is for disambiguation
+with C-style octal literals, which Python used before version 3.0.
+
+Formally, integer literals are described by the following lexical
+definitions:
+
+ integer: decinteger | bininteger | octinteger | hexinteger | zerointeger
+ decinteger: nonzerodigit (["_"] digit)*
bininteger: "0" ("b" | "B") (["_"] bindigit)+
octinteger: "0" ("o" | "O") (["_"] octdigit)+
hexinteger: "0" ("x" | "X") (["_"] hexdigit)+
+ zerointeger: "0"+ (["_"] "0")*
nonzerodigit: "1"..."9"
digit: "0"..."9"
bindigit: "0" | "1"
octdigit: "0"..."7"
hexdigit: digit | "a"..."f" | "A"..."F"
-There is no limit for the length of integer literals apart from what
-can be stored in available memory.
-
-Underscores are ignored for determining the numeric value of the
-literal. They can be used to group digits for enhanced readability.
-One underscore can occur between digits, and after base specifiers
-like "0x".
-
-Note that leading zeros in a non-zero decimal number are not allowed.
-This is for disambiguation with C-style octal literals, which Python
-used before version 3.0.
-
-Some examples of integer literals:
-
- 7 2147483647 0o177 0b100110111
- 3 79228162514264337593543950336 0o377 0xdeadbeef
- 100_000_000_000 0b_1110_0101
-
Changed in version 3.6: Underscores are now allowed for grouping
purposes in literals.
''',
'numbers': r'''Numeric literals
****************
-There are three types of numeric literals: integers, floating-point
-numbers, and imaginary numbers. There are no complex literals
-(complex numbers can be formed by adding a real number and an
-imaginary number).
+"NUMBER" tokens represent numeric literals, of which there are three
+types: integers, floating-point numbers, and imaginary numbers.
-Note that numeric literals do not include a sign; a phrase like "-1"
-is actually an expression composed of the unary operator ‘"-"’ and the
-literal "1".
-''',
- 'numeric-types': r'''Emulating numeric types
-***********************
+ NUMBER: integer | floatnumber | imagnumber
-The following methods can be defined to emulate numeric objects.
-Methods corresponding to operations that are not supported by the
-particular kind of number implemented (e.g., bitwise operations for
-non-integral numbers) should be left undefined.
+The numeric value of a numeric literal is the same as if it were
+passed as a string to the "int", "float" or "complex" class
+constructor, respectively. Note that not all valid inputs for those
+constructors are also valid literals.
-object.__add__(self, other)
-object.__sub__(self, other)
-object.__mul__(self, other)
-object.__matmul__(self, other)
-object.__truediv__(self, other)
-object.__floordiv__(self, other)
-object.__mod__(self, other)
-object.__divmod__(self, other)
-object.__pow__(self, other[, modulo])
-object.__lshift__(self, other)
-object.__rshift__(self, other)
-object.__and__(self, other)
-object.__xor__(self, other)
-object.__or__(self, other)
+Numeric literals do not include a sign; a phrase like "-1" is actually
+an expression composed of the unary operator ‘"-"’ and the literal
+"1".
- These methods are called to implement the binary arithmetic
- operations ("+", "-", "*", "@", "/", "//", "%", "divmod()",
- "pow()", "**", "<<", ">>", "&", "^", "|"). For instance, to
- evaluate the expression "x + y", where *x* is an instance of a
- class that has an "__add__()" method, "type(x).__add__(x, y)" is
- called. The "__divmod__()" method should be the equivalent to
- using "__floordiv__()" and "__mod__()"; it should not be related to
- "__truediv__()". Note that "__pow__()" should be defined to accept
- an optional third argument if the three-argument version of the
- built-in "pow()" function is to be supported.
- If one of those methods does not support the operation with the
- supplied arguments, it should return "NotImplemented".
+Integer literals
+================
-object.__radd__(self, other)
-object.__rsub__(self, other)
-object.__rmul__(self, other)
-object.__rmatmul__(self, other)
-object.__rtruediv__(self, other)
-object.__rfloordiv__(self, other)
-object.__rmod__(self, other)
-object.__rdivmod__(self, other)
-object.__rpow__(self, other[, modulo])
-object.__rlshift__(self, other)
-object.__rrshift__(self, other)
-object.__rand__(self, other)
-object.__rxor__(self, other)
-object.__ror__(self, other)
+Integer literals denote whole numbers. For example:
- These methods are called to implement the binary arithmetic
- operations ("+", "-", "*", "@", "/", "//", "%", "divmod()",
- "pow()", "**", "<<", ">>", "&", "^", "|") with reflected (swapped)
- operands. These functions are only called if the operands are of
- different types, when the left operand does not support the
- corresponding operation [3], or the right operand’s class is
- derived from the left operand’s class. [4] For instance, to
- evaluate the expression "x - y", where *y* is an instance of a
- class that has an "__rsub__()" method, "type(y).__rsub__(y, x)" is
- called if "type(x).__sub__(x, y)" returns "NotImplemented" or
- "type(y)" is a subclass of "type(x)". [5]
+ 7
+ 3
+ 2147483647
- Note that "__rpow__()" should be defined to accept an optional
- third argument if the three-argument version of the built-in
- "pow()" function is to be supported.
+There is no limit for the length of integer literals apart from what
+can be stored in available memory:
+
+ 7922816251426433759354395033679228162514264337593543950336
+
+Underscores can be used to group digits for enhanced readability, and
+are ignored for determining the numeric value of the literal. For
+example, the following literals are equivalent:
+
+ 100_000_000_000
+ 100000000000
+ 1_00_00_00_00_000
+
+Underscores can only occur between digits. For example, "_123",
+"321_", and "123__321" are *not* valid literals.
+
+Integers can be specified in binary (base 2), octal (base 8), or
+hexadecimal (base 16) using the prefixes "0b", "0o" and "0x",
+respectively. Hexadecimal digits 10 through 15 are represented by
+letters "A"-"F", case-insensitive. For example:
+
+ 0b100110111
+ 0b_1110_0101
+ 0o177
+ 0o377
+ 0xdeadbeef
+ 0xDead_Beef
+
+An underscore can follow the base specifier. For example, "0x_1f" is a
+valid literal, but "0_x1f" and "0x__1f" are not.
+
+Leading zeros in a non-zero decimal number are not allowed. For
+example, "0123" is not a valid literal. This is for disambiguation
+with C-style octal literals, which Python used before version 3.0.
+
+Formally, integer literals are described by the following lexical
+definitions:
+
+ integer: decinteger | bininteger | octinteger | hexinteger | zerointeger
+ decinteger: nonzerodigit (["_"] digit)*
+ bininteger: "0" ("b" | "B") (["_"] bindigit)+
+ octinteger: "0" ("o" | "O") (["_"] octdigit)+
+ hexinteger: "0" ("x" | "X") (["_"] hexdigit)+
+ zerointeger: "0"+ (["_"] "0")*
+ nonzerodigit: "1"..."9"
+ digit: "0"..."9"
+ bindigit: "0" | "1"
+ octdigit: "0"..."7"
+ hexdigit: digit | "a"..."f" | "A"..."F"
+
+Changed in version 3.6: Underscores are now allowed for grouping
+purposes in literals.
+
+
+Floating-point literals
+=======================
+
+Floating-point (float) literals, such as "3.14" or "1.5", denote
+approximations of real numbers.
+
+They consist of *integer* and *fraction* parts, each composed of
+decimal digits. The parts are separated by a decimal point, ".":
+
+ 2.71828
+ 4.0
+
+Unlike in integer literals, leading zeros are allowed in the numeric
+parts. For example, "077.010" is legal, and denotes the same number as
+"77.10".
+
+As in integer literals, single underscores may occur between digits to
+help readability:
+
+ 96_485.332_123
+ 3.14_15_93
+
+Either of these parts, but not both, can be empty. For example:
+
+ 10. # (equivalent to 10.0)
+ .001 # (equivalent to 0.001)
+
+Optionally, the integer and fraction may be followed by an *exponent*:
+the letter "e" or "E", followed by an optional sign, "+" or "-", and a
+number in the same format as the integer and fraction parts. The "e"
+or "E" represents “times ten raised to the power of”:
+
+ 1.0e3 # (represents 1.0×10³, or 1000.0)
+ 1.166e-5 # (represents 1.166×10⁻⁵, or 0.00001166)
+ 6.02214076e+23 # (represents 6.02214076×10²³, or 602214076000000000000000.)
+
+In floats with only integer and exponent parts, the decimal point may
+be omitted:
+
+ 1e3 # (equivalent to 1.e3 and 1.0e3)
+ 0e0 # (equivalent to 0.)
+
+Formally, floating-point literals are described by the following
+lexical definitions:
+
+ floatnumber:
+ | digitpart "." [digitpart] [exponent]
+ | "." digitpart [exponent]
+ | digitpart exponent
+ digitpart: digit (["_"] digit)*
+ exponent: ("e" | "E") ["+" | "-"] digitpart
+
+Changed in version 3.6: Underscores are now allowed for grouping
+purposes in literals.
+
+
+Imaginary literals
+==================
+
+Python has complex number objects, but no complex literals. Instead,
+*imaginary literals* denote complex numbers with a zero real part.
+
+For example, in math, the complex number 3+4.2*i* is written as the
+real number 3 added to the imaginary number 4.2*i*. Python uses a
+similar syntax, except the imaginary unit is written as "j" rather
+than *i*:
+
+ 3+4.2j
+
+This is an expression composed of the integer literal "3", the
+operator ‘"+"’, and the imaginary literal "4.2j". Since these are
+three separate tokens, whitespace is allowed between them:
+
+ 3 + 4.2j
- Changed in version 3.14.0a7 (unreleased): Three-argument "pow()"
- now try calling "__rpow__()" if necessary. Previously it was only
- called in two-argument "pow()" and the binary power operator.
+No whitespace is allowed *within* each token. In particular, the "j"
+suffix, may not be separated from the number before it.
+
+The number before the "j" has the same syntax as a floating-point
+literal. Thus, the following are valid imaginary literals:
+
+ 4.2j
+ 3.14j
+ 10.j
+ .001j
+ 1e100j
+ 3.14e-10j
+ 3.14_15_93j
+
+Unlike in a floating-point literal the decimal point can be omitted if
+the imaginary number only has an integer part. The number is still
+evaluated as a floating-point number, not an integer:
+
+ 10j
+ 0j
+ 1000000000000000000000000j # equivalent to 1e+24j
+
+The "j" suffix is case-insensitive. That means you can use "J"
+instead:
+
+ 3.14J # equivalent to 3.14j
+
+Formally, imaginary literals are described by the following lexical
+definition:
+
+ imagnumber: (floatnumber | digitpart) ("j" | "J")
+''',
+ 'numeric-types': r'''Emulating numeric types
+***********************
+
+The following methods can be defined to emulate numeric objects.
+Methods corresponding to operations that are not supported by the
+particular kind of number implemented (e.g., bitwise operations for
+non-integral numbers) should be left undefined.
+
+object.__add__(self, other)
+object.__sub__(self, other)
+object.__mul__(self, other)
+object.__matmul__(self, other)
+object.__truediv__(self, other)
+object.__floordiv__(self, other)
+object.__mod__(self, other)
+object.__divmod__(self, other)
+object.__pow__(self, other[, modulo])
+object.__lshift__(self, other)
+object.__rshift__(self, other)
+object.__and__(self, other)
+object.__xor__(self, other)
+object.__or__(self, other)
+
+ These methods are called to implement the binary arithmetic
+ operations ("+", "-", "*", "@", "/", "//", "%", "divmod()",
+ "pow()", "**", "<<", ">>", "&", "^", "|"). For instance, to
+ evaluate the expression "x + y", where *x* is an instance of a
+ class that has an "__add__()" method, "type(x).__add__(x, y)" is
+ called. The "__divmod__()" method should be the equivalent to
+ using "__floordiv__()" and "__mod__()"; it should not be related to
+ "__truediv__()". Note that "__pow__()" should be defined to accept
+ an optional third argument if the three-argument version of the
+ built-in "pow()" function is to be supported.
+
+ If one of those methods does not support the operation with the
+ supplied arguments, it should return "NotImplemented".
+
+object.__radd__(self, other)
+object.__rsub__(self, other)
+object.__rmul__(self, other)
+object.__rmatmul__(self, other)
+object.__rtruediv__(self, other)
+object.__rfloordiv__(self, other)
+object.__rmod__(self, other)
+object.__rdivmod__(self, other)
+object.__rpow__(self, other[, modulo])
+object.__rlshift__(self, other)
+object.__rrshift__(self, other)
+object.__rand__(self, other)
+object.__rxor__(self, other)
+object.__ror__(self, other)
+
+ These methods are called to implement the binary arithmetic
+ operations ("+", "-", "*", "@", "/", "//", "%", "divmod()",
+ "pow()", "**", "<<", ">>", "&", "^", "|") with reflected (swapped)
+ operands. These functions are only called if the operands are of
+ different types, when the left operand does not support the
+ corresponding operation [3], or the right operand’s class is
+ derived from the left operand’s class. [4] For instance, to
+ evaluate the expression "x - y", where *y* is an instance of a
+ class that has an "__rsub__()" method, "type(y).__rsub__(y, x)" is
+ called if "type(x).__sub__(x, y)" returns "NotImplemented" or
+ "type(y)" is a subclass of "type(x)". [5]
+
+ Note that "__rpow__()" should be defined to accept an optional
+ third argument if the three-argument version of the built-in
+ "pow()" function is to be supported.
+
+ Changed in version 3.14: Three-argument "pow()" now try calling
+ "__rpow__()" if necessary. Previously it was only called in two-
+ argument "pow()" and the binary power operator.
Note:
The "collections.abc" module provides a "MutableMapping" *abstract
base class* to help create those methods from a base set of
"__getitem__()", "__setitem__()", "__delitem__()", and "keys()".
-Mutable sequences should provide methods "append()", "count()",
-"index()", "extend()", "insert()", "pop()", "remove()", "reverse()"
-and "sort()", like Python standard "list" objects. Finally, sequence
+
+Mutable sequences should provide methods "append()", "clear()",
+"count()", "extend()", "index()", "insert()", "pop()", "remove()", and
+"reverse()", like Python standard "list" objects. Finally, sequence
types should implement addition (meaning concatenation) and
multiplication (meaning repetition) by defining the methods
"__add__()", "__radd__()", "__iadd__()", "__mul__()", "__rmul__()" and
"__imul__()" described below; they should not define other numerical
-operators. It is recommended that both mappings and sequences
-implement the "__contains__()" method to allow efficient use of the
-"in" operator; for mappings, "in" should search the mapping’s keys;
-for sequences, it should search through the values. It is further
-recommended that both mappings and sequences implement the
-"__iter__()" method to allow efficient iteration through the
-container; for mappings, "__iter__()" should iterate through the
-object’s keys; for sequences, it should iterate through the values.
+operators.
+
+It is recommended that both mappings and sequences implement the
+"__contains__()" method to allow efficient use of the "in" operator;
+for mappings, "in" should search the mapping’s keys; for sequences, it
+should search through the values. It is further recommended that both
+mappings and sequences implement the "__iter__()" method to allow
+efficient iteration through the container; for mappings, "__iter__()"
+should iterate through the object’s keys; for sequences, it should
+iterate through the values.
object.__len__(self)
important that the emulation only be implemented to the degree that it
makes sense for the object being modelled. For example, some
sequences may work well with retrieval of individual elements, but
-extracting a slice may not make sense. (One example of this is the
-"NodeList" interface in the W3C’s Document Object Model.)
+extracting a slice may not make sense. (One example of this is the
+NodeList interface in the W3C’s Document Object Model.)
Basic customization
Customizing module attribute access
-----------------------------------
+module.__getattr__()
+module.__dir__()
+
Special names "__getattr__" and "__dir__" can be also used to
customize access to module attributes. The "__getattr__" function at
the module level should accept one argument which is the name of an
present, this function overrides the standard "dir()" search on a
module.
+module.__class__
+
For a more fine grained customization of the module behavior (setting
attributes, properties, etc.), one can set the "__class__" attribute
of a module object to a subclass of "types.ModuleType". For example:
The "collections.abc" module provides a "MutableMapping" *abstract
base class* to help create those methods from a base set of
"__getitem__()", "__setitem__()", "__delitem__()", and "keys()".
-Mutable sequences should provide methods "append()", "count()",
-"index()", "extend()", "insert()", "pop()", "remove()", "reverse()"
-and "sort()", like Python standard "list" objects. Finally, sequence
+
+Mutable sequences should provide methods "append()", "clear()",
+"count()", "extend()", "index()", "insert()", "pop()", "remove()", and
+"reverse()", like Python standard "list" objects. Finally, sequence
types should implement addition (meaning concatenation) and
multiplication (meaning repetition) by defining the methods
"__add__()", "__radd__()", "__iadd__()", "__mul__()", "__rmul__()" and
"__imul__()" described below; they should not define other numerical
-operators. It is recommended that both mappings and sequences
-implement the "__contains__()" method to allow efficient use of the
-"in" operator; for mappings, "in" should search the mapping’s keys;
-for sequences, it should search through the values. It is further
-recommended that both mappings and sequences implement the
-"__iter__()" method to allow efficient iteration through the
-container; for mappings, "__iter__()" should iterate through the
-object’s keys; for sequences, it should iterate through the values.
+operators.
+
+It is recommended that both mappings and sequences implement the
+"__contains__()" method to allow efficient use of the "in" operator;
+for mappings, "in" should search the mapping’s keys; for sequences, it
+should search through the values. It is further recommended that both
+mappings and sequences implement the "__iter__()" method to allow
+efficient iteration through the container; for mappings, "__iter__()"
+should iterate through the object’s keys; for sequences, it should
+iterate through the values.
object.__len__(self)
third argument if the three-argument version of the built-in
"pow()" function is to be supported.
- Changed in version 3.14.0a7 (unreleased): Three-argument "pow()"
- now try calling "__rpow__()" if necessary. Previously it was only
- called in two-argument "pow()" and the binary power operator.
+ Changed in version 3.14: Three-argument "pow()" now try calling
+ "__rpow__()" if necessary. Previously it was only called in two-
+ argument "pow()" and the binary power operator.
Note:
Since it is already lowercase, "lower()" would do nothing to "'ß'";
"casefold()" converts it to ""ss"".
- The casefolding algorithm is described in section 3.13 ‘Default
+ The casefolding algorithm is described in section 3.13.3 ‘Default
Case Folding’ of the Unicode Standard.
Added in version 3.3.
-str.center(width[, fillchar])
+str.center(width, fillchar=' ', /)
Return centered in a string of length *width*. Padding is done
using the specified *fillchar* (default is an ASCII space). The
original string is returned if *width* is less than or equal to
- "len(s)".
+ "len(s)". For example:
+
+ >>> 'Python'.center(10)
+ ' Python '
+ >>> 'Python'.center(10, '-')
+ '--Python--'
+ >>> 'Python'.center(4)
+ 'Python'
str.count(sub[, start[, end]])
*end* are interpreted as in slice notation.
If *sub* is empty, returns the number of empty strings between
- characters which is the length of the string plus one.
+ characters which is the length of the string plus one. For example:
+
+ >>> 'spam, spam, spam'.count('spam')
+ 3
+ >>> 'spam, spam, spam'.count('spam', 5)
+ 2
+ >>> 'spam, spam, spam'.count('spam', 5, 10)
+ 1
+ >>> 'spam, spam, spam'.count('eggs')
+ 0
+ >>> 'spam, spam, spam'.count('')
+ 17
str.encode(encoding='utf-8', errors='strict')
For performance reasons, the value of *errors* is not checked for
validity unless an encoding error actually occurs, Python
- Development Mode is enabled or a debug build is used.
+ Development Mode is enabled or a debug build is used. For example:
+
+ >>> encoded_str_to_bytes = 'Python'.encode()
+ >>> type(encoded_str_to_bytes)
+ <class 'bytes'>
+ >>> encoded_str_to_bytes
+ b'Python'
Changed in version 3.1: Added support for keyword arguments.
otherwise return "False". *suffix* can also be a tuple of suffixes
to look for. With optional *start*, test beginning at that
position. With optional *end*, stop comparing at that position.
+ Using *start* and *end* is equivalent to
+ "str[start:end].endswith(suffix)". For example:
+
+ >>> 'Python'.endswith('on')
+ True
+ >>> 'a tuple of suffixes'.endswith(('at', 'in'))
+ False
+ >>> 'a tuple of suffixes'.endswith(('at', 'es'))
+ True
+ >>> 'Python is amazing'.endswith('is', 0, 9)
+ True
+
+ See also "startswith()" and "removesuffix()".
str.expandtabs(tabsize=8)
("\n") or return ("\r"), it is copied and the current column is
reset to zero. Any other character is copied unchanged and the
current column is incremented by one regardless of how the
- character is represented when printed.
+ character is represented when printed. For example:
- >>> '01\t012\t0123\t01234'.expandtabs()
- '01 012 0123 01234'
- >>> '01\t012\t0123\t01234'.expandtabs(4)
- '01 012 0123 01234'
+ >>> '01\t012\t0123\t01234'.expandtabs()
+ '01 012 0123 01234'
+ >>> '01\t012\t0123\t01234'.expandtabs(4)
+ '01 012 0123 01234'
+ >>> print('01\t012\n0123\t01234'.expandtabs(4))
+ 01 012
+ 0123 01234
str.find(sub[, start[, end]])
Return the lowest index in the string where substring *sub* is
found within the slice "s[start:end]". Optional arguments *start*
and *end* are interpreted as in slice notation. Return "-1" if
- *sub* is not found.
+ *sub* is not found. For example:
+
+ >>> 'spam, spam, spam'.find('sp')
+ 0
+ >>> 'spam, spam, spam'.find('sp', 5)
+ 6
+
+ See also "rfind()" and "index()".
Note:
str.isidentifier()
Return "True" if the string is a valid identifier according to the
- language definition, section Identifiers and keywords.
+ language definition, section Names (identifiers and keywords).
"keyword.iskeyword()" can be used to test whether string "s" is a
reserved identifier, such as "def" and "class".
str.isprintable()
- Return true if all characters in the string are printable, false if
- it contains at least one non-printable character.
+ Return "True" if all characters in the string are printable,
+ "False" if it contains at least one non-printable character.
Here “printable” means the character is suitable for "repr()" to
use in its output; “non-printable” means that "repr()" on built-in
>>> ' '.isupper()
False
-str.join(iterable)
+str.join(iterable, /)
Return a string which is the concatenation of the strings in
*iterable*. A "TypeError" will be raised if there are any non-
string values in *iterable*, including "bytes" objects. The
separator between elements is the string providing this method.
-str.ljust(width[, fillchar])
+str.ljust(width, fillchar=' ', /)
Return the string left justified in a string of length *width*.
Padding is done using the specified *fillchar* (default is an ASCII
Return a copy of the string with all the cased characters [4]
converted to lowercase.
- The lowercasing algorithm used is described in section 3.13
- ‘Default Case Folding’ of the Unicode Standard.
+ The lowercasing algorithm used is described in section 3.13.2
+ ‘Default Case Conversion’ of the Unicode Standard.
-str.lstrip([chars])
+str.lstrip(chars=None, /)
Return a copy of the string with leading characters removed. The
*chars* argument is a string specifying the set of characters to be
>>> 'Arthur: three!'.removeprefix('Arthur: ')
'three!'
-static str.maketrans(x[, y[, z]])
+static str.maketrans(dict, /)
+static str.maketrans(from, to, remove='', /)
This static method returns a translation table usable for
"str.translate()".
Character keys will then be converted to ordinals.
If there are two arguments, they must be strings of equal length,
- and in the resulting dictionary, each character in x will be mapped
- to the character at the same position in y. If there is a third
- argument, it must be a string, whose characters will be mapped to
- "None" in the result.
+ and in the resulting dictionary, each character in *from* will be
+ mapped to the character at the same position in *to*. If there is
+ a third argument, it must be a string, whose characters will be
+ mapped to "None" in the result.
-str.partition(sep)
+str.partition(sep, /)
Split the string at the first occurrence of *sep*, and return a
3-tuple containing the part before the separator, the separator
Added in version 3.9.
-str.replace(old, new, count=-1)
+str.replace(old, new, /, count=-1)
Return a copy of the string with all occurrences of substring *old*
replaced by *new*. If *count* is given, only the first *count*
Like "rfind()" but raises "ValueError" when the substring *sub* is
not found.
-str.rjust(width[, fillchar])
+str.rjust(width, fillchar=' ', /)
Return the string right justified in a string of length *width*.
Padding is done using the specified *fillchar* (default is an ASCII
space). The original string is returned if *width* is less than or
equal to "len(s)".
-str.rpartition(sep)
+str.rpartition(sep, /)
Split the string at the last occurrence of *sep*, and return a
3-tuple containing the part before the separator, the separator
from the right, "rsplit()" behaves like "split()" which is
described in detail below.
-str.rstrip([chars])
+str.rstrip(chars=None, /)
Return a copy of the string with trailing characters removed. The
*chars* argument is a string specifying the set of characters to be
>>> ' 1 2 3 '.split()
['1', '2', '3']
+ If *sep* is not specified or is "None" and *maxsplit* is "0", only
+ leading runs of consecutive whitespace are considered.
+
+ For example:
+
+ >>> "".split(None, 0)
+ []
+ >>> " ".split(None, 0)
+ []
+ >>> " foo ".split(maxsplit=0)
+ ['foo ']
+
str.splitlines(keepends=False)
Return a list of the lines in the string, breaking at line
With optional *start*, test string beginning at that position.
With optional *end*, stop comparing string at that position.
-str.strip([chars])
+str.strip(chars=None, /)
Return a copy of the string with the leading and trailing
characters removed. The *chars* argument is a string specifying the
>>> titlecase("they're bill's friends.")
"They're Bill's Friends."
-str.translate(table)
+str.translate(table, /)
Return a copy of the string in which each character has been mapped
through the given translation table. The table must be an object
category of the resulting character(s) is not “Lu” (Letter,
uppercase), but e.g. “Lt” (Letter, titlecase).
- The uppercasing algorithm used is described in section 3.13
- ‘Default Case Folding’ of the Unicode Standard.
+ The uppercasing algorithm used is described in section 3.13.2
+ ‘Default Case Conversion’ of the Unicode Standard.
-str.zfill(width)
+str.zfill(width, /)
Return a copy of the string left filled with ASCII "'0'" digits to
make a string of length *width*. A leading sign prefix
'strings': '''String and Bytes literals
*************************
-String literals are described by the following lexical definitions:
-
- stringliteral: [stringprefix](shortstring | longstring)
- stringprefix: "r" | "u" | "R" | "U" | "f" | "F"
- | "fr" | "Fr" | "fR" | "FR" | "rf" | "rF" | "Rf" | "RF"
- shortstring: "'" shortstringitem* "'" | '"' shortstringitem* '"'
- longstring: "\'\'\'" longstringitem* "\'\'\'" | '"""' longstringitem* '"""'
- shortstringitem: shortstringchar | stringescapeseq
- longstringitem: longstringchar | stringescapeseq
- shortstringchar: <any source character except "\\" or newline or the quote>
- longstringchar: <any source character except "\\">
- stringescapeseq: "\\" <any source character>
-
- bytesliteral: bytesprefix(shortbytes | longbytes)
- bytesprefix: "b" | "B" | "br" | "Br" | "bR" | "BR" | "rb" | "rB" | "Rb" | "RB"
- shortbytes: "'" shortbytesitem* "'" | '"' shortbytesitem* '"'
- longbytes: "\'\'\'" longbytesitem* "\'\'\'" | '"""' longbytesitem* '"""'
- shortbytesitem: shortbyteschar | bytesescapeseq
- longbytesitem: longbyteschar | bytesescapeseq
- shortbyteschar: <any ASCII character except "\\" or newline or the quote>
- longbyteschar: <any ASCII character except "\\">
- bytesescapeseq: "\\" <any ASCII character>
-
-One syntactic restriction not indicated by these productions is that
-whitespace is not allowed between the "stringprefix" or "bytesprefix"
-and the rest of the literal. The source character set is defined by
-the encoding declaration; it is UTF-8 if no encoding declaration is
-given in the source file; see section Encoding declarations.
-
-In plain English: Both types of literals can be enclosed in matching
-single quotes ("'") or double quotes ("""). They can also be enclosed
-in matching groups of three single or double quotes (these are
-generally referred to as *triple-quoted strings*). The backslash ("\\")
-character is used to give special meaning to otherwise ordinary
-characters like "n", which means ‘newline’ when escaped ("\\n"). It can
-also be used to escape characters that otherwise have a special
-meaning, such as newline, backslash itself, or the quote character.
-See escape sequences below for examples.
-
-Bytes literals are always prefixed with "'b'" or "'B'"; they produce
-an instance of the "bytes" type instead of the "str" type. They may
-only contain ASCII characters; bytes with a numeric value of 128 or
-greater must be expressed with escapes.
+String literals are text enclosed in single quotes ("'") or double
+quotes ("""). For example:
-Both string and bytes literals may optionally be prefixed with a
-letter "'r'" or "'R'"; such constructs are called *raw string
-literals* and *raw bytes literals* respectively and treat backslashes
-as literal characters. As a result, in raw string literals, "'\\U'"
-and "'\\u'" escapes are not treated specially.
+ "spam"
+ 'eggs'
+
+The quote used to start the literal also terminates it, so a string
+literal can only contain the other quote (except with escape
+sequences, see below). For example:
+
+ 'Say "Hello", please.'
+ "Don't do that!"
+
+Except for this limitation, the choice of quote character ("'" or """)
+does not affect how the literal is parsed.
+
+Inside a string literal, the backslash ("\\") character introduces an
+*escape sequence*, which has special meaning depending on the
+character after the backslash. For example, "\\"" denotes the double
+quote character, and does *not* end the string:
+
+ >>> print("Say \\"Hello\\" to everyone!")
+ Say "Hello" to everyone!
+
+See escape sequences below for a full list of such sequences, and more
+details.
+
+
+Triple-quoted strings
+=====================
+
+Strings can also be enclosed in matching groups of three single or
+double quotes. These are generally referred to as *triple-quoted
+strings*:
+
+ """This is a triple-quoted string."""
+
+In triple-quoted literals, unescaped quotes are allowed (and are
+retained), except that three unescaped quotes in a row terminate the
+literal, if they are of the same kind ("'" or """) used at the start:
+
+ """This string has "quotes" inside."""
+
+Unescaped newlines are also allowed and retained:
+
+ \'\'\'This triple-quoted string
+ continues on the next line.\'\'\'
+
+
+String prefixes
+===============
+
+String literals can have an optional *prefix* that influences how the
+content of the literal is parsed, for example:
+
+ b"data"
+ f'{result=}'
+
+The allowed prefixes are:
+
+* "b": Bytes literal
+
+* "r": Raw string
+
+* "f": Formatted string literal (“f-string”)
+
+* "t": Template string literal (“t-string”)
+
+* "u": No effect (allowed for backwards compatibility)
+
+See the linked sections for details on each type.
+
+Prefixes are case-insensitive (for example, ‘"B"’ works the same as
+‘"b"’). The ‘"r"’ prefix can be combined with ‘"f"’, ‘"t"’ or ‘"b"’,
+so ‘"fr"’, ‘"rf"’, ‘"tr"’, ‘"rt"’, ‘"br"’, and ‘"rb"’ are also valid
+prefixes.
Added in version 3.3: The "'rb'" prefix of raw bytes literals has been
added as a synonym of "'br'".Support for the unicode legacy literal
("u'value'") was reintroduced to simplify the maintenance of dual
Python 2.x and 3.x codebases. See **PEP 414** for more information.
-A string literal with "'f'" or "'F'" in its prefix is a *formatted
-string literal*; see f-strings. The "'f'" may be combined with "'r'",
-but not with "'b'" or "'u'", therefore raw formatted strings are
-possible, but formatted bytes literals are not.
-In triple-quoted literals, unescaped newlines and quotes are allowed
-(and are retained), except that three unescaped quotes in a row
-terminate the literal. (A “quote” is the character used to open the
-literal, i.e. either "'" or """.)
+Formal grammar
+==============
+
+String literals, except “f-strings” and “t-strings”, are described by
+the following lexical definitions.
+
+These definitions use negative lookaheads ("!") to indicate that an
+ending quote ends the literal.
+
+ STRING: [stringprefix] (stringcontent)
+ stringprefix: <("r" | "u" | "b" | "br" | "rb"), case-insensitive>
+ stringcontent:
+ | "\'\'\'" ( !"\'\'\'" longstringitem)* "\'\'\'"
+ | '"""' ( !'"""' longstringitem)* '"""'
+ | "'" ( !"'" stringitem)* "'"
+ | '"' ( !'"' stringitem)* '"'
+ stringitem: stringchar | stringescapeseq
+ stringchar: <any source_character, except backslash and newline>
+ longstringitem: stringitem | newline
+ stringescapeseq: "\\" <any source_character>
+
+Note that as in all lexical definitions, whitespace is significant. In
+particular, the prefix (if any) must be immediately followed by the
+starting quote.
Escape sequences
================
-Unless an "'r'" or "'R'" prefix is present, escape sequences in string
+Unless an ‘"r"’ or ‘"R"’ prefix is present, escape sequences in string
and bytes literals are interpreted according to rules similar to those
used by Standard C. The recognized escape sequences are:
-+---------------------------+-----------------------------------+---------+
-| Escape Sequence | Meaning | Notes |
-|===========================|===================================|=========|
-| "\\"<newline> | Backslash and newline ignored | (1) |
-+---------------------------+-----------------------------------+---------+
-| "\\\\" | Backslash ("\\") | |
-+---------------------------+-----------------------------------+---------+
-| "\\'" | Single quote ("'") | |
-+---------------------------+-----------------------------------+---------+
-| "\\"" | Double quote (""") | |
-+---------------------------+-----------------------------------+---------+
-| "\\a" | ASCII Bell (BEL) | |
-+---------------------------+-----------------------------------+---------+
-| "\\b" | ASCII Backspace (BS) | |
-+---------------------------+-----------------------------------+---------+
-| "\\f" | ASCII Formfeed (FF) | |
-+---------------------------+-----------------------------------+---------+
-| "\\n" | ASCII Linefeed (LF) | |
-+---------------------------+-----------------------------------+---------+
-| "\\r" | ASCII Carriage Return (CR) | |
-+---------------------------+-----------------------------------+---------+
-| "\\t" | ASCII Horizontal Tab (TAB) | |
-+---------------------------+-----------------------------------+---------+
-| "\\v" | ASCII Vertical Tab (VT) | |
-+---------------------------+-----------------------------------+---------+
-| "\\*ooo*" | Character with octal value *ooo* | (2,4) |
-+---------------------------+-----------------------------------+---------+
-| "\\x*hh*" | Character with hex value *hh* | (3,4) |
-+---------------------------+-----------------------------------+---------+
-
-Escape sequences only recognized in string literals are:
-
-+---------------------------+-----------------------------------+---------+
-| Escape Sequence | Meaning | Notes |
-|===========================|===================================|=========|
-| "\\N{*name*}" | Character named *name* in the | (5) |
-| | Unicode database | |
-+---------------------------+-----------------------------------+---------+
-| "\\u*xxxx*" | Character with 16-bit hex value | (6) |
-| | *xxxx* | |
-+---------------------------+-----------------------------------+---------+
-| "\\U*xxxxxxxx*" | Character with 32-bit hex value | (7) |
-| | *xxxxxxxx* | |
-+---------------------------+-----------------------------------+---------+
++----------------------------------------------------+----------------------------------------------------+
+| Escape Sequence | Meaning |
+|====================================================|====================================================|
+| "\\"<newline> | Ignored end of line |
++----------------------------------------------------+----------------------------------------------------+
+| "\\\\" | Backslash |
++----------------------------------------------------+----------------------------------------------------+
+| "\\'" | Single quote |
++----------------------------------------------------+----------------------------------------------------+
+| "\\"" | Double quote |
++----------------------------------------------------+----------------------------------------------------+
+| "\\a" | ASCII Bell (BEL) |
++----------------------------------------------------+----------------------------------------------------+
+| "\\b" | ASCII Backspace (BS) |
++----------------------------------------------------+----------------------------------------------------+
+| "\\f" | ASCII Formfeed (FF) |
++----------------------------------------------------+----------------------------------------------------+
+| "\\n" | ASCII Linefeed (LF) |
++----------------------------------------------------+----------------------------------------------------+
+| "\\r" | ASCII Carriage Return (CR) |
++----------------------------------------------------+----------------------------------------------------+
+| "\\t" | ASCII Horizontal Tab (TAB) |
++----------------------------------------------------+----------------------------------------------------+
+| "\\v" | ASCII Vertical Tab (VT) |
++----------------------------------------------------+----------------------------------------------------+
+| "\\*ooo*" | Octal character |
++----------------------------------------------------+----------------------------------------------------+
+| "\\x*hh*" | Hexadecimal character |
++----------------------------------------------------+----------------------------------------------------+
+| "\\N{*name*}" | Named Unicode character |
++----------------------------------------------------+----------------------------------------------------+
+| "\\u*xxxx*" | Hexadecimal Unicode character |
++----------------------------------------------------+----------------------------------------------------+
+| "\\U*xxxxxxxx*" | Hexadecimal Unicode character |
++----------------------------------------------------+----------------------------------------------------+
-Notes:
-1. A backslash can be added at the end of a line to ignore the
- newline:
+Ignored end of line
+-------------------
+
+A backslash can be added at the end of a line to ignore the newline:
+
+ >>> 'This string will not include \\
+ ... backslashes or newline characters.'
+ 'This string will not include backslashes or newline characters.'
+
+The same result can be achieved using triple-quoted strings, or
+parentheses and string literal concatenation.
+
+
+Escaped characters
+------------------
+
+To include a backslash in a non-raw Python string literal, it must be
+doubled. The "\\\\" escape sequence denotes a single backslash
+character:
+
+ >>> print('C:\\\\Program Files')
+ C:\\Program Files
+
+Similarly, the "\\'" and "\\"" sequences denote the single and double
+quote character, respectively:
+
+ >>> print('\\' and \\"')
+ ' and "
- >>> 'This string will not include \\
- ... backslashes or newline characters.'
- 'This string will not include backslashes or newline characters.'
- The same result can be achieved using triple-quoted strings, or
- parentheses and string literal concatenation.
+Octal character
+---------------
+
+The sequence "\\*ooo*" denotes a *character* with the octal (base 8)
+value *ooo*:
+
+ >>> '\\120'
+ 'P'
+
+Up to three octal digits (0 through 7) are accepted.
-2. As in Standard C, up to three octal digits are accepted.
+In a bytes literal, *character* means a *byte* with the given value.
+In a string literal, it means a Unicode character with the given
+value.
- Changed in version 3.11: Octal escapes with value larger than
- "0o377" produce a "DeprecationWarning".
+Changed in version 3.11: Octal escapes with value larger than "0o377"
+(255) produce a "DeprecationWarning".
- Changed in version 3.12: Octal escapes with value larger than
- "0o377" produce a "SyntaxWarning". In a future Python version they
- will be eventually a "SyntaxError".
+Changed in version 3.12: Octal escapes with value larger than "0o377"
+(255) produce a "SyntaxWarning". In a future Python version they will
+raise a "SyntaxError".
+
+
+Hexadecimal character
+---------------------
-3. Unlike in Standard C, exactly two hex digits are required.
+The sequence "\\x*hh*" denotes a *character* with the hex (base 16)
+value *hh*:
+
+ >>> '\\x50'
+ 'P'
+
+Unlike in Standard C, exactly two hex digits are required.
+
+In a bytes literal, *character* means a *byte* with the given value.
+In a string literal, it means a Unicode character with the given
+value.
+
+
+Named Unicode character
+-----------------------
-4. In a bytes literal, hexadecimal and octal escapes denote the byte
- with the given value. In a string literal, these escapes denote a
- Unicode character with the given value.
+The sequence "\\N{*name*}" denotes a Unicode character with the given
+*name*:
-5. Changed in version 3.3: Support for name aliases [1] has been
- added.
+ >>> '\\N{LATIN CAPITAL LETTER P}'
+ 'P'
+ >>> '\\N{SNAKE}'
+ '🐍'
-6. Exactly four hex digits are required.
+This sequence cannot appear in bytes literals.
-7. Any Unicode character can be encoded this way. Exactly eight hex
- digits are required.
+Changed in version 3.3: Support for name aliases has been added.
-Unlike Standard C, all unrecognized escape sequences are left in the
-string unchanged, i.e., *the backslash is left in the result*. (This
-behavior is useful when debugging: if an escape sequence is mistyped,
-the resulting output is more easily recognized as broken.) It is also
-important to note that the escape sequences only recognized in string
-literals fall into the category of unrecognized escapes for bytes
-literals.
+
+Hexadecimal Unicode characters
+------------------------------
+
+These sequences "\\u*xxxx*" and "\\U*xxxxxxxx*" denote the Unicode
+character with the given hex (base 16) value. Exactly four digits are
+required for "\\u"; exactly eight digits are required for "\\U". The
+latter can encode any Unicode character.
+
+ >>> '\\u1234'
+ 'ሴ'
+ >>> '\\U0001f40d'
+ '🐍'
+
+These sequences cannot appear in bytes literals.
+
+
+Unrecognized escape sequences
+-----------------------------
+
+Unlike in Standard C, all unrecognized escape sequences are left in
+the string unchanged, that is, *the backslash is left in the result*:
+
+ >>> print('\\q')
+ \\q
+ >>> list('\\q')
+ ['\\\\', 'q']
+
+Note that for bytes literals, the escape sequences only recognized in
+string literals ("\\N...", "\\u...", "\\U...") fall into the category of
+unrecognized escapes.
Changed in version 3.6: Unrecognized escape sequences produce a
"DeprecationWarning".
Changed in version 3.12: Unrecognized escape sequences produce a
-"SyntaxWarning". In a future Python version they will be eventually a
+"SyntaxWarning". In a future Python version they will raise a
"SyntaxError".
+
+Bytes literals
+==============
+
+*Bytes literals* are always prefixed with ‘"b"’ or ‘"B"’; they produce
+an instance of the "bytes" type instead of the "str" type. They may
+only contain ASCII characters; bytes with a numeric value of 128 or
+greater must be expressed with escape sequences (typically Hexadecimal
+character or Octal character):
+
+ >>> b'\\x89PNG\\r\\n\\x1a\\n'
+ b'\\x89PNG\\r\\n\\x1a\\n'
+ >>> list(b'\\x89PNG\\r\\n\\x1a\\n')
+ [137, 80, 78, 71, 13, 10, 26, 10]
+
+Similarly, a zero byte must be expressed using an escape sequence
+(typically "\\0" or "\\x00").
+
+
+Raw string literals
+===================
+
+Both string and bytes literals may optionally be prefixed with a
+letter ‘"r"’ or ‘"R"’; such constructs are called *raw string
+literals* and *raw bytes literals* respectively and treat backslashes
+as literal characters. As a result, in raw string literals, escape
+sequences are not treated specially:
+
+ >>> r'\\d{4}-\\d{2}-\\d{2}'
+ '\\\\d{4}-\\\\d{2}-\\\\d{2}'
+
Even in a raw literal, quotes can be escaped with a backslash, but the
backslash remains in the result; for example, "r"\\""" is a valid
string literal consisting of two characters: a backslash and a double
the following quote character). Note also that a single backslash
followed by a newline is interpreted as those two characters as part
of the literal, *not* as a line continuation.
+
+
+f-strings
+=========
+
+Added in version 3.6.
+
+A *formatted string literal* or *f-string* is a string literal that is
+prefixed with ‘"f"’ or ‘"F"’. These strings may contain replacement
+fields, which are expressions delimited by curly braces "{}". While
+other string literals always have a constant value, formatted strings
+are really expressions evaluated at run time.
+
+Escape sequences are decoded like in ordinary string literals (except
+when a literal is also marked as a raw string). After decoding, the
+grammar for the contents of the string is:
+
+ f_string: (literal_char | "{{" | "}}" | replacement_field)*
+ replacement_field: "{" f_expression ["="] ["!" conversion] [":" format_spec] "}"
+ f_expression: (conditional_expression | "*" or_expr)
+ ("," conditional_expression | "," "*" or_expr)* [","]
+ | yield_expression
+ conversion: "s" | "r" | "a"
+ format_spec: (literal_char | replacement_field)*
+ literal_char: <any code point except "{", "}" or NULL>
+
+The parts of the string outside curly braces are treated literally,
+except that any doubled curly braces "'{{'" or "'}}'" are replaced
+with the corresponding single curly brace. A single opening curly
+bracket "'{'" marks a replacement field, which starts with a Python
+expression. To display both the expression text and its value after
+evaluation, (useful in debugging), an equal sign "'='" may be added
+after the expression. A conversion field, introduced by an exclamation
+point "'!'" may follow. A format specifier may also be appended,
+introduced by a colon "':'". A replacement field ends with a closing
+curly bracket "'}'".
+
+Expressions in formatted string literals are treated like regular
+Python expressions surrounded by parentheses, with a few exceptions.
+An empty expression is not allowed, and both "lambda" and assignment
+expressions ":=" must be surrounded by explicit parentheses. Each
+expression is evaluated in the context where the formatted string
+literal appears, in order from left to right. Replacement expressions
+can contain newlines in both single-quoted and triple-quoted f-strings
+and they can contain comments. Everything that comes after a "#"
+inside a replacement field is a comment (even closing braces and
+quotes). In that case, replacement fields must be closed in a
+different line.
+
+ >>> f"abc{a # This is a comment }"
+ ... + 3}"
+ 'abc5'
+
+Changed in version 3.7: Prior to Python 3.7, an "await" expression and
+comprehensions containing an "async for" clause were illegal in the
+expressions in formatted string literals due to a problem with the
+implementation.
+
+Changed in version 3.12: Prior to Python 3.12, comments were not
+allowed inside f-string replacement fields.
+
+When the equal sign "'='" is provided, the output will have the
+expression text, the "'='" and the evaluated value. Spaces after the
+opening brace "'{'", within the expression and after the "'='" are all
+retained in the output. By default, the "'='" causes the "repr()" of
+the expression to be provided, unless there is a format specified.
+When a format is specified it defaults to the "str()" of the
+expression unless a conversion "'!r'" is declared.
+
+Added in version 3.8: The equal sign "'='".
+
+If a conversion is specified, the result of evaluating the expression
+is converted before formatting. Conversion "'!s'" calls "str()" on
+the result, "'!r'" calls "repr()", and "'!a'" calls "ascii()".
+
+The result is then formatted using the "format()" protocol. The
+format specifier is passed to the "__format__()" method of the
+expression or conversion result. An empty string is passed when the
+format specifier is omitted. The formatted result is then included in
+the final value of the whole string.
+
+Top-level format specifiers may include nested replacement fields.
+These nested fields may include their own conversion fields and format
+specifiers, but may not include more deeply nested replacement fields.
+The format specifier mini-language is the same as that used by the
+"str.format()" method.
+
+Formatted string literals may be concatenated, but replacement fields
+cannot be split across literals.
+
+Some examples of formatted string literals:
+
+ >>> name = "Fred"
+ >>> f"He said his name is {name!r}."
+ "He said his name is 'Fred'."
+ >>> f"He said his name is {repr(name)}." # repr() is equivalent to !r
+ "He said his name is 'Fred'."
+ >>> width = 10
+ >>> precision = 4
+ >>> value = decimal.Decimal("12.34567")
+ >>> f"result: {value:{width}.{precision}}" # nested fields
+ 'result: 12.35'
+ >>> today = datetime(year=2017, month=1, day=27)
+ >>> f"{today:%B %d, %Y}" # using date format specifier
+ 'January 27, 2017'
+ >>> f"{today=:%B %d, %Y}" # using date format specifier and debugging
+ 'today=January 27, 2017'
+ >>> number = 1024
+ >>> f"{number:#0x}" # using integer format specifier
+ '0x400'
+ >>> foo = "bar"
+ >>> f"{ foo = }" # preserves whitespace
+ " foo = 'bar'"
+ >>> line = "The mill's closed"
+ >>> f"{line = }"
+ 'line = "The mill\\'s closed"'
+ >>> f"{line = :20}"
+ "line = The mill's closed "
+ >>> f"{line = !r:20}"
+ 'line = "The mill\\'s closed" '
+
+Reusing the outer f-string quoting type inside a replacement field is
+permitted:
+
+ >>> a = dict(x=2)
+ >>> f"abc {a["x"]} def"
+ 'abc 2 def'
+
+Changed in version 3.12: Prior to Python 3.12, reuse of the same
+quoting type of the outer f-string inside a replacement field was not
+possible.
+
+Backslashes are also allowed in replacement fields and are evaluated
+the same way as in any other context:
+
+ >>> a = ["a", "b", "c"]
+ >>> print(f"List a contains:\\n{"\\n".join(a)}")
+ List a contains:
+ a
+ b
+ c
+
+Changed in version 3.12: Prior to Python 3.12, backslashes were not
+permitted inside an f-string replacement field.
+
+Formatted string literals cannot be used as docstrings, even if they
+do not include expressions.
+
+ >>> def foo():
+ ... f"Not a docstring"
+ ...
+ >>> foo.__doc__ is None
+ True
+
+See also **PEP 498** for the proposal that added formatted string
+literals, and "str.format()", which uses a related format string
+mechanism.
+
+
+t-strings
+=========
+
+Added in version 3.14.
+
+A *template string literal* or *t-string* is a string literal that is
+prefixed with ‘"t"’ or ‘"T"’. These strings follow the same syntax and
+evaluation rules as formatted string literals, with the following
+differences:
+
+* Rather than evaluating to a "str" object, template string literals
+ evaluate to a "string.templatelib.Template" object.
+
+* The "format()" protocol is not used. Instead, the format specifier
+ and conversions (if any) are passed to a new "Interpolation" object
+ that is created for each evaluated expression. It is up to code that
+ processes the resulting "Template" object to decide how to handle
+ format specifiers and conversions.
+
+* Format specifiers containing nested replacement fields are evaluated
+ eagerly, prior to being passed to the "Interpolation" object. For
+ instance, an interpolation of the form "{amount:.{precision}f}" will
+ evaluate the inner expression "{precision}" to determine the value
+ of the "format_spec" attribute. If "precision" were to be "2", the
+ resulting format specifier would be "'.2f'".
+
+* When the equals sign "'='" is provided in an interpolation
+ expression, the text of the expression is appended to the literal
+ string that precedes the relevant interpolation. This includes the
+ equals sign and any surrounding whitespace. The "Interpolation"
+ instance for the expression will be created as normal, except that
+ "conversion" will be set to ‘"r"’ ("repr()") by default. If an
+ explicit conversion or format specifier are provided, this will
+ override the default behaviour.
''',
'subscriptions': r'''Subscriptions
*************
"except*" clause
================
-The "except*" clause(s) are used for handling "ExceptionGroup"s. The
-exception type for matching is interpreted as in the case of "except",
-but in the case of exception groups we can have partial matches when
-the type matches some of the exceptions in the group. This means that
-multiple "except*" clauses can execute, each handling part of the
-exception group. Each clause executes at most once and handles an
-exception group of all matching exceptions. Each exception in the
-group is handled by at most one "except*" clause, the first that
-matches it.
+The "except*" clause(s) specify one or more handlers for groups of
+exceptions ("BaseExceptionGroup" instances). A "try" statement can
+have either "except" or "except*" clauses, but not both. The exception
+type for matching is mandatory in the case of "except*", so "except*:"
+is a syntax error. The type is interpreted as in the case of "except",
+but matching is performed on the exceptions contained in the group
+that is being handled. An "TypeError" is raised if a matching type is
+a subclass of "BaseExceptionGroup", because that would have ambiguous
+semantics.
+
+When an exception group is raised in the try block, each "except*"
+clause splits (see "split()") it into the subgroups of matching and
+non-matching exceptions. If the matching subgroup is not empty, it
+becomes the handled exception (the value returned from
+"sys.exception()") and assigned to the target of the "except*" clause
+(if there is one). Then, the body of the "except*" clause executes. If
+the non-matching subgroup is not empty, it is processed by the next
+"except*" in the same manner. This continues until all exceptions in
+the group have been matched, or the last "except*" clause has run.
+
+After all "except*" clauses execute, the group of unhandled exceptions
+is merged with any exceptions that were raised or re-raised from
+within "except*" clauses. This merged exception group propagates on.:
>>> try:
... raise ExceptionGroup("eg",
caught <class 'ExceptionGroup'> with nested (TypeError(2),)
caught <class 'ExceptionGroup'> with nested (OSError(3), OSError(4))
+ Exception Group Traceback (most recent call last):
- | File "<stdin>", line 2, in <module>
- | ExceptionGroup: eg
+ | File "<doctest default[0]>", line 2, in <module>
+ | raise ExceptionGroup("eg",
+ | [ValueError(1), TypeError(2), OSError(3), OSError(4)])
+ | ExceptionGroup: eg (1 sub-exception)
+-+---------------- 1 ----------------
| ValueError: 1
+------------------------------------
-Any remaining exceptions that were not handled by any "except*" clause
-are re-raised at the end, along with all exceptions that were raised
-from within the "except*" clauses. If this list contains more than one
-exception to reraise, they are combined into an exception group.
-
-If the raised exception is not an exception group and its type matches
-one of the "except*" clauses, it is caught and wrapped by an exception
-group with an empty message string.
+If the exception raised from the "try" block is not an exception group
+and its type matches one of the "except*" clauses, it is caught and
+wrapped by an exception group with an empty message string. This
+ensures that the type of the target "e" is consistently
+"BaseExceptionGroup":
>>> try:
... raise BlockingIOError
...
ExceptionGroup('', (BlockingIOError()))
-An "except*" clause must have a matching expression; it cannot be
-"except*:". Furthermore, this expression cannot contain exception
-group types, because that would have ambiguous semantics.
-
-It is not possible to mix "except" and "except*" in the same "try".
"break", "continue" and "return" cannot appear in an "except*" clause.
================
If "finally" is present, it specifies a ‘cleanup’ handler. The "try"
-clause is executed, including any "except" and "else" clauses. If an
+clause is executed, including any "except" and "else" clauses. If an
exception occurs in any of the clauses and is not handled, the
exception is temporarily saved. The "finally" clause is executed. If
there is a saved exception it is re-raised at the end of the "finally"
-clause. If the "finally" clause raises another exception, the saved
+clause. If the "finally" clause raises another exception, the saved
exception is set as the context of the new exception. If the "finally"
clause executes a "return", "break" or "continue" statement, the saved
exception is discarded. For example, this function returns 42.
Sets
These represent a mutable set. They are created by the built-in
"set()" constructor and can be modified afterwards by several
- methods, such as "add()".
+ methods, such as "add".
Frozen sets
These represent an immutable set. They are created by the built-in
"ImportWarning" when falling back to "__package__" during import
resolution.
- Deprecated since version 3.13, will be removed in version 3.15:
+ Deprecated since version 3.13, removed in version 3.15:
"__package__" will cease to be set or taken into consideration by
the import system or standard library.
It is **strongly** recommended that you use
"module.__spec__.cached" instead of "module.__cached__".
- Deprecated since version 3.13, will be removed in version 3.15:
- Setting "__cached__" on a module while failing to set
- "__spec__.cached" is deprecated. In Python 3.15, "__cached__" will
- cease to be set or taken into consideration by the import system or
- standard library.
+ Deprecated since version 3.13, removed in version 3.15: Setting
+ "__cached__" on a module while failing to set "__spec__.cached" is
+ deprecated. In Python 3.15, "__cached__" will cease to be set or
+ taken into consideration by the import system or standard library.
Other writable attributes on module objects
| | collected during class body execution. See also: |
| | "__annotations__ attributes". For best practices |
| | on working with "__annotations__", please see |
-| | "annotationlib". Where possible, use |
+| | "annotationlib". Use |
| | "annotationlib.get_annotations()" instead of |
-| | accessing this attribute directly. Changed in |
-| | version 3.14: Annotations are now lazily |
-| | evaluated. See **PEP 649**. |
+| | accessing this attribute directly. Warning: |
+| | Accessing the "__annotations__" attribute directly |
+| | on a class object may return annotations for the |
+| | wrong class, specifically in certain cases where |
+| | the class, its base class, or a metaclass is |
+| | defined under "from __future__ import |
+| | annotations". See **749** for details.This |
+| | attribute does not exist on certain builtin |
+| | classes. On user-defined classes without |
+| | "__annotations__", it is an empty dictionary. |
+| | Changed in version 3.14: Annotations are now |
+| | lazily evaluated. See **PEP 649**. |
+----------------------------------------------------+----------------------------------------------------+
| type.__annotate__() | The *annotate function* for this class, or "None" |
| | if the class has no annotations. See also: |
| | (this is an index into the *bytecode* string of |
| | the code object) |
+----------------------------------------------------+----------------------------------------------------+
+| frame.f_generator | The *generator* or *coroutine* object that owns |
+| | this frame, or "None" if the frame is a normal |
+| | function. Added in version 3.14. |
++----------------------------------------------------+----------------------------------------------------+
Special writable attributes
dictionary entry.
class dict(**kwargs)
-class dict(mapping, **kwargs)
-class dict(iterable, **kwargs)
+class dict(mapping, /, **kwargs)
+class dict(iterable, /, **kwargs)
Return a new dictionary initialized from an optional positional
argument and a possibly empty set of keyword arguments.
the keyword argument replaces the value from the positional
argument.
- To illustrate, the following examples all return a dictionary equal
- to "{"one": 1, "two": 2, "three": 3}":
+ Providing keyword arguments as in the first example only works for
+ keys that are valid Python identifiers. Otherwise, any valid keys
+ can be used.
+
+ Dictionaries compare equal if and only if they have the same "(key,
+ value)" pairs (regardless of ordering). Order comparisons (‘<’,
+ ‘<=’, ‘>=’, ‘>’) raise "TypeError". To illustrate dictionary
+ creation and equality, the following examples all return a
+ dictionary equal to "{"one": 1, "two": 2, "three": 3}":
>>> a = dict(one=1, two=2, three=3)
>>> b = {'one': 1, 'two': 2, 'three': 3}
keys that are valid Python identifiers. Otherwise, any valid keys
can be used.
+ Dictionaries preserve insertion order. Note that updating a key
+ does not affect the order. Keys added after deletion are inserted
+ at the end.
+
+ >>> d = {"one": 1, "two": 2, "three": 3, "four": 4}
+ >>> d
+ {'one': 1, 'two': 2, 'three': 3, 'four': 4}
+ >>> list(d)
+ ['one', 'two', 'three', 'four']
+ >>> list(d.values())
+ [1, 2, 3, 4]
+ >>> d["one"] = 42
+ >>> d
+ {'one': 42, 'two': 2, 'three': 3, 'four': 4}
+ >>> del d["two"]
+ >>> d["two"] = None
+ >>> d
+ {'one': 42, 'three': 3, 'four': 4, 'two': None}
+
+ Changed in version 3.7: Dictionary order is guaranteed to be
+ insertion order. This behavior was an implementation detail of
+ CPython from 3.6.
+
These are the operations that dictionaries support (and therefore,
custom mapping types should support too):
1
The example above shows part of the implementation of
- "collections.Counter". A different "__missing__" method is used
- by "collections.defaultdict".
+ "collections.Counter". A different "__missing__()" method is
+ used by "collections.defaultdict".
d[key] = value
Return a new view of the dictionary’s keys. See the
documentation of view objects.
- pop(key[, default])
+ pop(key, /)
+ pop(key, default, /)
If *key* is in the dictionary, remove it and return its value,
else return *default*. If *default* is not given and *key* is
*key* with a value of *default* and return *default*. *default*
defaults to "None".
- update([other])
+ update(**kwargs)
+ update(mapping, /, **kwargs)
+ update(iterable, /, **kwargs)
- Update the dictionary with the key/value pairs from *other*,
- overwriting existing keys. Return "None".
+ Update the dictionary with the key/value pairs from *mapping* or
+ *iterable* and *kwargs*, overwriting existing keys. Return
+ "None".
"update()" accepts either another object with a "keys()" method
(in which case "__getitem__()" is called with every key returned
Added in version 3.9.
- Dictionaries compare equal if and only if they have the same "(key,
- value)" pairs (regardless of ordering). Order comparisons (‘<’,
- ‘<=’, ‘>=’, ‘>’) raise "TypeError".
-
- Dictionaries preserve insertion order. Note that updating a key
- does not affect the order. Keys added after deletion are inserted
- at the end.
-
- >>> d = {"one": 1, "two": 2, "three": 3, "four": 4}
- >>> d
- {'one': 1, 'two': 2, 'three': 3, 'four': 4}
- >>> list(d)
- ['one', 'two', 'three', 'four']
- >>> list(d.values())
- [1, 2, 3, 4]
- >>> d["one"] = 42
- >>> d
- {'one': 42, 'two': 2, 'three': 3, 'four': 4}
- >>> del d["two"]
- >>> d["two"] = None
- >>> d
- {'one': 42, 'three': 3, 'four': 4, 'two': None}
-
- Changed in version 3.7: Dictionary order is guaranteed to be
- insertion order. This behavior was an implementation detail of
- CPython from 3.6.
-
Dictionaries and dictionary views are reversible.
>>> d = {"one": 1, "two": 2, "three": 3, "four": 4}
| "s * n" or "n * s" | equivalent to adding *s* to | (2)(7) |
| | itself *n* times | |
+----------------------------+----------------------------------+------------+
-| "s[i]" | *i*th item of *s*, origin 0 | (3) |
+| "s[i]" | *i*th item of *s*, origin 0 | (3)(8) |
+----------------------------+----------------------------------+------------+
| "s[i:j]" | slice of *s* from *i* to *j* | (3)(4) |
+----------------------------+----------------------------------+------------+
+----------------------------+----------------------------------+------------+
| "max(s)" | largest item of *s* | |
+----------------------------+----------------------------------+------------+
-| "s.index(x[, i[, j]])" | index of the first occurrence of | (8) |
-| | *x* in *s* (at or after index | |
-| | *i* and before index *j*) | |
-+----------------------------+----------------------------------+------------+
-| "s.count(x)" | total number of occurrences of | |
-| | *x* in *s* | |
-+----------------------------+----------------------------------+------------+
Sequences of the same type also support comparisons. In particular,
tuples and lists are compared lexicographically by comparing
that follow specific patterns, and hence don’t support sequence
concatenation or repetition.
-8. "index" raises "ValueError" when *x* is not found in *s*. Not all
- implementations support passing the additional arguments *i* and
- *j*. These arguments allow efficient searching of subsections of
- the sequence. Passing the extra arguments is roughly equivalent to
- using "s[i:j].index(x)", only without copying any data and with the
- returned index being relative to the start of the sequence rather
- than the start of the slice.
+8. An "IndexError" is raised if *i* is outside the sequence range.
+
+-[ Sequence Methods ]-
+
+Sequence types also support the following methods:
+
+sequence.count(value, /)
+
+ Return the total number of occurrences of *value* in *sequence*.
+
+sequence.index(value[, start[, stop])
+
+ Return the index of the first occurrence of *value* in *sequence*.
+
+ Raises "ValueError" if *value* is not found in *sequence*.
+
+ The *start* or *stop* arguments allow for efficient searching of
+ subsections of the sequence, beginning at *start* and ending at
+ *stop*. This is roughly equivalent to "start +
+ sequence[start:stop].index(value)", only without copying any data.
+
+ Caution:
+
+ Not all sequence types support passing the *start* and *stop*
+ arguments.
Immutable Sequence Types
| "s[i] = x" | item *i* of *s* is replaced by | |
| | *x* | |
+--------------------------------+----------------------------------+-----------------------+
+| "del s[i]" | removes item *i* of *s* | |
++--------------------------------+----------------------------------+-----------------------+
| "s[i:j] = t" | slice of *s* from *i* to *j* is | |
| | replaced by the contents of the | |
| | iterable *t* | |
+--------------------------------+----------------------------------+-----------------------+
-| "del s[i:j]" | same as "s[i:j] = []" | |
+| "del s[i:j]" | removes the elements of "s[i:j]" | |
+| | from the list (same as "s[i:j] = | |
+| | []") | |
+--------------------------------+----------------------------------+-----------------------+
| "s[i:j:k] = t" | the elements of "s[i:j:k]" are | (1) |
| | replaced by those of *t* | |
| "del s[i:j:k]" | removes the elements of | |
| | "s[i:j:k]" from the list | |
+--------------------------------+----------------------------------+-----------------------+
-| "s.append(x)" | appends *x* to the end of the | |
-| | sequence (same as | |
-| | "s[len(s):len(s)] = [x]") | |
-+--------------------------------+----------------------------------+-----------------------+
-| "s.clear()" | removes all items from *s* (same | (5) |
-| | as "del s[:]") | |
-+--------------------------------+----------------------------------+-----------------------+
-| "s.copy()" | creates a shallow copy of *s* | (5) |
-| | (same as "s[:]") | |
-+--------------------------------+----------------------------------+-----------------------+
-| "s.extend(t)" or "s += t" | extends *s* with the contents of | |
+| "s += t" | extends *s* with the contents of | |
| | *t* (for the most part the same | |
| | as "s[len(s):len(s)] = t") | |
+--------------------------------+----------------------------------+-----------------------+
-| "s *= n" | updates *s* with its contents | (6) |
+| "s *= n" | updates *s* with its contents | (2) |
| | repeated *n* times | |
+--------------------------------+----------------------------------+-----------------------+
-| "s.insert(i, x)" | inserts *x* into *s* at the | |
-| | index given by *i* (same as | |
-| | "s[i:i] = [x]") | |
-+--------------------------------+----------------------------------+-----------------------+
-| "s.pop()" or "s.pop(i)" | retrieves the item at *i* and | (2) |
-| | also removes it from *s* | |
-+--------------------------------+----------------------------------+-----------------------+
-| "s.remove(x)" | removes the first item from *s* | (3) |
-| | where "s[i]" is equal to *x* | |
-+--------------------------------+----------------------------------+-----------------------+
-| "s.reverse()" | reverses the items of *s* in | (4) |
-| | place | |
-+--------------------------------+----------------------------------+-----------------------+
Notes:
1. If *k* is not equal to "1", *t* must have the same length as the
slice it is replacing.
-2. The optional argument *i* defaults to "-1", so that by default the
- last item is removed and returned.
+2. The value *n* is an integer, or an object implementing
+ "__index__()". Zero and negative values of *n* clear the sequence.
+ Items in the sequence are not copied; they are referenced multiple
+ times, as explained for "s * n" under Common Sequence Operations.
-3. "remove()" raises "ValueError" when *x* is not found in *s*.
+-[ Mutable Sequence Methods ]-
-4. The "reverse()" method modifies the sequence in place for economy
- of space when reversing a large sequence. To remind users that it
- operates by side effect, it does not return the reversed sequence.
+Mutable sequence types also support the following methods:
-5. "clear()" and "copy()" are included for consistency with the
- interfaces of mutable containers that don’t support slicing
- operations (such as "dict" and "set"). "copy()" is not part of the
- "collections.abc.MutableSequence" ABC, but most concrete mutable
- sequence classes provide it.
+sequence.append(value, /)
- Added in version 3.3: "clear()" and "copy()" methods.
+ Append *value* to the end of the sequence This is equivalent to
+ writing "seq[len(seq):len(seq)] = [value]".
-6. The value *n* is an integer, or an object implementing
- "__index__()". Zero and negative values of *n* clear the sequence.
- Items in the sequence are not copied; they are referenced multiple
- times, as explained for "s * n" under Common Sequence Operations.
+sequence.clear()
+
+ Added in version 3.3.
+
+ Remove all items from *sequence*. This is equivalent to writing
+ "del sequence[:]".
+
+sequence.copy()
+
+ Added in version 3.3.
+
+ Create a shallow copy of *sequence*. This is equivalent to writing
+ "sequence[:]".
+
+ Hint:
+
+ The "copy()" method is not part of the "MutableSequence" "ABC",
+ but most concrete mutable sequence types provide it.
+
+sequence.extend(iterable, /)
+
+ Extend *sequence* with the contents of *iterable*. For the most
+ part, this is the same as writing "seq[len(seq):len(seq)] =
+ iterable".
+
+sequence.insert(index, value, /)
+
+ Insert *value* into *sequence* at the given *index*. This is
+ equivalent to writing "sequence[index:index] = [value]".
+
+sequence.pop(index=-1, /)
+
+ Retrieve the item at *index* and also removes it from *sequence*.
+ By default, the last item in *sequence* is removed and returned.
+
+sequence.remove(value, /)
+
+ Remove the first item from *sequence* where "sequence[i] == value".
+
+ Raises "ValueError" if *value* is not found in *sequence*.
+
+sequence.reverse()
+
+ Reverse the items of *sequence* in place. This method maintains
+ economy of space when reversing a large sequence. To remind users
+ that it operates by side-effect, it returns "None".
Lists
homogeneous items (where the precise degree of similarity will vary by
application).
-class list([iterable])
+class list(iterable=(), /)
Lists may be constructed in several ways:
of homogeneous data is needed (such as allowing storage in a "set" or
"dict" instance).
-class tuple([iterable])
+class tuple(iterable=(), /)
Tuples may be constructed in a number of ways:
The "range" type represents an immutable sequence of numbers and is
commonly used for looping a specific number of times in "for" loops.
-class range(stop)
-class range(start, stop[, step])
+class range(stop, /)
+class range(start, stop, step=1, /)
The arguments to the range constructor must be integers (either
built-in "int" or any object that implements the "__index__()"
| "s[i] = x" | item *i* of *s* is replaced by | |
| | *x* | |
+--------------------------------+----------------------------------+-----------------------+
+| "del s[i]" | removes item *i* of *s* | |
++--------------------------------+----------------------------------+-----------------------+
| "s[i:j] = t" | slice of *s* from *i* to *j* is | |
| | replaced by the contents of the | |
| | iterable *t* | |
+--------------------------------+----------------------------------+-----------------------+
-| "del s[i:j]" | same as "s[i:j] = []" | |
+| "del s[i:j]" | removes the elements of "s[i:j]" | |
+| | from the list (same as "s[i:j] = | |
+| | []") | |
+--------------------------------+----------------------------------+-----------------------+
| "s[i:j:k] = t" | the elements of "s[i:j:k]" are | (1) |
| | replaced by those of *t* | |
| "del s[i:j:k]" | removes the elements of | |
| | "s[i:j:k]" from the list | |
+--------------------------------+----------------------------------+-----------------------+
-| "s.append(x)" | appends *x* to the end of the | |
-| | sequence (same as | |
-| | "s[len(s):len(s)] = [x]") | |
-+--------------------------------+----------------------------------+-----------------------+
-| "s.clear()" | removes all items from *s* (same | (5) |
-| | as "del s[:]") | |
-+--------------------------------+----------------------------------+-----------------------+
-| "s.copy()" | creates a shallow copy of *s* | (5) |
-| | (same as "s[:]") | |
-+--------------------------------+----------------------------------+-----------------------+
-| "s.extend(t)" or "s += t" | extends *s* with the contents of | |
+| "s += t" | extends *s* with the contents of | |
| | *t* (for the most part the same | |
| | as "s[len(s):len(s)] = t") | |
+--------------------------------+----------------------------------+-----------------------+
-| "s *= n" | updates *s* with its contents | (6) |
+| "s *= n" | updates *s* with its contents | (2) |
| | repeated *n* times | |
+--------------------------------+----------------------------------+-----------------------+
-| "s.insert(i, x)" | inserts *x* into *s* at the | |
-| | index given by *i* (same as | |
-| | "s[i:i] = [x]") | |
-+--------------------------------+----------------------------------+-----------------------+
-| "s.pop()" or "s.pop(i)" | retrieves the item at *i* and | (2) |
-| | also removes it from *s* | |
-+--------------------------------+----------------------------------+-----------------------+
-| "s.remove(x)" | removes the first item from *s* | (3) |
-| | where "s[i]" is equal to *x* | |
-+--------------------------------+----------------------------------+-----------------------+
-| "s.reverse()" | reverses the items of *s* in | (4) |
-| | place | |
-+--------------------------------+----------------------------------+-----------------------+
Notes:
1. If *k* is not equal to "1", *t* must have the same length as the
slice it is replacing.
-2. The optional argument *i* defaults to "-1", so that by default the
- last item is removed and returned.
+2. The value *n* is an integer, or an object implementing
+ "__index__()". Zero and negative values of *n* clear the sequence.
+ Items in the sequence are not copied; they are referenced multiple
+ times, as explained for "s * n" under Common Sequence Operations.
+
+-[ Mutable Sequence Methods ]-
-3. "remove()" raises "ValueError" when *x* is not found in *s*.
+Mutable sequence types also support the following methods:
-4. The "reverse()" method modifies the sequence in place for economy
- of space when reversing a large sequence. To remind users that it
- operates by side effect, it does not return the reversed sequence.
+sequence.append(value, /)
-5. "clear()" and "copy()" are included for consistency with the
- interfaces of mutable containers that don’t support slicing
- operations (such as "dict" and "set"). "copy()" is not part of the
- "collections.abc.MutableSequence" ABC, but most concrete mutable
- sequence classes provide it.
+ Append *value* to the end of the sequence This is equivalent to
+ writing "seq[len(seq):len(seq)] = [value]".
- Added in version 3.3: "clear()" and "copy()" methods.
+sequence.clear()
-6. The value *n* is an integer, or an object implementing
- "__index__()". Zero and negative values of *n* clear the sequence.
- Items in the sequence are not copied; they are referenced multiple
- times, as explained for "s * n" under Common Sequence Operations.
+ Added in version 3.3.
+
+ Remove all items from *sequence*. This is equivalent to writing
+ "del sequence[:]".
+
+sequence.copy()
+
+ Added in version 3.3.
+
+ Create a shallow copy of *sequence*. This is equivalent to writing
+ "sequence[:]".
+
+ Hint:
+
+ The "copy()" method is not part of the "MutableSequence" "ABC",
+ but most concrete mutable sequence types provide it.
+
+sequence.extend(iterable, /)
+
+ Extend *sequence* with the contents of *iterable*. For the most
+ part, this is the same as writing "seq[len(seq):len(seq)] =
+ iterable".
+
+sequence.insert(index, value, /)
+
+ Insert *value* into *sequence* at the given *index*. This is
+ equivalent to writing "sequence[index:index] = [value]".
+
+sequence.pop(index=-1, /)
+
+ Retrieve the item at *index* and also removes it from *sequence*.
+ By default, the last item in *sequence* is removed and returned.
+
+sequence.remove(value, /)
+
+ Remove the first item from *sequence* where "sequence[i] == value".
+
+ Raises "ValueError" if *value* is not found in *sequence*.
+
+sequence.reverse()
+
+ Reverse the items of *sequence* in place. This method maintains
+ economy of space when reversing a large sequence. To remind users
+ that it operates by side-effect, it returns "None".
''',
'unary': r'''Unary arithmetic and bitwise operations
***************************************
--- /dev/null
+.. date: 2025-10-14-00-17-48
+.. gh-issue: 115119
+.. nonce: 470I1N
+.. release date: 2025-10-14
+.. section: macOS
+
+Update macOS installer to use libmpdecimal 4.0.1.
+
+..
+
+.. date: 2025-10-14-00-08-16
+.. gh-issue: 124111
+.. nonce: 7-j-DQ
+.. section: macOS
+
+Update macOS installer to use Tcl/Tk 9.0.2.
+
+..
+
+.. date: 2025-10-13-23-46-12
+.. gh-issue: 132339
+.. nonce: kAp603
+.. section: macOS
+
+Update macOS installer version of OpenSSL to 3.5.4.
+
+..
+
+.. date: 2025-08-06-06-29-12
+.. gh-issue: 137450
+.. nonce: JZypb7
+.. section: macOS
+
+macOS installer shell path management improvements: separate the installer
+``Shell profile updater`` postinstall script from the ``Update Shell
+Profile.command`` to enable more robust error handling.
+
+..
+
+.. date: 2025-07-27-02-17-40
+.. gh-issue: 137134
+.. nonce: pjgITs
+.. section: macOS
+
+Update macOS installer to ship with SQLite version 3.50.4.
+
+..
+
+.. date: 2025-10-08-22-54-38
+.. gh-issue: 139810
+.. nonce: LAaemi
+.. section: Windows
+
+Installing with ``py install 3[.x]-dev`` will now select final versions as
+well as prereleases.
+
+..
+
+.. date: 2025-10-04-12-18-45
+.. gh-issue: 139573
+.. nonce: EO9kVB
+.. section: Windows
+
+Updated bundled version of OpenSSL to 3.0.18.
+
+..
+
+.. date: 2025-09-15-15-34-29
+.. gh-issue: 138896
+.. nonce: lkiF_7
+.. section: Windows
+
+Fix error installing C runtime on non-updated Windows machines
+
+..
+
+.. date: 2025-09-03-01-07-44
+.. gh-issue: 138314
+.. nonce: IeWQ2i
+.. section: Windows
+
+Add :func:`winreg.DeleteTree`.
+
+..
+
+.. date: 2025-07-27-14-25-11
+.. gh-issue: 137136
+.. nonce: xNthFT
+.. section: Windows
+
+Suppress build warnings when build on Windows with
+``--experimental-jit-interpreter``.
+
+..
+
+.. date: 2025-07-27-02-16-53
+.. gh-issue: 137134
+.. nonce: W0WpDF
+.. section: Windows
+
+Update Windows installer to ship with SQLite 3.50.4.
+
+..
+
+.. date: 2025-06-03-18-26-54
+.. gh-issue: 135099
+.. nonce: Q9usKm
+.. section: Windows
+
+Fix a crash that could occur on Windows when a background thread waits on a
+:c:type:`PyMutex` while the main thread is shutting down the interpreter.
+
+..
+
+.. date: 2025-05-20-21-43-20
+.. gh-issue: 130727
+.. nonce: -69t4D
+.. section: Windows
+
+Fix a race in internal calls into WMI that can result in an "invalid handle"
+exception under high load. Patch by Chris Eibl.
+
+..
+
+.. date: 2025-05-19-03-02-04
+.. gh-issue: 76023
+.. nonce: vHOf6M
+.. section: Windows
+
+Make :func:`os.path.realpath` ignore Windows error 1005 when in non-strict
+mode.
+
+..
+
+.. date: 2025-05-13-13-25-27
+.. gh-issue: 133779
+.. nonce: -YcTBz
+.. section: Windows
+
+Reverts the change to generate different :file:`pyconfig.h` files based on
+compiler settings, as it was frequently causing extension builds to break.
+In particular, the ``Py_GIL_DISABLED`` preprocessor variable must now always
+be defined explicitly when compiling for the experimental free-threaded
+runtime. The :func:`sysconfig.get_config_var` function can be used to
+determine whether the current runtime was compiled with that flag or not.
+
+..
+
+.. date: 2025-05-08-19-07-26
+.. gh-issue: 133626
+.. nonce: yFTKYK
+.. section: Windows
+
+Ensures packages are not accidentally bundled into the traditional
+installer.
+
+..
+
+.. date: 2025-05-07-13-04-22
+.. gh-issue: 133580
+.. nonce: jBMujJ
+.. section: Windows
+
+Fix :func:`sys.getwindowsversion` failing without setting an exception when
+called on some WinAPI partitions.
+
+..
+
+.. date: 2025-05-07-11-45-30
+.. gh-issue: 133572
+.. nonce: Xc2zxH
+.. section: Windows
+
+Avoid LsaNtStatus to WinError conversion on unsupported WinAPI partitions.
+
+..
+
+.. date: 2025-05-07-11-25-29
+.. gh-issue: 133568
+.. nonce: oYV0d8
+.. section: Windows
+
+Fix compile error when using a WinAPI partition that doesn't support the RPC
+runtime library.
+
+..
+
+.. date: 2025-05-07-09-02-19
+.. gh-issue: 133562
+.. nonce: lqqNW1
+.. section: Windows
+
+Disable handling of security descriptors by :func:`os.mkdir` with mode
+``0o700`` on WinAPI partitions that do not support it. This only affects
+custom builds for specialized targets.
+
+..
+
+.. date: 2025-05-07-08-19-15
+.. gh-issue: 133537
+.. nonce: yzf963
+.. section: Windows
+
+Avoid using console I/O in WinAPI partitions that don’t support it
+
+..
+
+.. date: 2025-03-31-15-37-57
+.. gh-issue: 131942
+.. nonce: jip_aL
+.. section: Windows
+
+Use the Python-specific :c:macro:`Py_DEBUG` macro rather than
+:c:macro:`!_DEBUG` in Windows-related C code. Patch by Xuehai Pan.
+
+..
+
+.. date: 2025-09-25-10-31-02
+.. gh-issue: 139330
+.. nonce: 5WWkY0
+.. section: Tools/Demos
+
+SBOM generation tool didn't cross-check the version and checksum values
+against the ``Modules/expat/refresh.sh`` script, leading to the values
+becoming out-of-date during routine updates.
+
+..
+
+.. date: 2025-08-28-06-22-26
+.. gh-issue: 132006
+.. nonce: eZQmc6
+.. section: Tools/Demos
+
+XCframeworks now include privacy manifests to satisfy Apple App Store
+submission requirements.
+
+..
+
+.. date: 2025-08-27-11-14-53
+.. gh-issue: 138171
+.. nonce: Suz8ob
+.. section: Tools/Demos
+
+A script for building an iOS XCframework was added. As part of this change,
+the top level ``iOS`` folder has been moved to be a subdirectory of the
+``Apple`` folder.
+
+..
+
+.. date: 2025-08-21-14-04-50
+.. gh-issue: 137873
+.. nonce: qxffLt
+.. section: Tools/Demos
+
+The iOS test runner has been simplified, resolving some issues that have
+been observed using the runner in GitHub Actions and Azure Pipelines test
+environments.
+
+..
+
+.. date: 2025-08-06-11-54-55
+.. gh-issue: 137484
+.. nonce: 8iFAQs
+.. section: Tools/Demos
+
+Have ``Tools/wasm/wasi`` put the build Python into a directory named after
+the build triple instead of "build".
+
+..
+
+.. date: 2025-08-01-13-27-43
+.. gh-issue: 137025
+.. nonce: ubuhQC
+.. section: Tools/Demos
+
+The ``wasm_build.py`` script has been removed. ``Tools/wasm/emscripten``
+and ``Tools/wasm/wasi`` should be used instead, as described in the `Dev
+Guide <https://devguide.python.org/contrib/workflows/compile/>`__.
+
+..
+
+.. date: 2025-07-30-11-15-47
+.. gh-issue: 137248
+.. nonce: 8IxwY3
+.. section: Tools/Demos
+
+Add a ``--logdir`` option to ``Tools/wasm/wasi`` for specifying where to
+write log files.
+
+..
+
+.. date: 2025-07-30-10-28-35
+.. gh-issue: 137243
+.. nonce: NkdUqH
+.. section: Tools/Demos
+
+Have Tools/wasm/wasi detect a WASI SDK install in /opt when it was directly
+extracted from a release tarball.
+
+..
+
+.. date: 2025-07-05-15-10-42
+.. gh-issue: 136251
+.. nonce: GRM6o8
+.. section: Tools/Demos
+
+Fixes and usability improvements for ``Tools/wasm/emscripten/web_example``
+
+..
+
+.. date: 2025-06-26-15-58-13
+.. gh-issue: 135968
+.. nonce: C4v_-W
+.. section: Tools/Demos
+
+Stubs for ``strip`` are now provided as part of an iOS install.
+
+..
+
+.. date: 2025-06-11-12-14-06
+.. gh-issue: 135379
+.. nonce: 25ttXq
+.. section: Tools/Demos
+
+The cases generator no longer accepts type annotations on stack items.
+Conversions to non-default types are now done explicitly in bytecodes.c and
+optimizer_bytecodes.c. This will simplify code generation for top-of-stack
+caching and other future features.
+
+..
+
+.. date: 2025-05-19-14-57-46
+.. gh-issue: 134215
+.. nonce: sbdDK6
+.. section: Tools/Demos
+
+:term:`REPL` import autocomplete only suggests private modules when
+explicitly specified.
+
+..
+
+.. date: 2025-09-22-15-40-09
+.. gh-issue: 139208
+.. nonce: Tc13dl
+.. section: Tests
+
+Fix regrtest ``--fast-ci --verbose``: don't ignore the ``--verbose`` option
+anymore. Patch by Victor Stinner.
+
+..
+
+.. date: 2025-09-21-16-00-30
+.. gh-issue: 138313
+.. nonce: lBx2en
+.. section: Tests
+
+Restore skipped test and add janky workaround to prevent select buildbots
+from failing with a ResourceWarning.
+
+..
+
+.. date: 2025-06-26-15-15-35
+.. gh-issue: 135966
+.. nonce: EBpF8Y
+.. section: Tests
+
+The iOS testbed now handles the ``app_packages`` folder as a site directory.
+
+..
+
+.. date: 2025-06-19-15-29-38
+.. gh-issue: 135494
+.. nonce: FVl9a0
+.. section: Tests
+
+Fix regrtest to support excluding tests from ``--pgo`` tests. Patch by
+Victor Stinner.
+
+..
+
+.. date: 2025-06-17-08-48-08
+.. gh-issue: 132815
+.. nonce: CY1Esu
+.. section: Tests
+
+Fix test__opcode: add ``JUMP_BACKWARD`` to specialization stats.
+
+..
+
+.. date: 2025-06-14-13-20-17
+.. gh-issue: 135489
+.. nonce: Uh0yVO
+.. section: Tests
+
+Show verbose output for failing tests during PGO profiling step with
+--enable-optimizations.
+
+..
+
+.. date: 2025-06-11-16-52-49
+.. gh-issue: 135401
+.. nonce: ccMXmL
+.. section: Tests
+
+Add a new GitHub CI job to test the :mod:`ssl` module with `AWS-LC
+<https://github.com/aws/aws-lc>`_ as the backing cryptography and TLS
+library.
+
+..
+
+.. date: 2025-06-04-13-07-44
+.. gh-issue: 135120
+.. nonce: NapnZT
+.. section: Tests
+
+Add :func:`!test.support.subTests`.
+
+..
+
+.. date: 2025-05-23-09-19-52
+.. gh-issue: 134567
+.. nonce: hwEIMb
+.. section: Tests
+
+Expose log formatter to users in TestCase.assertLogs.
+:func:`unittest.TestCase.assertLogs` will now optionally accept a formatter
+that will be used to format the strings in output if provided.
+
+..
+
+.. date: 2025-05-09-14-54-48
+.. gh-issue: 133744
+.. nonce: LCquu0
+.. section: Tests
+
+Fix multiprocessing interrupt test. Add an event to synchronize the parent
+process with the child process: wait until the child process starts
+sleeping. Patch by Victor Stinner.
+
+..
+
+.. date: 2025-05-09-04-11-06
+.. gh-issue: 133682
+.. nonce: -_lwo3
+.. section: Tests
+
+Fixed test case ``test.test_annotationlib.TestStringFormat.test_displays``
+which ensures proper handling of complex data structures (lists, sets,
+dictionaries, and tuples) in string annotations.
+
+..
+
+.. date: 2025-05-08-15-06-01
+.. gh-issue: 133639
+.. nonce: 50-kbV
+.. section: Tests
+
+Fix ``TestPyReplAutoindent.test_auto_indent_default()`` doesn't run
+``input_code``.
+
+..
+
+.. date: 2025-10-07-19-31-34
+.. gh-issue: 139700
+.. nonce: vNHU1O
+.. section: Security
+
+Check consistency of the zip64 end of central directory record. Support
+records with "zip64 extensible data" if there are no bytes prepended to the
+ZIP file.
+
+..
+
+.. date: 2025-09-29-00-01-28
+.. gh-issue: 139400
+.. nonce: X2T-jO
+.. section: Security
+
+:mod:`xml.parsers.expat`: Make sure that parent Expat parsers are only
+garbage-collected once they are no longer referenced by subparsers created
+by :meth:`~xml.parsers.expat.xmlparser.ExternalEntityParserCreate`. Patch by
+Sebastian Pipping.
+
+..
+
+.. date: 2025-09-24-13-39-56
+.. gh-issue: 139283
+.. nonce: jODz_q
+.. section: Security
+
+:mod:`sqlite3`: correctly handle maximum number of rows to fetch in
+:meth:`Cursor.fetchmany <sqlite3.Cursor.fetchmany>` and reject negative
+values for :attr:`Cursor.arraysize <sqlite3.Cursor.arraysize>`. Patch by
+Bénédikt Tran.
+
+..
+
+.. date: 2025-06-27-21-23-19
+.. gh-issue: 136053
+.. nonce: QZxcee
+.. section: Security
+
+:mod:`marshal`: fix a possible crash when deserializing :class:`slice`
+objects.
+
+..
+
+.. date: 2025-06-25-14-13-39
+.. gh-issue: 135661
+.. nonce: idjQ0B
+.. section: Security
+
+Fix parsing start and end tags in :class:`html.parser.HTMLParser` according
+to the HTML5 standard.
+
+* Whitespaces no longer accepted between ``</`` and the tag name.
+ E.g. ``</ script>`` does not end the script section.
+
+* Vertical tabulation (``\v``) and non-ASCII whitespaces no longer recognized
+ as whitespaces. The only whitespaces are ``\t\n\r\f`` and space.
+
+* Null character (U+0000) no longer ends the tag name.
+
+* Attributes and slashes after the tag name in end tags are now ignored,
+ instead of terminating after the first ``>`` in quoted attribute value.
+ E.g. ``</script/foo=">"/>``.
+
+* Multiple slashes and whitespaces between the last attribute and closing ``>``
+ are now ignored in both start and end tags. E.g. ``<a foo=bar/ //>``.
+
+* Multiple ``=`` between attribute name and value are no longer collapsed.
+ E.g. ``<a foo==bar>`` produces attribute "foo" with value "=bar".
+
+..
+
+.. date: 2025-06-18-13-34-55
+.. gh-issue: 135661
+.. nonce: NZlpWf
+.. section: Security
+
+Fix CDATA section parsing in :class:`html.parser.HTMLParser` according to
+the HTML5 standard: ``] ]>`` and ``]] >`` no longer end the CDATA section.
+Add private method ``_set_support_cdata()`` which can be used to specify how
+to parse ``<[CDATA[`` --- as a CDATA section in foreign content (SVG or
+MathML) or as a bogus comment in the HTML namespace.
+
+..
+
+.. date: 2025-06-18-13-28-08
+.. gh-issue: 102555
+.. nonce: nADrzJ
+.. section: Security
+
+Fix comment parsing in :class:`html.parser.HTMLParser` according to the
+HTML5 standard. ``--!>`` now ends the comment. ``-- >`` no longer ends the
+comment. Support abnormally ended empty comments ``<-->`` and ``<--->``.
+
+..
+
+.. date: 2025-06-13-15-55-22
+.. gh-issue: 135462
+.. nonce: KBeJpc
+.. section: Security
+
+Fix quadratic complexity in processing specially crafted input in
+:class:`html.parser.HTMLParser`. End-of-file errors are now handled
+according to the HTML5 specs -- comments and declarations are automatically
+closed, tags are ignored.
+
+..
+
+.. date: 2025-06-09-20-38-25
+.. gh-issue: 118350
+.. nonce: KgWCcP
+.. section: Security
+
+Fix support of escapable raw text mode (elements "textarea" and "title") in
+:class:`html.parser.HTMLParser`.
+
+..
+
+.. date: 2025-06-02-11-32-23
+.. gh-issue: 135034
+.. nonce: RLGjbp
+.. section: Security
+
+Fixes multiple issues that allowed ``tarfile`` extraction filters
+(``filter="data"`` and ``filter="tar"``) to be bypassed using crafted
+symlinks and hard links.
+
+Addresses :cve:`2024-12718`, :cve:`2025-4138`, :cve:`2025-4330`, and
+:cve:`2025-4517`.
+
+..
+
+.. date: 2025-05-09-20-22-54
+.. gh-issue: 133767
+.. nonce: kN2i3Q
+.. section: Security
+
+Fix use-after-free in the "unicode-escape" decoder with a non-"strict" error
+handler.
+
+..
+
+.. date: 2025-05-07-22-49-27
+.. gh-issue: 133623
+.. nonce: fgWkBm
+.. section: Security
+
+Indicate through :data:`ssl.HAS_PSK_TLS13` whether the :mod:`ssl` module
+supports "External PSKs" in TLSv1.3, as described in RFC 9258. Patch by Will
+Childs-Klein.
+
+..
+
+.. date: 2025-01-14-11-19-07
+.. gh-issue: 128840
+.. nonce: M1doZW
+.. section: Security
+
+Short-circuit the processing of long IPv6 addresses early in
+:mod:`ipaddress` to prevent excessive memory consumption and a minor
+denial-of-service.
+
+..
+
+.. date: 2025-10-11-20-03-13
+.. gh-issue: 139482
+.. nonce: du2Stg
+.. section: Library
+
+Optimize :data:`os.environ.clear() <os.environ>` by calling
+:manpage:`clearenv(3)` when this function is available. Patch by Victor
+Stinner.
+
+..
+
+.. date: 2025-10-11-17-41-26
+.. gh-issue: 139958
+.. nonce: AnCakj
+.. section: Library
+
+The ``application/toml`` mime type is now supported by :mod:`mimetypes`.
+Patch by Gil Forcada.
+
+..
+
+.. date: 2025-10-11-14-37-42
+.. gh-issue: 139823
+.. nonce: uGF4oh
+.. section: Library
+
+:mod:`ensurepip` now fails with a nicer error message when the :mod:`zlib`
+module is not available.
+
+..
+
+.. date: 2025-10-11-10-02-56
+.. gh-issue: 139905
+.. nonce: UyJIR_
+.. section: Library
+
+Add suggestion to error message for :class:`typing.Generic` subclasses when
+``cls.__parameters__`` is missing due to a parent class failing to call
+:meth:`super().__init_subclass__() <object.__init_subclass__>` in its
+``__init_subclass__``.
+
+..
+
+.. date: 2025-10-10-11-22-50
+.. gh-issue: 139894
+.. nonce: ECAXqj
+.. section: Library
+
+Fix incorrect sharing of current task with the child process while forking
+in :mod:`asyncio`. Patch by Kumar Aditya.
+
+..
+
+.. date: 2025-10-09-21-37-20
+.. gh-issue: 139845
+.. nonce: dzx5UP
+.. section: Library
+
+Fix to not print KeyboardInterrupt twice in default asyncio REPL.
+
+..
+
+.. date: 2025-10-09-13-48-28
+.. gh-issue: 139783
+.. nonce: __NUgo
+.. section: Library
+
+Fix :func:`inspect.getsourcelines` for the case when a decorator is followed
+by a comment or an empty line.
+
+..
+
+.. date: 2025-10-09-03-06-19
+.. gh-issue: 139809
+.. nonce: lzHJNu
+.. section: Library
+
+Prevent premature colorization of subparser ``prog`` in
+:meth:`argparse.ArgumentParser.add_subparsers` to respect color environment
+variable changes after parser creation.
+
+..
+
+.. date: 2025-10-08-00-06-30
+.. gh-issue: 139736
+.. nonce: baPeBd
+.. section: Library
+
+Fix excessive indentation in the default :mod:`argparse`
+:class:`!HelpFormatter`. Patch by Alexander Edland.
+
+..
+
+.. date: 2025-10-02-17-40-10
+.. gh-issue: 70765
+.. nonce: zVlLZn
+.. section: Library
+
+:mod:`http.server`: fix default handling of HTTP/0.9 requests in
+:class:`~http.server.BaseHTTPRequestHandler`. Previously,
+:meth:`!BaseHTTPRequestHandler.parse_request` incorrectly waited for headers
+in the request although those are not supported in HTTP/0.9. Patch by
+Bénédikt Tran.
+
+..
+
+.. date: 2025-10-02-15-45-08
+.. gh-issue: 139322
+.. nonce: rouPGj
+.. section: Library
+
+Fix :func:`os.getlogin` error handling: fix the error number. Patch by
+Victor Stinner.
+
+..
+
+.. date: 2025-10-01-20-30-03
+.. gh-issue: 135953
+.. nonce: NAofJl
+.. section: Library
+
+Add a Gecko format output to the tachyon profiler via ``--gecko``.
+
+..
+
+.. date: 2025-09-29-14-15-20
+.. gh-issue: 139184
+.. nonce: dNl9O4
+.. section: Library
+
+:func:`os.forkpty` does now make the returned file descriptor
+non-inheritable.
+
+..
+
+.. date: 2025-09-28-16-34-11
+.. gh-issue: 139391
+.. nonce: nRFnmx
+.. section: Library
+
+Fix an issue when, on non-Windows platforms, it was not possible to
+gracefully exit a ``python -m asyncio`` process suspended by Ctrl+Z and
+later resumed by :manpage:`fg` other than with :manpage:`kill`.
+
+..
+
+.. date: 2025-09-27-08-26-31
+.. gh-issue: 139374
+.. nonce: hfh-dl
+.. section: Library
+
+:mod:`timeit`: Add color to error tracebacks.
+
+..
+
+.. date: 2025-09-26-18-04-28
+.. gh-issue: 90949
+.. nonce: YHjSzX
+.. section: Library
+
+Add
+:meth:`~xml.parsers.expat.xmlparser.SetBillionLaughsAttackProtectionActivationThreshold`
+and
+:meth:`~xml.parsers.expat.xmlparser.SetBillionLaughsAttackProtectionMaximumAmplification`
+to :ref:`xmlparser <xmlparser-objects>` objects to tune protections against
+`billion laughs <https://en.wikipedia.org/wiki/Billion_laughs_attack>`_
+attacks. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-09-25-07-33-43
+.. gh-issue: 139312
+.. nonce: ygE8AC
+.. section: Library
+
+Upgrade bundled libexpat to 2.7.3
+
+..
+
+.. date: 2025-09-24-14-17-34
+.. gh-issue: 139289
+.. nonce: Vmk25k
+.. section: Library
+
+Do a real lazy-import on :mod:`rlcompleter` in :mod:`pdb` and restore the
+existing completer after importing :mod:`rlcompleter`.
+
+..
+
+.. date: 2025-09-22-14-40-11
+.. gh-issue: 90949
+.. nonce: UM35nb
+.. section: Library
+
+Add :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerActivationThreshold`
+and :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerMaximumAmplification`
+to :ref:`xmlparser <xmlparser-objects>` objects to tune protections against
+disproportional amounts of dynamic memory usage from within an Expat parser.
+Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-09-22-11-30-45
+.. gh-issue: 67795
+.. nonce: fROoZt
+.. section: Library
+
+Functions that take timestamp or timeout arguments now accept any real
+numbers (such as :class:`~decimal.Decimal` and
+:class:`~fractions.Fraction`), not only integers or floats, although this
+does not improve precision.
+
+..
+
+.. date: 2025-09-22-11-19-05
+.. gh-issue: 95953
+.. nonce: 7oLoag
+.. section: Library
+
+A CSS class, ``diff_changed``, was added to the changed lines in the
+``make_table`` output of :class:`difflib.HtmlDiff`. Patch by Katie Gardner.
+
+..
+
+.. date: 2025-09-21-15-58-57
+.. gh-issue: 139210
+.. nonce: HGbMvz
+.. section: Library
+
+Fix use-after-free when reporting unknown event in
+:func:`xml.etree.ElementTree.iterparse`. Patch by Ken Jin.
+
+..
+
+.. date: 2025-09-20-17-50-31
+.. gh-issue: 138860
+.. nonce: Y9JXap
+.. section: Library
+
+Lazy import :mod:`rlcompleter` in :mod:`pdb` to avoid deadlock in
+subprocess.
+
+..
+
+.. date: 2025-09-19-09-36-42
+.. gh-issue: 112729
+.. nonce: mmty0_
+.. section: Library
+
+Fix crash when calling :func:`concurrent.interpreters.create` when the
+process is out of memory.
+
+..
+
+.. date: 2025-09-19-07-41-52
+.. gh-issue: 126016
+.. nonce: Uz9W6h
+.. section: Library
+
+Fix an assertion failure when sending :exc:`KeyboardInterrupt` to a Python
+process running a subinterpreter in a separate thread.
+
+..
+
+.. date: 2025-09-18-14-21-57
+.. gh-issue: 118803
+.. nonce: 2JPbto
+.. section: Library
+
+:class:`collections.abc.ByteString` has been removed from
+``collections.abc.__all__``, and :class:`typing.ByteString` has been removed
+from ``typing.__all__``. The former has been deprecated since Python 3.12,
+and the latter has been deprecated since Python 3.9. Both classes are
+scheduled for removal in Python 3.17.
+
+Additionally, the following statements now cause ``DeprecationWarning``\ s
+to be emitted at runtime: ``from collections.abc import ByteString``, ``from
+typing import ByteString``, ``import collections.abc;
+collections.abc.ByteString`` and ``import typing; typing.ByteString``. Both
+classes already caused ``DeprecationWarning``\ s to be emitted if they were
+subclassed or used as the second argument to ``isinstance()`` or
+``issubclass()``, but they did not previously lead to
+``DeprecationWarning``\ s if they were merely imported or accessed from
+their respective modules.
+
+..
+
+.. date: 2025-09-18-05-32-18
+.. gh-issue: 135729
+.. nonce: 8AmMza
+.. section: Library
+
+Fix unraisable exception during finalization when using
+:mod:`concurrent.interpreters` in the REPL.
+
+..
+
+.. date: 2025-09-17-21-54-53
+.. gh-issue: 139076
+.. nonce: 2eX9lG
+.. section: Library
+
+Fix a bug in the :mod:`pydoc` module that was hiding functions in a Python
+module if they were implemented in an extension module and the module did
+not have ``__all__``.
+
+..
+
+.. date: 2025-09-17-21-52-30
+.. gh-issue: 139090
+.. nonce: W7vbhF
+.. section: Library
+
+Add :data:`os.RWF_DONTCACHE` constant for Linux 6.14+.
+
+..
+
+.. date: 2025-09-17-19-08-34
+.. gh-issue: 139065
+.. nonce: Hu8fM5
+.. section: Library
+
+Fix trailing space before a wrapped long word if the line length is exactly
+*width* in :mod:`textwrap`.
+
+..
+
+.. date: 2025-09-17-12-07-21
+.. gh-issue: 139001
+.. nonce: O6tseN
+.. section: Library
+
+Fix race condition in :class:`pathlib.Path` on the internal ``_raw_paths``
+field.
+
+..
+
+.. date: 2025-09-17-08-32-43
+.. gh-issue: 138813
+.. nonce: LHkHjX
+.. section: Library
+
+:class:`!multiprocessing.BaseProcess` defaults ``kwargs`` to ``None``
+instead of a shared dictionary.
+
+..
+
+.. date: 2025-09-16-19-05-29
+.. gh-issue: 138998
+.. nonce: URl0Y_
+.. section: Library
+
+Update bundled libexpat to 2.7.2
+
+..
+
+.. date: 2025-09-16-16-46-58
+.. gh-issue: 138993
+.. nonce: -8s8_T
+.. section: Library
+
+Dedent :data:`credits` text.
+
+..
+
+.. date: 2025-09-16-15-56-29
+.. gh-issue: 118803
+.. nonce: aOPtmL
+.. section: Library
+
+Add back :class:`collections.abc.ByteString` and :class:`typing.ByteString`.
+Both had been removed in prior alpha, beta and release candidates for Python
+3.14, but their removal has now been postponed to Python 3.17.
+
+..
+
+.. date: 2025-09-15-19-29-12
+.. gh-issue: 130567
+.. nonce: shDEnT
+.. section: Library
+
+Fix possible crash in :func:`locale.strxfrm` due to a platform bug on macOS.
+
+..
+
+.. date: 2025-09-15-13-09-19
+.. gh-issue: 137226
+.. nonce: HH3_ik
+.. section: Library
+
+Fix :func:`typing.get_type_hints` calls on generic :class:`typing.TypedDict`
+classes defined with string annotations.
+
+..
+
+.. date: 2025-09-15-08-57-39
+.. gh-issue: 138899
+.. nonce: Uh6fvY
+.. section: Library
+
+Executing ``quit`` command in :mod:`pdb` will raise :exc:`bdb.BdbQuit` when
+:mod:`pdb` is started from an asyncio console using :func:`breakpoint` or
+:func:`pdb.set_trace`.
+
+..
+
+.. date: 2025-09-12-01-01-05
+.. gh-issue: 138804
+.. nonce: 46ZukT
+.. section: Library
+
+Raise :exc:`TypeError` instead of :exc:`AttributeError` when an argument of
+incorrect type is passed to :func:`shlex.quote`. This restores the behavior
+of the function prior to 3.14.
+
+..
+
+.. date: 2025-09-11-11-09-28
+.. gh-issue: 138779
+.. nonce: TNZnLr
+.. section: Library
+
+Support device numbers larger than ``2**63-1`` for the
+:attr:`~os.stat_result.st_rdev` field of the :class:`os.stat_result`
+structure.
+
+..
+
+.. date: 2025-09-10-13-32-25
+.. gh-issue: 138682
+.. nonce: iExqx1
+.. section: Library
+
+Added symmetric difference support to :class:`collections.Counter` objects.
+
+..
+
+.. date: 2025-09-10-10-11-59
+.. gh-issue: 138712
+.. nonce: avrPG5
+.. section: Library
+
+Add :const:`os.NODEV`.
+
+..
+
+.. date: 2025-09-10-10-02-59
+.. gh-issue: 128636
+.. nonce: ldRKGZ
+.. section: Library
+
+Fix crash in PyREPL when os.environ is overwritten with an invalid value for
+mac
+
+..
+
+.. date: 2025-09-09-17-57-49
+.. gh-issue: 138720
+.. nonce: hAtsm-
+.. section: Library
+
+Fix an issue where :class:`io.BufferedWriter` and :class:`io.BufferedRandom`
+had different definitions of "closed" for :meth:`~io.IOBase.close` and
+:meth:`~io.IOBase.flush` which resulted in an exception when close called
+flush but flush thought the file was already closed.
+
+..
+
+.. date: 2025-09-09-10-48-26
+.. gh-issue: 138706
+.. nonce: xB--LX
+.. section: Library
+
+Update :mod:`unicodedata` database to Unicode 17.0.0.
+
+..
+
+.. date: 2025-09-08-17-32-02
+.. gh-issue: 76007
+.. nonce: peEgcr
+.. section: Library
+
+Deprecate ``__version__`` from a number of standard library modules. Patch
+by Hugo van Kemenade.
+
+..
+
+.. date: 2025-09-06-20-09-32
+.. gh-issue: 138535
+.. nonce: mlntEe
+.. section: Library
+
+Speed up :func:`os.stat` for files with reasonable timestamps. Contributed
+by Jeffrey Bosboom.
+
+..
+
+.. date: 2025-09-06-14-56-40
+.. gh-issue: 116946
+.. nonce: GGIeyO
+.. section: Library
+
+:mod:`curses.panel`: the type of :func:`curses.panel.new_panel` is now
+immutable. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-09-06-14-54-01
+.. gh-issue: 116946
+.. nonce: hzQEWI
+.. section: Library
+
+:mod:`zlib`: the types of :func:`zlib.compressobj` and
+:func:`zlib.decompressobj` are now immutable. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-09-06-14-53-19
+.. gh-issue: 116946
+.. nonce: c-npxd
+.. section: Library
+
+:mod:`os`: the :class:`os.DirEntry` type and the type of :func:`os.scandir`
+are now immutable. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-09-06-14-47-23
+.. gh-issue: 116946
+.. nonce: hj_u1t
+.. section: Library
+
+:mod:`tkinter`: the types :class:`!_tkinter.Tcl_Obj` (wrapper for Tcl
+objects), :class:`!_tkinter.tktimertoken` (obtained by calling
+``createtimerhandler()`` on a :attr:`Tk <tkinter.Tk.tk>` application) and
+:class:`!_tkinter.tkapp` (the runtime type of Tk applications) are now
+immutable. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-09-06-11-26-21
+.. gh-issue: 138514
+.. nonce: 66ltOb
+.. section: Library
+
+Raise :exc:`ValueError` when a multi-character string is passed to the
+*echo_char* parameter of :func:`getpass.getpass`. Patch by Benjamin Johnson.
+
+..
+
+.. date: 2025-09-05-21-10-24
+.. gh-issue: 137706
+.. nonce: 0EztiJ
+.. section: Library
+
+Fix the partial evaluation of annotations that use ``typing.Annotated[T,
+x]`` where ``T`` is a forward reference.
+
+..
+
+.. date: 2025-09-05-15-35-59
+.. gh-issue: 88375
+.. nonce: dC491a
+.. section: Library
+
+Fix normalization of the ``robots.txt`` rules and URLs in the
+:mod:`urllib.robotparser` module. No longer ignore trailing ``?``.
+Distinguish raw special characters ``?``, ``=`` and ``&`` from the
+percent-encoded ones.
+
+..
+
+.. date: 2025-09-05-07-50-18
+.. gh-issue: 138515
+.. nonce: E3M-pu
+.. section: Library
+
+:mod:`email` is added to Emscripten build.
+
+..
+
+.. date: 2025-09-05-05-53-43
+.. gh-issue: 99948
+.. nonce: KMSlG6
+.. section: Library
+
+:func:`ctypes.util.find_library` now works in Emscripten build.
+
+..
+
+.. date: 2025-09-04-15-18-11
+.. gh-issue: 111788
+.. nonce: tuTEM5
+.. section: Library
+
+Fix parsing errors in the :mod:`urllib.robotparser` module. Don't fail
+trying to parse weird paths. Don't fail trying to decode non-UTF-8
+``robots.txt`` files.
+
+..
+
+.. date: 2025-09-03-15-20-10
+.. gh-issue: 138432
+.. nonce: RMc7UX
+.. section: Library
+
+:meth:`zoneinfo.reset_tzpath` will now convert any :class:`os.PathLike`
+objects it receives into strings before adding them to ``TZPATH``. It will
+raise ``TypeError`` if anything other than a string is found after this
+conversion. If given an :class:`os.PathLike` object that represents a
+relative path, it will now raise ``ValueError`` instead of ``TypeError``,
+and present a more informative error message.
+
+..
+
+.. date: 2025-09-03-09-03-11
+.. gh-issue: 132657
+.. nonce: cbAIDh
+.. section: Library
+
+Improve the scaling of :func:`copy.copy` and :func:`copy.deepcopy` in the
+free-threading build.
+
+..
+
+.. date: 2025-09-02-10-27-21
+.. gh-issue: 116946
+.. nonce: VxXNGD
+.. section: Library
+
+The types of :func:`select.poll` and :func:`select.epoll` objects are now
+immutable. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-09-02-10-23-09
+.. gh-issue: 116946
+.. nonce: U6RpwK
+.. section: Library
+
+The :class:`!_random.Random` C type is now immutable. Patch by Bénédikt
+Tran.
+
+..
+
+.. date: 2025-08-31-22-10-22
+.. gh-issue: 57911
+.. nonce: N_Ixtv
+.. section: Library
+
+When extracting tar files on Windows, slashes in symlink targets will be
+replaced by backslashes to prevent corrupted links.
+
+..
+
+.. date: 2025-08-31-12-34-02
+.. gh-issue: 138205
+.. nonce: iHXb1z
+.. section: Library
+
+Removed the :meth:`~mmap.mmap.resize` method on platforms that don't support
+the underlying syscall, instead of raising a :exc:`SystemError`.
+
+..
+
+.. date: 2025-08-31-09-06-49
+.. gh-issue: 138008
+.. nonce: heOvsU
+.. section: Library
+
+Fix segmentation faults in the :mod:`ctypes` module due to invalid
+:attr:`~ctypes._CFuncPtr.argtypes`. Patch by Dung Nguyen.
+
+..
+
+.. date: 2025-08-30-17-58-04
+.. gh-issue: 138252
+.. nonce: CDiEby
+.. section: Library
+
+:mod:`ssl`: :class:`~ssl.SSLContext` objects can now set client and server
+TLS signature algorithms. If Python has been built with OpenSSL 3.5 or
+later, :class:`~ssl.SSLSocket` objects can return the signature algorithms
+selected on a connection.
+
+..
+
+.. date: 2025-08-30-10-58-15
+.. gh-issue: 138253
+.. nonce: 9Ehj-N
+.. section: Library
+
+Add the *block* parameter in the :meth:`!put` and :meth:`!get` methods of
+the :mod:`concurrent.interpreters` queues for compatibility with the
+:class:`queue.Queue` interface.
+
+..
+
+.. date: 2025-08-30-10-04-28
+.. gh-issue: 60462
+.. nonce: yh_vDc
+.. section: Library
+
+Fix :func:`locale.strxfrm` on Solaris (and possibly other platforms).
+
+..
+
+.. date: 2025-08-29-12-56-55
+.. gh-issue: 138239
+.. nonce: uthZFI
+.. section: Library
+
+The REPL now highlights :keyword:`type` as a soft keyword in :ref:`type
+statements <type>`.
+
+..
+
+.. date: 2025-08-29-12-05-33
+.. gh-issue: 78502
+.. nonce: VpIMxg
+.. section: Library
+
+:class:`mmap.mmap` now has a *trackfd* parameter on Windows; if it is
+``False``, the file handle corresponding to *fileno* will not be duplicated.
+
+..
+
+.. date: 2025-08-28-13-20-09
+.. gh-issue: 138204
+.. nonce: 8oLOud
+.. section: Library
+
+Forbid expansion of shared anonymous :mod:`memory maps <mmap>` on Linux,
+which caused a bus error.
+
+..
+
+.. date: 2025-08-27-17-05-36
+.. gh-issue: 138010
+.. nonce: ZZJmPL
+.. section: Library
+
+Fix an issue where defining a class with a
+:deco:`warnings.deprecated`-decorated base class may not invoke the correct
+:meth:`~object.__init_subclass__` method in cases involving multiple
+inheritance. Patch by Brian Schubert.
+
+..
+
+.. date: 2025-08-25-22-38-03
+.. gh-issue: 134716
+.. nonce: kyYKeX
+.. section: Library
+
+Add support of regular expressions in the :option:`-W` option and the
+:envvar:`PYTHONWARNINGS` environment variable.
+
+..
+
+.. date: 2025-08-25-18-06-04
+.. gh-issue: 138133
+.. nonce: Zh9rGo
+.. section: Library
+
+Prevent infinite traceback loop when sending CTRL^C to Python through
+``strace``.
+
+..
+
+.. date: 2025-08-25-16-22-32
+.. gh-issue: 138122
+.. nonce: eMNDZ1
+.. section: Library
+
+Implement :pep:`799` -- A dedicated profiling package for organizing Python
+profiling tools. Patch by Pablo Galindo.
+
+..
+
+.. date: 2025-08-24-02-04-32
+.. gh-issue: 138092
+.. nonce: V4-wTO
+.. section: Library
+
+Fixed a bug in :meth:`mmap.mmap.flush` where calling with only an offset
+parameter would fail.
+
+..
+
+.. date: 2025-08-22-12-48-14
+.. gh-issue: 138044
+.. nonce: lEQULC
+.. section: Library
+
+Remove compatibility shim for deprecated parameter *package* in
+:func:`importlib.resources.files`. Patch by Semyon Moroz.
+
+..
+
+.. date: 2025-08-22-09-53-45
+.. gh-issue: 86819
+.. nonce: ECxvwx
+.. section: Library
+
+:mod:`socket`: Add missing constants for ISO-TP sockets.
+
+..
+
+.. date: 2025-08-19-00-12-57
+.. gh-issue: 137884
+.. nonce: 4faCA_
+.. section: Library
+
+Add :func:`threading.get_native_id` support for Illumos/Solaris. Patch by
+Yüce Tekol.
+
+..
+
+.. date: 2025-08-18-16-02-51
+.. gh-issue: 134869
+.. nonce: GnAjnU
+.. section: Library
+
+Fix an issue where pressing Ctrl+C during tab completion in the REPL would
+leave the autocompletion menu in a corrupted state.
+
+..
+
+.. date: 2025-08-18-07-10-55
+.. gh-issue: 137840
+.. nonce: 9b7AnG
+.. section: Library
+
+:class:`typing.TypedDict` now supports the ``closed`` and ``extra_items``
+keyword arguments (as described in :pep:`728`) to control whether additional
+non-required keys are allowed and to specify their value type.
+
+..
+
+.. date: 2025-08-17-10-22-31
+.. gh-issue: 132947
+.. nonce: XR4MJ8
+.. section: Library
+
+Applied changes to ``importlib.metadata`` from `importlib_metadata 8.7
+<https://importlib-metadata.readthedocs.io/en/latest/history.html#v8-7-0>`_,
+including ``dist`` now disallowed for ``EntryPoints.select``; deferred
+imports for faster import times; added support for metadata with newlines
+(python/cpython#119650); and ``metadata()`` function now returns ``None``
+when a metadata directory is present but no metadata is present.
+
+..
+
+.. date: 2025-08-16-18-11-41
+.. gh-issue: 90548
+.. nonce: q3aJUK
+.. section: Library
+
+Fix ``musl`` detection for :func:`platform.libc_ver` on Alpine Linux if
+compiled with --strip-all.
+
+..
+
+.. date: 2025-08-16-16-04-15
+.. gh-issue: 137317
+.. nonce: Dl13B5
+.. section: Library
+
+:func:`inspect.signature` now correctly handles classes that use a
+descriptor on a wrapped :meth:`!__init__` or :meth:`!__new__` method.
+Contributed by Yongyu Yan.
+
+..
+
+.. date: 2025-08-16-09-02-11
+.. gh-issue: 137754
+.. nonce: mCev1Y
+.. section: Library
+
+Fix import of the :mod:`zoneinfo` module if the C implementation of the
+:mod:`datetime` module is not available.
+
+..
+
+.. date: 2025-08-14-10-27-07
+.. gh-issue: 125854
+.. nonce: vDzFcZ
+.. section: Library
+
+Improve error messages for invalid category in :func:`warnings.warn`.
+
+..
+
+.. date: 2025-08-14-00-00-12
+.. gh-issue: 137729
+.. nonce: i9NSKP
+.. section: Library
+
+:func:`locale.setlocale` now supports language codes with ``@``-modifiers.
+``@``-modifier are no longer silently removed in :func:`locale.getlocale`,
+but included in the language code.
+
+..
+
+.. date: 2025-08-13-10-50-22
+.. gh-issue: 73487
+.. nonce: DUHbBq
+.. section: Library
+
+Speedup processing arguments (up to 1.5x) in the :mod:`decimal` module
+methods, that now using :c:macro:`METH_FASTCALL` calling convention. Patch
+by Sergey B Kirpichev.
+
+..
+
+.. date: 2025-08-11-14-18-32
+.. gh-issue: 137634
+.. nonce: M7iBG6
+.. section: Library
+
+Calendar pages generated by the :class:`calendar.HTMLCalendar` class now
+support dark mode and have been migrated to the HTML5 standard for improved
+accessibility.
+
+..
+
+.. date: 2025-08-11-05-05-08
+.. gh-issue: 137630
+.. nonce: 9lmqyc
+.. section: Library
+
+The :mod:`!_interpreters` module now uses Argument Clinic to parse
+arguments. Patch by Adam Turner.
+
+..
+
+.. date: 2025-08-09-08-53-32
+.. gh-issue: 137583
+.. nonce: s6OZud
+.. section: Library
+
+Fix a deadlock introduced in 3.13.6 when a call to :meth:`ssl.SSLSocket.recv
+<socket.socket.recv>` was blocked in one thread, and then another method on
+the object (such as :meth:`ssl.SSLSocket.send <socket.socket.send>`) was
+subsequently called in another thread.
+
+..
+
+.. date: 2025-08-08-21-20-14
+.. gh-issue: 92936
+.. nonce: rOgG1S
+.. section: Library
+
+Update regex used by ``http.cookies.SimpleCookie`` to handle values
+containing double quotes.
+
+..
+
+.. date: 2025-08-08-15-00-38
+.. gh-issue: 137426
+.. nonce: lW-Rk2
+.. section: Library
+
+Remove the code deprecation of ``importlib.abc.ResourceLoader``. It is
+documented as deprecated, but left for backwards compatibility with other
+classes in ``importlib.abc``.
+
+..
+
+.. date: 2025-08-07-17-18-57
+.. gh-issue: 137490
+.. nonce: s89ieZ
+.. section: Library
+
+Handle :data:`~errno.ECANCELED` in the same way as :data:`~errno.EINTR` in
+:func:`signal.sigwaitinfo` on NetBSD.
+
+..
+
+.. date: 2025-08-07-15-07-44
+.. gh-issue: 137512
+.. nonce: j2or5h
+.. section: Library
+
+Add new constants in the :mod:`resource` module:
+:data:`~resource.RLIMIT_NTHR`, :data:`~resource.RLIMIT_UMTXP`,
+:data:`~resource.RLIMIT_PIPEBUF`, :data:`~resource.RLIMIT_THREADS`,
+:data:`~resource.RLIM_SAVED_CUR`, and :data:`~resource.RLIM_SAVED_MAX`.
+
+..
+
+.. date: 2025-08-07-12-32-23
+.. gh-issue: 137044
+.. nonce: abNoIy
+.. section: Library
+
+:data:`resource.RLIM_INFINITY` is now always a positive integer. On all
+supported platforms, it is larger than any limited resource value, which
+simplifies comparison of the resource values. Previously, it could be
+negative, such as -1 or -3, depending on platform.
+
+..
+
+.. date: 2025-08-06-23-16-42
+.. gh-issue: 137477
+.. nonce: bk6BDV
+.. section: Library
+
+Fix :func:`!inspect.getblock`, :func:`inspect.getsourcelines` and
+:func:`inspect.getsource` for generator expressions.
+
+..
+
+.. date: 2025-08-06-16-54-22
+.. gh-issue: 137481
+.. nonce: eSTkK0
+.. section: Library
+
+Calendar uses the lengths of the locale's weekdays to decide if the width
+requires abbreviation.
+
+..
+
+.. date: 2025-08-06-16-13-47
+.. gh-issue: 137466
+.. nonce: Whv0-A
+.. section: Library
+
+Remove undocumented :func:`!glob.glob0` and :func:`!glob.glob1` functions,
+which have been deprecated since Python 3.13. Use :func:`glob.glob` and pass
+a directory to its *root_dir* argument instead.
+
+..
+
+.. date: 2025-08-03-13-16-39
+.. gh-issue: 137044
+.. nonce: 0hPVL_
+.. section: Library
+
+Return large limit values as positive integers instead of negative integers
+in :func:`resource.getrlimit`. Accept large values and reject negative
+values (except :data:`~resource.RLIM_INFINITY`) for limits in
+:func:`resource.setrlimit`.
+
+..
+
+.. date: 2025-08-03-00-36-57
+.. gh-issue: 115766
+.. nonce: nJCFkW
+.. section: Library
+
+Fix :attr:`!ipaddress.IPv4Interface.is_unspecified`.
+
+..
+
+.. date: 2025-08-01-23-52-49
+.. gh-issue: 75989
+.. nonce: 5aYXNJ
+.. section: Library
+
+:func:`tarfile.TarFile.extractall` and :func:`tarfile.TarFile.extract` now
+overwrite symlinks when extracting hardlinks. (Contributed by Alexander
+Enrique Urieles Nieto in :gh:`75989`.)
+
+..
+
+.. date: 2025-08-01-23-11-25
+.. gh-issue: 137017
+.. nonce: 0yGcNc
+.. section: Library
+
+Fix :obj:`threading.Thread.is_alive` to remain ``True`` until the underlying
+OS thread is fully cleaned up. This avoids false negatives in edge cases
+involving thread monitoring or premature :obj:`threading.Thread.is_alive`
+calls.
+
+..
+
+.. date: 2025-08-01-15-07-59
+.. gh-issue: 137273
+.. nonce: 4V8Xmv
+.. section: Library
+
+Fix debug assertion failure in :func:`locale.setlocale` on Windows.
+
+..
+
+.. date: 2025-07-31-16-43-16
+.. gh-issue: 137191
+.. nonce: FIogE8
+.. section: Library
+
+Fix how type parameters are collected, when :class:`typing.Protocol` are
+specified with explicit parameters. Now, :class:`typing.Generic` and
+:class:`typing.Protocol` always dictate the parameter number and parameter
+ordering of types. Previous behavior was a bug.
+
+..
+
+.. date: 2025-07-31-10-31-56
+.. gh-issue: 137282
+.. nonce: GOCwIC
+.. section: Library
+
+Fix tab completion and :func:`dir` on :mod:`concurrent.futures`.
+
+..
+
+.. date: 2025-07-30-18-07-33
+.. gh-issue: 137257
+.. nonce: XBtzf2
+.. section: Library
+
+Bump the version of pip bundled in ensurepip to version 25.2
+
+..
+
+.. date: 2025-07-30-17-42-36
+.. gh-issue: 137239
+.. nonce: qSpj32
+.. section: Library
+
+:mod:`heapq`: Update :data:`!heapq.__all__` with ``*_max`` functions.
+
+..
+
+.. date: 2025-07-30-11-12-22
+.. gh-issue: 124503
+.. nonce: d4hc7b
+.. section: Library
+
+:func:`ast.literal_eval` is 10-20% faster for small inputs.
+
+..
+
+.. date: 2025-07-29-21-18-31
+.. gh-issue: 137226
+.. nonce: B_4lpu
+.. section: Library
+
+Fix behavior of :meth:`annotationlib.ForwardRef.evaluate` when the
+*type_params* parameter is passed and the name of a type param is also
+present in an enclosing scope.
+
+..
+
+.. date: 2025-07-29-05-12-50
+.. gh-issue: 137197
+.. nonce: bMK3sO
+.. section: Library
+
+:class:`~ssl.SSLContext` objects can now set TLS 1.3 cipher suites via
+:meth:`~ssl.SSLContext.set_ciphersuites`.
+
+..
+
+.. date: 2025-07-28-23-11-29
+.. gh-issue: 81325
+.. nonce: jMJFBe
+.. section: Library
+
+:class:`tarfile.TarFile` now accepts a :term:`path-like <path-like object>`
+when working on a tar archive. (Contributed by Alexander Enrique Urieles
+Nieto in :gh:`81325`.)
+
+..
+
+.. date: 2025-07-28-20-48-32
+.. gh-issue: 137185
+.. nonce: fgI7-B
+.. section: Library
+
+Fix a potential async-signal-safety issue in :mod:`faulthandler` when
+printing C stack traces.
+
+..
+
+.. date: 2025-07-27-17-03-17
+.. gh-issue: 133951
+.. nonce: 7kwt78
+.. section: Library
+
+Remove lib64-lib symlink creation when creating new virtual environments in
+:mod:`venv` module
+
+..
+
+.. date: 2025-07-25-09-21-56
+.. gh-issue: 130522
+.. nonce: Crwq68
+.. section: Library
+
+Fix unraisable :exc:`TypeError` raised during :term:`interpreter shutdown`
+in the :mod:`threading` module.
+
+..
+
+.. date: 2025-07-24-00-38-07
+.. gh-issue: 137059
+.. nonce: fr64oW
+.. section: Library
+
+Fix handling of file URLs with a Windows drive letter in the URL authority
+by :func:`urllib.request.url2pathname`. This fixes a regression in earlier
+pre-releases of Python 3.14.
+
+..
+
+.. date: 2025-07-23-11-59-48
+.. gh-issue: 136980
+.. nonce: BIJzkB
+.. section: Library
+
+Remove unused C tracing code in bdb for event type ``c_call``, ``c_return``
+and ``c_exception``
+
+..
+
+.. date: 2025-07-23-00-35-29
+.. gh-issue: 130577
+.. nonce: c7EITy
+.. section: Library
+
+:mod:`tarfile` now validates archives to ensure member offsets are
+non-negative. (Contributed by Alexander Enrique Urieles Nieto in
+:gh:`130577`.)
+
+..
+
+.. date: 2025-07-21-22-35-50
+.. gh-issue: 136170
+.. nonce: QUlc78
+.. section: Library
+
+Removed the unreleased ``zipfile.ZipFile.data_offset`` property added in
+3.14.0a7 as it wasn't fully clear which behavior it should have in some
+situations so the result was not always what a user might expect.
+
+..
+
+.. date: 2025-07-21-20-00-42
+.. gh-issue: 121237
+.. nonce: DyxNqo
+.. section: Library
+
+Support ``%:z`` directive for :meth:`datetime.datetime.strptime`,
+:meth:`datetime.time.strptime` and :func:`time.strptime`. Patch by Lucas
+Esposito and Semyon Moroz.
+
+..
+
+.. date: 2025-07-21-16-13-20
+.. gh-issue: 136929
+.. nonce: obKZ2S
+.. section: Library
+
+Ensure that hash functions guaranteed to be always *available* exist as
+attributes of :mod:`hashlib` even if they will not work at runtime due to
+missing backend implementations. For instance, ``hashlib.md5`` will no
+longer raise :exc:`AttributeError` if OpenSSL is not available and Python
+has been built without MD5 support. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-07-21-16-10-24
+.. gh-issue: 124621
+.. nonce: wyoWc1
+.. section: Library
+
+pyrepl now works in Emscripten.
+
+..
+
+.. date: 2025-07-21-15-40-00
+.. gh-issue: 136914
+.. nonce: -GNG-d
+.. section: Library
+
+Fix retrieval of :attr:`doctest.DocTest.lineno` for objects decorated with
+:func:`functools.cache` or :class:`functools.cached_property`.
+
+..
+
+.. date: 2025-07-21-11-56-47
+.. gh-issue: 136912
+.. nonce: zWosAL
+.. section: Library
+
+:func:`hmac.digest` now properly handles large keys and messages by falling
+back to the pure Python implementation when necessary. Patch by Bénédikt
+Tran.
+
+..
+
+.. date: 2025-07-21-01-16-32
+.. gh-issue: 83424
+.. nonce: Y3tEV4
+.. section: Library
+
+Allows creating a :class:`ctypes.CDLL` without name when passing a handle as
+an argument.
+
+..
+
+.. date: 2025-07-20-16-56-55
+.. gh-issue: 135228
+.. nonce: n_XIao
+.. section: Library
+
+When :mod:`dataclasses` replaces a class with a slotted dataclass, the
+original class can now be garbage collected again. Earlier changes in Python
+3.14 caused this class to always remain in existence together with the
+replacement class synthesized by :mod:`dataclasses`.
+
+..
+
+.. date: 2025-07-20-16-02-00
+.. gh-issue: 136874
+.. nonce: cLC3o1
+.. section: Library
+
+Discard URL query and fragment in :func:`urllib.request.url2pathname`.
+
+..
+
+.. date: 2025-07-20-10-21-49
+.. gh-issue: 136787
+.. nonce: _0Rbp_
+.. section: Library
+
+:mod:`hashlib`: improve exception messages when a hash algorithm is not
+recognized, blocked by the current security policy or incompatible with the
+desired operation (for instance, using HMAC with SHAKE). Patch by Bénédikt
+Tran.
+
+..
+
+.. date: 2025-07-19-16-20-54
+.. gh-issue: 130645
+.. nonce: O-dYcN
+.. section: Library
+
+Enable color help by default in :mod:`argparse`.
+
+..
+
+.. date: 2025-07-19-15-40-47
+.. gh-issue: 131724
+.. nonce: LS59nA
+.. section: Library
+
+In :mod:`http.client`, a new *max_response_headers* keyword-only parameter
+has been added to :class:`~http.client.HTTPConnection` and
+:class:`~http.client.HTTPSConnection` constructors. This parameter sets the
+maximum number of allowed response headers, helping to prevent
+denial-of-service attacks.
+
+..
+
+.. date: 2025-07-19-11-53-19
+.. gh-issue: 135427
+.. nonce: iJM_X2
+.. section: Library
+
+With :option:`-Werror <-W>`, the DeprecationWarning emitted by
+:py:func:`os.fork` and :py:func:`os.forkpty` in mutli-threaded processes is
+now raised as an exception. Previously it was silently ignored. Patch by
+Rani Pinchuk.
+
+..
+
+.. date: 2025-07-17-16-12-23
+.. gh-issue: 136234
+.. nonce: VmTxtj
+.. section: Library
+
+Fix :meth:`asyncio.WriteTransport.writelines` to be robust to connection
+failure, by using the same behavior as
+:meth:`~asyncio.WriteTransport.write`.
+
+..
+
+.. date: 2025-07-16-09-45-58
+.. gh-issue: 53144
+.. nonce: mrKwMW
+.. section: Library
+
+:mod:`!encodings.aliases`: Add ``latin_N`` aliases
+
+..
+
+.. date: 2025-07-15-16-37-34
+.. gh-issue: 136669
+.. nonce: Yexwah
+.. section: Library
+
+:mod:`!_asyncio` is now statically linked for improved performance.
+
+..
+
+.. date: 2025-07-13-13-31-22
+.. gh-issue: 136134
+.. nonce: mh6VjS
+.. section: Library
+
+:meth:`!SMTP.auth_cram_md5` now raises an :exc:`~smtplib.SMTPException`
+instead of a :exc:`ValueError` if Python has been built without MD5 support.
+In particular, :class:`~smtplib.SMTP` clients will not attempt to use this
+method even if the remote server is assumed to support it. Patch by Bénédikt
+Tran.
+
+..
+
+.. date: 2025-07-13-11-20-05
+.. gh-issue: 136134
+.. nonce: xhh0Kq
+.. section: Library
+
+:meth:`IMAP4.login_cram_md5 <imaplib.IMAP4.login_cram_md5>` now raises an
+:exc:`IMAP4.error <imaplib.IMAP4.error>` if CRAM-MD5 authentication is not
+supported. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-07-12-18-05-37
+.. gh-issue: 136591
+.. nonce: ujXmSN
+.. section: Library
+
+:mod:`!_hashlib`: avoid using deprecated functions
+:manpage:`ERR_func_error_string` and :manpage:`EVP_MD_CTX_md` when using
+OpenSSL 3.0 and later. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-07-12-14-15-47
+.. gh-issue: 136571
+.. nonce: muHmBv
+.. section: Library
+
+:meth:`datetime.date.fromisocalendar` can now raise OverflowError for out of
+range arguments.
+
+..
+
+.. date: 2025-07-11-23-04-39
+.. gh-issue: 136549
+.. nonce: oAi8u4
+.. section: Library
+
+Fix signature of :func:`threading.excepthook`.
+
+..
+
+.. date: 2025-07-11-10-23-44
+.. gh-issue: 136492
+.. nonce: BVi5h0
+.. section: Library
+
+Expose :pep:`667`'s :data:`~types.FrameLocalsProxyType` in the :mod:`types`
+module.
+
+..
+
+.. date: 2025-07-11-08-15-17
+.. gh-issue: 83336
+.. nonce: ptpmq7
+.. section: Library
+
+``utf8_sig`` is now aliased to :mod:`encodings.utf_8_sig`
+
+..
+
+.. date: 2025-07-11-03-39-15
+.. gh-issue: 136523
+.. nonce: s7caKL
+.. section: Library
+
+Fix :class:`wave.Wave_write` emitting an unraisable when open raises.
+
+..
+
+.. date: 2025-07-10-21-02-43
+.. gh-issue: 136507
+.. nonce: pnEuGS
+.. section: Library
+
+Fix mimetypes CLI to handle multiple file parameters.
+
+..
+
+.. date: 2025-07-10-10-18-19
+.. gh-issue: 52876
+.. nonce: 9Vjrd8
+.. section: Library
+
+Add missing ``keepends`` (default ``True``) parameter to
+:meth:`!codecs.StreamReaderWriter.readline` and
+:meth:`!codecs.StreamReaderWriter.readlines`.
+
+..
+
+.. date: 2025-07-10-00-47-37
+.. gh-issue: 136470
+.. nonce: KlUEUG
+.. section: Library
+
+Correct :class:`concurrent.futures.InterpreterPoolExecutor`'s default thread
+name.
+
+..
+
+.. date: 2025-07-09-20-29-30
+.. gh-issue: 136476
+.. nonce: HyLLzh
+.. section: Library
+
+Fix a bug that was causing the ``get_async_stack_trace`` function to miss
+some frames in the stack trace.
+
+..
+
+.. date: 2025-07-08-20-58-01
+.. gh-issue: 136434
+.. nonce: uuJsjS
+.. section: Library
+
+Fix docs generation of ``UnboundItem`` in :mod:`concurrent.interpreters`
+when running with :option:`-OO`.
+
+..
+
+.. date: 2025-07-07-22-12-32
+.. gh-issue: 136380
+.. nonce: 1b_nXl
+.. section: Library
+
+Raises :exc:`AttributeError` when accessing
+:class:`concurrent.futures.InterpreterPoolExecutor` and subinterpreters are
+not available.
+
+..
+
+.. date: 2025-07-07-16-46-55
+.. gh-issue: 72327
+.. nonce: wLvRuj
+.. section: Library
+
+Suggest using the system command prompt when ``pip install`` is typed into
+the REPL. Patch by Tom Viner, Richard Si, and Brian Schubert.
+
+..
+
+.. date: 2025-07-06-18-38-10
+.. gh-issue: 135953
+.. nonce: Z29DCz
+.. section: Library
+
+Implement a new high-frequency runtime profiler that leverages the existing
+remote debugging functionality to collect detailed execution statistics from
+running Python processes. This tool is exposed in the ``profile.sample``
+module and enables non-intrusive observation of production applications by
+attaching to already-running processes without requiring any code
+modifications, restarts, or special startup flags. The observer can perform
+extremely high-frequency sampling of stack traces and interpreter state,
+providing detailed runtime execution analysis of live applications.
+
+..
+
+.. date: 2025-07-06-10-18-48
+.. gh-issue: 136021
+.. nonce: f-FJYT
+.. section: Library
+
+Make ``type_params`` parameter required in :func:`!typing._eval_type` after
+a deprecation period for not providing this parameter. Also remove the
+:exc:`DeprecationWarning` for the old behavior.
+
+..
+
+.. date: 2025-07-05-09-45-04
+.. gh-issue: 136286
+.. nonce: N67Amr
+.. section: Library
+
+Fix pickling failures for protocols 0 and 1 for many objects related to
+subinterpreters.
+
+..
+
+.. date: 2025-07-05-06-59-46
+.. gh-issue: 136047
+.. nonce: qWvycf
+.. section: Library
+
+Fix issues with :mod:`typing` when the C implementation of :mod:`abc` is not
+available.
+
+..
+
+.. date: 2025-07-05-06-56-16
+.. gh-issue: 136316
+.. nonce: 3zj_Do
+.. section: Library
+
+Improve support for evaluating nested forward references in
+:func:`typing.evaluate_forward_ref`.
+
+..
+
+.. date: 2025-07-04-23-45-00
+.. gh-issue: 136306
+.. nonce: O1YLIU
+.. section: Library
+
+:mod:`ssl` can now get and set groups used for key agreement.
+
+..
+
+.. date: 2025-07-04-12-53-02
+.. gh-issue: 136156
+.. nonce: OYlXoz
+.. section: Library
+
+:func:`tempfile.TemporaryFile` no longer uses :data:`os.O_EXCL` with
+:data:`os.O_TMPFILE`, so it's possible to use ``linkat()`` on the file
+descriptor. Patch by Victor Stinner.
+
+..
+
+.. date: 2025-07-02-18-41-45
+.. gh-issue: 133982
+.. nonce: 7qqAn6
+.. section: Library
+
+Update Python implementation of :class:`io.BytesIO` to be thread safe.
+
+..
+
+.. date: 2025-07-02-10-48-21
+.. gh-issue: 136193
+.. nonce: xfvras
+.. section: Library
+
+Improve :exc:`TypeError` error message, when richcomparing two
+:class:`types.SimpleNamespace` objects.
+
+..
+
+.. date: 2025-07-01-14-44-03
+.. gh-issue: 136097
+.. nonce: bI1n14
+.. section: Library
+
+Fix potential infinite recursion and KeyError in ``sysconfig
+--generate-posix-vars``.
+
+..
+
+.. date: 2025-06-30-11-12-24
+.. gh-issue: 85702
+.. nonce: 0Lrbwu
+.. section: Library
+
+If ``zoneinfo._common.load_tzdata`` is given a package without a resource a
+:exc:`zoneinfo.ZoneInfoNotFoundError` is raised rather than a
+:exc:`PermissionError`. Patch by Victor Stinner.
+
+..
+
+.. date: 2025-06-29-15-22-13
+.. gh-issue: 90733
+.. nonce: NiquaA
+.. section: Library
+
+Improve error messages when reporting invalid parameters in
+:func:`hashlib.scrypt`. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-06-28-11-32-57
+.. gh-issue: 134759
+.. nonce: AjjKcG
+.. section: Library
+
+Fix :exc:`UnboundLocalError` in :func:`email.message.Message.get_payload`
+when the payload to decode is a :class:`bytes` object. Patch by Kliment
+Lamonov.
+
+..
+
+.. date: 2025-06-27-13-34-28
+.. gh-issue: 136028
+.. nonce: RY727g
+.. section: Library
+
+Fix parsing month names containing "İ" (U+0130, LATIN CAPITAL LETTER I WITH
+DOT ABOVE) in :func:`time.strptime`. This affects locales az_AZ, ber_DZ,
+ber_MA and crh_UA.
+
+..
+
+.. date: 2025-06-27-09-26-04
+.. gh-issue: 87135
+.. nonce: 33z0UW
+.. section: Library
+
+Acquiring a :class:`threading.Lock` or :class:`threading.RLock` at
+interpreter shutdown will raise :exc:`PythonFinalizationError` if Python can
+determine that it would otherwise deadlock.
+
+..
+
+.. date: 2025-06-26-17-28-49
+.. gh-issue: 135995
+.. nonce: pPrDCt
+.. section: Library
+
+In the palmos encoding, make byte ``0x9b`` decode to ``›`` (U+203A - SINGLE
+RIGHT-POINTING ANGLE QUOTATION MARK).
+
+..
+
+.. date: 2025-06-26-17-19-36
+.. gh-issue: 105456
+.. nonce: eR9oHB
+.. section: Library
+
+Removed :mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse`
+modules.
+
+..
+
+.. date: 2025-06-26-11-52-40
+.. gh-issue: 53203
+.. nonce: TMigBr
+.. section: Library
+
+Fix :func:`time.strptime` for ``%c`` and ``%x`` formats on locales byn_ER,
+wal_ET and lzh_TW, and for ``%X`` format on locales ar_SA, bg_BG and lzh_TW.
+
+..
+
+.. date: 2025-06-24-14-43-24
+.. gh-issue: 135878
+.. nonce: Db4roX
+.. section: Library
+
+Fixes a crash of :class:`types.SimpleNamespace` on :term:`free threading`
+builds, when several threads were calling its :meth:`~object.__repr__`
+method at the same time.
+
+..
+
+.. date: 2025-06-24-13-30-47
+.. gh-issue: 135853
+.. nonce: 7ejTvK
+.. section: Library
+
+Add :func:`math.fmax` and :func:`math.fmin` to get the larger and smaller of
+two floating-point values. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-06-24-10-52-35
+.. gh-issue: 135836
+.. nonce: s37351
+.. section: Library
+
+Fix :exc:`IndexError` in :meth:`asyncio.loop.create_connection` that could
+occur when non-\ :exc:`OSError` exception is raised during connection and
+socket's ``close()`` raises :exc:`!OSError`.
+
+..
+
+.. date: 2025-06-24-10-23-37
+.. gh-issue: 135853
+.. nonce: 6xDNOG
+.. section: Library
+
+:mod:`math`: expose C99 :func:`~math.signbit` function to determine whether
+the sign bit of a floating-point value is set. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-06-23-13-02-08
+.. gh-issue: 134531
+.. nonce: yUmj07
+.. section: Library
+
+:mod:`hmac`: use the :manpage:`EVP_MAC(3ssl)` interface for HMAC when Python
+is built with OpenSSL 3.0 and later instead of the deprecated
+:manpage:`HMAC_CTX(3ssl) <hmac(3)>` interface. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-06-23-11-04-25
+.. gh-issue: 135836
+.. nonce: -C-c4v
+.. section: Library
+
+Fix :exc:`IndexError` in :meth:`asyncio.loop.create_connection` that could
+occur when the Happy Eyeballs algorithm resulted in an empty exceptions list
+during connection attempts.
+
+..
+
+.. date: 2025-06-23-10-19-11
+.. gh-issue: 135855
+.. nonce: -J0AGF
+.. section: Library
+
+Raise :exc:`TypeError` instead of :exc:`SystemError` when
+:func:`!_interpreters.set___main___attrs` is passed a non-dict object. Patch
+by Brian Schubert.
+
+..
+
+.. date: 2025-06-22-22-03-06
+.. gh-issue: 135823
+.. nonce: iDBg97
+.. section: Library
+
+:mod:`netrc`: improve the error message when the security check for the
+ownership of the default configuration file ``~/.netrc`` fails. Patch by
+Bénédikt Tran.
+
+..
+
+.. date: 2025-06-22-16-23-44
+.. gh-issue: 135815
+.. nonce: 0DandH
+.. section: Library
+
+:mod:`netrc`: skip security checks if :func:`os.getuid` is missing. Patch by
+Bénédikt Tran.
+
+..
+
+.. date: 2025-06-22-02-16-17
+.. gh-issue: 135640
+.. nonce: FXyFL6
+.. section: Library
+
+Address bug where it was possible to call
+:func:`xml.etree.ElementTree.ElementTree.write` on an ElementTree object
+with an invalid root element. This behavior blanked the file passed to
+``write`` if it already existed.
+
+..
+
+.. date: 2025-06-20-17-06-59
+.. gh-issue: 90117
+.. nonce: GYWVrn
+.. section: Library
+
+Speed up :mod:`pprint` for :class:`list` and :class:`tuple`.
+
+..
+
+.. date: 2025-06-20-16-28-47
+.. gh-issue: 135759
+.. nonce: jne0Zi
+.. section: Library
+
+:mod:`hashlib`: reject negative digest lengths in OpenSSL-based SHAKE
+objects by raising a :exc:`ValueError`. Previously, negative lengths were
+implicitly rejected by raising a :exc:`MemoryError` or a :exc:`SystemError`.
+Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-06-18-19-25-32
+.. gh-issue: 123471
+.. nonce: lx1Xbt
+.. section: Library
+
+Make concurrent iterations over :class:`itertools.chain` safe under
+:term:`free threading`.
+
+..
+
+.. date: 2025-06-18-13-58-13
+.. gh-issue: 135645
+.. nonce: 109nff
+.. section: Library
+
+Added ``supports_isolated_interpreters`` field to
+:data:`sys.implementation`.
+
+..
+
+.. date: 2025-06-18-11-43-17
+.. gh-issue: 135646
+.. nonce: r7ekEn
+.. section: Library
+
+Raise consistent :exc:`NameError` exceptions in
+:func:`annotationlib.ForwardRef.evaluate`
+
+..
+
+.. date: 2025-06-17-23-13-56
+.. gh-issue: 135557
+.. nonce: Bfcy4v
+.. section: Library
+
+Fix races on :mod:`heapq` updates and :class:`list` reads on the :term:`free
+threaded <free threading>` build.
+
+..
+
+.. date: 2025-06-17-22-44-19
+.. gh-issue: 119180
+.. nonce: Ogv8Nj
+.. section: Library
+
+Only fetch globals and locals if necessary in
+:func:`annotationlib.get_annotations`
+
+..
+
+.. date: 2025-06-16-15-03-03
+.. gh-issue: 135561
+.. nonce: mJCN8D
+.. section: Library
+
+Fix a crash on DEBUG builds when an HACL* HMAC routine fails. Patch by
+Bénédikt Tran.
+
+..
+
+.. date: 2025-06-16-15-00-13
+.. gh-issue: 135386
+.. nonce: lNrxLc
+.. section: Library
+
+Fix opening a :mod:`dbm.sqlite3` database for reading from read-only file or
+directory.
+
+..
+
+.. date: 2025-06-16-12-37-02
+.. gh-issue: 135444
+.. nonce: An2eeA
+.. section: Library
+
+Fix :meth:`asyncio.DatagramTransport.sendto` to account for datagram header
+size when data cannot be sent.
+
+..
+
+.. date: 2025-06-15-03-03-22
+.. gh-issue: 65697
+.. nonce: COdwZd
+.. section: Library
+
+:class:`configparser`'s error message when attempting to write an invalid
+key is now more helpful.
+
+..
+
+.. date: 2025-06-14-14-19-13
+.. gh-issue: 135497
+.. nonce: 1pzwdA
+.. section: Library
+
+Fix :func:`os.getlogin` failing for longer usernames on BSD-based platforms.
+
+..
+
+.. date: 2025-06-14-12-06-55
+.. gh-issue: 135487
+.. nonce: KdVFff
+.. section: Library
+
+Fix :meth:`!reprlib.Repr.repr_int` when given integers with more than
+:func:`sys.get_int_max_str_digits` digits. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-06-12-18-15-31
+.. gh-issue: 135429
+.. nonce: mch75_
+.. section: Library
+
+Fix the argument mismatch in ``_lsprof`` for ``PY_THROW`` event.
+
+..
+
+.. date: 2025-06-12-10-45-02
+.. gh-issue: 135368
+.. nonce: OjWVHL
+.. section: Library
+
+Fix :class:`unittest.mock.Mock` generation on :func:`dataclasses.dataclass`
+objects. Now all special attributes are set as it was before :gh:`124429`.
+
+..
+
+.. date: 2025-06-11-15-08-02
+.. gh-issue: 135336
+.. nonce: 6Gq6MI
+.. section: Library
+
+:mod:`json` now encodes strings up to 2.2x faster if they consist solely of
+characters that don’t require escaping.
+
+..
+
+.. date: 2025-06-10-21-42-04
+.. gh-issue: 135335
+.. nonce: WnUqb_
+.. section: Library
+
+:mod:`multiprocessing`: Flush ``stdout`` and ``stderr`` after preloading
+modules in the ``forkserver``.
+
+..
+
+.. date: 2025-06-10-21-00-48
+.. gh-issue: 126631
+.. nonce: eITVJd
+.. section: Library
+
+Fix :mod:`multiprocessing` ``forkserver`` bug which prevented ``__main__``
+from being preloaded.
+
+..
+
+.. date: 2025-06-10-16-11-00
+.. gh-issue: 133967
+.. nonce: P0c24q
+.. section: Library
+
+Do not normalize :mod:`locale` name 'C.UTF-8' to 'en_US.UTF-8'.
+
+..
+
+.. date: 2025-06-10-10-22-18
+.. gh-issue: 130870
+.. nonce: JipqbO
+.. section: Library
+
+Preserve :class:`types.GenericAlias` subclasses in
+:func:`typing.get_type_hints`
+
+..
+
+.. date: 2025-06-10-00-42-30
+.. gh-issue: 135321
+.. nonce: UHh9jT
+.. section: Library
+
+Raise a correct exception for values greater than 0x7fffffff for the
+``BINSTRING`` opcode in the C implementation of :mod:`pickle`.
+
+..
+
+.. date: 2025-06-09-10-16-55
+.. gh-issue: 121914
+.. nonce: G6Avkq
+.. section: Library
+
+Changed the names of the symbol tables for lambda expressions and generator
+expressions to "<lambda>" and "<genexpr>" respectively to avoid conflicts
+with user-defined names.
+
+..
+
+.. date: 2025-06-08-14-50-34
+.. gh-issue: 135276
+.. nonce: ZLUhV1
+.. section: Library
+
+Synchronized zipfile.Path with zipp 3.23, including improved performance of
+:meth:`zipfile.Path.open` for non-reading modes, rely on
+:func:`functools.cached_property` to cache values on the instance. Rely on
+``save_method_args`` to save the initialization method arguments. Fixed
+``.name``, ``.stem`` and other basename-based properties on Windows when
+working with a zipfile on disk.
+
+..
+
+.. date: 2025-06-08-11-11-07
+.. gh-issue: 135234
+.. nonce: wJCdh0
+.. section: Library
+
+:mod:`hashlib`: improve exception messages when an OpenSSL function failed.
+When memory allocation fails on OpenSSL's side, a :exc:`MemoryError` is
+raised instead of a :exc:`ValueError`. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-06-08-10-22-22
+.. gh-issue: 135244
+.. nonce: Y2SOTJ
+.. section: Library
+
+:mod:`uuid`: when the MAC address cannot be determined, the 48-bit node ID
+is now generated with a cryptographically-secure pseudo-random number
+generator (CSPRNG) as per :rfc:`RFC 9562, §6.10.3 <9562#section-6.10-3>`.
+This affects :func:`~uuid.uuid1` and :func:`~uuid.uuid6`.
+
+..
+
+.. date: 2025-06-08-01-10-34
+.. gh-issue: 135241
+.. nonce: 5j18IW
+.. section: Library
+
+The :code:`INT` opcode of the C accelerator :mod:`!_pickle` module was
+updated to look only for "00" and "01" to push booleans onto the stack,
+aligning with the Python :mod:`pickle` module.
+
+..
+
+.. date: 2025-06-06-17-34-18
+.. gh-issue: 133934
+.. nonce: yT1r68
+.. section: Library
+
+Improve :mod:`sqlite3` CLI's ``.help`` message.
+
+..
+
+.. date: 2025-06-03-12-59-17
+.. gh-issue: 135069
+.. nonce: xop30V
+.. section: Library
+
+Fix the "Invalid error handling" exception in
+:class:`!encodings.idna.IncrementalDecoder` to correctly replace the
+'errors' parameter.
+
+..
+
+.. date: 2025-06-02-14-36-28
+.. gh-issue: 130662
+.. nonce: Gpr2GB
+.. section: Library
+
++Accept leading zeros in precision and width fields for
++:class:`~decimal.Decimal` formatting, for example ``format(Decimal(1.25),
+'.016f')``.
+
+..
+
+.. date: 2025-06-02-14-28-30
+.. gh-issue: 130662
+.. nonce: EIgIR8
+.. section: Library
+
+Accept leading zeros in precision and width fields for
+:class:`~fractions.Fraction` formatting, for example ``format(Fraction(1,
+3), '.016f')``.
+
+..
+
+.. date: 2025-06-01-14-18-48
+.. gh-issue: 135004
+.. nonce: cq3-fp
+.. section: Library
+
+Rewrite and cleanup the internal :mod:`!_blake2` module. Some exception
+messages were changed but their types were left untouched. Patch by Bénédikt
+Tran.
+
+..
+
+.. date: 2025-06-01-11-14-00
+.. gh-issue: 134953
+.. nonce: ashdfs
+.. section: Library
+
+Expand ``_colorize`` theme with ``keyword_constant`` and implement in
+:term:`repl`.
+
+..
+
+.. date: 2025-05-31-15-49-46
+.. gh-issue: 134978
+.. nonce: mXXuvW
+.. section: Library
+
+:mod:`hashlib`: Supporting the ``string`` keyword parameter in hash function
+constructors such as :func:`~hashlib.new` or the direct hash-named
+constructors such as :func:`~hashlib.md5` and :func:`~hashlib.sha256` is now
+deprecated and slated for removal in Python 3.19. Prefer passing the initial
+data as a positional argument for maximum backwards compatibility. Patch by
+Bénédikt Tran.
+
+..
+
+.. date: 2025-05-31-12-08-12
+.. gh-issue: 134970
+.. nonce: lgSaxq
+.. section: Library
+
+Fix the "unknown action" exception in
+:meth:`argparse.ArgumentParser.add_argument_group` to correctly replace the
+action class.
+
+..
+
+.. date: 2025-05-30-18-13-48
+.. gh-issue: 134718
+.. nonce: 5FEspx
+.. section: Library
+
+By default, omit optional ``Load()`` values in :func:`ast.dump`.
+
+..
+
+.. date: 2025-05-30-13-07-29
+.. gh-issue: 134718
+.. nonce: 9Qvhxn
+.. section: Library
+
+:func:`ast.dump` now only omits ``None`` and ``[]`` values if they are
+default values.
+
+..
+
+.. date: 2025-05-30-09-46-21
+.. gh-issue: 134939
+.. nonce: Pu3nnm
+.. section: Library
+
+Add the :mod:`concurrent.interpreters` module. See :pep:`734`.
+
+..
+
+.. date: 2025-05-29-17-39-13
+.. gh-issue: 108885
+.. nonce: MegCRA
+.. section: Library
+
+Run each example as a subtest in unit tests synthesized by
+:func:`doctest.DocFileSuite` and :func:`doctest.DocTestSuite`. Add the
+:meth:`doctest.DocTestRunner.report_skip` method.
+
+..
+
+.. date: 2025-05-29-06-53-40
+.. gh-issue: 134885
+.. nonce: -_L22o
+.. section: Library
+
+Fix possible crash in the :mod:`compression.zstd` module related to setting
+parameter types. Patch by Jelle Zijlstra.
+
+..
+
+.. date: 2025-05-28-20-49-29
+.. gh-issue: 134857
+.. nonce: dVYXVO
+.. section: Library
+
+Improve error report for :mod:`doctest`\ s run with :mod:`unittest`. Remove
+:mod:`!doctest` module frames from tracebacks and redundant newline
+character from a failure message.
+
+..
+
+.. date: 2025-05-28-15-53-27
+.. gh-issue: 128840
+.. nonce: Nur2pB
+.. section: Library
+
+Fix parsing long IPv6 addresses with embedded IPv4 address.
+
+..
+
+.. date: 2025-05-27-11-24-38
+.. gh-issue: 133579
+.. nonce: WGPUC1
+.. section: Library
+
+:mod:`curses`: Consistently report failures of curses C API calls in
+module-level methods by raising a :exc:`curses.error`. This affects
+:func:`~curses.assume_default_colors`, :func:`~curses.baudrate`,
+:func:`~curses.cbreak`, :func:`~curses.echo`, :func:`~curses.longname`,
+:func:`~curses.initscr`, :func:`~curses.nl`, :func:`~curses.raw`,
+:func:`~curses.termattrs`, :func:`~curses.termname` and
+:func:`~curses.unctrl`. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-05-27-11-18-13
+.. gh-issue: 133579
+.. nonce: ohtgdC
+.. section: Library
+
+:meth:`curses.window.refresh` and :meth:`curses.window.noutrefresh` now
+raise a :exc:`TypeError` instead of :exc:`curses.error` when called with an
+incorrect number of arguments for :ref:`pads <windows-and-pads>`. Patch by
+Bénédikt Tran.
+
+..
+
+.. date: 2025-05-27-11-13-51
+.. gh-issue: 133579
+.. nonce: KY9M6S
+.. section: Library
+
+:ref:`curses.window <curses-window-objects>`: Consistently report failures
+of curses C API calls in Window methods by raising a :exc:`curses.error`.
+This affects :meth:`~curses.window.addch`, :meth:`~curses.window.addnstr`,
+:meth:`~curses.window.addstr`, :meth:`~curses.window.border`,
+:meth:`~curses.window.box`, :meth:`~curses.window.chgat`,
+:meth:`~curses.window.getbkgd`, :meth:`~curses.window.inch`,
+:meth:`~curses.window.insstr` and :meth:`~curses.window.insnstr`. Patch by
+Bénédikt Tran.
+
+..
+
+.. date: 2025-05-26-22-18-32
+.. gh-issue: 134771
+.. nonce: RKXpLT
+.. section: Library
+
+The ``time_clockid_converter()`` function now selects correct type for
+``clockid_t`` on Cygwin which fixes a build error.
+
+..
+
+.. date: 2025-05-26-17-06-40
+.. gh-issue: 134637
+.. nonce: 9-3zRL
+.. section: Library
+
+Fix performance regression in calling a :mod:`ctypes` function pointer in
+:term:`free threading`.
+
+..
+
+.. date: 2025-05-26-14-04-39
+.. gh-issue: 134696
+.. nonce: P04xUa
+.. section: Library
+
+Built-in HACL* and OpenSSL implementations of hash function constructors now
+correctly accept the same *documented* named arguments. For instance,
+:func:`~hashlib.md5` could be previously invoked as ``md5(data=data)`` or
+``md5(string=string)`` depending on the underlying implementation but these
+calls were not compatible. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-05-26-12-31-08
+.. gh-issue: 132710
+.. nonce: ApU3TZ
+.. section: Library
+
+If possible, ensure that :func:`uuid.getnode` returns the same result even
+across different processes. Previously, the result was constant only within
+the same process. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-05-26-11-01-54
+.. gh-issue: 134531
+.. nonce: my1Fzt
+.. section: Library
+
+:mod:`!_hashlib`: Rename internal C functions for :class:`!_hashlib.HASH`
+and :class:`!_hashlib.HASHXOF` objects. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-05-26-10-52-27
+.. gh-issue: 134698
+.. nonce: aJ1mZ1
+.. section: Library
+
+Fix a crash when calling methods of :class:`ssl.SSLContext` or
+:class:`ssl.SSLSocket` across multiple threads.
+
+..
+
+.. date: 2025-05-25-23-23-05
+.. gh-issue: 134151
+.. nonce: 13Wwsb
+.. section: Library
+
+:mod:`email`: Fix :exc:`TypeError` in :func:`email.utils.decode_params` when
+sorting :rfc:`2231` continuations that contain an unnumbered section.
+
+..
+
+.. date: 2025-05-25-13-46-37
+.. gh-issue: 134635
+.. nonce: ZlPrlX
+.. section: Library
+
+:mod:`zlib`: Allow to combine Adler-32 and CRC-32 checksums via
+:func:`~zlib.adler32_combine` and :func:`~zlib.crc32_combine`. Patch by
+Callum Attryde and Bénédikt Tran.
+
+..
+
+.. date: 2025-05-25-11-02-05
+.. gh-issue: 134657
+.. nonce: 3YFhR9
+.. section: Library
+
+:mod:`asyncio`: Remove some private names from ``asyncio.__all__``.
+
+..
+
+.. date: 2025-05-24-13-10-35
+.. gh-issue: 134210
+.. nonce: 0IuMY2
+.. section: Library
+
+:func:`curses.window.getch` now correctly handles signals. Patch by Bénédikt
+Tran.
+
+..
+
+.. date: 2025-05-24-03-10-36
+.. gh-issue: 80334
+.. nonce: z21cMa
+.. section: Library
+
+:func:`multiprocessing.freeze_support` now checks for work on any "spawn"
+start method platform rather than only on Windows.
+
+..
+
+.. date: 2025-05-23-23-43-39
+.. gh-issue: 134582
+.. nonce: 9POq3l
+.. section: Library
+
+Fix tokenize.untokenize() round-trip errors related to t-strings braces
+escaping
+
+..
+
+.. date: 2025-05-23-20-01-52
+.. gh-issue: 134580
+.. nonce: xnaJ70
+.. section: Library
+
+Improved the styling of HTML diff pages generated by the
+:class:`difflib.HtmlDiff` class, and migrated the output to the HTML5
+standard.
+
+..
+
+.. date: 2025-05-23-10-15-36
+.. gh-issue: 134565
+.. nonce: zmb66C
+.. section: Library
+
+:func:`unittest.doModuleCleanups` no longer swallows all but first exception
+raised in the cleanup code, but raises a :exc:`ExceptionGroup` if multiple
+errors occurred.
+
+..
+
+.. date: 2025-05-22-18-14-13
+.. gh-issue: 134546
+.. nonce: fjLVzK
+.. section: Library
+
+Ensure :mod:`pdb` remote debugging script is readable by remote Python
+process.
+
+..
+
+.. date: 2025-05-22-14-12-53
+.. gh-issue: 134451
+.. nonce: M1rD-j
+.. section: Library
+
+Converted ``asyncio.tools.CycleFoundException`` from dataclass to a regular
+exception type.
+
+..
+
+.. date: 2025-05-22-13-10-32
+.. gh-issue: 114177
+.. nonce: 3TYUJ3
+.. section: Library
+
+Fix :mod:`asyncio` to not close subprocess pipes which would otherwise error
+out when the event loop is already closed.
+
+..
+
+.. date: 2025-05-20-21-45-58
+.. gh-issue: 90871
+.. nonce: Gkvtp6
+.. section: Library
+
+Fixed an off by one error concerning the backlog parameter in
+:meth:`~asyncio.loop.create_unix_server`. Contributed by Christian Harries.
+
+..
+
+.. date: 2025-05-20-19-16-30
+.. gh-issue: 134323
+.. nonce: ZQZGvw
+.. section: Library
+
+Fix the :meth:`threading.RLock.locked` method.
+
+..
+
+.. date: 2025-05-20-15-13-43
+.. gh-issue: 86802
+.. nonce: trF7TM
+.. section: Library
+
+Fixed asyncio memory leak in cancelled shield tasks. For shielded tasks
+where the shield was cancelled, log potential exceptions through the
+exception handler. Contributed by Christian Harries.
+
+..
+
+.. date: 2025-05-20-11-51-17
+.. gh-issue: 71189
+.. nonce: 0LpTB1
+.. section: Library
+
+Add support of the all-but-last mode in :func:`os.path.realpath`.
+
+..
+
+.. date: 2025-05-20-11-35-08
+.. gh-issue: 72902
+.. nonce: jzEI-E
+.. section: Library
+
+Improve speed (x1.1-1.8) of the :class:`~fractions.Fraction` constructor for
+typical inputs (:class:`float`'s, :class:`~decimal.Decimal`'s or strings).
+
+..
+
+.. date: 2025-05-19-20-59-06
+.. gh-issue: 134209
+.. nonce: anhTcF
+.. section: Library
+
+:mod:`curses`: The :meth:`curses.window.instr` and
+:meth:`curses.window.getstr` methods now allocate their internal buffer on
+the heap instead of the stack; in addition, the max buffer size is increased
+from 1023 to 2047.
+
+..
+
+.. date: 2025-05-19-18-12-42
+.. gh-issue: 88994
+.. nonce: 7avvVu
+.. section: Library
+
+Change :func:`datetime.datetime.now` to half-even rounding for consistency
+with :func:`datetime.datetime.fromtimestamp`. Patch by John Keith Hohm.
+
+..
+
+.. date: 2025-05-19-17-27-21
+.. gh-issue: 80184
+.. nonce: LOkbaw
+.. section: Library
+
+The default queue size is now ``socket.SOMAXCONN`` for
+:class:`socketserver.TCPServer`.
+
+..
+
+.. date: 2025-05-19-15-30-00
+.. gh-issue: 132983
+.. nonce: asdsfs
+.. section: Library
+
+Add :mod:`!compression.zstd` version information to ``test.pythoninfo``.
+
+..
+
+.. date: 2025-05-19-15-05-24
+.. gh-issue: 134235
+.. nonce: pz9PwV
+.. section: Library
+
+Updated tab completion on REPL to include builtin modules. Contributed by
+Tom Wang, Hunter Young
+
+..
+
+.. date: 2025-05-19-10-32-11
+.. gh-issue: 134152
+.. nonce: INJC2j
+.. section: Library
+
+Fixed :exc:`UnboundLocalError` that could occur during :mod:`email` header
+parsing if an expected trailing delimiter is missing in some contexts.
+
+..
+
+.. date: 2025-05-18-23-46-21
+.. gh-issue: 134152
+.. nonce: 30HwbX
+.. section: Library
+
+:mod:`email`: Fix parsing of email message ID with invalid domain.
+
+..
+
+.. date: 2025-05-18-13-23-29
+.. gh-issue: 134168
+.. nonce: hgx3Xg
+.. section: Library
+
+:mod:`http.server`: Fix IPv6 address binding and :option:`--directory
+<http.server --directory>` handling when using HTTPS.
+
+..
+
+.. date: 2025-05-18-12-48-39
+.. gh-issue: 62184
+.. nonce: y11l10
+.. section: Library
+
+Remove import of C implementation of :class:`io.FileIO` from Python
+implementation which has its own implementation
+
+..
+
+.. date: 2025-05-18-12-23-07
+.. gh-issue: 134087
+.. nonce: HilZWl
+.. section: Library
+
+Remove support for arbitrary positional or keyword arguments in the C
+implementation of :class:`threading.RLock` objects. This was deprecated
+since Python 3.14. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-05-18-07-25-15
+.. gh-issue: 134173
+.. nonce: 53oOoF
+.. section: Library
+
+Speed up :mod:`asyncio` performance of transferring state from thread pool
+:class:`concurrent.futures.Future` by up to 4.4x. Patch by J. Nick Koston.
+
+..
+
+.. date: 2025-05-17-20-23-57
+.. gh-issue: 133982
+.. nonce: smS7au
+.. section: Library
+
+Emit :exc:`RuntimeWarning` in the Python implementation of :mod:`io` when
+the :term:`file-like object <file object>` is not closed explicitly in the
+presence of multiple I/O layers.
+
+..
+
+.. date: 2025-05-17-18-08-35
+.. gh-issue: 133890
+.. nonce: onn9_X
+.. section: Library
+
+The :mod:`tarfile` module now handles :exc:`UnicodeEncodeError` in the same
+way as :exc:`OSError` when cannot extract a member.
+
+..
+
+.. date: 2025-05-17-13-46-20
+.. gh-issue: 134097
+.. nonce: fgkjE1
+.. section: Library
+
+Fix interaction of the new :term:`REPL` and :option:`-X showrefcount <-X>`
+command line option.
+
+..
+
+.. date: 2025-05-17-12-40-12
+.. gh-issue: 133889
+.. nonce: Eh-zO4
+.. section: Library
+
+The generated directory listing page in
+:class:`http.server.SimpleHTTPRequestHandler` now only shows the decoded
+path component of the requested URL, and not the query and fragment.
+
+..
+
+.. date: 2025-05-16-20-10-25
+.. gh-issue: 134098
+.. nonce: YyTkKr
+.. section: Library
+
+Fix handling paths that end with a percent-encoded slash (``%2f`` or
+``%2F``) in :class:`http.server.SimpleHTTPRequestHandler`.
+
+..
+
+.. date: 2025-05-16-12-40-37
+.. gh-issue: 132124
+.. nonce: T_5Odx
+.. section: Library
+
+On POSIX-compliant systems, :func:`!multiprocessing.util.get_temp_dir` now
+ignores :envvar:`TMPDIR` (and similar environment variables) if the path
+length of ``AF_UNIX`` socket files exceeds the platform-specific maximum
+length when using the :ref:`forkserver
+<multiprocessing-start-method-forkserver>` start method. Patch by Bénédikt
+Tran.
+
+..
+
+.. date: 2025-05-15-14-27-01
+.. gh-issue: 134062
+.. nonce: fRbJet
+.. section: Library
+
+:mod:`ipaddress`: fix collisions in :meth:`~object.__hash__` for
+:class:`~ipaddress.IPv4Network` and :class:`~ipaddress.IPv6Network` objects.
+
+..
+
+.. date: 2025-05-15-00-27-09
+.. gh-issue: 134004
+.. nonce: e8k4-R
+.. section: Library
+
+:mod:`shelve` as well as underlying :mod:`!dbm.dumb` and :mod:`!dbm.sqlite`
+now have :meth:`!reorganize` methods to recover unused free space previously
+occupied by deleted entries.
+
+..
+
+.. date: 2025-05-13-18-54-56
+.. gh-issue: 133970
+.. nonce: 6G-Oi6
+.. section: Library
+
+Make :class:`!string.templatelib.Template` and
+:class:`!string.templatelib.Interpolation` generic.
+
+..
+
+.. date: 2025-05-13-18-21-59
+.. gh-issue: 71253
+.. nonce: -3Sf_K
+.. section: Library
+
+Raise :exc:`ValueError` in :func:`open` if *opener* returns a negative
+file-descriptor in the Python implementation of :mod:`io` to match the C
+implementation.
+
+..
+
+.. date: 2025-05-12-20-38-57
+.. gh-issue: 133960
+.. nonce: Aee79f
+.. section: Library
+
+Simplify and improve :func:`typing.evaluate_forward_ref`. It now no longer
+raises errors on certain invalid types. In several situations, it is now
+able to evaluate forward references that were previously unsupported.
+
+..
+
+.. date: 2025-05-12-06-52-10
+.. gh-issue: 133925
+.. nonce: elInBY
+.. section: Library
+
+Make the private class ``typing._UnionGenericAlias`` hashable.
+
+..
+
+.. date: 2025-05-11-12-56-52
+.. gh-issue: 133604
+.. nonce: kFxhc8
+.. section: Library
+
+Remove :func:`!platform.java_ver` which was deprecated since Python 3.13.
+
+..
+
+.. date: 2025-05-11-11-39-05
+.. gh-issue: 133875
+.. nonce: pUar3l
+.. section: Library
+
+Removed deprecated :meth:`!pathlib.PurePath.is_reserved`. Use
+:func:`os.path.isreserved` to detect reserved paths on Windows.
+
+..
+
+.. date: 2025-05-11-10-28-11
+.. gh-issue: 133873
+.. nonce: H03nov
+.. section: Library
+
+Remove the deprecated ``getmark()``, ``setmark()`` and ``getmarkers()``
+methods of the :class:`~wave.Wave_read` and :class:`~wave.Wave_write`
+classes, which were deprecated since Python 3.13. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-05-11-10-01-48
+.. gh-issue: 133866
+.. nonce: g3dHP_
+.. section: Library
+
+Remove the undocumented function :func:`!ctypes.SetPointerType`, which has
+been deprecated since Python 3.13. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-05-11-08-48-55
+.. gh-issue: 133823
+.. nonce: F8udQy
+.. section: Library
+
+Remove support for ``TD = TypedDict("TD")`` and ``TD = TypedDict("TD",
+None)`` calls for constructing :class:`typing.TypedDict` objects with zero
+field. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-05-10-17-42-03
+.. gh-issue: 125996
+.. nonce: vaQp0-
+.. section: Library
+
+Fix thread safety of :class:`collections.OrderedDict`. Patch by Kumar
+Aditya.
+
+..
+
+.. date: 2025-05-10-12-07-54
+.. gh-issue: 133817
+.. nonce: 4GMtKV
+.. section: Library
+
+Remove support for creating :class:`~typing.NamedTuple` classes via the
+undocumented keyword argument syntax. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-05-10-12-06-55
+.. gh-issue: 133653
+.. nonce: Gb2aG4
+.. section: Library
+
+Fix :class:`argparse.ArgumentParser` with the *formatter_class* argument.
+Fix TypeError when *formatter_class* is a custom subclass of
+:class:`!HelpFormatter`. Fix TypeError when *formatter_class* is not a
+subclass of :class:`!HelpFormatter` and non-standard *prefix_char* is used.
+Fix support of colorizing when *formatter_class* is not a subclass of
+:class:`!HelpFormatter`.
+
+..
+
+.. date: 2025-05-10-11-04-47
+.. gh-issue: 133810
+.. nonce: 03WhnK
+.. section: Library
+
+Remove :class:`!http.server.CGIHTTPRequestHandler` and ``--cgi`` flag from
+the :program:`python -m http.server` command-line interface. They were
+deprecated in Python 3.13. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-05-09-20-59-24
+.. gh-issue: 132641
+.. nonce: 3qTw44
+.. section: Library
+
+Fixed a race in :func:`functools.lru_cache` under free-threading.
+
+..
+
+.. date: 2025-05-09-19-05-24
+.. gh-issue: 133783
+.. nonce: 1voCnR
+.. section: Library
+
+Fix bug with applying :func:`copy.replace` to :mod:`ast` objects. Attributes
+that default to ``None`` were incorrectly treated as required for manually
+created AST nodes.
+
+..
+
+.. date: 2025-05-09-18-29-25
+.. gh-issue: 133684
+.. nonce: Y1DFSt
+.. section: Library
+
+Fix bug where :func:`annotationlib.get_annotations` would return the wrong
+result for certain classes that are part of a class hierarchy where ``from
+__future__ import annotations`` is used.
+
+..
+
+.. date: 2025-05-09-15-50-00
+.. gh-issue: 77057
+.. nonce: fV8SU-
+.. section: Library
+
+Fix handling of invalid markup declarations in
+:class:`html.parser.HTMLParser`.
+
+..
+
+.. date: 2025-05-09-09-10-34
+.. gh-issue: 130328
+.. nonce: s9h4By
+.. section: Library
+
+Speedup pasting in ``PyREPL`` on Windows in a legacy console. Patch by Chris
+Eibl.
+
+..
+
+.. date: 2025-05-09-08-49-03
+.. gh-issue: 133701
+.. nonce: KI8tGz
+.. section: Library
+
+Fix bug where :class:`typing.TypedDict` classes defined under ``from
+__future__ import annotations`` and inheriting from another ``TypedDict``
+had an incorrect ``__annotations__`` attribute.
+
+..
+
+.. date: 2025-05-08-20-45-35
+.. gh-issue: 133656
+.. nonce: cxZODA
+.. section: Library
+
+Remove deprecated :meth:`!zipimport.zipimporter.load_module`. Use
+:meth:`zipimport.zipimporter.exec_module` instead.
+
+..
+
+.. date: 2025-05-08-20-03-20
+.. gh-issue: 133722
+.. nonce: 1-B82a
+.. section: Library
+
+Added a *color* option to :func:`difflib.unified_diff` that colors output
+similar to :program:`git diff`.
+
+..
+
+.. date: 2025-05-08-13-43-19
+.. gh-issue: 133489
+.. nonce: 9eGS1Z
+.. section: Library
+
+:func:`random.getrandbits` can now generate more that 2\ :sup:`31` bits.
+:func:`random.randbytes` can now generate more that 256 MiB.
+
+..
+
+.. date: 2025-05-07-22-15-15
+.. gh-issue: 133595
+.. nonce: c3U88r
+.. section: Library
+
+Clean up :class:`sqlite3.Connection` APIs. All parameters of
+:func:`sqlite3.connect` except *database* are now keyword-only. The first
+three parameters of methods :meth:`~sqlite3.Connection.create_function` and
+:meth:`~sqlite3.Connection.create_aggregate` are now positional-only. The
+first parameter of methods :meth:`~sqlite3.Connection.set_authorizer`,
+:meth:`~sqlite3.Connection.set_progress_handler` and
+:meth:`~sqlite3.Connection.set_trace_callback` is now positional-only.
+
+..
+
+.. date: 2025-05-07-19-16-41
+.. gh-issue: 133581
+.. nonce: kERUCJ
+.. section: Library
+
+Improve unparsing of t-strings in :func:`ast.unparse` and ``from __future__
+import annotations``. Empty t-strings now round-trip correctly and
+formatting in interpolations is preserved. Patch by Jelle Zijlstra.
+
+..
+
+.. date: 2025-05-07-14-36-30
+.. gh-issue: 133577
+.. nonce: BggPk9
+.. section: Library
+
+Add parameter ``formatter`` to :func:`logging.basicConfig`.
+
+..
+
+.. date: 2025-05-07-13-31-06
+.. gh-issue: 92897
+.. nonce: ubeqGE
+.. section: Library
+
+Removed the ``check_home`` parameter from :func:`sysconfig.is_python_build`,
+deprecated since Python 3.12.
+
+..
+
+.. date: 2025-05-06-22-54-37
+.. gh-issue: 133551
+.. nonce: rfy1tJ
+.. section: Library
+
+Support t-strings (:pep:`750`) in :mod:`annotationlib`. Patch by Jelle
+Zijlstra.
+
+..
+
+.. date: 2025-05-06-14-44-55
+.. gh-issue: 133517
+.. nonce: Ca6NgW
+.. section: Library
+
+Remove :func:`os.listdrives`, :func:`os.listvolumes` and
+:func:`os.listmounts` in non Windows desktop builds since the underlying
+functionality is missing.
+
+..
+
+.. date: 2025-05-05-22-11-24
+.. gh-issue: 133439
+.. nonce: LpmyFz
+.. section: Library
+
+Fix dot commands with trailing spaces are mistaken for multi-line SQL
+statements in the sqlite3 command-line interface.
+
+..
+
+.. date: 2025-05-05-18-50-00
+.. gh-issue: 133447
+.. nonce: ajshdb
+.. section: Library
+
+Add basic color to :mod:`sqlite3` CLI interface.
+
+..
+
+.. date: 2025-05-05-10-41-41
+.. gh-issue: 133253
+.. nonce: J5-xDD
+.. section: Library
+
+Fix thread-safety issues in :mod:`linecache`.
+
+..
+
+.. date: 2025-05-05-03-14-08
+.. gh-issue: 133390
+.. nonce: AuTggn
+.. section: Library
+
+Support keyword completion in the :mod:`sqlite3` command-line interface and
+add :data:`sqlite3.SQLITE_KEYWORDS` constant.
+
+..
+
+.. date: 2025-05-04-17-04-55
+.. gh-issue: 132493
+.. nonce: huirKi
+.. section: Library
+
+Avoid accessing ``__annotations__`` unnecessarily in
+:func:`inspect.signature`.
+
+..
+
+.. date: 2025-05-01-16-03-11
+.. gh-issue: 133017
+.. nonce: k7RLQp
+.. section: Library
+
+Improve the error message of :func:`multiprocessing.sharedctypes.Array`,
+:func:`multiprocessing.sharedctypes.RawArray`,
+:func:`multiprocessing.sharedctypes.Value` and
+:func:`multiprocessing.sharedctypes.RawValue` when an invalid typecode is
+passed. Patch by Tomas Roun
+
+..
+
+.. date: 2025-05-01-10-56-44
+.. gh-issue: 132813
+.. nonce: rKurvp
+.. section: Library
+
+Improve error messages for incorrect types and values of
+:class:`csv.Dialect` attributes.
+
+..
+
+.. date: 2025-04-30-19-32-18
+.. gh-issue: 132969
+.. nonce: EagQ3G
+.. section: Library
+
+Prevent the :class:`~concurrent.futures.ProcessPoolExecutor` executor
+thread, which remains running when :meth:`shutdown(wait=False)
+<concurrent.futures.Executor.shutdown>`, from attempting to adjust the
+pool's worker processes after the object state has already been reset during
+shutdown. A combination of conditions, including a worker process having
+terminated abormally, resulted in an exception and a potential hang when the
+still-running executor thread attempted to replace dead workers within the
+pool.
+
+..
+
+.. date: 2025-04-29-11-48-46
+.. gh-issue: 132876
+.. nonce: lyTQGZ
+.. section: Library
+
+``ldexp()`` on Windows doesn't round subnormal results before Windows 11,
+but should. Python's :func:`math.ldexp` wrapper now does round them, so
+results may change slightly, in rare cases of very small results, on Windows
+versions before 11.
+
+..
+
+.. date: 2025-04-26-15-50-12
+.. gh-issue: 133009
+.. nonce: etBuz5
+.. section: Library
+
+:mod:`xml.etree.ElementTree`: Fix a crash in :meth:`Element.__deepcopy__
+<object.__deepcopy__>` when the element is concurrently mutated. Patch by
+Bénédikt Tran.
+
+..
+
+.. date: 2025-04-25-16-06-53
+.. gh-issue: 132908
+.. nonce: wV5rja
+.. section: Library
+
+Add :func:`math.isnormal` and :func:`math.issubnormal` functions. Patch by
+Sergey B Kirpichev.
+
+..
+
+.. date: 2025-04-25-11-53-37
+.. gh-issue: 95380
+.. nonce: 7dvPe-
+.. section: Library
+
+:func:`fcntl.fcntl` and :func:`fcntl.ioctl`: Remove the 1024 bytes limit on
+the size of not mutated bytes-like argument.
+
+..
+
+.. date: 2025-04-25-11-48-00
+.. gh-issue: 122781
+.. nonce: ajsdns
+.. section: Library
+
+Fix ``%z`` directive in :func:`datetime.datetime.strptime` to allow for no
+provided offset as was documented.
+
+..
+
+.. date: 2025-04-22-21-00-23
+.. gh-issue: 123471
+.. nonce: asOLA2
+.. section: Library
+
+Make concurrent iterations over :class:`itertools.combinations` and
+:class:`itertools.product` safe under free-threading.
+
+..
+
+.. date: 2025-04-21-01-05-14
+.. gh-issue: 127081
+.. nonce: Egrpq7
+.. section: Library
+
+Fix libc thread safety issues with :mod:`dbm` by performing stateful
+operations in critical sections.
+
+..
+
+.. date: 2025-04-21-01-03-15
+.. gh-issue: 127081
+.. nonce: WXRliX
+.. section: Library
+
+Fix libc thread safety issues with :mod:`os` by replacing ``getlogin`` with
+``getlogin_r`` re-entrant version.
+
+..
+
+.. date: 2025-04-21-00-58-04
+.. gh-issue: 127081
+.. nonce: 3DCl92
+.. section: Library
+
+Fix libc thread safety issues with :mod:`pwd` by locking access to
+``getpwall``.
+
+..
+
+.. date: 2025-04-16-21-02-57
+.. gh-issue: 132551
+.. nonce: Psa7pL
+.. section: Library
+
+Make :class:`io.BytesIO` safe in :term:`free-threaded <free threading>`
+build.
+
+..
+
+.. date: 2025-04-08-07-25-10
+.. gh-issue: 107583
+.. nonce: JGfbhq
+.. section: Library
+
+Fix :class:`!Flag` inversion when flag set has missing values
+(:class:`!IntFlag` still flips all bits); fix negative assigned values
+during flag creation (both :class:`!Flag` and :class:`!IntFlag` ignore
+missing values).
+
+..
+
+.. date: 2025-04-07-10-20-16
+.. gh-issue: 87790
+.. nonce: X2SjJe
+.. section: Library
+
+Support underscore and comma as thousands separators in the fractional part
+for :class:`~fractions.Fraction`'s formatting. Patch by Sergey B Kirpichev.
+
+..
+
+.. date: 2025-04-07-09-53-54
+.. gh-issue: 87790
+.. nonce: 6nj3zQ
+.. section: Library
+
+Support underscore and comma as thousands separators in the fractional part
+for :class:`~decimal.Decimal`'s formatting. Patch by Sergey B Kirpichev.
+
+..
+
+.. date: 2025-04-07-06-41-54
+.. gh-issue: 131884
+.. nonce: ym9BJN
+.. section: Library
+
+Fix formatting issues in :func:`json.dump` when both *indent* and *skipkeys*
+are used.
+
+..
+
+.. date: 2025-03-27-08-13-32
+.. gh-issue: 131788
+.. nonce: 0RWiFc
+.. section: Library
+
+Make ``ResourceTracker.send`` from :mod:`multiprocessing` re-entrant safe
+
+..
+
+.. date: 2025-03-19-12-41-42
+.. gh-issue: 91349
+.. nonce: 8eTOCP
+.. section: Library
+
+Adjust default ``compressionlevel=`` to 6 (down from 9) in :mod:`gzip` and
+:mod:`tarfile`. It is the default level used by most compression tools and a
+better tradeoff between speed and performance.
+
+..
+
+.. date: 2025-03-17-21-21-06
+.. gh-issue: 131146
+.. nonce: A5Obgv
+.. section: Library
+
+Fix :class:`calendar.TextCalendar`, :class:`calendar.HTMLCalendar`, and the
+:mod:`calendar` CLI to display month names in the nominative case by adding
+:data:`calendar.standalone_month_name` and
+:data:`calendar.standalone_month_abbr`, which provide month names and
+abbreviations in the grammatical form used when a month name stands by
+itself, if the locale supports it.
+
+..
+
+.. date: 2025-03-13-20-48-58
+.. gh-issue: 123471
+.. nonce: cM4w4f
+.. section: Library
+
+Make concurrent iterations over :class:`itertools.cycle` safe under
+free-threading.
+
+..
+
+.. date: 2025-03-11-05-24-14
+.. gh-issue: 130664
+.. nonce: g0yNMm
+.. section: Library
+
+Handle corner-case for :class:`~fractions.Fraction`'s formatting: treat
+zero-padding (preceding the width field by a zero (``'0'``) character) as an
+equivalent to a fill character of ``'0'`` with an alignment type of ``'='``,
+just as in case of :class:`float`'s.
+
+..
+
+.. date: 2025-03-09-03-13-41
+.. gh-issue: 130999
+.. nonce: tBRBVB
+.. section: Library
+
+Avoid exiting the new REPL and offer suggestions even if there are
+non-string candidates when errors occur.
+
+..
+
+.. date: 2025-03-08-17-07-00
+.. gh-issue: 88473
+.. nonce: qg23g8
+.. section: Library
+
+Implement a fast path for :class:`datetime.date` objects in
+:func:`datetime.date.today` which results in a 5x performance gain while
+proper subclasses retain their previous performance.
+
+..
+
+.. date: 2024-11-25-10-22-08
+.. gh-issue: 126883
+.. nonce: MAEF7g
+.. section: Library
+
+Add check that timezone fields are in range for
+:meth:`datetime.datetime.fromisoformat` and
+:meth:`datetime.time.fromisoformat`. Patch by Semyon Moroz.
+
+..
+
+.. date: 2024-10-28-06-54-22
+.. gh-issue: 125028
+.. nonce: GEY8Ws
+.. section: Library
+
+:data:`functools.Placeholder` cannot be passed to :func:`functools.partial`
+as a keyword argument.
+
+..
+
+.. date: 2024-10-22-16-21-55
+.. gh-issue: 125843
+.. nonce: 2ttzYo
+.. section: Library
+
+If possible, indicate which :mod:`curses` C function or macro is responsible
+for raising a :exc:`curses.error` exception. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2024-10-17-01-12-22
+.. gh-issue: 119109
+.. nonce: u4hcvb
+.. section: Library
+
+:func:`functools.partial` calls are now faster when keyword arguments are
+used.
+
+..
+
+.. date: 2024-09-13-09-48-25
+.. gh-issue: 124033
+.. nonce: WNudS0
+.. section: Library
+
+``SimplePath`` is now presented in ``importlib.metadata.__all__``.
+
+..
+
+.. date: 2024-09-13-09-46-47
+.. gh-issue: 91216
+.. nonce: LuOsF4
+.. section: Library
+
+``importlib.metadata`` now raises a ``KeyError`` instead of returning
+``None`` when a key is missing from the metadata.
+
+..
+
+.. date: 2024-09-13-09-43-15
+.. gh-issue: 120492
+.. nonce: Mm6CJ6
+.. section: Library
+
+``importlib.metadata`` now prioritizes valid dists to invalid dists when
+retrieving by name.
+
+..
+
+.. date: 2024-07-16-00-01-04
+.. gh-issue: 99631
+.. nonce: GWD4fD
+.. section: Library
+
+The :mod:`shelve` module now accepts custom serialization and
+deserialization functions.
+
+..
+
+.. date: 2024-07-06-14-32-30
+.. gh-issue: 119186
+.. nonce: E5B1HQ
+.. section: Library
+
+Slightly speed up :func:`os.walk` by calling :func:`os.path.join` less
+often.
+
+..
+
+.. date: 2024-06-06-17-49-07
+.. gh-issue: 120170
+.. nonce: DUxhmT
+.. section: Library
+
+Fix an issue in the :mod:`!_pickle` extension module in which importing
+:mod:`multiprocessing` could change how pickle identifies which module an
+object belongs to, potentially breaking the unpickling of those objects.
+
+..
+
+.. date: 2024-05-13-09-50-31
+.. gh-issue: 118981
+.. nonce: zgOQPv
+.. section: Library
+
+Fix potential hang in ``multiprocessing.popen_spawn_posix`` that can happen
+when the child proc dies early by closing the child fds right away.
+
+..
+
+.. date: 2023-07-05-14-34-10
+.. gh-issue: 105497
+.. nonce: HU5u89
+.. section: Library
+
+Fix flag mask inversion when unnamed flags exist.
+
+..
+
+.. date: 2023-03-13-22-51-40
+.. gh-issue: 99813
+.. nonce: 40TV02
+.. section: Library
+
+:mod:`ssl` now uses ``SSL_sendfile`` internally when it is possible (see
+:data:`~ssl.OP_ENABLE_KTLS`). The function sends a file more efficiently
+because it performs TLS encryption in the kernel to avoid additional context
+switches. Patch by Illia Volochii.
+
+..
+
+.. date: 2023-02-13-21-56-38
+.. gh-issue: 62824
+.. nonce: CBZzX3
+.. section: Library
+
+Fix aliases for ``iso8859_8`` encoding. Patch by Dave Goncalves.
+
+..
+
+.. date: 2023-02-13-21-41-34
+.. gh-issue: 86155
+.. nonce: ppIGSC
+.. section: Library
+
+:meth:`html.parser.HTMLParser.close` no longer loses data when the
+``<script>`` tag is not closed. Patch by Waylan Limberg.
+
+..
+
+.. date: 2023-02-13-20-34-52
+.. gh-issue: 78319
+.. nonce: V1zzed
+.. section: Library
+
+UTF8 support for the IMAP APPEND command has been made RFC compliant.
+
+..
+
+.. date: 2022-10-08-14-56-07
+.. gh-issue: 93334
+.. nonce: 0KUm8d
+.. section: Library
+
+Reraise :exc:`KeyError` as :exc:`ModuleNotFoundError` when
+:meth:`importlib.machinery.PathFinder.find_spec` is called on a submodule
+without importing the parent (and without a ``path`` argument).
+
+..
+
+.. date: 2022-07-24-20-56-32
+.. gh-issue: 69426
+.. nonce: unccw7
+.. section: Library
+
+Fix :class:`html.parser.HTMLParser` to not unescape character entities in
+attribute values if they are followed by an ASCII alphanumeric or an equals
+sign.
+
+..
+
+.. bpo: 38735
+.. date: 2022-01-07-16-56-57
+.. nonce: NFfJX6
+.. section: Library
+
+Fix failure when importing a module from the root directory on unix-like
+platforms with sys.pycache_prefix set.
+
+..
+
+.. bpo: 45959
+.. date: 2021-12-18-12-46-20
+.. nonce: vPlr3P
+.. section: Library
+
+:mod:`pprint` can now pretty-print dict views.
+
+..
+
+.. date: 2021-09-21-17-17-29
+.. gh-issue: 84683
+.. nonce: wDSRsG
+.. section: Library
+
+:mod:`zoneinfo`: Check in ``<prefix>/share/zoneinfo`` for data files on
+Windows
+
+..
+
+.. bpo: 43429
+.. date: 2021-03-07-16-31-36
+.. nonce: Koa0mf
+.. section: Library
+
+The :meth:`~mmap.mmap.size` method of the :class:`mmap.mmap` class now
+returns the size of an anonymous mapping on both Unix and Windows.
+Previously, the size would be returned on Windows and an :exc:`OSError`
+would be raised on Unix. :exc:`ValueError` is now raised instead of
+:exc:`OSError` when ``trackfd=False``.
+
+..
+
+.. bpo: 41839
+.. date: 2020-09-23-11-54-17
+.. nonce: kU5Ywl
+.. section: Library
+
+Allow negative priority values from :func:`os.sched_get_priority_min` and
+:func:`os.sched_get_priority_max` functions.
+
+..
+
+.. bpo: 28494
+.. date: 2017-12-30-18-21-00
+.. nonce: Dt_Wks
+.. section: Library
+
+Improve Zip file validation false positive rate in
+:func:`zipfile.is_zipfile`.
+
+..
+
+.. date: 2025-10-09-12-53-47
+.. gh-issue: 96491
+.. nonce: 4YKxvy
+.. section: IDLE
+
+Deduplicate version number in IDLE shell title bar after saving to a file.
+
+..
+
+.. date: 2025-10-08-08-35-50
+.. gh-issue: 139742
+.. nonce: B3fZLg
+.. section: IDLE
+
+Colorize t-string prefixes for template strings in IDLE, as done for
+f-string prefixes.
+
+..
+
+.. date: 2025-07-01-23-00-58
+.. gh-issue: 136155
+.. nonce: 4siQQO
+.. section: Documentation
+
+We are now checking for fatal errors in EPUB builds in CI.
+
+..
+
+.. date: 2025-06-10-17-02-06
+.. gh-issue: 135171
+.. nonce: quHvts
+.. section: Documentation
+
+Document that the :term:`iterator` for the leftmost :keyword:`!for` clause
+in the generator expression is created immediately.
+
+..
+
+.. bpo: 45210
+.. date: 2021-09-15-13-07-25
+.. nonce: RtGk7i
+.. section: Documentation
+
+Document that error indicator may be set in tp_dealloc, and how to avoid
+clobbering it.
+
+..
+
+.. date: 2025-10-13-17-56-23
+.. gh-issue: 140000
+.. nonce: tLhn3e
+.. section: Core and Builtins
+
+Fix potential memory leak when a reference cycle exists between an instance
+of :class:`typing.TypeAliasType`, :class:`typing.TypeVar`,
+:class:`typing.ParamSpec`, or :class:`typing.TypeVarTuple` and its
+``__name__`` attribute. Patch by Mikhail Efimov.
+
+..
+
+.. date: 2025-10-12-18-54-06
+.. gh-issue: 140009
+.. nonce: -MbFh_
+.. section: Core and Builtins
+
+Improve performance of list extension by dictionary items.
+
+..
+
+.. date: 2025-10-12-11-00-06
+.. gh-issue: 139988
+.. nonce: 4wi51t
+.. section: Core and Builtins
+
+Fix a memory leak when failing to create a :class:`~typing.Union` type.
+Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-10-08-13-52-00
+.. gh-issue: 139748
+.. nonce: jq0yFJ
+.. section: Core and Builtins
+
+Fix reference leaks in error branches of functions accepting path strings or
+bytes such as :func:`compile` and :func:`os.system`. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-10-06-13-15-26
+.. gh-issue: 139516
+.. nonce: d9Pkur
+.. section: Core and Builtins
+
+Fix lambda colon erroneously start format spec in f-string in tokenizer.
+
+..
+
+.. date: 2025-10-01-18-21-19
+.. gh-issue: 63161
+.. nonce: ef1S6N
+.. section: Core and Builtins
+
+Support non-UTF-8 shebang and comments in Python source files if non-UTF-8
+encoding is specified. Detect decoding error in comments for default (UTF-8)
+encoding. Show the line and position of decoding error for default encoding
+in a traceback. Show the line containing the coding cookie when it conflicts
+with the BOM in a traceback.
+
+..
+
+.. date: 2025-09-30-14-57-19
+.. gh-issue: 139116
+.. nonce: nlVf40
+.. section: Core and Builtins
+
+Prevent a deadlock when multiple threads start, stop and use
+:mod:`tracemalloc` simultaneously.
+
+..
+
+.. date: 2025-09-24-17-32-52
+.. gh-issue: 139275
+.. nonce: novrqf
+.. section: Core and Builtins
+
+Fix compilation problems in ``_remote_debugging_module.c`` when the system
+doesn't have ``process_vm_readv``. Patch by Pablo Galindo
+
+..
+
+.. date: 2025-09-24-17-08-42
+.. gh-issue: 133059
+.. nonce: EXvxb7
+.. section: Core and Builtins
+
+Increased the number of cached small positive integers from 256 to 1024.
+
+..
+
+.. date: 2025-09-22-15-21-49
+.. gh-issue: 74857
+.. nonce: 5XRQaA
+.. section: Core and Builtins
+
+:pep:`538`: Coerce the POSIX locale to a UTF-8 based locale. Patch by Victor
+Stinner.
+
+..
+
+.. date: 2025-09-21-14-33-17
+.. gh-issue: 116738
+.. nonce: vNaI4h
+.. section: Core and Builtins
+
+Make :mod:`mmap` thread-safe on the :term:`free threaded <free threading>`
+build.
+
+..
+
+.. date: 2025-09-17-17-17-21
+.. gh-issue: 138558
+.. nonce: 0VbzCH
+.. section: Core and Builtins
+
+Fix handling of unusual t-string annotations in annotationlib. Patch by Dave
+Peck.
+
+..
+
+.. date: 2025-09-15-14-04-56
+.. gh-issue: 134466
+.. nonce: yR4fYW
+.. section: Core and Builtins
+
+Don't run PyREPL in a degraded environment where setting termios attributes
+is not allowed.
+
+..
+
+.. date: 2025-09-11-15-56-18
+.. gh-issue: 138794
+.. nonce: nrOn1K
+.. section: Core and Builtins
+
+When a new tracing function is registered with
+:c:func:`PyRefTracer_SetTracer`, replacing the current a call to the trace
+function will be made with the object set to **NULL** and **event** set to
+:c:data:`PyRefTracer_TRACKER_REMOVED`. This will happen just before the new
+function is registered. Patch by Pablo Galindo
+
+..
+
+.. date: 2025-09-10-14-53-59
+.. gh-issue: 71810
+.. nonce: ppf0J-
+.. section: Core and Builtins
+
+Raise :exc:`OverflowError` for ``(-1).to_bytes()`` for signed conversions
+when bytes count is zero. Patch by Sergey B Kirpichev.
+
+..
+
+.. date: 2025-09-09-23-59-13
+.. gh-issue: 138716
+.. nonce: UawDY0
+.. section: Core and Builtins
+
+Improve :exc:`SyntaxError` message for :keyword:`assert` in cases like
+``assert a := b``.
+
+..
+
+.. date: 2025-09-06-13-53-33
+.. gh-issue: 105487
+.. nonce: a43YaY
+.. section: Core and Builtins
+
+Remove non-existent :meth:`~object.__copy__`, :meth:`~object.__deepcopy__`,
+and :attr:`~type.__bases__` from the :meth:`~object.__dir__` entries of
+:class:`types.GenericAlias`.
+
+..
+
+.. date: 2025-09-05-01-19-04
+.. gh-issue: 138192
+.. nonce: erluq5
+.. section: Core and Builtins
+
+Fix :mod:`contextvars` initialization so that all subinterpreters are
+assigned the :attr:`~contextvars.Token.MISSING` value.
+
+..
+
+.. date: 2025-09-03-17-00-30
+.. gh-issue: 138479
+.. nonce: qUxgWs
+.. section: Core and Builtins
+
+Fix a crash when a generic object's ``__typing_subst__`` returns an object
+that isn't a :class:`tuple`.
+
+..
+
+.. date: 2025-09-03-15-35-34
+.. gh-issue: 138431
+.. nonce: EUsrtA
+.. section: Core and Builtins
+
+Fix a bug in the JIT optimizer when round-tripping strings and tuples.
+
+..
+
+.. date: 2025-09-03-10-16-09
+.. gh-issue: 138378
+.. nonce: r6BQxV
+.. section: Core and Builtins
+
+Move the globals-to-const JIT optimizer pass into to the main JIT optimizer
+pass
+
+..
+
+.. date: 2025-09-02-22-17-55
+.. gh-issue: 138401
+.. nonce: uTRvue
+.. section: Core and Builtins
+
+Add missing validation of argument ``count`` in :func:`os.sendfile` to be
+non-negative.
+
+..
+
+.. date: 2025-09-02-09-10-06
+.. gh-issue: 138372
+.. nonce: h1Xk4-
+.. section: Core and Builtins
+
+Fix :exc:`SyntaxWarning` emitted for erroneous subscript expressions
+involving :ref:`template string literals <t-strings>`. Patch by Brian
+Schubert.
+
+..
+
+.. date: 2025-09-01-21-52-54
+.. gh-issue: 138302
+.. nonce: -ez47B
+.. section: Core and Builtins
+
+``BINARY_OP`` now specializes to ``BINARY_OP_ADD_INT``,
+``BINARY_OP_SUBTRACT_INT`` or ``BINARY_OP_MULTIPLY_INT`` if operands are
+compact ints.
+
+..
+
+.. date: 2025-09-01-16-09-02
+.. gh-issue: 138318
+.. nonce: t-WEN5
+.. section: Core and Builtins
+
+The default REPL now avoids highlighting built-in names (for instance
+:class:`set` or :func:`format`) when they are used as attribute names (for
+instance in ``value.set`` or ``text.format``).
+
+..
+
+.. date: 2025-09-01-13-54-43
+.. gh-issue: 138349
+.. nonce: 0fGmAi
+.. section: Core and Builtins
+
+Fix crash in certain cases where a module contains both a module-level
+annotation and a comprehension.
+
+..
+
+.. date: 2025-08-30-17-15-05
+.. gh-issue: 69605
+.. nonce: KjBk99
+.. section: Core and Builtins
+
+Fix some standard library submodules missing from the :term:`REPL`
+auto-completion of imports.
+
+..
+
+.. date: 2025-08-30-00-55-35
+.. gh-issue: 61206
+.. nonce: HeFLvl
+.. section: Core and Builtins
+
+:mod:`zipimport` now supports zstandard compressed zip file entries.
+
+..
+
+.. date: 2025-08-28-09-29-46
+.. gh-issue: 116738
+.. nonce: yLZJpV
+.. section: Core and Builtins
+
+Make :mod:`cProfile` thread-safe on the :term:`free threaded <free
+threading>` build.
+
+..
+
+.. date: 2025-08-27-17-51-38
+.. gh-issue: 137838
+.. nonce: lK6T0j
+.. section: Core and Builtins
+
+Fix JIT trace buffer overrun by increasing possible exit stubs. Patch by
+Donghee Na.
+
+..
+
+.. date: 2025-08-27-13-11-47
+.. gh-issue: 71679
+.. nonce: V0yFeT
+.. section: Core and Builtins
+
+Use the same quoting algorithm for the repr of bytearrays as for bytes
+objects and strings -- use double quotes for quoting if the bytearray
+contains single quotes and does not contain double quotes.
+
+..
+
+.. date: 2025-08-22-11-39-40
+.. gh-issue: 137384
+.. nonce: j4b_in
+.. section: Core and Builtins
+
+Fix a crash when using the :mod:`warnings` module in a finalizer at
+shutdown. Patch by Kumar Aditya.
+
+..
+
+.. date: 2025-08-21-06-31-42
+.. gh-issue: 138004
+.. nonce: FH2Hre
+.. section: Core and Builtins
+
+On Solaris/Illumos platforms, thread names are now encoded as ASCII to avoid
+errors on systems (e.g. OpenIndiana) that don't support non-ASCII names.
+
+..
+
+.. date: 2025-08-21-01-46-39
+.. gh-issue: 137976
+.. nonce: p4sb4x
+.. section: Core and Builtins
+
+Removed ``localtime`` from the list of reported system timezones.
+
+..
+
+.. date: 2025-08-20-14-17-47
+.. gh-issue: 137992
+.. nonce: fcL3SK
+.. section: Core and Builtins
+
+Ensure that :c:func:`PyRefTracer_SetTracer` sync with all existing threads
+when called to avoid races in the free threaded build. Patch by Pablo
+Galindo
+
+..
+
+.. date: 2025-08-19-18-52-22
+.. gh-issue: 137967
+.. nonce: uw67Ys
+.. section: Core and Builtins
+
+Show error suggestions on nested attribute access. Patch by Pablo Galindo
+
+..
+
+.. date: 2025-08-19-16-07-07
+.. gh-issue: 137959
+.. nonce: EWj0RZ
+.. section: Core and Builtins
+
+Replace the shim code added to every piece of jitted code with a single
+trampoline function.
+
+..
+
+.. date: 2025-08-17-13-36-53
+.. gh-issue: 137883
+.. nonce: 55VDCN
+.. section: Core and Builtins
+
+Fix runaway recursion when calling a function with keyword arguments.
+
+..
+
+.. date: 2025-08-15-15-45-26
+.. gh-issue: 137079
+.. nonce: YEow69
+.. section: Core and Builtins
+
+Fix keyword typo recognition when parsing files. Patch by Pablo Galindo.
+
+..
+
+.. date: 2025-08-14-14-18-29
+.. gh-issue: 137728
+.. nonce: HdYS9R
+.. section: Core and Builtins
+
+Fix the JIT's handling of many local variables. This previously caused a
+segfault.
+
+..
+
+.. date: 2025-08-13-16-58-58
+.. gh-issue: 137716
+.. nonce: ZcZSyi
+.. section: Core and Builtins
+
+Fix double period in :exc:`AttributeError` message for invalid mock
+assertions
+
+..
+
+.. date: 2025-08-13-13-39-02
+.. gh-issue: 137433
+.. nonce: g6Atfz
+.. section: Core and Builtins
+
+Fix a potential deadlock in the :term:`free threading` build when daemon
+threads enable or disable profiling or tracing while the main thread is
+shutting down the interpreter.
+
+..
+
+.. date: 2025-08-10-21-34-12
+.. gh-issue: 137576
+.. nonce: 0ZicS-
+.. section: Core and Builtins
+
+Fix for incorrect source code being shown in tracebacks from the Basic REPL
+when :envvar:`PYTHONSTARTUP` is given. Patch by Adam Hartz.
+
+..
+
+.. date: 2025-08-09-11-38-37
+.. gh-issue: 37817
+.. nonce: Y5Fhde
+.. section: Core and Builtins
+
+Allow assignment to :attr:`~type.__bases__` of direct subclasses of builtin
+classes.
+
+..
+
+.. date: 2025-08-09-04-07-05
+.. gh-issue: 132732
+.. nonce: 8BiIVJ
+.. section: Core and Builtins
+
+Optimize ``_COMPARE_OP``, ``_CONTAINS_OP``, ``_UNARY_NEGATIVE``,
+``_UNARY_NOT``, and ``_UNARY_INVERT`` in JIT builds with constant-loading
+uops (``_POP_TWO_LOAD_CONST_INLINE_BORROW`` and
+``_POP_TOP_LOAD_CONST_INLINE_BORROW``), and then remove both to reduce
+instruction count.
+
+..
+
+.. date: 2025-08-07-09-52-19
+.. gh-issue: 137400
+.. nonce: AK1dy-
+.. section: Core and Builtins
+
+Fix a crash in the :term:`free threading` build when disabling profiling or
+tracing across all threads with :c:func:`PyEval_SetProfileAllThreads` or
+:c:func:`PyEval_SetTraceAllThreads` or their Python equivalents
+:func:`threading.settrace_all_threads` and
+:func:`threading.setprofile_all_threads`.
+
+..
+
+.. date: 2025-08-06-16-55-44
+.. gh-issue: 133143
+.. nonce: l7CI9v
+.. section: Core and Builtins
+
+Add :data:`sys.abi_info` object to make ABI information more easily
+accessible.
+
+..
+
+.. date: 2025-08-06-15-39-54
+.. gh-issue: 137400
+.. nonce: xIw0zs
+.. section: Core and Builtins
+
+Fix a crash in the :term:`free threading` build when disabling profiling or
+tracing across all threads with :c:func:`PyEval_SetProfileAllThreads` or
+:c:func:`PyEval_SetTraceAllThreads` or their Python equivalents
+:func:`threading.settrace_all_threads` and
+:func:`threading.setprofile_all_threads`.
+
+..
+
+.. date: 2025-08-05-20-24-12
+.. gh-issue: 120037
+.. nonce: MB7MmI
+.. section: Core and Builtins
+
+Disable user site packages directory when a ``._pth`` file is used, even if
+it contains ``import site``.
+
+..
+
+.. date: 2025-08-05-17-22-24
+.. gh-issue: 58124
+.. nonce: q1__53
+.. section: Core and Builtins
+
+Fix name of the Python encoding in Unicode errors of the code page codec:
+use "cp65000" and "cp65001" instead of "CP_UTF7" and "CP_UTF8" which are not
+valid Python code names. Patch by Victor Stinner.
+
+..
+
+.. date: 2025-08-05-10-22-15
+.. gh-issue: 136966
+.. nonce: J5lrE0
+.. section: Core and Builtins
+
+The :attr:`object.__dict__` and :attr:`!__weakref__` descriptors now use a
+single descriptor instance per interpreter, shared across all types that
+need them. This speeds up class creation, and helps avoid reference cycles.
+
+..
+
+.. date: 2025-08-02-23-04-57
+.. gh-issue: 137314
+.. nonce: wjEdzD
+.. section: Core and Builtins
+
+Fixed a regression where raw f-strings incorrectly interpreted escape
+sequences in format specifications. Raw f-strings now properly preserve
+literal backslashes in format specs, matching the behavior from Python 3.11.
+For example, ``rf"{obj:\xFF}"`` now correctly produces ``'\\xFF'`` instead
+of ``'ÿ'``. Patch by Pablo Galindo.
+
+..
+
+.. date: 2025-08-02-10-27-53
+.. gh-issue: 137308
+.. nonce: at05p_
+.. section: Core and Builtins
+
+A standalone docstring in a node body is optimized as a :keyword:`pass`
+statement to ensure that the node's body is never empty. There was a
+:exc:`ValueError` in :func:`compile` otherwise.
+
+..
+
+.. date: 2025-08-01-18-54-31
+.. gh-issue: 137288
+.. nonce: FhE7ku
+.. section: Core and Builtins
+
+Fix bug where some bytecode instructions of a boolean expression are not
+associated with the correct exception handler.
+
+..
+
+.. date: 2025-07-31-23-02-02
+.. gh-issue: 137291
+.. nonce: kIxVZd
+.. section: Core and Builtins
+
+The perf profiler can now be used if a previous frame evaluation API has
+been provided.
+
+..
+
+.. date: 2025-07-28-19-11-34
+.. gh-issue: 134291
+.. nonce: IiB9Id
+.. section: Core and Builtins
+
+Remove some newer macOS API usage from the JIT compiler in order to restore
+compatibility with older OSX 10.15 deployment targets.
+
+..
+
+.. date: 2025-07-28-17-01-05
+.. gh-issue: 88886
+.. nonce: g4XFPb
+.. section: Core and Builtins
+
+The codecs lookup function now again performs only minimal normalization of
+the encoding name before passing it to the search functions: all ASCII
+letters are converted to lower case, spaces are replaced with hyphens. This
+restores the pre-Python 3.9 behavior.
+
+..
+
+.. date: 2025-07-25-22-31-52
+.. gh-issue: 131338
+.. nonce: zJDCMp
+.. section: Core and Builtins
+
+Disable computed stack limit checks on non-glibc linux platforms to fix
+crashes on deep recursion.
+
+..
+
+.. date: 2025-07-24-17-30-58
+.. gh-issue: 136870
+.. nonce: ncx82J
+.. section: Core and Builtins
+
+Fix data races while de-instrumenting bytecode of code objects running
+concurrently in threads.
+
+..
+
+.. date: 2025-07-24-02-13-59
+.. gh-issue: 132732
+.. nonce: p77xkb
+.. section: Core and Builtins
+
+Optimize constant comparison for ``_COMPARE_OP_INT``, ``_COMPARE_OP_FLOAT``
+and ``_COMPARE_OP_STR`` in JIT builds
+
+..
+
+.. date: 2025-07-19-17-08-09
+.. gh-issue: 127598
+.. nonce: Mx8S-y
+.. section: Core and Builtins
+
+Improve :exc:`ModuleNotFoundError` by adding flavour text to the exception
+when the :option:`-S` option is passed. Patch by Andrea Mattei.
+
+..
+
+.. date: 2025-07-19-12-37-05
+.. gh-issue: 136801
+.. nonce: XU_tF2
+.. section: Core and Builtins
+
+Fix PyREPL syntax highlighting on match cases after multi-line case.
+Contributed by Olga Matoula.
+
+..
+
+.. date: 2025-07-19-10-35-31
+.. gh-issue: 74185
+.. nonce: 7hPCA5
+.. section: Core and Builtins
+
+The :meth:`~object.__repr__` of :class:`ImportError` and
+:class:`ModuleNotFoundError` now shows "name" and "path" as ``name=<name>``
+and ``path=<path>`` if they were given as keyword arguments at construction
+time. Patch by Serhiy Storchaka, Oleg Iarygin, and Yoav Nir
+
+..
+
+.. date: 2025-07-18-08-43-35
+.. gh-issue: 116738
+.. nonce: i0HWtP
+.. section: Core and Builtins
+
+Make functions in :mod:`syslog` thread-safe on the :term:`free threaded
+<free threading>` build.
+
+..
+
+.. date: 2025-07-15-10-03-57
+.. gh-issue: 116738
+.. nonce: oFttKl
+.. section: Core and Builtins
+
+Make functions in :mod:`pwd` thread-safe on the :term:`free threaded <free
+threading>` build.
+
+..
+
+.. date: 2025-07-14-17-01-23
+.. gh-issue: 136616
+.. nonce: FQjXE_
+.. section: Core and Builtins
+
+Improve :exc:`SyntaxError` error messages for invalid :keyword:`assert`
+usages.
+
+..
+
+.. date: 2025-07-13-21-21-17
+.. gh-issue: 136599
+.. nonce: sLhm2O
+.. section: Core and Builtins
+
+Improve performance of :class:`int` hash calculations.
+
+..
+
+.. date: 2025-07-12-09-59-14
+.. gh-issue: 136421
+.. nonce: ZD1rNj
+.. section: Core and Builtins
+
+Fix crash when initializing :mod:`datetime` concurrently.
+
+..
+
+.. date: 2025-07-11-13-45-48
+.. gh-issue: 136541
+.. nonce: uZ_-Ju
+.. section: Core and Builtins
+
+Fix some issues with the perf trampolines on x86-64 and aarch64. The
+trampolines were not being generated correctly for some cases, which could
+lead to the perf integration not working correctly. Patch by Pablo Galindo.
+
+..
+
+.. date: 2025-07-11-12-29-09
+.. gh-issue: 107545
+.. nonce: ipfl7U
+.. section: Core and Builtins
+
+Improve the error messages that may be raised by
+:meth:`~socket.socket.setsockopt`.
+
+..
+
+.. date: 2025-07-10-23-23-50
+.. gh-issue: 136517
+.. nonce: _NHJyv
+.. section: Core and Builtins
+
+Fixed a typo that prevented printing of uncollectable objects when the
+:const:`gc.DEBUG_UNCOLLECTABLE` mode was set.
+
+..
+
+.. date: 2025-07-10-15-53-16
+.. gh-issue: 136525
+.. nonce: xAko0e
+.. section: Core and Builtins
+
+Fix issue where per-thread bytecode was not instrumented for newly created
+threads.
+
+..
+
+.. date: 2025-07-09-21-27-14
+.. gh-issue: 132657
+.. nonce: kSA8R3
+.. section: Core and Builtins
+
+Improve performance of :class:`frozenset` by removing locks in the
+free-threading build.
+
+..
+
+.. date: 2025-07-09-11-15-42
+.. gh-issue: 136459
+.. nonce: m4Udh8
+.. section: Core and Builtins
+
+Add support for perf trampoline on macOS, to allow profilers wit JIT map
+support to read Python calls. While profiling, ``PYTHONPERFSUPPORT=1`` can
+be appended to enable the trampoline.
+
+..
+
+.. date: 2025-07-08-23-53-51
+.. gh-issue: 132661
+.. nonce: B84iYt
+.. section: Core and Builtins
+
+``Interpolation.expression`` now has a default, the empty string.
+
+..
+
+.. date: 2025-07-08-23-22-08
+.. gh-issue: 132661
+.. nonce: 34ftJl
+.. section: Core and Builtins
+
+Reflect recent :pep:`750` change.
+
+Disallow concatenation of ``string.templatelib.Template`` and :class:`str`.
+Also, disallow implicit concatenation of t-string literals with string or
+f-string literals.
+
+..
+
+.. date: 2025-07-07-17-26-06
+.. gh-issue: 91636
+.. nonce: GyHU72
+.. section: Core and Builtins
+
+While performing garbage collection, clear weakrefs to unreachable objects
+that are created during running of finalizers. If those weakrefs were are
+not cleared, they could reveal unreachable objects.
+
+..
+
+.. date: 2025-07-07-12-24-00
+.. gh-issue: 136355
+.. nonce: MTcA8j
+.. section: Core and Builtins
+
+Deprecate :option:`-b` and :option:`!-bb` command line options and schedule
+them to become no-op in Python 3.17.
+
+..
+
+.. date: 2025-07-06-14-53-19
+.. gh-issue: 109700
+.. nonce: KVNQQi
+.. section: Core and Builtins
+
+Fix memory error handling in :c:func:`PyDict_SetDefault`.
+
+..
+
+.. date: 2025-07-03-06-04-42
+.. gh-issue: 135552
+.. nonce: CbBQof
+.. section: Core and Builtins
+
+Fix a bug caused by the garbage collector clearing weakrefs too early. The
+weakrefs in the ``tp_subclasses`` dictionary are needed in order to
+correctly invalidate type caches (for example, by calling
+``PyType_Modified()``). Clearing weakrefs before calling finalizers causes
+the caches to not be correctly invalidated. That can cause crashes since
+the caches can refer to invalid objects. Defer the clearing of weakrefs
+without callbacks until after finalizers are executed.
+
+..
+
+.. date: 2025-07-02-15-18-41
+.. gh-issue: 136203
+.. nonce: Y934sC
+.. section: Core and Builtins
+
+Improve :exc:`TypeError` error message, when richcomparing two
+:class:`types.MappingProxyType` objects.
+
+..
+
+.. date: 2025-06-26-18-44-34
+.. gh-issue: 136003
+.. nonce: sln51d
+.. section: Core and Builtins
+
+Fix :class:`threading.Thread` objects becoming incorrectly daemon when
+created from an :mod:`atexit` callback or a pending call
+(:c:func:`Py_AddPendingCall`).
+
+..
+
+.. date: 2025-06-26-15-25-51
+.. gh-issue: 78465
+.. nonce: MbDN8X
+.. section: Core and Builtins
+
+Fix error message for ``cls.__new__(cls, ...)`` where ``cls`` is not
+instantiable builtin or extension type (with ``tp_new`` set to ``NULL``).
+
+..
+
+.. date: 2025-06-24-16-46-34
+.. gh-issue: 135904
+.. nonce: 78xfon
+.. section: Core and Builtins
+
+Perform more aggressive control-flow optimizations on the machine code
+templates emitted by the experimental JIT compiler.
+
+..
+
+.. date: 2025-06-24-06-41-47
+.. gh-issue: 129958
+.. nonce: EaJuS0
+.. section: Core and Builtins
+
+Differentiate between t-strings and f-strings in syntax error for newlines
+in format specifiers of single-quoted interpolated strings.
+
+..
+
+.. date: 2025-06-23-18-08-32
+.. gh-issue: 135871
+.. nonce: 50C528
+.. section: Core and Builtins
+
+Non-blocking mutex lock attempts now return immediately when the lock is
+busy instead of briefly spinning in the :term:`free threading` build.
+
+..
+
+.. date: 2025-06-20-14-50-44
+.. gh-issue: 134584
+.. nonce: 3CJdAI
+.. section: Core and Builtins
+
+Specialize :opcode:`POP_TOP` in the JIT compiler by specializing for
+reference lifetime and type. This will also enable easier top of stack
+caching in the JIT compiler.
+
+..
+
+.. date: 2025-06-18-16-45-36
+.. gh-issue: 135106
+.. nonce: cpl6Aq
+.. section: Core and Builtins
+
+Restrict the trashcan mechanism to GC'ed objects and untrack them while in
+the trashcan to prevent the GC and trashcan mechanisms conflicting.
+
+..
+
+.. date: 2025-06-18-12-19-13
+.. gh-issue: 135379
+.. nonce: TCvGpj
+.. section: Core and Builtins
+
+Changes specialization of ``BINARY_OP`` for ints to only specialize for
+"compact" ints. This streamlines the fast path at the cost of fewer
+specializations when very large integers are used.
+
+..
+
+.. date: 2025-06-17-22-34-58
+.. gh-issue: 135607
+.. nonce: ucsLVu
+.. section: Core and Builtins
+
+Fix potential :mod:`weakref` races in an object's destructor on the
+:term:`free threaded <free threading>` build.
+
+..
+
+.. date: 2025-06-17-12-50-48
+.. gh-issue: 135608
+.. nonce: PnHckD
+.. section: Core and Builtins
+
+Fix a crash in the JIT involving attributes of modules.
+
+..
+
+.. date: 2025-06-17-08-37-45
+.. gh-issue: 82088
+.. nonce: TgPvLg
+.. section: Core and Builtins
+
+Improve performance of ``PyLongObject`` conversion functions
+``PyLong_AsLongAndOverflow()``, ``PyLong_AsSsize_t()``,
+``PyLong_AsUnsignedLong()``, ``PyLong_AsSize_t()``,
+``PyLong_AsUnsignedLongMask()``, ``PyLong_AsUnsignedLongLongMask()``,
+``PyLong_AsLongLongAndOverflow()`` for integers larger than 2**30 up to 30%.
+
+..
+
+.. date: 2025-06-16-03-56-15
+.. gh-issue: 135551
+.. nonce: hRTQO-
+.. section: Core and Builtins
+
+Sorting randomly ordered lists will often run a bit faster, thanks to a new
+scheme for picking minimum run lengths from Stefan Pochmann, which arranges
+for the merge tree to be as evenly balanced as is possible.
+
+..
+
+.. date: 2025-06-16-02-31-42
+.. gh-issue: 135543
+.. nonce: 6b0HOF
+.. section: Core and Builtins
+
+Emit ``sys.remote_exec`` audit event when :func:`sys.remote_exec` is called
+and migrate ``remote_debugger_script`` to
+``cpython.remote_debugger_script``.
+
+..
+
+.. date: 2025-06-14-01-01-14
+.. gh-issue: 135496
+.. nonce: ER0Me3
+.. section: Core and Builtins
+
+Fix typo in the f-string conversion type error ("exclamanation" ->
+"exclamation").
+
+..
+
+.. date: 2025-06-13-16-05-24
+.. gh-issue: 135474
+.. nonce: 67nOl3
+.. section: Core and Builtins
+
+Specialize integer operations only on compact integers. This is a CPython
+internal change.
+
+..
+
+.. date: 2025-06-12-18-12-42
+.. gh-issue: 135371
+.. nonce: R_YUtR
+.. section: Core and Builtins
+
+Fixed :mod:`asyncio` debugging tools to properly display internal coroutine
+call stacks alongside external task dependencies. The ``python -m asyncio
+ps`` and ``python -m asyncio pstree`` commands now show complete execution
+context. Patch by Pablo Galindo.
+
+..
+
+.. date: 2025-06-12-11-19-52
+.. gh-issue: 135422
+.. nonce: F6yQi6
+.. section: Core and Builtins
+
+Fix regression in :exc:`SyntaxError` messages after :gh:`134036`.
+
+..
+
+.. date: 2025-06-12-00-03-34
+.. gh-issue: 116738
+.. nonce: iBBAdo
+.. section: Core and Builtins
+
+Make functions in :mod:`grp` thread-safe on the :term:`free threaded <free
+threading>` build.
+
+..
+
+.. date: 2025-06-11-15-08-10
+.. gh-issue: 127319
+.. nonce: OVGFSZ
+.. section: Core and Builtins
+
+Set the ``allow_reuse_port`` class variable to ``False`` on the XMLRPC,
+logging, and HTTP servers. This matches the behavior in prior Python
+releases, which is to not allow port reuse.
+
+..
+
+.. date: 2025-06-09-23-57-37
+.. gh-issue: 130077
+.. nonce: MHknDB
+.. section: Core and Builtins
+
+Properly raise custom syntax errors when incorrect syntax containing names
+that are prefixes of soft keywords is encountered. Patch by Pablo Galindo.
+
+..
+
+.. date: 2025-06-08-14-24-29
+.. gh-issue: 131798
+.. nonce: qfw91T
+.. section: Core and Builtins
+
+Optimize _CALL_LEN in the JIT when the length is known. Patch by Tomas Roun
+
+..
+
+.. date: 2025-06-06-19-17-22
+.. gh-issue: 131798
+.. nonce: XoV8Eb
+.. section: Core and Builtins
+
+Optimize ``_UNARY_NEGATIVE`` in JIT-compiled code.
+
+..
+
+.. date: 2025-06-06-02-24-42
+.. gh-issue: 135148
+.. nonce: r-t2sC
+.. section: Core and Builtins
+
+Fixed a bug where f-string debug expressions (using =) would incorrectly
+strip out parts of strings containing escaped quotes and # characters. Patch
+by Pablo Galindo.
+
+..
+
+.. date: 2025-06-06-01-09-44
+.. gh-issue: 131798
+.. nonce: 1SuxO9
+.. section: Core and Builtins
+
+Optimize ``_UNARY_INVERT`` in JIT-compiled code.
+
+..
+
+.. date: 2025-06-05-21-58-30
+.. gh-issue: 131798
+.. nonce: nt5Ab7
+.. section: Core and Builtins
+
+Optimize away ``_CALL_TYPE_1`` in the JIT when the return type is known.
+Patch by Tomas Roun
+
+..
+
+.. date: 2025-06-03-21-06-22
+.. gh-issue: 133136
+.. nonce: Usnvri
+.. section: Core and Builtins
+
+Limit excess memory usage in the :term:`free threading` build when a large
+dictionary or list is resized and accessed by multiple threads.
+
+..
+
+.. date: 2025-06-02-20-13-37
+.. gh-issue: 131798
+.. nonce: JQRFvR
+.. section: Core and Builtins
+
+Optimize ``_CHECK_METHOD_VERSION`` into ``_CHECK_FUNCTION_VERSION_INLINE``
+in JIT-compiled code.
+
+..
+
+.. date: 2025-06-02-13-57-40
+.. gh-issue: 116738
+.. nonce: ycJsL8
+.. section: Core and Builtins
+
+Make methods in :mod:`heapq` thread-safe on the :term:`free threaded <free
+threading>` build.
+
+..
+
+.. date: 2025-05-31-19-24-54
+.. gh-issue: 134280
+.. nonce: NDVbzY
+.. section: Core and Builtins
+
+Disable constant folding for ``~`` with a boolean argument. This moves the
+deprecation warning from compile time to runtime.
+
+..
+
+.. date: 2025-05-31-10-26-46
+.. gh-issue: 134876
+.. nonce: 8mBGJI
+.. section: Core and Builtins
+
+Add support to :pep:`768` remote debugging for Linux kernels which don't
+have CONFIG_CROSS_MEMORY_ATTACH configured.
+
+..
+
+.. date: 2025-05-30-18-09-54
+.. gh-issue: 134889
+.. nonce: Ic9UM-
+.. section: Core and Builtins
+
+Fix handling of a few opcodes that leave operands on the stack when
+optimizing ``LOAD_FAST``.
+
+..
+
+.. date: 2025-05-30-15-56-19
+.. gh-issue: 134908
+.. nonce: 3a7PxM
+.. section: Core and Builtins
+
+Fix crash when iterating over lines in a text file on the :term:`free
+threaded <free threading>` build.
+
+..
+
+.. date: 2025-05-28-23-58-50
+.. gh-issue: 117852
+.. nonce: BO9g7z
+.. section: Core and Builtins
+
+Fix argument checking of :meth:`~agen.athrow`.
+
+..
+
+.. date: 2025-05-27-20-29-00
+.. gh-issue: 132617
+.. nonce: EmUfQQ
+.. section: Core and Builtins
+
+Fix :meth:`dict.update` modification check that could incorrectly raise a
+"dict mutated during update" error when a different dictionary was modified
+that happens to share the same underlying keys object.
+
+..
+
+.. date: 2025-05-27-20-21-34
+.. gh-issue: 131798
+.. nonce: b32zkl
+.. section: Core and Builtins
+
+Allow the JIT to remove unnecessary ``_ITER_CHECK_TUPLE`` ops.
+
+..
+
+.. date: 2025-05-27-18-59-54
+.. gh-issue: 134679
+.. nonce: FWPBu6
+.. section: Core and Builtins
+
+Fix crash in the :term:`free threading` build's QSBR code that could occur
+when changing an object's ``__dict__`` attribute.
+
+..
+
+.. date: 2025-05-26-15-55-50
+.. gh-issue: 133912
+.. nonce: -xAguL
+.. section: Core and Builtins
+
+Fix the C API function ``PyObject_GenericSetDict`` to handle extension
+classes with inline values.
+
+..
+
+.. date: 2025-05-25-19-32-15
+.. gh-issue: 131798
+.. nonce: f5h8aI
+.. section: Core and Builtins
+
+Make the JIT optimizer understand that slicing a string/list/tuple returns
+the same type.
+
+..
+
+.. date: 2025-05-23-14-54-07
+.. gh-issue: 134584
+.. nonce: y-WDjf
+.. section: Core and Builtins
+
+Add a reference count elimination pass to the JIT compiler. Patch by Ken
+Jin.
+
+..
+
+.. date: 2025-05-22-17-49-39
+.. gh-issue: 131798
+.. nonce: U6ZmFm
+.. section: Core and Builtins
+
+Optimize ``_POP_CALL_TWO_LOAD_CONST_INLINE_BORROW``.
+
+..
+
+.. date: 2025-05-22-14-48-19
+.. gh-issue: 134381
+.. nonce: 2BXhth
+.. section: Core and Builtins
+
+Fix :exc:`RuntimeError` when using a not-started :class:`threading.Thread`
+after calling :func:`os.fork`
+
+..
+
+.. date: 2025-05-21-18-02-56
+.. gh-issue: 127960
+.. nonce: W3J_2X
+.. section: Core and Builtins
+
+PyREPL interactive shell no longer starts with ``__package__`` and
+``__file__`` global names set to ``_pyrepl`` package internals. Contributed
+by Yuichiro Tachibana.
+
+..
+
+.. date: 2025-05-21-15-14-32
+.. gh-issue: 130397
+.. nonce: aG6EON
+.. section: Core and Builtins
+
+Remove special-casing for C stack depth limits for WASI. Due to
+WebAssembly's built-in stack protection this does not pose a security
+concern.
+
+..
+
+.. date: 2025-05-21-13-57-26
+.. gh-issue: 131798
+.. nonce: QwS5Bb
+.. section: Core and Builtins
+
+JIT: replace ``_LOAD_SMALL_INT`` with ``_LOAD_CONST_INLINE_BORROW``
+
+..
+
+.. date: 2025-05-20-23-32-11
+.. gh-issue: 131798
+.. nonce: G9ZQZw
+.. section: Core and Builtins
+
+Improve the JIT's ability to optimize away cached class attribute and method
+loads.
+
+..
+
+.. date: 2025-05-20-14-41-50
+.. gh-issue: 128066
+.. nonce: qzzGfv
+.. section: Core and Builtins
+
+Fixes an edge case where PyREPL improperly threw an error when Python is
+invoked on a read only filesystem while trying to write history file
+entries.
+
+..
+
+.. date: 2025-05-20-13-58-18
+.. gh-issue: 131798
+.. nonce: hG8xBw
+.. section: Core and Builtins
+
+Improve the JIT's ability to narrow unknown classes to constant values.
+
+..
+
+.. date: 2025-05-19-20-52-53
+.. gh-issue: 134268
+.. nonce: HPKX1e
+.. section: Core and Builtins
+
+Add ``_POP_CALL_TWO_LOAD_CONST_INLINE_BORROW`` and use it to further
+optimize ``CALL_ISINSTANCE``.
+
+..
+
+.. date: 2025-05-19-15-15-58
+.. gh-issue: 131798
+.. nonce: PCP71j
+.. section: Core and Builtins
+
+Split ``CALL_LIST_APPEND`` into several uops. Patch by Diego Russo.
+
+..
+
+.. date: 2025-05-18-14-33-23
+.. gh-issue: 69605
+.. nonce: ZMO49F
+.. section: Core and Builtins
+
+When auto-completing an import in the :term:`REPL`, finding no candidates
+now issues no suggestion, rather than suggestions from the current
+namespace.
+
+..
+
+.. date: 2025-05-18-10-50-46
+.. gh-issue: 134170
+.. nonce: J0Hvmi
+.. section: Core and Builtins
+
+Add colorization to :func:`sys.unraisablehook` by default.
+
+..
+
+.. date: 2025-05-17-20-56-05
+.. gh-issue: 91153
+.. nonce: afgtG2
+.. section: Core and Builtins
+
+Fix a crash when a :class:`bytearray` is concurrently mutated during item
+assignment.
+
+..
+
+.. date: 2025-05-17-20-44-51
+.. gh-issue: 134158
+.. nonce: ewLNLp
+.. section: Core and Builtins
+
+Fix coloring of double braces in f-strings and t-strings in the
+:term:`REPL`.
+
+..
+
+.. date: 2025-05-16-20-59-12
+.. gh-issue: 134119
+.. nonce: w8expI
+.. section: Core and Builtins
+
+Fix crash when calling :func:`next` on an exhausted template string
+iterator. Patch by Jelle Zijlstra.
+
+..
+
+.. date: 2025-05-16-17-25-52
+.. gh-issue: 134100
+.. nonce: 5-FbLK
+.. section: Core and Builtins
+
+Fix a use-after-free bug that occurs when an imported module isn't in
+:data:`sys.modules` after its initial import. Patch by Nico-Posada.
+
+..
+
+.. date: 2025-05-16-09-06-38
+.. gh-issue: 134036
+.. nonce: st2e-B
+.. section: Core and Builtins
+
+Improve :exc:`SyntaxError` message when using invalid :keyword:`raise`
+statements.
+
+..
+
+.. date: 2025-05-15-11-38-16
+.. gh-issue: 133999
+.. nonce: uBZ8uS
+.. section: Core and Builtins
+
+Fix :exc:`SyntaxError` regression in :keyword:`except` parsing after
+:gh:`123440`.
+
+..
+
+.. date: 2025-05-11-13-40-42
+.. gh-issue: 133886
+.. nonce: ryBAyo
+.. section: Core and Builtins
+
+Fix :func:`sys.remote_exec` for non-ASCII paths in non-UTF-8 locales and
+non-UTF-8 paths in UTF-8 locales.
+
+..
+
+.. date: 2025-05-11-09-40-19
+.. gh-issue: 133400
+.. nonce: zkWla8
+.. section: Core and Builtins
+
+Fixed Ctrl+D (^D) behavior in _pyrepl module to match old pre-3.13 REPL
+behavior.
+
+..
+
+.. date: 2025-05-10-17-12-27
+.. gh-issue: 133703
+.. nonce: bVM-re
+.. section: Core and Builtins
+
+Fix hashtable in dict can be bigger than intended in some situations.
+
+..
+
+.. date: 2025-05-09-18-11-21
+.. gh-issue: 133778
+.. nonce: pWEV3t
+.. section: Core and Builtins
+
+Fix bug where assigning to the :attr:`~type.__annotations__` attributes of
+classes defined under ``from __future__ import annotations`` had no effect.
+
+..
+
+.. date: 2025-05-08-22-19-10
+.. gh-issue: 133711
+.. nonce: e91wUy
+.. section: Core and Builtins
+
+Implement :pep:`686`: Enable :ref:`Python UTF-8 Mode <utf8-mode>` by
+default. Patch by Adam Turner.
+
+..
+
+.. date: 2025-05-08-13-48-02
+.. gh-issue: 132762
+.. nonce: tKbygC
+.. section: Core and Builtins
+
+:meth:`~dict.fromkeys` no longer loops forever when adding a small set of
+keys to a large base dict. Patch by Angela Liss.
+
+..
+
+.. date: 2025-05-07-23-26-53
+.. gh-issue: 133541
+.. nonce: bHIC55
+.. section: Core and Builtins
+
+Inconsistent indentation in user input crashed the new REPL when syntax
+highlighting was active. This is now fixed.
+
+..
+
+.. date: 2025-05-06-15-01-41
+.. gh-issue: 133516
+.. nonce: RqWVf2
+.. section: Core and Builtins
+
+Raise :exc:`ValueError` when constants ``True``, ``False`` or ``None`` are
+used as an identifier after NFKC normalization.
+
+..
+
+.. date: 2025-05-03-22-31-53
+.. gh-issue: 131798
+.. nonce: fQ0ato
+.. section: Core and Builtins
+
+Allow the JIT to remove int guards after ``_GET_LEN`` by setting the return
+type to int.
+
+..
+
+.. date: 2025-05-03-13-36-01
+.. gh-issue: 131798
+.. nonce: U4_QEJ
+.. section: Core and Builtins
+
+Split ``CALL_ISINSTANCE`` into several uops, allowing the JIT to remove some
+of them.
+
+..
+
+.. date: 2025-04-30-14-13-01
+.. gh-issue: 132554
+.. nonce: GqQaUp
+.. section: Core and Builtins
+
+Change iteration to use "virtual iterators" for sequences. Instead of
+creating an iterator, a tagged integer representing the next index is pushed
+to the stack above the iterable. For non-sequence iterators, ``NULL`` is
+pushed.
+
+..
+
+.. date: 2025-04-28-18-59-11
+.. gh-issue: 130821
+.. nonce: B11LU1
+.. section: Core and Builtins
+
+Enhance wrong type error messages and make them more consistent. Patch by
+Semyon Moroz.
+
+..
+
+.. date: 2025-04-26-17-50-01
+.. gh-issue: 131798
+.. nonce: XiOgw5
+.. section: Core and Builtins
+
+Narrow the return type and constant-evaluate ``CALL_ISINSTANCE`` for a
+subset of known values in the JIT. Patch by Tomas Roun
+
+..
+
+.. date: 2025-04-19-17-16-46
+.. gh-issue: 132542
+.. nonce: 7T_TY_
+.. section: Core and Builtins
+
+Update :attr:`Thread.native_id <threading.Thread.native_id>` after
+:manpage:`fork(2)` to ensure accuracy. Patch by Noam Cohen.
+
+..
+
+.. date: 2025-04-19-16-22-47
+.. gh-issue: 132732
+.. nonce: jgqhlF
+.. section: Core and Builtins
+
+Automatically constant evaluate bytecode operations marked as pure in the
+JIT optimizer.
+
+..
+
+.. date: 2025-04-16-12-01-13
+.. gh-issue: 127971
+.. nonce: pMDOQ0
+.. section: Core and Builtins
+
+Fix off-by-one read beyond the end of a string in string search.
+
+..
+
+.. date: 2025-04-10-01-52-42
+.. gh-issue: 132042
+.. nonce: fePwlj
+.. section: Core and Builtins
+
+Improve class creation times by up to 12% by pre-computing type slots just
+once. Patch by Sergey Miryanov.
+
+..
+
+.. date: 2025-04-04-16-41-00
+.. gh-issue: 133379
+.. nonce: asdjhjdf
+.. section: Core and Builtins
+
+Correct usage of *arguments* in error messages.
+
+..
+
+.. date: 2025-03-14-13-08-20
+.. gh-issue: 127266
+.. nonce: _tyfBp
+.. section: Core and Builtins
+
+In the free-threaded build, avoid data races caused by updating type slots
+or type flags after the type was initially created. For those (typically
+rare) cases, use the stop-the-world mechanism. Remove the use of atomics
+when reading or writing type flags. The use of atomics is not sufficient to
+avoid races (since flags are sometimes read without a lock and without
+atomics) and are no longer required.
+
+..
+
+.. date: 2025-02-22-01-23-23
+.. gh-issue: 130425
+.. nonce: x5SNQ8
+.. section: Core and Builtins
+
+Add ``"Did you mean: 'attr'?"`` suggestion when using ``del obj.attr`` if
+``attr`` does not exist.
+
+..
+
+.. date: 2025-01-08-12-52-47
+.. gh-issue: 128640
+.. nonce: 9nbh9z
+.. section: Core and Builtins
+
+Fix a crash when using threads inside of a subinterpreter.
+
+..
+
+.. date: 2024-06-04-20-26-21
+.. gh-issue: 116738
+.. nonce: q_hPYq
+.. section: Core and Builtins
+
+Make the module :mod:`json` safe to use under the free-threading build.
+
+..
+
+.. date: 2024-05-24-07-02-47
+.. gh-issue: 119494
+.. nonce: x3KUMC
+.. section: Core and Builtins
+
+Exception text when trying to delete attributes of types was clarified.
+
+..
+
+.. date: 2025-10-10-20-59-07
+.. gh-issue: 139924
+.. nonce: ALByCb
+.. section: C API
+
+Function watchers can now receive a PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME
+event when a watched functions qualname is changed.
+
+..
+
+.. date: 2025-10-07-12-51-32
+.. gh-issue: 111489
+.. nonce: LCKKlg
+.. section: C API
+
+Add :c:func:`PyTuple_FromArray` to create a :class:`tuple` from an array.
+Patch by Victor Stinner.
+
+..
+
+.. date: 2025-09-14-14-44-24
+.. gh-issue: 136355
+.. nonce: LCaYyC
+.. section: C API
+
+Deprecate :c:member:`PyConfig.bytes_warning` field and schedule its removal
+in 3.17.
+
+..
+
+.. date: 2025-09-14-13-09-47
+.. gh-issue: 138886
+.. nonce: dlcTXL
+.. section: C API
+
+Remove deprecated :c:func:`!PySys_ResetWarnOptions` C-API function.
+
+..
+
+.. date: 2025-09-12-13-05-20
+.. gh-issue: 129813
+.. nonce: dJZpME
+.. section: C API
+
+Implement :pep:`782`, the :c:type:`PyBytesWriter` API. Add functions:
+
+* :c:func:`PyBytesWriter_Create`
+* :c:func:`PyBytesWriter_Discard`
+* :c:func:`PyBytesWriter_FinishWithPointer`
+* :c:func:`PyBytesWriter_FinishWithSize`
+* :c:func:`PyBytesWriter_Finish`
+* :c:func:`PyBytesWriter_Format`
+* :c:func:`PyBytesWriter_GetData`
+* :c:func:`PyBytesWriter_GetSize`
+* :c:func:`PyBytesWriter_GrowAndUpdatePointer`
+* :c:func:`PyBytesWriter_Grow`
+* :c:func:`PyBytesWriter_Resize`
+* :c:func:`PyBytesWriter_WriteBytes`
+
+Patch by Victor Stinner.
+
+..
+
+.. date: 2025-08-19-15-31-36
+.. gh-issue: 137956
+.. nonce: P4TK1d
+.. section: C API
+
+Display and raise an exception if an extension compiled for
+non-free-threaded Python is loaded in a free-threaded interpreter.
+
+..
+
+.. date: 2025-08-13-13-41-04
+.. gh-issue: 137573
+.. nonce: r6uwRf
+.. section: C API
+
+Mark ``_PyOptimizer_Optimize`` as :c:macro:`Py_NO_INLINE` to prevent stack
+overflow crashes on macOS.
+
+..
+
+.. date: 2025-07-31-04-30-42
+.. gh-issue: 128813
+.. nonce: opL-Pv
+.. section: C API
+
+Functions :c:func:`_Py_c_sum`, :c:func:`_Py_c_diff`, :c:func:`_Py_c_neg`,
+:c:func:`_Py_c_prod`, :c:func:`_Py_c_quot`, :c:func:`_Py_c_pow` and
+previously undocumented :c:func:`_Py_c_abs` are :term:`soft deprecated`.
+Deprecate also :c:member:`~PyComplexObject.cval` field of the
+:c:type:`PyComplexObject` type. Patch by Sergey B Kirpichev.
+
+..
+
+.. date: 2025-07-29-18-00-22
+.. gh-issue: 137210
+.. nonce: DD4VEm
+.. section: C API
+
+Add API for checking an extension module's ABI compatibility:
+:c:data:`Py_mod_abi`, :c:func:`PyABIInfo_Check`, :c:macro:`PyABIInfo_VAR`
+and :c:data:`Py_mod_abi`.
+
+..
+
+.. date: 2025-07-23-22-30-23
+.. gh-issue: 136759
+.. nonce: ffB4wO
+.. section: C API
+
+Rename ``lock.h`` to ``pylock.h`` to avoid potential include conflicts.
+
+..
+
+.. date: 2025-07-22-15-18-08
+.. gh-issue: 112068
+.. nonce: 4WvT-8
+.. section: C API
+
+Revert support of nullable arguments in :c:func:`PyArg_Parse`.
+
+..
+
+.. date: 2025-07-08-22-07-54
+.. gh-issue: 136006
+.. nonce: XRU5w4
+.. section: C API
+
+On Solaris, the :c:macro:`!Py_NAN` macro now expands to a :c:type:`!double`
+instead of a function address. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-07-01-16-22-39
+.. gh-issue: 135075
+.. nonce: angu3J
+.. section: C API
+
+Make :c:func:`PyObject_SetAttr` and :c:func:`PyObject_SetAttrString` fail if
+called with ``NULL`` value and an exception set. Patch by Victor Stinner.
+
+..
+
+.. date: 2025-06-25-01-03-10
+.. gh-issue: 135906
+.. nonce: UBrCWq
+.. section: C API
+
+Fix compilation errors when compiling the internal headers with a C++
+compiler.
+
+..
+
+.. date: 2025-06-24-11-10-01
+.. gh-issue: 133296
+.. nonce: lIEuVJ
+.. section: C API
+
+New variants for the critical section API that accept one or two
+:c:type:`PyMutex` pointers rather than :c:type:`PyObject` instances are now
+public in the non-limited C API.
+
+..
+
+.. date: 2025-06-19-12-47-18
+.. gh-issue: 133157
+.. nonce: 1WA85f
+.. section: C API
+
+Remove the private, undocumented macro
+:c:macro:`!_Py_NO_SANITIZE_UNDEFINED`.
+
+..
+
+.. date: 2025-06-05-11-06-07
+.. gh-issue: 134989
+.. nonce: 74p4ud
+.. section: C API
+
+Fix ``Py_RETURN_NONE``, ``Py_RETURN_TRUE`` and ``Py_RETURN_FALSE`` macros in
+the limited C API 3.11 and older: don't treat ``Py_None``, ``Py_True`` and
+``Py_False`` as immortal. Patch by Victor Stinner.
+
+..
+
+.. date: 2025-06-02-13-19-22
+.. gh-issue: 134989
+.. nonce: sDDyBN
+.. section: C API
+
+Implement :c:func:`PyObject_DelAttr` and :c:func:`PyObject_DelAttrString` as
+macros in the limited C API 3.12 and older. Patch by Victor Stinner.
+
+..
+
+.. date: 2025-05-30-11-33-17
+.. gh-issue: 134745
+.. nonce: GN-zk2
+.. section: C API
+
+Change :c:func:`!PyThread_allocate_lock` implementation to ``PyMutex``. On
+Windows, :c:func:`!PyThread_acquire_lock_timed` now supports the *intr_flag*
+parameter: it can be interrupted. Patch by Victor Stinner.
+
+..
+
+.. date: 2025-05-29-16-56-23
+.. gh-issue: 134891
+.. nonce: 7eKO8U
+.. section: C API
+
+Add :c:type:`PyUnstable_Unicode_GET_CACHED_HASH` to get the cached hash of a
+string.
+
+..
+
+.. date: 2025-05-20-17-13-51
+.. gh-issue: 134009
+.. nonce: CpCmry
+.. section: C API
+
+Expose :c:func:`PyMutex_IsLocked` as part of the public C API.
+
+..
+
+.. date: 2025-05-17-14-41-21
+.. gh-issue: 134144
+.. nonce: xVpZik
+.. section: C API
+
+Fix crash when calling :c:func:`Py_EndInterpreter` with a :term:`thread
+state` that isn't the initial thread for the interpreter.
+
+..
+
+.. date: 2025-05-13-16-06-46
+.. gh-issue: 133968
+.. nonce: 6alWst
+.. section: C API
+
+Add :c:func:`PyUnicodeWriter_WriteASCII` function to write an ASCII string
+into a :c:type:`PyUnicodeWriter`. The function is faster than
+:c:func:`PyUnicodeWriter_WriteUTF8`, but has an undefined behavior if the
+input string contains non-ASCII characters. Patch by Victor Stinner.
+
+..
+
+.. date: 2025-05-08-13-14-45
+.. gh-issue: 133644
+.. nonce: J8_KZ2
+.. section: C API
+
+Remove deprecated Python initialization getter functions ``Py_Get*``. Patch
+by Bénédikt Tran.
+
+..
+
+.. date: 2025-05-08-12-40-59
+.. gh-issue: 133644
+.. nonce: FNexLJ
+.. section: C API
+
+Remove deprecated function :c:func:`!PyWeakref_GetObject` and macro
+:c:macro:`!PyWeakref_GET_OBJECT`. Use :c:func:`PyWeakref_GetRef` instead.
+Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-05-08-12-25-47
+.. gh-issue: 133644
+.. nonce: Yb86Rm
+.. section: C API
+
+Remove deprecated alias :c:func:`!PyImport_ImportModuleNoBlock` of
+:c:func:`PyImport_ImportModule`. Patch by Bénédikt Tran.
+
+..
+
+.. date: 2025-05-07-21-18-00
+.. gh-issue: 133610
+.. nonce: asdfjs
+.. section: C API
+
+Remove deprecated functions :c:func:`!PyUnicode_AsDecodedObject`,
+:c:func:`!PyUnicode_AsDecodedUnicode`, :c:func:`!PyUnicode_AsEncodedObject`,
+and :c:func:`!PyUnicode_AsEncodedUnicode`.
+
+..
+
+.. date: 2025-04-17-12-37-27
+.. gh-issue: 132629
+.. nonce: 01ArwX
+.. section: C API
+
+For unsigned integer formats in :c:func:`PyArg_ParseTuple`, accepting Python
+integers with value that is larger than the maximal value for the C type or
+less than the minimal value for the corresponding signed integer type of the
+same size is now deprecated.
+
+..
+
+.. date: 2025-04-14-07-41-28
+.. gh-issue: 131185
+.. nonce: ZCjMHD
+.. section: C API
+
+:c:func:`PyGILState_Ensure` no longer crashes when called after interpreter
+finalization.
+
+..
+
+.. date: 2023-10-18-14-36-35
+.. gh-issue: 108512
+.. nonce: fMZLfr
+.. section: C API
+
+Add functions :c:func:`PySys_GetAttr`, :c:func:`PySys_GetAttrString`,
+:c:func:`PySys_GetOptionalAttr` and :c:func:`PySys_GetOptionalAttrString`.
+
+..
+
+.. date: 2025-09-24-13-59-26
+.. gh-issue: 138489
+.. nonce: 1AcuZM
+.. section: Build
+
+When cross-compiling for WASI by ``build_wasm`` or ``build_emscripten``, the
+``build-details.json`` step is now included in the build process, just like
+with native builds.
+
+This fixes the ``libinstall`` task which requires the ``build-details.json``
+file during the process.
+
+..
+
+.. date: 2025-09-04-12-16-31
+.. gh-issue: 138497
+.. nonce: Y_5YXh
+.. section: Build
+
+The LLVM version used by the JIT at build time can now be modified using the
+``LLVM_VERSION`` environment variable. Use this at your own risk, as there
+is only one officially supported LLVM version. For more information, please
+check ``Tools/jit/README.md``.
+
+..
+
+.. date: 2025-08-27-11-32-02
+.. gh-issue: 95952
+.. nonce: KSymc7
+.. section: Build
+
+When cross-compiling for WASI, require that the HOSTRUNNER environment
+variable be explicitly set.
+
+This was needed as macOS lacks the appropriate CLI tools to set a reasonable
+default.
+
+..
+
+.. date: 2025-08-27-09-52-45
+.. gh-issue: 138061
+.. nonce: fMVS9w
+.. section: Build
+
+Ensure reproducible builds by making JIT stencil header generation
+deterministic.
+
+..
+
+.. date: 2025-08-26-21-18-32
+.. gh-issue: 128042
+.. nonce: 5voC8H
+.. section: Build
+
+``./configure`` now warns when ``--enable-optimizations`` and ``CFLAGS=-O0``
+are both set, suggesting removing ``-O0`` from ``CFLAGS`` for optimal
+performance. Patch by Taegyun Kim.
+
+..
+
+.. date: 2025-08-13-12-10-12
+.. gh-issue: 132339
+.. nonce: 3Czz5y
+.. section: Build
+
+Add support for OpenSSL 3.5.
+
+..
+
+.. date: 2025-07-18-17-15-00
+.. gh-issue: 135621
+.. nonce: 9cyCNb
+.. section: Build
+
+PyREPL no longer depends on the :mod:`curses` standard library. Contributed
+by Łukasz Langa.
+
+..
+
+.. date: 2025-06-25-13-27-14
+.. gh-issue: 135927
+.. nonce: iCNPQc
+.. section: Build
+
+Fix building with MSVC when passing option ``/std:clatest``.
+
+..
+
+.. date: 2025-06-16-07-20-28
+.. gh-issue: 119132
+.. nonce: fcI8s7
+.. section: Build
+
+Remove "experimental" tag from the CPython free-threading build.
+
+..
+
+.. date: 2025-06-14-10-32-11
+.. gh-issue: 135497
+.. nonce: ajlV4F
+.. section: Build
+
+Fix the detection of ``MAXLOGNAME`` in the ``configure.ac`` script.
+
+..
+
+.. date: 2025-05-30-11-02-30
+.. gh-issue: 134923
+.. nonce: gBkRg4
+.. section: Build
+
+Windows builds with profile-guided optimization enabled now use
+``/GENPROFILE`` and ``/USEPROFILE`` instead of deprecated ``/LTCG:``
+options.
+
+..
+
+.. date: 2025-05-24-16-59-20
+.. gh-issue: 134632
+.. nonce: i0W2hc
+.. section: Build
+
+Fixed ``build-details.json`` generation to use ``INCLUDEPY``, in order to
+reference the ``pythonX.Y`` subdirectory of the include directory, as
+required in :pep:`739`, instead of the top-level include directory.
+
+..
+
+.. date: 2025-05-21-22-13-30
+.. gh-issue: 134486
+.. nonce: yvdL6f
+.. section: Build
+
+The :mod:`ctypes` module now performs a more portable test for the
+definition of :manpage:`alloca(3)`, fixing a compilation failure on NetBSD.
+
+..
+
+.. date: 2025-05-21-19-46-28
+.. gh-issue: 134455
+.. nonce: vdwlrq
+.. section: Build
+
+Fixed ``build-details.json`` generation to use the correct ``c_api.headers``
+as defined in :pep:`739`, instead of ``c_api.include``.
+
+..
+
+.. date: 2025-05-19-18-09-20
+.. gh-issue: 134273
+.. nonce: ZAliyy
+.. section: Build
+
+Add support for configuring compiler flags for the JIT with ``CFLAGS_JIT``
+
+..
+
+.. date: 2025-05-16-07-46-06
+.. gh-issue: 115119
+.. nonce: ALBgS_
+.. section: Build
+
+Removed implicit fallback to the bundled copy of the ``libmpdec`` library.
+Now this should be explicitly enabled via :option:`--with-system-libmpdec`
+set to ``no`` or :option:`!--without-system-libmpdec`. Patch by Sergey B
+Kirpichev.
+
+..
+
+.. date: 2025-05-14-09-43-48
+.. gh-issue: 131769
+.. nonce: H0oy5x
+.. section: Build
+
+Fix detecting when the build Python in a cross-build is a pydebug build.
+
+..
+
+.. date: 2025-04-16-09-38-48
+.. gh-issue: 117088
+.. nonce: EFt_5c
+.. section: Build
+
+AIX linker don't support -h option, so avoid it through platform check
+
+..
+
+.. date: 2025-01-03-13-02-06
+.. gh-issue: 123681
+.. nonce: gQ67nK
+.. section: Build
+
+Check the ``strftime()`` behavior at runtime instead of at the compile time
+to support cross-compiling. Remove the internal macro
+``_Py_NORMALIZE_CENTURY``.
+
+..
+
+.. date: 2024-12-04-10-00-35
+.. gh-issue: 127545
+.. nonce: t0THjE
+.. section: Build
+
+Fix crash when building on Linux/m68k.
+++ /dev/null
-Fix crash when building on Linux/m68k.
+++ /dev/null
-Check the ``strftime()`` behavior at runtime instead of at the compile time
-to support cross-compiling.
-Remove the internal macro ``_Py_NORMALIZE_CENTURY``.
+++ /dev/null
-AIX linker don't support -h option, so avoid it through platform check
+++ /dev/null
-Fix detecting when the build Python in a cross-build is a pydebug build.
+++ /dev/null
-Removed implicit fallback to the bundled copy of the ``libmpdec`` library.
-Now this should be explicitly enabled via :option:`--with-system-libmpdec`
-set to ``no`` or :option:`!--without-system-libmpdec`. Patch by Sergey
-B Kirpichev.
+++ /dev/null
-Add support for configuring compiler flags for the JIT with ``CFLAGS_JIT``
+++ /dev/null
-Fixed ``build-details.json`` generation to use the correct ``c_api.headers``
-as defined in :pep:`739`, instead of ``c_api.include``.
+++ /dev/null
-The :mod:`ctypes` module now performs a more portable test for the
-definition of :manpage:`alloca(3)`, fixing a compilation failure on
-NetBSD.
+++ /dev/null
-Fixed ``build-details.json`` generation to use ``INCLUDEPY``, in order to
-reference the ``pythonX.Y`` subdirectory of the include directory, as
-required in :pep:`739`, instead of the top-level include directory.
+++ /dev/null
-Windows builds with profile-guided optimization enabled now use
-``/GENPROFILE`` and ``/USEPROFILE`` instead of deprecated ``/LTCG:``
-options.
+++ /dev/null
-Fix the detection of ``MAXLOGNAME`` in the ``configure.ac`` script.
+++ /dev/null
-Remove "experimental" tag from the CPython free-threading build.
+++ /dev/null
-Fix building with MSVC when passing option ``/std:clatest``.
+++ /dev/null
-PyREPL no longer depends on the :mod:`curses` standard library. Contributed
-by Łukasz Langa.
+++ /dev/null
-Add support for OpenSSL 3.5.
+++ /dev/null
-``./configure`` now warns when ``--enable-optimizations`` and ``CFLAGS=-O0`` are both set, suggesting removing ``-O0`` from ``CFLAGS`` for optimal performance. Patch by Taegyun Kim.
+++ /dev/null
-Ensure reproducible builds by making JIT stencil header generation deterministic.
+++ /dev/null
-When cross-compiling for WASI, require that the HOSTRUNNER environment
-variable be explicitly set.
-
-This was needed as macOS lacks the appropriate CLI tools to set a reasonable
-default.
+++ /dev/null
-The LLVM version used by the JIT at build time can now be modified using
-the ``LLVM_VERSION`` environment variable. Use this at your own risk, as
-there is only one officially supported LLVM version. For more information,
-please check ``Tools/jit/README.md``.
+++ /dev/null
-When cross-compiling for WASI by ``build_wasm`` or ``build_emscripten``, the
-``build-details.json`` step is now included in the build process, just like
-with native builds.
-
-This fixes the ``libinstall`` task which requires the ``build-details.json``
-file during the process.
+++ /dev/null
-Add functions :c:func:`PySys_GetAttr`, :c:func:`PySys_GetAttrString`,
-:c:func:`PySys_GetOptionalAttr` and :c:func:`PySys_GetOptionalAttrString`.
+++ /dev/null
-:c:func:`PyGILState_Ensure` no longer crashes when called after interpreter
-finalization.
+++ /dev/null
-For unsigned integer formats in :c:func:`PyArg_ParseTuple`, accepting Python
-integers with value that is larger than the maximal value for the C type or
-less than the minimal value for the corresponding signed integer type
-of the same size is now deprecated.
+++ /dev/null
-Remove deprecated functions :c:func:`!PyUnicode_AsDecodedObject`,
-:c:func:`!PyUnicode_AsDecodedUnicode`, :c:func:`!PyUnicode_AsEncodedObject`,
-and :c:func:`!PyUnicode_AsEncodedUnicode`.
+++ /dev/null
-Remove deprecated alias :c:func:`!PyImport_ImportModuleNoBlock` of
-:c:func:`PyImport_ImportModule`. Patch by Bénédikt Tran.
+++ /dev/null
-Remove deprecated function :c:func:`!PyWeakref_GetObject` and macro
-:c:macro:`!PyWeakref_GET_OBJECT`. Use :c:func:`PyWeakref_GetRef` instead.
-Patch by Bénédikt Tran.
+++ /dev/null
-Remove deprecated Python initialization getter functions ``Py_Get*``.
-Patch by Bénédikt Tran.
+++ /dev/null
-Add :c:func:`PyUnicodeWriter_WriteASCII` function to write an ASCII string
-into a :c:type:`PyUnicodeWriter`. The function is faster than
-:c:func:`PyUnicodeWriter_WriteUTF8`, but has an undefined behavior if the
-input string contains non-ASCII characters. Patch by Victor Stinner.
+++ /dev/null
-Fix crash when calling :c:func:`Py_EndInterpreter` with a :term:`thread state` that isn't the initial thread for the interpreter.
+++ /dev/null
-Expose :c:func:`PyMutex_IsLocked` as part of the public C API.
+++ /dev/null
-Add :c:type:`PyUnstable_Unicode_GET_CACHED_HASH` to get the cached hash of a
-string.
+++ /dev/null
-Change :c:func:`!PyThread_allocate_lock` implementation to ``PyMutex``.
-On Windows, :c:func:`!PyThread_acquire_lock_timed` now supports the *intr_flag*
-parameter: it can be interrupted. Patch by Victor Stinner.
+++ /dev/null
-Implement :c:func:`PyObject_DelAttr` and :c:func:`PyObject_DelAttrString` as
-macros in the limited C API 3.12 and older. Patch by Victor Stinner.
+++ /dev/null
-Fix ``Py_RETURN_NONE``, ``Py_RETURN_TRUE`` and ``Py_RETURN_FALSE`` macros in
-the limited C API 3.11 and older: don't treat ``Py_None``, ``Py_True`` and
-``Py_False`` as immortal. Patch by Victor Stinner.
+++ /dev/null
-Remove the private, undocumented macro :c:macro:`!_Py_NO_SANITIZE_UNDEFINED`.
+++ /dev/null
-New variants for the critical section API that accept one or two
-:c:type:`PyMutex` pointers rather than :c:type:`PyObject` instances are now
-public in the non-limited C API.
+++ /dev/null
-Fix compilation errors when compiling the internal headers with a C++ compiler.
+++ /dev/null
-Make :c:func:`PyObject_SetAttr` and :c:func:`PyObject_SetAttrString` fail if
-called with ``NULL`` value and an exception set. Patch by Victor Stinner.
+++ /dev/null
-On Solaris, the :c:macro:`!Py_NAN` macro now expands to a :c:type:`!double`
-instead of a function address. Patch by Bénédikt Tran.
+++ /dev/null
-Revert support of nullable arguments in :c:func:`PyArg_Parse`.
+++ /dev/null
-Rename ``lock.h`` to ``pylock.h`` to avoid potential include conflicts.
+++ /dev/null
-Add API for checking an extension module's ABI compatibility:
-:c:data:`Py_mod_abi`, :c:func:`PyABIInfo_Check`, :c:macro:`PyABIInfo_VAR`
-and :c:data:`Py_mod_abi`.
+++ /dev/null
-Functions :c:func:`_Py_c_sum`, :c:func:`_Py_c_diff`, :c:func:`_Py_c_neg`,
-:c:func:`_Py_c_prod`, :c:func:`_Py_c_quot`, :c:func:`_Py_c_pow` and previously
-undocumented :c:func:`_Py_c_abs` are :term:`soft deprecated`. Deprecate also
-:c:member:`~PyComplexObject.cval` field of the :c:type:`PyComplexObject` type.
-Patch by Sergey B Kirpichev.
+++ /dev/null
-Mark ``_PyOptimizer_Optimize`` as :c:macro:`Py_NO_INLINE` to
-prevent stack overflow crashes on macOS.
+++ /dev/null
-Display and raise an exception if an extension compiled for
-non-free-threaded Python is loaded in a free-threaded interpreter.
+++ /dev/null
-Implement :pep:`782`, the :c:type:`PyBytesWriter` API. Add functions:
-
-* :c:func:`PyBytesWriter_Create`
-* :c:func:`PyBytesWriter_Discard`
-* :c:func:`PyBytesWriter_FinishWithPointer`
-* :c:func:`PyBytesWriter_FinishWithSize`
-* :c:func:`PyBytesWriter_Finish`
-* :c:func:`PyBytesWriter_Format`
-* :c:func:`PyBytesWriter_GetData`
-* :c:func:`PyBytesWriter_GetSize`
-* :c:func:`PyBytesWriter_GrowAndUpdatePointer`
-* :c:func:`PyBytesWriter_Grow`
-* :c:func:`PyBytesWriter_Resize`
-* :c:func:`PyBytesWriter_WriteBytes`
-
-Patch by Victor Stinner.
+++ /dev/null
-Remove deprecated :c:func:`!PySys_ResetWarnOptions` C-API function.
+++ /dev/null
-Deprecate :c:member:`PyConfig.bytes_warning` field and schedule its removal
-in 3.17.
+++ /dev/null
-Add :c:func:`PyTuple_FromArray` to create a :class:`tuple` from an array.
-Patch by Victor Stinner.
+++ /dev/null
-Function watchers can now receive a PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME event when a watched functions qualname is changed.
+++ /dev/null
-Exception text when trying to delete attributes of types was clarified.
+++ /dev/null
-Make the module :mod:`json` safe to use under the free-threading build.
+++ /dev/null
-Fix a crash when using threads inside of a subinterpreter.
+++ /dev/null
-Add ``"Did you mean: 'attr'?"`` suggestion when using ``del obj.attr`` if ``attr``
-does not exist.
+++ /dev/null
-In the free-threaded build, avoid data races caused by updating type slots
-or type flags after the type was initially created. For those (typically
-rare) cases, use the stop-the-world mechanism. Remove the use of atomics
-when reading or writing type flags. The use of atomics is not sufficient to
-avoid races (since flags are sometimes read without a lock and without
-atomics) and are no longer required.
+++ /dev/null
-Correct usage of *arguments* in error messages.
+++ /dev/null
-Improve class creation times by up to 12% by pre-computing type slots
-just once. Patch by Sergey Miryanov.
+++ /dev/null
-Fix off-by-one read beyond the end of a string in string search.
+++ /dev/null
-Automatically constant evaluate bytecode operations marked as pure in the JIT optimizer.
+++ /dev/null
-Update :attr:`Thread.native_id <threading.Thread.native_id>` after
-:manpage:`fork(2)` to ensure accuracy. Patch by Noam Cohen.
+++ /dev/null
-Narrow the return type and constant-evaluate ``CALL_ISINSTANCE`` for a
-subset of known values in the JIT. Patch by Tomas Roun
+++ /dev/null
-Enhance wrong type error messages and make them more consistent. Patch by
-Semyon Moroz.
+++ /dev/null
-Change iteration to use "virtual iterators" for sequences. Instead of
-creating an iterator, a tagged integer representing the next index is pushed
-to the stack above the iterable. For non-sequence iterators, ``NULL`` is
-pushed.
+++ /dev/null
-Split ``CALL_ISINSTANCE`` into several uops, allowing the JIT to remove some
-of them.
+++ /dev/null
-Allow the JIT to remove int guards after ``_GET_LEN`` by setting the return
-type to int.
+++ /dev/null
-Raise :exc:`ValueError` when constants ``True``, ``False`` or ``None`` are
-used as an identifier after NFKC normalization.
+++ /dev/null
-Inconsistent indentation in user input crashed the new REPL when syntax
-highlighting was active. This is now fixed.
+++ /dev/null
-:meth:`~dict.fromkeys` no longer loops forever when adding a small set of keys to a large base dict. Patch by Angela Liss.
+++ /dev/null
-Implement :pep:`686`: Enable :ref:`Python UTF-8 Mode <utf8-mode>` by
-default. Patch by Adam Turner.
+++ /dev/null
-Fix bug where assigning to the :attr:`~type.__annotations__` attributes of
-classes defined under ``from __future__ import annotations`` had no effect.
+++ /dev/null
-Fix hashtable in dict can be bigger than intended in some situations.
+++ /dev/null
-Fixed Ctrl+D (^D) behavior in _pyrepl module to match old pre-3.13 REPL behavior.
+++ /dev/null
-Fix :func:`sys.remote_exec` for non-ASCII paths in non-UTF-8 locales and
-non-UTF-8 paths in UTF-8 locales.
+++ /dev/null
-Fix :exc:`SyntaxError` regression in :keyword:`except` parsing after
-:gh:`123440`.
+++ /dev/null
-Improve :exc:`SyntaxError` message when using invalid :keyword:`raise`
-statements.
+++ /dev/null
-Fix a use-after-free bug that occurs when an imported module isn't
-in :data:`sys.modules` after its initial import. Patch by Nico-Posada.
+++ /dev/null
-Fix crash when calling :func:`next` on an exhausted template string iterator.
-Patch by Jelle Zijlstra.
+++ /dev/null
-Fix coloring of double braces in f-strings and t-strings in the :term:`REPL`.
+++ /dev/null
-Fix a crash when a :class:`bytearray` is concurrently mutated during item assignment.
+++ /dev/null
-Add colorization to :func:`sys.unraisablehook` by default.
+++ /dev/null
-When auto-completing an import in the :term:`REPL`, finding no candidates
-now issues no suggestion, rather than suggestions from the current namespace.
+++ /dev/null
-Split ``CALL_LIST_APPEND`` into several uops. Patch by Diego Russo.
+++ /dev/null
-Add ``_POP_CALL_TWO_LOAD_CONST_INLINE_BORROW`` and use it to further
-optimize ``CALL_ISINSTANCE``.
+++ /dev/null
-Improve the JIT's ability to narrow unknown classes to constant values.
+++ /dev/null
-Fixes an edge case where PyREPL improperly threw an error when Python is
-invoked on a read only filesystem while trying to write history file
-entries.
+++ /dev/null
-Improve the JIT's ability to optimize away cached class attribute and method
-loads.
+++ /dev/null
-JIT: replace ``_LOAD_SMALL_INT`` with ``_LOAD_CONST_INLINE_BORROW``
+++ /dev/null
-Remove special-casing for C stack depth limits for WASI. Due to
-WebAssembly's built-in stack protection this does not pose a security
-concern.
+++ /dev/null
-PyREPL interactive shell no longer starts with ``__package__`` and
-``__file__`` global names set to ``_pyrepl`` package internals. Contributed
-by Yuichiro Tachibana.
+++ /dev/null
-Fix :exc:`RuntimeError` when using a not-started :class:`threading.Thread` after calling :func:`os.fork`
+++ /dev/null
-Optimize ``_POP_CALL_TWO_LOAD_CONST_INLINE_BORROW``.
+++ /dev/null
-Add a reference count elimination pass to the JIT compiler. Patch by Ken Jin.
+++ /dev/null
-Make the JIT optimizer understand that slicing a string/list/tuple returns the same type.
+++ /dev/null
-Fix the C API function ``PyObject_GenericSetDict`` to handle extension
-classes with inline values.
+++ /dev/null
-Fix crash in the :term:`free threading` build's QSBR code that could occur
-when changing an object's ``__dict__`` attribute.
+++ /dev/null
-Allow the JIT to remove unnecessary ``_ITER_CHECK_TUPLE`` ops.
+++ /dev/null
-Fix :meth:`dict.update` modification check that could incorrectly raise a
-"dict mutated during update" error when a different dictionary was modified
-that happens to share the same underlying keys object.
+++ /dev/null
-Fix argument checking of :meth:`~agen.athrow`.
+++ /dev/null
-Fix crash when iterating over lines in a text file on the :term:`free threaded <free threading>` build.
+++ /dev/null
-Fix handling of a few opcodes that leave operands on the stack when
-optimizing ``LOAD_FAST``.
+++ /dev/null
-Add support to :pep:`768` remote debugging for Linux kernels which don't
-have CONFIG_CROSS_MEMORY_ATTACH configured.
+++ /dev/null
-Disable constant folding for ``~`` with a boolean argument.
-This moves the deprecation warning from compile time to runtime.
+++ /dev/null
-Make methods in :mod:`heapq` thread-safe on the :term:`free threaded <free threading>` build.
+++ /dev/null
-Optimize ``_CHECK_METHOD_VERSION`` into ``_CHECK_FUNCTION_VERSION_INLINE`` in JIT-compiled code.
+++ /dev/null
-Limit excess memory usage in the :term:`free threading` build when a
-large dictionary or list is resized and accessed by multiple threads.
+++ /dev/null
-Optimize away ``_CALL_TYPE_1`` in the JIT when the return type is known.
-Patch by Tomas Roun
+++ /dev/null
-Optimize ``_UNARY_INVERT`` in JIT-compiled code.
+++ /dev/null
-Fixed a bug where f-string debug expressions (using =) would incorrectly
-strip out parts of strings containing escaped quotes and # characters. Patch
-by Pablo Galindo.
+++ /dev/null
-Optimize ``_UNARY_NEGATIVE`` in JIT-compiled code.
+++ /dev/null
-Optimize _CALL_LEN in the JIT when the length is known. Patch by Tomas Roun
+++ /dev/null
-Properly raise custom syntax errors when incorrect syntax containing names
-that are prefixes of soft keywords is encountered. Patch by Pablo Galindo.
+++ /dev/null
-Set the ``allow_reuse_port`` class variable to ``False`` on the XMLRPC,
-logging, and HTTP servers. This matches the behavior in prior Python
-releases, which is to not allow port reuse.
+++ /dev/null
-Make functions in :mod:`grp` thread-safe on the :term:`free threaded <free threading>` build.
+++ /dev/null
-Fix regression in :exc:`SyntaxError` messages after :gh:`134036`.
+++ /dev/null
-Fixed :mod:`asyncio` debugging tools to properly display internal coroutine
-call stacks alongside external task dependencies. The ``python -m asyncio
-ps`` and ``python -m asyncio pstree`` commands now show complete execution
-context. Patch by Pablo Galindo.
+++ /dev/null
-Specialize integer operations only on compact integers. This is a CPython internal change.
+++ /dev/null
-Fix typo in the f-string conversion type error ("exclamanation" -> "exclamation").
+++ /dev/null
-Emit ``sys.remote_exec`` audit event when :func:`sys.remote_exec` is called
-and migrate ``remote_debugger_script`` to ``cpython.remote_debugger_script``.
+++ /dev/null
-Sorting randomly ordered lists will often run a bit faster, thanks to a new scheme for picking minimum run lengths from Stefan Pochmann, which arranges for the merge tree to be as evenly balanced as is possible.
+++ /dev/null
-Improve performance of ``PyLongObject`` conversion functions
-``PyLong_AsLongAndOverflow()``, ``PyLong_AsSsize_t()``, ``PyLong_AsUnsignedLong()``, ``PyLong_AsSize_t()``,
-``PyLong_AsUnsignedLongMask()``, ``PyLong_AsUnsignedLongLongMask()``, ``PyLong_AsLongLongAndOverflow()``
-for integers larger than 2**30 up to 30%.
-
+++ /dev/null
-Fix a crash in the JIT involving attributes of modules.
+++ /dev/null
-Fix potential :mod:`weakref` races in an object's destructor on the :term:`free threaded <free
-threading>` build.
+++ /dev/null
-Changes specialization of ``BINARY_OP`` for ints to only specialize for
-"compact" ints. This streamlines the fast path at the cost of fewer
-specializations when very large integers are used.
+++ /dev/null
-Restrict the trashcan mechanism to GC'ed objects and untrack them while in
-the trashcan to prevent the GC and trashcan mechanisms conflicting.
+++ /dev/null
-Specialize :opcode:`POP_TOP` in the JIT compiler by specializing for reference lifetime and type. This will also enable easier top of stack caching in the JIT compiler.
+++ /dev/null
-Non-blocking mutex lock attempts now return immediately when the lock is busy
-instead of briefly spinning in the :term:`free threading` build.
+++ /dev/null
-Differentiate between t-strings and f-strings in syntax error for newlines
-in format specifiers of single-quoted interpolated strings.
+++ /dev/null
-Perform more aggressive control-flow optimizations on the machine code
-templates emitted by the experimental JIT compiler.
+++ /dev/null
-Fix error message for ``cls.__new__(cls, ...)`` where ``cls`` is not
-instantiable builtin or extension type (with ``tp_new`` set to ``NULL``).
+++ /dev/null
-Fix :class:`threading.Thread` objects becoming incorrectly daemon when
-created from an :mod:`atexit` callback or a pending call
-(:c:func:`Py_AddPendingCall`).
+++ /dev/null
-Improve :exc:`TypeError` error message, when richcomparing two
-:class:`types.MappingProxyType` objects.
+++ /dev/null
-Fix a bug caused by the garbage collector clearing weakrefs too early. The
-weakrefs in the ``tp_subclasses`` dictionary are needed in order to correctly
-invalidate type caches (for example, by calling ``PyType_Modified()``).
-Clearing weakrefs before calling finalizers causes the caches to not be
-correctly invalidated. That can cause crashes since the caches can refer to
-invalid objects. Defer the clearing of weakrefs without callbacks until after
-finalizers are executed.
+++ /dev/null
-Fix memory error handling in :c:func:`PyDict_SetDefault`.
+++ /dev/null
-Deprecate :option:`-b` and :option:`!-bb` command line options
-and schedule them to become no-op in Python 3.17.
+++ /dev/null
-While performing garbage collection, clear weakrefs to unreachable objects
-that are created during running of finalizers. If those weakrefs were are
-not cleared, they could reveal unreachable objects.
+++ /dev/null
-Reflect recent :pep:`750` change.
-
-Disallow concatenation of ``string.templatelib.Template`` and :class:`str`.
-Also, disallow implicit concatenation of t-string literals with string or
-f-string literals.
+++ /dev/null
-``Interpolation.expression`` now has a default, the empty string.
+++ /dev/null
-Add support for perf trampoline on macOS, to allow profilers wit JIT map
-support to read Python calls. While profiling, ``PYTHONPERFSUPPORT=1`` can
-be appended to enable the trampoline.
+++ /dev/null
-Improve performance of :class:`frozenset` by removing locks in the free-threading build.
+++ /dev/null
-Fix issue where per-thread bytecode was not instrumented for newly created
-threads.
+++ /dev/null
-Fixed a typo that prevented printing of uncollectable objects when the
-:const:`gc.DEBUG_UNCOLLECTABLE` mode was set.
+++ /dev/null
-Improve the error messages that may be raised by
-:meth:`~socket.socket.setsockopt`.
+++ /dev/null
-Fix some issues with the perf trampolines on x86-64 and aarch64. The
-trampolines were not being generated correctly for some cases, which could
-lead to the perf integration not working correctly. Patch by Pablo Galindo.
+++ /dev/null
-Fix crash when initializing :mod:`datetime` concurrently.
+++ /dev/null
-Improve performance of :class:`int` hash calculations.
+++ /dev/null
-Improve :exc:`SyntaxError` error messages for invalid :keyword:`assert`
-usages.
+++ /dev/null
-Make functions in :mod:`pwd` thread-safe on the :term:`free threaded <free threading>` build.
+++ /dev/null
-Make functions in :mod:`syslog` thread-safe on the :term:`free threaded
-<free threading>` build.
+++ /dev/null
-The :meth:`~object.__repr__` of :class:`ImportError` and :class:`ModuleNotFoundError`
-now shows "name" and "path" as ``name=<name>`` and ``path=<path>`` if they were given
-as keyword arguments at construction time.
-Patch by Serhiy Storchaka, Oleg Iarygin, and Yoav Nir
+++ /dev/null
-Fix PyREPL syntax highlighting on match cases after multi-line case. Contributed by Olga Matoula.
+++ /dev/null
-Improve :exc:`ModuleNotFoundError` by adding flavour text to the exception when the
-:option:`-S` option is passed. Patch by Andrea Mattei.
+++ /dev/null
-Optimize constant comparison for ``_COMPARE_OP_INT``, ``_COMPARE_OP_FLOAT`` and ``_COMPARE_OP_STR`` in JIT builds
+++ /dev/null
-Fix data races while de-instrumenting bytecode of code objects running concurrently in threads.
+++ /dev/null
-Disable computed stack limit checks on non-glibc linux platforms to fix
-crashes on deep recursion.
+++ /dev/null
-The codecs lookup function now again performs only minimal normalization of
-the encoding name before passing it to the search functions: all ASCII
-letters are converted to lower case, spaces are replaced with hyphens.
-This restores the pre-Python 3.9 behavior.
+++ /dev/null
-Remove some newer macOS API usage from the JIT compiler in order to restore
-compatibility with older OSX 10.15 deployment targets.
+++ /dev/null
-The perf profiler can now be used if a previous frame evaluation API has been provided.
+++ /dev/null
-Fix bug where some bytecode instructions of a boolean expression are not
-associated with the correct exception handler.
+++ /dev/null
-A standalone docstring in a node body is optimized as a :keyword:`pass`
-statement to ensure that the node's body is never empty. There was a
-:exc:`ValueError` in :func:`compile` otherwise.
+++ /dev/null
-Fixed a regression where raw f-strings incorrectly interpreted
-escape sequences in format specifications. Raw f-strings now properly preserve
-literal backslashes in format specs, matching the behavior from Python 3.11.
-For example, ``rf"{obj:\xFF}"`` now correctly produces ``'\\xFF'`` instead of
-``'ÿ'``. Patch by Pablo Galindo.
+++ /dev/null
-The :attr:`object.__dict__` and :attr:`!__weakref__` descriptors now use a
-single descriptor instance per interpreter, shared across all types that
-need them.
-This speeds up class creation, and helps avoid reference cycles.
+++ /dev/null
-Fix name of the Python encoding in Unicode errors of the code page codec:
-use "cp65000" and "cp65001" instead of "CP_UTF7" and "CP_UTF8" which are not
-valid Python code names. Patch by Victor Stinner.
+++ /dev/null
-Disable user site packages directory when a ``._pth`` file is used, even if
-it contains ``import site``.
+++ /dev/null
-Fix a crash in the :term:`free threading` build when disabling profiling or tracing
-across all threads with :c:func:`PyEval_SetProfileAllThreads` or
-:c:func:`PyEval_SetTraceAllThreads` or their Python equivalents
-:func:`threading.settrace_all_threads` and :func:`threading.setprofile_all_threads`.
+++ /dev/null
-Add :data:`sys.abi_info` object to make ABI information more easily accessible.
+++ /dev/null
-Fix a crash in the :term:`free threading` build when disabling profiling or
-tracing across all threads with :c:func:`PyEval_SetProfileAllThreads` or
-:c:func:`PyEval_SetTraceAllThreads` or their Python equivalents
-:func:`threading.settrace_all_threads` and
-:func:`threading.setprofile_all_threads`.
+++ /dev/null
-Optimize ``_COMPARE_OP``, ``_CONTAINS_OP``, ``_UNARY_NEGATIVE``, ``_UNARY_NOT``, and ``_UNARY_INVERT`` in JIT builds with constant-loading uops (``_POP_TWO_LOAD_CONST_INLINE_BORROW`` and ``_POP_TOP_LOAD_CONST_INLINE_BORROW``), and then remove both to reduce instruction count.
+++ /dev/null
-Allow assignment to :attr:`~type.__bases__` of direct subclasses of builtin
-classes.
+++ /dev/null
-Fix for incorrect source code being shown in tracebacks from the Basic REPL
-when :envvar:`PYTHONSTARTUP` is given. Patch by Adam Hartz.
+++ /dev/null
-Fix a potential deadlock in the :term:`free threading` build when daemon
-threads enable or disable profiling or tracing while the main thread is
-shutting down the interpreter.
+++ /dev/null
-Fix double period in :exc:`AttributeError` message for invalid mock assertions
+++ /dev/null
-Fix the JIT's handling of many local variables. This previously caused a segfault.
+++ /dev/null
-Fix keyword typo recognition when parsing files. Patch by Pablo Galindo.
+++ /dev/null
-Fix runaway recursion when calling a function with keyword arguments.
+++ /dev/null
-Replace the shim code added to every piece of jitted code with a single
-trampoline function.
+++ /dev/null
-Show error suggestions on nested attribute access. Patch by Pablo Galindo
+++ /dev/null
-Ensure that :c:func:`PyRefTracer_SetTracer` sync with all existing threads when called
-to avoid races in the free threaded build. Patch by Pablo Galindo
+++ /dev/null
-Removed ``localtime`` from the list of reported system timezones.
+++ /dev/null
-On Solaris/Illumos platforms, thread names are now encoded as ASCII to avoid errors on systems (e.g. OpenIndiana) that don't support non-ASCII names.
+++ /dev/null
-Fix a crash when using the :mod:`warnings` module in a finalizer at shutdown. Patch by Kumar Aditya.
+++ /dev/null
-Use the same quoting algorithm for the repr of bytearrays as for bytes
-objects and strings -- use double quotes for quoting if the bytearray
-contains single quotes and does not contain double quotes.
+++ /dev/null
-Fix JIT trace buffer overrun by increasing possible exit stubs.
-Patch by Donghee Na.
+++ /dev/null
-Make :mod:`cProfile` thread-safe on the :term:`free threaded <free
-threading>` build.
+++ /dev/null
-:mod:`zipimport` now supports zstandard compressed zip file entries.
+++ /dev/null
-Fix some standard library submodules missing from the :term:`REPL` auto-completion of imports.
+++ /dev/null
-Fix crash in certain cases where a module contains both a module-level
-annotation and a comprehension.
+++ /dev/null
-The default REPL now avoids highlighting built-in names (for instance :class:`set`
-or :func:`format`) when they are used as attribute names (for instance in ``value.set``
-or ``text.format``).
+++ /dev/null
-``BINARY_OP`` now specializes to ``BINARY_OP_ADD_INT``,
-``BINARY_OP_SUBTRACT_INT`` or ``BINARY_OP_MULTIPLY_INT`` if operands
-are compact ints.
+++ /dev/null
-Fix :exc:`SyntaxWarning` emitted for erroneous subscript expressions involving
-:ref:`template string literals <t-strings>`. Patch by Brian Schubert.
+++ /dev/null
-Add missing validation of argument ``count`` in :func:`os.sendfile` to be
-non-negative.
+++ /dev/null
-Move the globals-to-const JIT optimizer pass into to the main JIT optimizer
-pass
+++ /dev/null
-Fix a bug in the JIT optimizer when round-tripping strings and tuples.
+++ /dev/null
-Fix a crash when a generic object's ``__typing_subst__`` returns an object
-that isn't a :class:`tuple`.
+++ /dev/null
-Fix :mod:`contextvars` initialization so that all subinterpreters are assigned the
-:attr:`~contextvars.Token.MISSING` value.
+++ /dev/null
-Remove non-existent :meth:`~object.__copy__`, :meth:`~object.__deepcopy__`, and :attr:`~type.__bases__` from the :meth:`~object.__dir__` entries of :class:`types.GenericAlias`.
+++ /dev/null
-Improve :exc:`SyntaxError` message for :keyword:`assert` in cases like
-``assert a := b``.
+++ /dev/null
-Raise :exc:`OverflowError` for ``(-1).to_bytes()`` for signed conversions
-when bytes count is zero. Patch by Sergey B Kirpichev.
+++ /dev/null
-When a new tracing function is registered with
-:c:func:`PyRefTracer_SetTracer`, replacing the current a call to the trace
-function will be made with the object set to **NULL** and **event** set to
-:c:data:`PyRefTracer_TRACKER_REMOVED`. This will happen just before the new
-function is registered. Patch by Pablo Galindo
+++ /dev/null
-Don't run PyREPL in a degraded environment where setting termios attributes
-is not allowed.
+++ /dev/null
-Fix handling of unusual t-string annotations in annotationlib. Patch by Dave Peck.
+++ /dev/null
-Make :mod:`mmap` thread-safe on the :term:`free threaded <free threading>`
-build.
+++ /dev/null
-:pep:`538`: Coerce the POSIX locale to a UTF-8 based locale. Patch by Victor
-Stinner.
+++ /dev/null
-Increased the number of cached small positive integers from 256 to 1024.
+++ /dev/null
-Fix compilation problems in ``_remote_debugging_module.c`` when the system
-doesn't have ``process_vm_readv``. Patch by Pablo Galindo
+++ /dev/null
-Prevent a deadlock when multiple threads start, stop and use :mod:`tracemalloc`
-simultaneously.
+++ /dev/null
-Support non-UTF-8 shebang and comments in Python source files if non-UTF-8
-encoding is specified. Detect decoding error in comments for default (UTF-8)
-encoding. Show the line and position of decoding error for default encoding
-in a traceback. Show the line containing the coding cookie when it conflicts
-with the BOM in a traceback.
+++ /dev/null
-Fix lambda colon erroneously start format spec in f-string in tokenizer.
+++ /dev/null
-Fix reference leaks in error branches of functions accepting path strings or
-bytes such as :func:`compile` and :func:`os.system`. Patch by Bénédikt Tran.
+++ /dev/null
-Fix a memory leak when failing to create a :class:`~typing.Union` type.
-Patch by Bénédikt Tran.
+++ /dev/null
-Improve performance of list extension by dictionary items.
+++ /dev/null
-Fix potential memory leak when a reference cycle exists between an instance
-of :class:`typing.TypeAliasType`, :class:`typing.TypeVar`,
-:class:`typing.ParamSpec`, or :class:`typing.TypeVarTuple` and its
-``__name__`` attribute. Patch by Mikhail Efimov.
+++ /dev/null
-Document that error indicator may be set in tp_dealloc, and how to avoid
-clobbering it.
+++ /dev/null
-Document that the :term:`iterator` for the leftmost :keyword:`!for` clause
-in the generator expression is created immediately.
+++ /dev/null
-We are now checking for fatal errors in EPUB builds in CI.
+++ /dev/null
-Colorize t-string prefixes for template strings in IDLE, as done for f-string prefixes.
+++ /dev/null
-Deduplicate version number in IDLE shell title bar after saving to a file.
+++ /dev/null
-Improve Zip file validation false positive rate in :func:`zipfile.is_zipfile`.
+++ /dev/null
-Allow negative priority values from :func:`os.sched_get_priority_min` and
-:func:`os.sched_get_priority_max` functions.
+++ /dev/null
-The :meth:`~mmap.mmap.size` method of the :class:`mmap.mmap` class now
-returns the size of an anonymous mapping on both Unix and Windows.
-Previously, the size would be returned on Windows and an :exc:`OSError`
-would be raised on Unix. :exc:`ValueError` is now raised instead of
-:exc:`OSError` when ``trackfd=False``.
+++ /dev/null
-:mod:`zoneinfo`: Check in ``<prefix>/share/zoneinfo`` for data files on Windows
+++ /dev/null
-:mod:`pprint` can now pretty-print dict views.
+++ /dev/null
-Fix failure when importing a module from the root directory on unix-like
-platforms with sys.pycache_prefix set.
+++ /dev/null
-Fix :class:`html.parser.HTMLParser` to not unescape character entities in
-attribute values if they are followed by an ASCII alphanumeric or an equals
-sign.
+++ /dev/null
-Reraise :exc:`KeyError` as :exc:`ModuleNotFoundError` when
-:meth:`importlib.machinery.PathFinder.find_spec` is called on a submodule
-without importing the parent (and without a ``path`` argument).
+++ /dev/null
-UTF8 support for the IMAP APPEND command has been made RFC compliant.
+++ /dev/null
-:meth:`html.parser.HTMLParser.close` no longer loses data when the
-``<script>`` tag is not closed. Patch by Waylan Limberg.
+++ /dev/null
-Fix aliases for ``iso8859_8`` encoding. Patch by Dave Goncalves.
+++ /dev/null
-:mod:`ssl` now uses ``SSL_sendfile`` internally when it is possible (see
-:data:`~ssl.OP_ENABLE_KTLS`). The function sends a file more efficiently
-because it performs TLS encryption in the kernel to avoid additional context
-switches. Patch by Illia Volochii.
+++ /dev/null
-Fix flag mask inversion when unnamed flags exist.
+++ /dev/null
-Fix potential hang in ``multiprocessing.popen_spawn_posix`` that can happen
-when the child proc dies early by closing the child fds right away.
+++ /dev/null
-Fix an issue in the :mod:`!_pickle` extension module in which importing
-:mod:`multiprocessing` could change how pickle identifies which module an
-object belongs to, potentially breaking the unpickling of those objects.
+++ /dev/null
-Slightly speed up :func:`os.walk` by calling :func:`os.path.join` less
-often.
+++ /dev/null
-The :mod:`shelve` module now accepts custom serialization
-and deserialization functions.
+++ /dev/null
-``importlib.metadata`` now prioritizes valid dists to invalid dists when
-retrieving by name.
+++ /dev/null
-``importlib.metadata`` now raises a ``KeyError`` instead of returning
-``None`` when a key is missing from the metadata.
+++ /dev/null
-``SimplePath`` is now presented in ``importlib.metadata.__all__``.
+++ /dev/null
-:func:`functools.partial` calls are now faster when keyword arguments are used.
+++ /dev/null
-If possible, indicate which :mod:`curses` C function or macro is responsible
-for raising a :exc:`curses.error` exception. Patch by Bénédikt Tran.
+++ /dev/null
-:data:`functools.Placeholder` cannot be passed to :func:`functools.partial` as a keyword argument.
+++ /dev/null
-Add check that timezone fields are in range for
-:meth:`datetime.datetime.fromisoformat` and
-:meth:`datetime.time.fromisoformat`. Patch by Semyon Moroz.
+++ /dev/null
-Implement a fast path for :class:`datetime.date` objects in :func:`datetime.date.today`
-which results in a 5x performance gain while proper subclasses retain their
-previous performance.
+++ /dev/null
-Avoid exiting the new REPL and offer suggestions even if there are non-string
-candidates when errors occur.
+++ /dev/null
-Handle corner-case for :class:`~fractions.Fraction`'s formatting: treat
-zero-padding (preceding the width field by a zero (``'0'``) character) as an
-equivalent to a fill character of ``'0'`` with an alignment type of ``'='``,
-just as in case of :class:`float`'s.
+++ /dev/null
-Make concurrent iterations over :class:`itertools.cycle` safe under free-threading.
+++ /dev/null
-Fix :class:`calendar.TextCalendar`, :class:`calendar.HTMLCalendar`,
-and the :mod:`calendar` CLI to display month names in the nominative
-case by adding :data:`calendar.standalone_month_name` and
-:data:`calendar.standalone_month_abbr`, which provide month names and
-abbreviations in the grammatical form used when a month name stands by
-itself, if the locale supports it.
+++ /dev/null
-Adjust default ``compressionlevel=`` to 6 (down from 9) in :mod:`gzip` and :mod:`tarfile`.
-It is the default level used by most compression tools and a better
-tradeoff between speed and performance.
+++ /dev/null
-Make ``ResourceTracker.send`` from :mod:`multiprocessing` re-entrant safe
+++ /dev/null
-Fix formatting issues in :func:`json.dump` when both *indent* and *skipkeys* are used.
+++ /dev/null
-Support underscore and comma as thousands separators in the fractional part
-for :class:`~decimal.Decimal`'s formatting. Patch by Sergey B Kirpichev.
+++ /dev/null
-Support underscore and comma as thousands separators in the fractional part
-for :class:`~fractions.Fraction`'s formatting. Patch by Sergey B Kirpichev.
+++ /dev/null
-Fix :class:`!Flag` inversion when flag set has missing values
-(:class:`!IntFlag` still flips all bits); fix negative assigned values
-during flag creation (both :class:`!Flag` and :class:`!IntFlag` ignore
-missing values).
+++ /dev/null
-Make :class:`io.BytesIO` safe in :term:`free-threaded <free threading>` build.
+++ /dev/null
-Fix libc thread safety issues with :mod:`pwd` by locking access to
-``getpwall``.
+++ /dev/null
-Fix libc thread safety issues with :mod:`os` by replacing ``getlogin`` with
-``getlogin_r`` re-entrant version.
+++ /dev/null
-Fix libc thread safety issues with :mod:`dbm` by performing stateful
-operations in critical sections.
+++ /dev/null
-Make concurrent iterations over :class:`itertools.combinations` and :class:`itertools.product` safe under free-threading.
+++ /dev/null
-Fix ``%z`` directive in :func:`datetime.datetime.strptime` to allow for no provided
-offset as was documented.
+++ /dev/null
-:func:`fcntl.fcntl` and :func:`fcntl.ioctl`: Remove the 1024 bytes limit
-on the size of not mutated bytes-like argument.
+++ /dev/null
-Add :func:`math.isnormal` and :func:`math.issubnormal` functions. Patch by
-Sergey B Kirpichev.
+++ /dev/null
-:mod:`xml.etree.ElementTree`: Fix a crash in :meth:`Element.__deepcopy__
-<object.__deepcopy__>` when the element is concurrently mutated.
-Patch by Bénédikt Tran.
+++ /dev/null
-``ldexp()`` on Windows doesn't round subnormal results before Windows 11,
-but should. Python's :func:`math.ldexp` wrapper now does round them, so
-results may change slightly, in rare cases of very small results, on
-Windows versions before 11.
+++ /dev/null
-Prevent the :class:`~concurrent.futures.ProcessPoolExecutor` executor thread,
-which remains running when :meth:`shutdown(wait=False)
-<concurrent.futures.Executor.shutdown>`, from
-attempting to adjust the pool's worker processes after the object state has already been reset during shutdown.
-A combination of conditions, including a worker process having terminated abormally,
-resulted in an exception and a potential hang when the still-running executor thread
-attempted to replace dead workers within the pool.
+++ /dev/null
-Improve error messages for incorrect types and values of :class:`csv.Dialect`
-attributes.
+++ /dev/null
-Improve the error message of :func:`multiprocessing.sharedctypes.Array`,
-:func:`multiprocessing.sharedctypes.RawArray`, :func:`multiprocessing.sharedctypes.Value` and
-:func:`multiprocessing.sharedctypes.RawValue` when an invalid typecode is passed. Patch
-by Tomas Roun
+++ /dev/null
-Avoid accessing ``__annotations__`` unnecessarily in
-:func:`inspect.signature`.
+++ /dev/null
-Support keyword completion in the :mod:`sqlite3` command-line interface and add
-:data:`sqlite3.SQLITE_KEYWORDS` constant.
+++ /dev/null
-Fix thread-safety issues in :mod:`linecache`.
+++ /dev/null
-Add basic color to :mod:`sqlite3` CLI interface.
+++ /dev/null
-Fix dot commands with trailing spaces are mistaken for multi-line SQL
-statements in the sqlite3 command-line interface.
+++ /dev/null
-Remove :func:`os.listdrives`, :func:`os.listvolumes` and :func:`os.listmounts`
-in non Windows desktop builds since the underlying functionality is missing.
+++ /dev/null
-Support t-strings (:pep:`750`) in :mod:`annotationlib`. Patch by Jelle
-Zijlstra.
+++ /dev/null
-Removed the ``check_home`` parameter from :func:`sysconfig.is_python_build`,
-deprecated since Python 3.12.
+++ /dev/null
-Add parameter ``formatter`` to :func:`logging.basicConfig`.
+++ /dev/null
-Improve unparsing of t-strings in :func:`ast.unparse` and ``from __future__
-import annotations``. Empty t-strings now round-trip correctly and
-formatting in interpolations is preserved.
-Patch by Jelle Zijlstra.
+++ /dev/null
-Clean up :class:`sqlite3.Connection` APIs. All parameters of
-:func:`sqlite3.connect` except *database* are now keyword-only. The first
-three parameters of methods :meth:`~sqlite3.Connection.create_function` and
-:meth:`~sqlite3.Connection.create_aggregate` are now positional-only. The
-first parameter of methods :meth:`~sqlite3.Connection.set_authorizer`,
-:meth:`~sqlite3.Connection.set_progress_handler` and
-:meth:`~sqlite3.Connection.set_trace_callback` is now positional-only.
+++ /dev/null
-:func:`random.getrandbits` can now generate more that 2\ :sup:`31` bits.
-:func:`random.randbytes` can now generate more that 256 MiB.
+++ /dev/null
-Added a *color* option to :func:`difflib.unified_diff` that colors output
-similar to :program:`git diff`.
+++ /dev/null
-Remove deprecated :meth:`!zipimport.zipimporter.load_module`. Use
-:meth:`zipimport.zipimporter.exec_module` instead.
+++ /dev/null
-Fix bug where :class:`typing.TypedDict` classes defined under ``from
-__future__ import annotations`` and inheriting from another ``TypedDict``
-had an incorrect ``__annotations__`` attribute.
+++ /dev/null
-Speedup pasting in ``PyREPL`` on Windows in a legacy console. Patch by Chris
-Eibl.
+++ /dev/null
-Fix handling of invalid markup declarations in
-:class:`html.parser.HTMLParser`.
+++ /dev/null
-Fix bug where :func:`annotationlib.get_annotations` would return the wrong
-result for certain classes that are part of a class hierarchy where ``from
-__future__ import annotations`` is used.
+++ /dev/null
-Fix bug with applying :func:`copy.replace` to :mod:`ast` objects. Attributes
-that default to ``None`` were incorrectly treated as required for manually
-created AST nodes.
+++ /dev/null
-Fixed a race in :func:`functools.lru_cache` under free-threading.
+++ /dev/null
-Remove :class:`!http.server.CGIHTTPRequestHandler` and ``--cgi`` flag from the
-:program:`python -m http.server` command-line interface. They were
-deprecated in Python 3.13. Patch by Bénédikt Tran.
+++ /dev/null
-Fix :class:`argparse.ArgumentParser` with the *formatter_class* argument.
-Fix TypeError when *formatter_class* is a custom subclass of
-:class:`!HelpFormatter`.
-Fix TypeError when *formatter_class* is not a subclass of
-:class:`!HelpFormatter` and non-standard *prefix_char* is used.
-Fix support of colorizing when *formatter_class* is not a subclass of
-:class:`!HelpFormatter`.
+++ /dev/null
-Remove support for creating :class:`~typing.NamedTuple` classes via the
-undocumented keyword argument syntax. Patch by Bénédikt Tran.
+++ /dev/null
-Fix thread safety of :class:`collections.OrderedDict`. Patch by Kumar Aditya.
+++ /dev/null
-Remove support for ``TD = TypedDict("TD")`` and ``TD = TypedDict("TD", None)``
-calls for constructing :class:`typing.TypedDict` objects with zero field.
-Patch by Bénédikt Tran.
+++ /dev/null
-Remove the undocumented function :func:`!ctypes.SetPointerType`,
-which has been deprecated since Python 3.13.
-Patch by Bénédikt Tran.
+++ /dev/null
-Remove the deprecated ``getmark()``, ``setmark()`` and ``getmarkers()``
-methods of the :class:`~wave.Wave_read` and :class:`~wave.Wave_write`
-classes, which were deprecated since Python 3.13. Patch by Bénédikt Tran.
+++ /dev/null
-Removed deprecated :meth:`!pathlib.PurePath.is_reserved`. Use
-:func:`os.path.isreserved` to detect reserved paths on Windows.
+++ /dev/null
-Remove :func:`!platform.java_ver` which was deprecated since Python 3.13.
+++ /dev/null
-Make the private class ``typing._UnionGenericAlias`` hashable.
+++ /dev/null
-Simplify and improve :func:`typing.evaluate_forward_ref`. It now no longer
-raises errors on certain invalid types. In several situations, it is now
-able to evaluate forward references that were previously unsupported.
+++ /dev/null
-Raise :exc:`ValueError` in :func:`open` if *opener* returns a negative
-file-descriptor in the Python implementation of :mod:`io` to match the
-C implementation.
+++ /dev/null
-Make :class:`!string.templatelib.Template` and
-:class:`!string.templatelib.Interpolation` generic.
+++ /dev/null
-:mod:`shelve` as well as underlying :mod:`!dbm.dumb` and :mod:`!dbm.sqlite` now have :meth:`!reorganize` methods to
-recover unused free space previously occupied by deleted entries.
+++ /dev/null
-:mod:`ipaddress`: fix collisions in :meth:`~object.__hash__` for
-:class:`~ipaddress.IPv4Network` and :class:`~ipaddress.IPv6Network`
-objects.
+++ /dev/null
-On POSIX-compliant systems, :func:`!multiprocessing.util.get_temp_dir` now
-ignores :envvar:`TMPDIR` (and similar environment variables) if the path
-length of ``AF_UNIX`` socket files exceeds the platform-specific maximum
-length when using the :ref:`forkserver
-<multiprocessing-start-method-forkserver>` start method. Patch by Bénédikt
-Tran.
+++ /dev/null
-Fix handling paths that end with a percent-encoded slash (``%2f`` or
-``%2F``) in :class:`http.server.SimpleHTTPRequestHandler`.
+++ /dev/null
-The generated directory listing page in
-:class:`http.server.SimpleHTTPRequestHandler` now only shows the decoded
-path component of the requested URL, and not the query and fragment.
+++ /dev/null
-Fix interaction of the new :term:`REPL` and :option:`-X showrefcount <-X>` command line option.
+++ /dev/null
-The :mod:`tarfile` module now handles :exc:`UnicodeEncodeError` in the same
-way as :exc:`OSError` when cannot extract a member.
+++ /dev/null
-Emit :exc:`RuntimeWarning` in the Python implementation of :mod:`io` when
-the :term:`file-like object <file object>` is not closed explicitly in the
-presence of multiple I/O layers.
+++ /dev/null
-Speed up :mod:`asyncio` performance of transferring state from thread
-pool :class:`concurrent.futures.Future` by up to 4.4x. Patch by J. Nick
-Koston.
+++ /dev/null
-Remove support for arbitrary positional or keyword arguments in the C
-implementation of :class:`threading.RLock` objects. This was deprecated
-since Python 3.14. Patch by Bénédikt Tran.
+++ /dev/null
-Remove import of C implementation of :class:`io.FileIO` from Python
-implementation which has its own implementation
+++ /dev/null
-:mod:`http.server`: Fix IPv6 address binding and
-:option:`--directory <http.server --directory>` handling when using HTTPS.
+++ /dev/null
-:mod:`email`: Fix parsing of email message ID with invalid domain.
+++ /dev/null
-Fixed :exc:`UnboundLocalError` that could occur during :mod:`email` header
-parsing if an expected trailing delimiter is missing in some contexts.
+++ /dev/null
-Updated tab completion on REPL to include builtin modules. Contributed by
-Tom Wang, Hunter Young
+++ /dev/null
-Add :mod:`!compression.zstd` version information to ``test.pythoninfo``.
+++ /dev/null
-The default queue size is now ``socket.SOMAXCONN`` for :class:`socketserver.TCPServer`.
+++ /dev/null
-Change :func:`datetime.datetime.now` to half-even rounding for
-consistency with :func:`datetime.datetime.fromtimestamp`. Patch by
-John Keith Hohm.
+++ /dev/null
-:mod:`curses`: The :meth:`curses.window.instr` and :meth:`curses.window.getstr`
-methods now allocate their internal buffer on the heap instead of the stack;
-in addition, the max buffer size is increased from 1023 to 2047.
+++ /dev/null
-Improve speed (x1.1-1.8) of the :class:`~fractions.Fraction` constructor for
-typical inputs (:class:`float`'s, :class:`~decimal.Decimal`'s or strings).
+++ /dev/null
-Add support of the all-but-last mode in :func:`os.path.realpath`.
+++ /dev/null
-Fixed asyncio memory leak in cancelled shield tasks. For shielded tasks
-where the shield was cancelled, log potential exceptions through the
-exception handler. Contributed by Christian Harries.
+++ /dev/null
-Fix the :meth:`threading.RLock.locked` method.\r
+++ /dev/null
-Fixed an off by one error concerning the backlog parameter in
-:meth:`~asyncio.loop.create_unix_server`. Contributed by Christian Harries.
+++ /dev/null
-Fix :mod:`asyncio` to not close subprocess pipes which would otherwise error out when the event loop is already closed.
+++ /dev/null
-Converted ``asyncio.tools.CycleFoundException`` from dataclass to a regular exception type.
+++ /dev/null
-Ensure :mod:`pdb` remote debugging script is readable by remote Python process.
+++ /dev/null
-:func:`unittest.doModuleCleanups` no longer swallows all but first exception
-raised in the cleanup code, but raises a :exc:`ExceptionGroup` if multiple
-errors occurred.
+++ /dev/null
-Improved the styling of HTML diff pages generated by the
-:class:`difflib.HtmlDiff` class, and migrated the output to the HTML5
-standard.
+++ /dev/null
-Fix tokenize.untokenize() round-trip errors related to t-strings braces escaping
+++ /dev/null
-:func:`multiprocessing.freeze_support` now checks for work on any "spawn"
-start method platform rather than only on Windows.
+++ /dev/null
-:func:`curses.window.getch` now correctly handles signals. Patch by Bénédikt
-Tran.
+++ /dev/null
-:mod:`asyncio`: Remove some private names from ``asyncio.__all__``.
+++ /dev/null
-:mod:`zlib`: Allow to combine Adler-32 and CRC-32 checksums via
-:func:`~zlib.adler32_combine` and :func:`~zlib.crc32_combine`. Patch by
-Callum Attryde and Bénédikt Tran.
+++ /dev/null
-:mod:`email`: Fix :exc:`TypeError` in :func:`email.utils.decode_params`
-when sorting :rfc:`2231` continuations that contain an unnumbered section.
+++ /dev/null
-Fix a crash when calling methods of :class:`ssl.SSLContext` or
-:class:`ssl.SSLSocket` across multiple threads.
+++ /dev/null
-:mod:`!_hashlib`: Rename internal C functions for :class:`!_hashlib.HASH`
-and :class:`!_hashlib.HASHXOF` objects. Patch by Bénédikt Tran.
+++ /dev/null
-If possible, ensure that :func:`uuid.getnode` returns the same result even
-across different processes. Previously, the result was constant only within
-the same process. Patch by Bénédikt Tran.
+++ /dev/null
-Built-in HACL* and OpenSSL implementations of hash function constructors
-now correctly accept the same *documented* named arguments. For instance,
-:func:`~hashlib.md5` could be previously invoked as ``md5(data=data)``
-or ``md5(string=string)`` depending on the underlying implementation
-but these calls were not compatible. Patch by Bénédikt Tran.
+++ /dev/null
-Fix performance regression in calling a :mod:`ctypes` function pointer in :term:`free threading`.
+++ /dev/null
-The ``time_clockid_converter()`` function now selects correct type for
-``clockid_t`` on Cygwin which fixes a build error.
+++ /dev/null
-:ref:`curses.window <curses-window-objects>`: Consistently report failures
-of curses C API calls in Window methods by raising a :exc:`curses.error`.
-This affects :meth:`~curses.window.addch`, :meth:`~curses.window.addnstr`,
-:meth:`~curses.window.addstr`, :meth:`~curses.window.border`,
-:meth:`~curses.window.box`, :meth:`~curses.window.chgat`,
-:meth:`~curses.window.getbkgd`, :meth:`~curses.window.inch`,
-:meth:`~curses.window.insstr` and :meth:`~curses.window.insnstr`.
-Patch by Bénédikt Tran.
+++ /dev/null
-:meth:`curses.window.refresh` and :meth:`curses.window.noutrefresh` now raise
-a :exc:`TypeError` instead of :exc:`curses.error` when called with an incorrect
-number of arguments for :ref:`pads <windows-and-pads>`. Patch by Bénédikt Tran.
+++ /dev/null
-:mod:`curses`: Consistently report failures of curses C API calls in
-module-level methods by raising a :exc:`curses.error`. This affects
-:func:`~curses.assume_default_colors`, :func:`~curses.baudrate`,
-:func:`~curses.cbreak`, :func:`~curses.echo`, :func:`~curses.longname`,
-:func:`~curses.initscr`, :func:`~curses.nl`, :func:`~curses.raw`,
-:func:`~curses.termattrs`, :func:`~curses.termname` and :func:`~curses.unctrl`.
-Patch by Bénédikt Tran.
+++ /dev/null
-Fix parsing long IPv6 addresses with embedded IPv4 address.
+++ /dev/null
-Improve error report for :mod:`doctest`\ s run with :mod:`unittest`. Remove
-:mod:`!doctest` module frames from tracebacks and redundant newline
-character from a failure message.
+++ /dev/null
-Fix possible crash in the :mod:`compression.zstd` module related to setting
-parameter types. Patch by Jelle Zijlstra.
+++ /dev/null
-Run each example as a subtest in unit tests synthesized by
-:func:`doctest.DocFileSuite` and :func:`doctest.DocTestSuite`.
-Add the :meth:`doctest.DocTestRunner.report_skip` method.
+++ /dev/null
-Add the :mod:`concurrent.interpreters` module. See :pep:`734`.
+++ /dev/null
-:func:`ast.dump` now only omits ``None`` and ``[]`` values if they are
-default values.
+++ /dev/null
-By default, omit optional ``Load()`` values in :func:`ast.dump`.
+++ /dev/null
-Fix the "unknown action" exception in
-:meth:`argparse.ArgumentParser.add_argument_group` to correctly replace the
-action class.
+++ /dev/null
-:mod:`hashlib`: Supporting the ``string`` keyword parameter in hash function
-constructors such as :func:`~hashlib.new` or the direct hash-named constructors
-such as :func:`~hashlib.md5` and :func:`~hashlib.sha256` is now deprecated and
-slated for removal in Python 3.19.
-Prefer passing the initial data as a positional argument for maximum backwards
-compatibility.
-Patch by Bénédikt Tran.
+++ /dev/null
-Expand ``_colorize`` theme with ``keyword_constant`` and implement in
-:term:`repl`.
+++ /dev/null
-Rewrite and cleanup the internal :mod:`!_blake2` module. Some exception
-messages were changed but their types were left untouched. Patch by Bénédikt
-Tran.
+++ /dev/null
-Accept leading zeros in precision and width fields for
-:class:`~fractions.Fraction` formatting, for example ``format(Fraction(1,
-3), '.016f')``.
+++ /dev/null
-+Accept leading zeros in precision and width fields for
-+:class:`~decimal.Decimal` formatting, for example ``format(Decimal(1.25),
-'.016f')``.
+++ /dev/null
-Fix the "Invalid error handling" exception in
-:class:`!encodings.idna.IncrementalDecoder` to correctly replace the
-'errors' parameter.
+++ /dev/null
-Improve :mod:`sqlite3` CLI's ``.help`` message.
+++ /dev/null
-The :code:`INT` opcode of the C accelerator :mod:`!_pickle` module was updated
-to look only for "00" and "01" to push booleans onto the stack, aligning with
-the Python :mod:`pickle` module.
+++ /dev/null
-:mod:`uuid`: when the MAC address cannot be determined, the 48-bit node\r
-ID is now generated with a cryptographically-secure pseudo-random number\r
-generator (CSPRNG) as per :rfc:`RFC 9562, §6.10.3 <9562#section-6.10-3>`.\r
-This affects :func:`~uuid.uuid1` and :func:`~uuid.uuid6`.\r
+++ /dev/null
-:mod:`hashlib`: improve exception messages when an OpenSSL function failed.
-When memory allocation fails on OpenSSL's side, a :exc:`MemoryError` is
-raised instead of a :exc:`ValueError`. Patch by Bénédikt Tran.
+++ /dev/null
-Synchronized zipfile.Path with zipp 3.23, including improved performance of
-:meth:`zipfile.Path.open` for non-reading modes, rely on
-:func:`functools.cached_property` to cache values on the instance. Rely on
-``save_method_args`` to save the initialization method arguments. Fixed
-``.name``, ``.stem`` and other basename-based properties on Windows when
-working with a zipfile on disk.
+++ /dev/null
-Changed the names of the symbol tables for lambda expressions and generator
-expressions to "<lambda>" and "<genexpr>" respectively to avoid conflicts
-with user-defined names.
+++ /dev/null
-Raise a correct exception for values greater than 0x7fffffff for the ``BINSTRING`` opcode in the C implementation of :mod:`pickle`.
+++ /dev/null
-Preserve :class:`types.GenericAlias` subclasses in
-:func:`typing.get_type_hints`
+++ /dev/null
-Do not normalize :mod:`locale` name 'C.UTF-8' to 'en_US.UTF-8'.
+++ /dev/null
-Fix :mod:`multiprocessing` ``forkserver`` bug which prevented ``__main__``
-from being preloaded.
+++ /dev/null
-:mod:`multiprocessing`: Flush ``stdout`` and ``stderr`` after preloading
-modules in the ``forkserver``.
+++ /dev/null
-:mod:`json` now encodes strings up to 2.2x faster if they consist solely of characters that don’t require escaping.
+++ /dev/null
-Fix :class:`unittest.mock.Mock` generation on :func:`dataclasses.dataclass`
-objects. Now all special attributes are set as it was before :gh:`124429`.
+++ /dev/null
-Fix the argument mismatch in ``_lsprof`` for ``PY_THROW`` event.
+++ /dev/null
-Fix :meth:`!reprlib.Repr.repr_int` when given integers with more than
-:func:`sys.get_int_max_str_digits` digits. Patch by Bénédikt Tran.
+++ /dev/null
-Fix :func:`os.getlogin` failing for longer usernames on BSD-based platforms.
+++ /dev/null
-:class:`configparser`'s error message when attempting to write an invalid key is now more helpful.
+++ /dev/null
-Fix :meth:`asyncio.DatagramTransport.sendto` to account for datagram header size when
-data cannot be sent.
+++ /dev/null
-Fix opening a :mod:`dbm.sqlite3` database for reading from read-only file
-or directory.
+++ /dev/null
-Fix a crash on DEBUG builds when an HACL* HMAC routine fails. Patch by
-Bénédikt Tran.
+++ /dev/null
-Only fetch globals and locals if necessary in
-:func:`annotationlib.get_annotations`
+++ /dev/null
-Fix races on :mod:`heapq` updates and :class:`list` reads on the :term:`free threaded <free threading>`
-build.
+++ /dev/null
-Raise consistent :exc:`NameError` exceptions in :func:`annotationlib.ForwardRef.evaluate`
+++ /dev/null
-Added ``supports_isolated_interpreters`` field to
-:data:`sys.implementation`.
+++ /dev/null
-Make concurrent iterations over :class:`itertools.chain` safe under :term:`free threading`.
+++ /dev/null
-:mod:`hashlib`: reject negative digest lengths in OpenSSL-based SHAKE objects
-by raising a :exc:`ValueError`. Previously, negative lengths were implicitly
-rejected by raising a :exc:`MemoryError` or a :exc:`SystemError`.
-Patch by Bénédikt Tran.
+++ /dev/null
-Speed up :mod:`pprint` for :class:`list` and :class:`tuple`.
+++ /dev/null
-Address bug where it was possible to call
-:func:`xml.etree.ElementTree.ElementTree.write` on an ElementTree object with
-an invalid root element. This behavior blanked the file passed to ``write``
-if it already existed.
+++ /dev/null
-:mod:`netrc`: skip security checks if :func:`os.getuid` is missing.
-Patch by Bénédikt Tran.
+++ /dev/null
-:mod:`netrc`: improve the error message when the security check for the
-ownership of the default configuration file ``~/.netrc`` fails. Patch by
-Bénédikt Tran.
+++ /dev/null
-Raise :exc:`TypeError` instead of :exc:`SystemError` when
-:func:`!_interpreters.set___main___attrs` is passed a non-dict object.
-Patch by Brian Schubert.
+++ /dev/null
-Fix :exc:`IndexError` in :meth:`asyncio.loop.create_connection` that could occur when the Happy Eyeballs algorithm resulted in an empty exceptions list during connection attempts.
+++ /dev/null
-:mod:`hmac`: use the :manpage:`EVP_MAC(3ssl)` interface for HMAC when Python
-is built with OpenSSL 3.0 and later instead of the deprecated
-:manpage:`HMAC_CTX(3ssl) <hmac(3)>` interface. Patch by Bénédikt Tran.
+++ /dev/null
-:mod:`math`: expose C99 :func:`~math.signbit` function to determine whether
-the sign bit of a floating-point value is set. Patch by Bénédikt Tran.
+++ /dev/null
-Fix :exc:`IndexError` in :meth:`asyncio.loop.create_connection` that could
-occur when non-\ :exc:`OSError` exception is raised during connection and
-socket's ``close()`` raises :exc:`!OSError`.
+++ /dev/null
-Add :func:`math.fmax` and :func:`math.fmin` to get the larger and smaller of
-two floating-point values. Patch by Bénédikt Tran.
+++ /dev/null
-Fixes a crash of :class:`types.SimpleNamespace` on :term:`free threading` builds,
-when several threads were calling its :meth:`~object.__repr__` method at the
-same time.
+++ /dev/null
-Fix :func:`time.strptime` for ``%c`` and ``%x`` formats on locales byn_ER,
-wal_ET and lzh_TW, and for ``%X`` format on locales ar_SA, bg_BG and lzh_TW.
+++ /dev/null
-Removed :mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse`
-modules.
+++ /dev/null
-In the palmos encoding, make byte ``0x9b`` decode to ``›`` (U+203A - SINGLE RIGHT-POINTING ANGLE QUOTATION MARK).
+++ /dev/null
-Acquiring a :class:`threading.Lock` or :class:`threading.RLock` at interpreter
-shutdown will raise :exc:`PythonFinalizationError` if Python can determine
-that it would otherwise deadlock.
+++ /dev/null
-Fix parsing month names containing "İ" (U+0130, LATIN CAPITAL LETTER I WITH
-DOT ABOVE) in :func:`time.strptime`. This affects locales az_AZ, ber_DZ,
-ber_MA and crh_UA.
+++ /dev/null
-Fix :exc:`UnboundLocalError` in :func:`email.message.Message.get_payload` when
-the payload to decode is a :class:`bytes` object. Patch by Kliment Lamonov.
+++ /dev/null
-Improve error messages when reporting invalid parameters in
-:func:`hashlib.scrypt`. Patch by Bénédikt Tran.
+++ /dev/null
-If ``zoneinfo._common.load_tzdata`` is given a package without a resource a
-:exc:`zoneinfo.ZoneInfoNotFoundError` is raised rather than a :exc:`PermissionError`.
-Patch by Victor Stinner.
+++ /dev/null
-Fix potential infinite recursion and KeyError in ``sysconfig
---generate-posix-vars``.
+++ /dev/null
-Improve :exc:`TypeError` error message, when richcomparing two
-:class:`types.SimpleNamespace` objects.
+++ /dev/null
-Update Python implementation of :class:`io.BytesIO` to be thread safe.
+++ /dev/null
-:func:`tempfile.TemporaryFile` no longer uses :data:`os.O_EXCL` with
-:data:`os.O_TMPFILE`, so it's possible to use ``linkat()`` on the file
-descriptor. Patch by Victor Stinner.
+++ /dev/null
-:mod:`ssl` can now get and set groups used for key agreement.
+++ /dev/null
-Improve support for evaluating nested forward references in
-:func:`typing.evaluate_forward_ref`.
+++ /dev/null
-Fix issues with :mod:`typing` when the C implementation of :mod:`abc` is not
-available.
+++ /dev/null
-Fix pickling failures for protocols 0 and 1 for many objects related to
-subinterpreters.
+++ /dev/null
-Make ``type_params`` parameter required in :func:`!typing._eval_type` after
-a deprecation period for not providing this parameter. Also remove the
-:exc:`DeprecationWarning` for the old behavior.
+++ /dev/null
-Implement a new high-frequency runtime profiler that leverages the existing
-remote debugging functionality to collect detailed execution statistics
-from running Python processes. This tool is exposed in the
-``profile.sample`` module and enables non-intrusive observation of
-production applications by attaching to already-running processes without
-requiring any code modifications, restarts, or special startup flags. The
-observer can perform extremely high-frequency sampling of stack traces and
-interpreter state, providing detailed runtime execution analysis of live
-applications.
+++ /dev/null
-Suggest using the system command prompt when ``pip install`` is typed into
-the REPL. Patch by Tom Viner, Richard Si, and Brian Schubert.
+++ /dev/null
-Raises :exc:`AttributeError` when accessing
-:class:`concurrent.futures.InterpreterPoolExecutor` and subinterpreters are
-not available.
+++ /dev/null
-Fix docs generation of ``UnboundItem`` in :mod:`concurrent.interpreters`
-when running with :option:`-OO`.
+++ /dev/null
-Fix a bug that was causing the ``get_async_stack_trace`` function to miss
-some frames in the stack trace.
+++ /dev/null
-Correct :class:`concurrent.futures.InterpreterPoolExecutor`'s default thread
-name.
+++ /dev/null
-Add missing ``keepends`` (default ``True``) parameter to
-:meth:`!codecs.StreamReaderWriter.readline` and
-:meth:`!codecs.StreamReaderWriter.readlines`.
+++ /dev/null
-Fix mimetypes CLI to handle multiple file parameters.
+++ /dev/null
-Fix :class:`wave.Wave_write` emitting an unraisable when open raises.
+++ /dev/null
-``utf8_sig`` is now aliased to :mod:`encodings.utf_8_sig`
+++ /dev/null
-Expose :pep:`667`'s :data:`~types.FrameLocalsProxyType` in the :mod:`types` module.
+++ /dev/null
-Fix signature of :func:`threading.excepthook`.
+++ /dev/null
-:meth:`datetime.date.fromisocalendar` can now raise OverflowError for out of
-range arguments.
+++ /dev/null
-:mod:`!_hashlib`: avoid using deprecated functions
-:manpage:`ERR_func_error_string` and :manpage:`EVP_MD_CTX_md` when using
-OpenSSL 3.0 and later. Patch by Bénédikt Tran.
+++ /dev/null
-:meth:`IMAP4.login_cram_md5 <imaplib.IMAP4.login_cram_md5>` now raises an
-:exc:`IMAP4.error <imaplib.IMAP4.error>` if CRAM-MD5 authentication is not
-supported. Patch by Bénédikt Tran.
+++ /dev/null
-:meth:`!SMTP.auth_cram_md5` now raises an :exc:`~smtplib.SMTPException`
-instead of a :exc:`ValueError` if Python has been built without MD5 support.
-In particular, :class:`~smtplib.SMTP` clients will not attempt to use this
-method even if the remote server is assumed to support it. Patch by Bénédikt
-Tran.
+++ /dev/null
-:mod:`!_asyncio` is now statically linked for improved performance.
+++ /dev/null
-:mod:`!encodings.aliases`: Add ``latin_N`` aliases
+++ /dev/null
-Fix :meth:`asyncio.WriteTransport.writelines` to be robust to connection
-failure, by using the same behavior as :meth:`~asyncio.WriteTransport.write`.
+++ /dev/null
-With :option:`-Werror <-W>`, the DeprecationWarning emitted by :py:func:`os.fork`
-and :py:func:`os.forkpty` in mutli-threaded processes is now raised as an exception.
-Previously it was silently ignored.
-Patch by Rani Pinchuk.
+++ /dev/null
-In :mod:`http.client`, a new *max_response_headers* keyword-only parameter has been
-added to :class:`~http.client.HTTPConnection` and :class:`~http.client.HTTPSConnection`
-constructors. This parameter sets the maximum number of allowed response headers,
-helping to prevent denial-of-service attacks.
+++ /dev/null
-Enable color help by default in :mod:`argparse`.
+++ /dev/null
-:mod:`hashlib`: improve exception messages when a hash algorithm is not
-recognized, blocked by the current security policy or incompatible with
-the desired operation (for instance, using HMAC with SHAKE).
-Patch by Bénédikt Tran.
+++ /dev/null
-Discard URL query and fragment in :func:`urllib.request.url2pathname`.
+++ /dev/null
-When :mod:`dataclasses` replaces a class with a slotted dataclass, the
-original class can now be garbage collected again. Earlier changes in Python
-3.14 caused this class to always remain in existence together with the replacement
-class synthesized by :mod:`dataclasses`.
+++ /dev/null
-Allows creating a :class:`ctypes.CDLL` without name when passing a handle as
-an argument.
+++ /dev/null
-:func:`hmac.digest` now properly handles large keys and messages
-by falling back to the pure Python implementation when necessary.
-Patch by Bénédikt Tran.
+++ /dev/null
-Fix retrieval of :attr:`doctest.DocTest.lineno` for objects decorated with
-:func:`functools.cache` or :class:`functools.cached_property`.
+++ /dev/null
-pyrepl now works in Emscripten.
+++ /dev/null
-Ensure that hash functions guaranteed to be always *available* exist as
-attributes of :mod:`hashlib` even if they will not work at runtime due to
-missing backend implementations. For instance, ``hashlib.md5`` will no
-longer raise :exc:`AttributeError` if OpenSSL is not available and Python
-has been built without MD5 support. Patch by Bénédikt Tran.
+++ /dev/null
-Support ``%:z`` directive for :meth:`datetime.datetime.strptime`,
-:meth:`datetime.time.strptime` and :func:`time.strptime`.
-Patch by Lucas Esposito and Semyon Moroz.
+++ /dev/null
-Removed the unreleased ``zipfile.ZipFile.data_offset`` property added in 3.14.0a7
-as it wasn't fully clear which behavior it should have in some situations so
-the result was not always what a user might expect.
+++ /dev/null
-:mod:`tarfile` now validates archives to ensure member offsets are
-non-negative. (Contributed by Alexander Enrique Urieles Nieto in
-:gh:`130577`.)
+++ /dev/null
-Remove unused C tracing code in bdb for event type ``c_call``, ``c_return`` and ``c_exception``
+++ /dev/null
-Fix handling of file URLs with a Windows drive letter in the URL authority
-by :func:`urllib.request.url2pathname`. This fixes a regression in earlier
-pre-releases of Python 3.14.
+++ /dev/null
-Fix unraisable :exc:`TypeError` raised during :term:`interpreter shutdown`
-in the :mod:`threading` module.
+++ /dev/null
-Remove lib64-lib symlink creation when creating new virtual environments in
-:mod:`venv` module
+++ /dev/null
-Fix a potential async-signal-safety issue in :mod:`faulthandler` when
-printing C stack traces.
+++ /dev/null
-:class:`tarfile.TarFile` now accepts a :term:`path-like <path-like object>` when working on a tar archive.
-(Contributed by Alexander Enrique Urieles Nieto in :gh:`81325`.)
+++ /dev/null
-:class:`~ssl.SSLContext` objects can now set TLS 1.3 cipher suites
-via :meth:`~ssl.SSLContext.set_ciphersuites`.
+++ /dev/null
-Fix behavior of :meth:`annotationlib.ForwardRef.evaluate` when the
-*type_params* parameter is passed and the name of a type param is also
-present in an enclosing scope.
+++ /dev/null
-:func:`ast.literal_eval` is 10-20% faster for small inputs.
+++ /dev/null
-:mod:`heapq`: Update :data:`!heapq.__all__` with ``*_max`` functions.
+++ /dev/null
-Bump the version of pip bundled in ensurepip to version 25.2
+++ /dev/null
-Fix tab completion and :func:`dir` on :mod:`concurrent.futures`.
+++ /dev/null
-Fix how type parameters are collected, when :class:`typing.Protocol` are
-specified with explicit parameters. Now, :class:`typing.Generic` and
-:class:`typing.Protocol` always dictate the parameter number
-and parameter ordering of types. Previous behavior was a bug.
+++ /dev/null
-Fix debug assertion failure in :func:`locale.setlocale` on Windows.
+++ /dev/null
-Fix :obj:`threading.Thread.is_alive` to remain ``True`` until the underlying OS
-thread is fully cleaned up. This avoids false negatives in edge cases
-involving thread monitoring or premature :obj:`threading.Thread.is_alive` calls.
+++ /dev/null
-:func:`tarfile.TarFile.extractall` and :func:`tarfile.TarFile.extract` now
-overwrite symlinks when extracting hardlinks.
-(Contributed by Alexander Enrique Urieles Nieto in :gh:`75989`.)
+++ /dev/null
-Fix :attr:`!ipaddress.IPv4Interface.is_unspecified`.
+++ /dev/null
-Return large limit values as positive integers instead of negative integers
-in :func:`resource.getrlimit`. Accept large values and reject negative
-values (except :data:`~resource.RLIM_INFINITY`) for limits in
-:func:`resource.setrlimit`.
+++ /dev/null
-Remove undocumented :func:`!glob.glob0` and :func:`!glob.glob1` functions,
-which have been deprecated since Python 3.13. Use :func:`glob.glob` and pass
-a directory to its *root_dir* argument instead.
+++ /dev/null
-Calendar uses the lengths of the locale's weekdays to decide if the width
-requires abbreviation.
+++ /dev/null
-Fix :func:`!inspect.getblock`, :func:`inspect.getsourcelines` and
-:func:`inspect.getsource` for generator expressions.
+++ /dev/null
-:data:`resource.RLIM_INFINITY` is now always a positive integer.
-On all supported platforms, it is larger than any limited resource value,
-which simplifies comparison of the resource values.
-Previously, it could be negative, such as -1 or -3, depending on platform.
+++ /dev/null
-Add new constants in the :mod:`resource` module:
-:data:`~resource.RLIMIT_NTHR`, :data:`~resource.RLIMIT_UMTXP`,
-:data:`~resource.RLIMIT_PIPEBUF`, :data:`~resource.RLIMIT_THREADS`,
-:data:`~resource.RLIM_SAVED_CUR`, and :data:`~resource.RLIM_SAVED_MAX`.
+++ /dev/null
-Handle :data:`~errno.ECANCELED` in the same way as :data:`~errno.EINTR` in
-:func:`signal.sigwaitinfo` on NetBSD.
+++ /dev/null
-Remove the code deprecation of ``importlib.abc.ResourceLoader``. It is
-documented as deprecated, but left for backwards compatibility with other
-classes in ``importlib.abc``.
+++ /dev/null
-Update regex used by ``http.cookies.SimpleCookie`` to handle values containing
-double quotes.
+++ /dev/null
-Fix a deadlock introduced in 3.13.6 when a call to
-:meth:`ssl.SSLSocket.recv <socket.socket.recv>` was blocked in one thread,
-and then another method on the object (such as :meth:`ssl.SSLSocket.send <socket.socket.send>`)
-was subsequently called in another thread.
+++ /dev/null
-The :mod:`!_interpreters` module now uses Argument Clinic to parse arguments.
-Patch by Adam Turner.
+++ /dev/null
-Calendar pages generated by the :class:`calendar.HTMLCalendar` class now support
-dark mode and have been migrated to the HTML5 standard for improved accessibility.
+++ /dev/null
-Speedup processing arguments (up to 1.5x) in the :mod:`decimal` module
-methods, that now using :c:macro:`METH_FASTCALL` calling convention. Patch
-by Sergey B Kirpichev.
+++ /dev/null
-:func:`locale.setlocale` now supports language codes with ``@``-modifiers.
-``@``-modifier are no longer silently removed in :func:`locale.getlocale`,
-but included in the language code.
+++ /dev/null
-Improve error messages for invalid category in :func:`warnings.warn`.
+++ /dev/null
-Fix import of the :mod:`zoneinfo` module if the C implementation of the
-:mod:`datetime` module is not available.
+++ /dev/null
-:func:`inspect.signature` now correctly handles classes that use a descriptor
-on a wrapped :meth:`!__init__` or :meth:`!__new__` method.
-Contributed by Yongyu Yan.
+++ /dev/null
-Fix ``musl`` detection for :func:`platform.libc_ver` on Alpine Linux if
-compiled with --strip-all.
+++ /dev/null
-Applied changes to ``importlib.metadata`` from `importlib_metadata 8.7
-<https://importlib-metadata.readthedocs.io/en/latest/history.html#v8-7-0>`_,
-including ``dist`` now disallowed for ``EntryPoints.select``; deferred
-imports for faster import times; added support for metadata with newlines
-(python/cpython#119650); and ``metadata()`` function now returns ``None``
-when a metadata directory is present but no metadata is present.
+++ /dev/null
-:class:`typing.TypedDict` now supports the ``closed`` and ``extra_items``
-keyword arguments (as described in :pep:`728`) to control whether additional
-non-required keys are allowed and to specify their value type.
+++ /dev/null
-Fix an issue where pressing Ctrl+C during tab completion in the REPL would leave the autocompletion menu in a corrupted state.
+++ /dev/null
-Add :func:`threading.get_native_id` support for Illumos/Solaris. Patch by
-Yüce Tekol.
+++ /dev/null
-:mod:`socket`: Add missing constants for ISO-TP sockets.
+++ /dev/null
-Remove compatibility shim for deprecated parameter *package* in
-:func:`importlib.resources.files`. Patch by Semyon Moroz.
+++ /dev/null
-Fixed a bug in :meth:`mmap.mmap.flush` where calling with only an offset
-parameter would fail.
+++ /dev/null
-Implement :pep:`799` -- A dedicated profiling package for organizing Python
-profiling tools. Patch by Pablo Galindo.
+++ /dev/null
-Prevent infinite traceback loop when sending CTRL^C to Python through ``strace``.
+++ /dev/null
-Add support of regular expressions in the :option:`-W` option and the
-:envvar:`PYTHONWARNINGS` environment variable.
+++ /dev/null
-Fix an issue where defining a class with a :deco:`warnings.deprecated`-decorated
-base class may not invoke the correct
-:meth:`~object.__init_subclass__` method in cases involving multiple
-inheritance. Patch by Brian Schubert.
+++ /dev/null
-Forbid expansion of shared anonymous :mod:`memory maps <mmap>` on Linux,
-which caused a bus error.
+++ /dev/null
-:class:`mmap.mmap` now has a *trackfd* parameter on Windows; if it is
-``False``, the file handle corresponding to *fileno* will not be duplicated.
+++ /dev/null
-The REPL now highlights :keyword:`type` as a soft keyword
-in :ref:`type statements <type>`.
+++ /dev/null
-Fix :func:`locale.strxfrm` on Solaris (and possibly other platforms).
+++ /dev/null
-Add the *block* parameter in the :meth:`!put` and :meth:`!get` methods
-of the :mod:`concurrent.interpreters` queues for compatibility with the
-:class:`queue.Queue` interface.
+++ /dev/null
-:mod:`ssl`: :class:`~ssl.SSLContext` objects can now set client and server
-TLS signature algorithms. If Python has been built with OpenSSL 3.5 or later,
-:class:`~ssl.SSLSocket` objects can return the signature algorithms selected
-on a connection.
+++ /dev/null
-Fix segmentation faults in the :mod:`ctypes` module due to invalid :attr:`~ctypes._CFuncPtr.argtypes`. Patch by Dung Nguyen.
+++ /dev/null
-Removed the :meth:`~mmap.mmap.resize` method on platforms that don't support the
-underlying syscall, instead of raising a :exc:`SystemError`.
+++ /dev/null
-When extracting tar files on Windows, slashes in symlink targets will be
-replaced by backslashes to prevent corrupted links.
+++ /dev/null
-The :class:`!_random.Random` C type is now immutable. Patch by Bénédikt
-Tran.
+++ /dev/null
-The types of :func:`select.poll` and :func:`select.epoll` objects are now
-immutable. Patch by Bénédikt Tran.
+++ /dev/null
-Improve the scaling of :func:`copy.copy` and :func:`copy.deepcopy` in the free-threading build.
+++ /dev/null
-:meth:`zoneinfo.reset_tzpath` will now convert any :class:`os.PathLike` objects
-it receives into strings before adding them to ``TZPATH``. It will raise
-``TypeError`` if anything other than a string is found after this conversion.
-If given an :class:`os.PathLike` object that represents a relative path, it
-will now raise ``ValueError`` instead of ``TypeError``, and present a more
-informative error message.
+++ /dev/null
-Fix parsing errors in the :mod:`urllib.robotparser` module.
-Don't fail trying to parse weird paths.
-Don't fail trying to decode non-UTF-8 ``robots.txt`` files.
+++ /dev/null
-:func:`ctypes.util.find_library` now works in Emscripten build.
+++ /dev/null
-:mod:`email` is added to Emscripten build.
+++ /dev/null
-Fix normalization of the ``robots.txt`` rules and URLs in the
-:mod:`urllib.robotparser` module. No longer ignore trailing ``?``.
-Distinguish raw special characters ``?``, ``=`` and ``&`` from the
-percent-encoded ones.
+++ /dev/null
-Fix the partial evaluation of annotations that use ``typing.Annotated[T, x]`` where ``T`` is a forward reference.
+++ /dev/null
-Raise :exc:`ValueError` when a multi-character string is passed to the
-*echo_char* parameter of :func:`getpass.getpass`. Patch by Benjamin Johnson.
+++ /dev/null
-:mod:`tkinter`: the types :class:`!_tkinter.Tcl_Obj` (wrapper for Tcl objects),
-:class:`!_tkinter.tktimertoken` (obtained by calling ``createtimerhandler()``
-on a :attr:`Tk <tkinter.Tk.tk>` application) and :class:`!_tkinter.tkapp`
-(the runtime type of Tk applications) are now immutable.
-Patch by Bénédikt Tran.
+++ /dev/null
-:mod:`os`: the :class:`os.DirEntry` type and the type of :func:`os.scandir`
-are now immutable. Patch by Bénédikt Tran.
+++ /dev/null
-:mod:`zlib`: the types of :func:`zlib.compressobj`
-and :func:`zlib.decompressobj` are now immutable.
-Patch by Bénédikt Tran.
+++ /dev/null
-:mod:`curses.panel`: the type of :func:`curses.panel.new_panel` is now
-immutable. Patch by Bénédikt Tran.
+++ /dev/null
-Speed up :func:`os.stat` for files with reasonable timestamps. Contributed
-by Jeffrey Bosboom.
+++ /dev/null
-Deprecate ``__version__`` from a number of standard library modules. Patch
-by Hugo van Kemenade.
+++ /dev/null
-Update :mod:`unicodedata` database to Unicode 17.0.0.
+++ /dev/null
-Fix an issue where :class:`io.BufferedWriter` and :class:`io.BufferedRandom`
-had different definitions of "closed" for :meth:`~io.IOBase.close` and
-:meth:`~io.IOBase.flush` which resulted in an exception when close called
-flush but flush thought the file was already closed.
+++ /dev/null
-Fix crash in PyREPL when os.environ is overwritten with an invalid value for
-mac
+++ /dev/null
-Add :const:`os.NODEV`.
+++ /dev/null
-Added symmetric difference support to :class:`collections.Counter` objects.
+++ /dev/null
-Support device numbers larger than ``2**63-1`` for the
-:attr:`~os.stat_result.st_rdev` field of the :class:`os.stat_result`
-structure.
+++ /dev/null
-Raise :exc:`TypeError` instead of :exc:`AttributeError` when an argument of
-incorrect type is passed to :func:`shlex.quote`. This restores the behavior of
-the function prior to 3.14.
+++ /dev/null
-Executing ``quit`` command in :mod:`pdb` will raise :exc:`bdb.BdbQuit` when
-:mod:`pdb` is started from an asyncio console using :func:`breakpoint` or
-:func:`pdb.set_trace`.
+++ /dev/null
-Fix :func:`typing.get_type_hints` calls on generic :class:`typing.TypedDict`
-classes defined with string annotations.
+++ /dev/null
-Fix possible crash in :func:`locale.strxfrm` due to a platform bug on
-macOS.
+++ /dev/null
-Add back :class:`collections.abc.ByteString` and :class:`typing.ByteString`.
-Both had been removed in prior alpha, beta and release candidates for Python
-3.14, but their removal has now been postponed to Python 3.17.
+++ /dev/null
-Dedent :data:`credits` text.
+++ /dev/null
-Update bundled libexpat to 2.7.2
+++ /dev/null
-:class:`!multiprocessing.BaseProcess` defaults ``kwargs`` to ``None`` instead of a shared dictionary.
+++ /dev/null
-Fix race condition in :class:`pathlib.Path` on the internal ``_raw_paths``
-field.
+++ /dev/null
-Fix trailing space before a wrapped long word if the line length is exactly
-*width* in :mod:`textwrap`.
+++ /dev/null
-Add :data:`os.RWF_DONTCACHE` constant for Linux 6.14+.
+++ /dev/null
-Fix a bug in the :mod:`pydoc` module that was hiding functions in a Python
-module if they were implemented in an extension module and the module did
-not have ``__all__``.
+++ /dev/null
-Fix unraisable exception during finalization when using
-:mod:`concurrent.interpreters` in the REPL.
+++ /dev/null
-:class:`collections.abc.ByteString` has been removed from
-``collections.abc.__all__``, and :class:`typing.ByteString` has been removed
-from ``typing.__all__``. The former has been deprecated since Python 3.12,
-and the latter has been deprecated since Python 3.9. Both classes are
-scheduled for removal in Python 3.17.
-
-Additionally, the following statements now cause ``DeprecationWarning``\ s to
-be emitted at runtime: ``from collections.abc import ByteString``, ``from
-typing import ByteString``, ``import collections.abc;
-collections.abc.ByteString`` and ``import typing; typing.ByteString``. Both
-classes already caused ``DeprecationWarning``\ s to be emitted if they were
-subclassed or used as the second argument to ``isinstance()`` or
-``issubclass()``, but they did not previously lead to
-``DeprecationWarning``\ s if they were merely imported or accessed from their
-respective modules.
+++ /dev/null
-Fix an assertion failure when sending :exc:`KeyboardInterrupt` to a Python
-process running a subinterpreter in a separate thread.
+++ /dev/null
-Fix crash when calling :func:`concurrent.interpreters.create` when the
-process is out of memory.
+++ /dev/null
-Lazy import :mod:`rlcompleter` in :mod:`pdb` to avoid deadlock in subprocess.
+++ /dev/null
-Fix use-after-free when reporting unknown event in :func:`xml.etree.ElementTree.iterparse`. Patch by Ken Jin.
+++ /dev/null
-A CSS class, ``diff_changed``, was added to the changed lines in the
-``make_table`` output of :class:`difflib.HtmlDiff`. Patch by Katie Gardner.
+++ /dev/null
-Functions that take timestamp or timeout arguments now accept any real
-numbers (such as :class:`~decimal.Decimal` and :class:`~fractions.Fraction`),
-not only integers or floats, although this does not improve precision.
+++ /dev/null
-Add :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerActivationThreshold`
-and :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerMaximumAmplification`
-to :ref:`xmlparser <xmlparser-objects>` objects to tune protections against
-disproportional amounts of dynamic memory usage from within an Expat parser.
-Patch by Bénédikt Tran.
+++ /dev/null
-Do a real lazy-import on :mod:`rlcompleter` in :mod:`pdb` and restore the existing completer after importing :mod:`rlcompleter`.
+++ /dev/null
-Upgrade bundled libexpat to 2.7.3
+++ /dev/null
-Add
-:meth:`~xml.parsers.expat.xmlparser.SetBillionLaughsAttackProtectionActivationThreshold`
-and
-:meth:`~xml.parsers.expat.xmlparser.SetBillionLaughsAttackProtectionMaximumAmplification`
-to :ref:`xmlparser <xmlparser-objects>` objects to tune protections against
-`billion laughs <https://en.wikipedia.org/wiki/Billion_laughs_attack>`_ attacks.
-Patch by Bénédikt Tran.
+++ /dev/null
-:mod:`timeit`: Add color to error tracebacks.
+++ /dev/null
-Fix an issue when, on non-Windows platforms, it was not possible to
-gracefully exit a ``python -m asyncio`` process suspended by Ctrl+Z
-and later resumed by :manpage:`fg` other than with :manpage:`kill`.
+++ /dev/null
-:func:`os.forkpty` does now make the returned file descriptor non-inheritable.
+++ /dev/null
-Add a Gecko format output to the tachyon profiler via ``--gecko``.
+++ /dev/null
-Fix :func:`os.getlogin` error handling: fix the error number. Patch by
-Victor Stinner.
+++ /dev/null
-:mod:`http.server`: fix default handling of HTTP/0.9 requests in
-:class:`~http.server.BaseHTTPRequestHandler`. Previously,
-:meth:`!BaseHTTPRequestHandler.parse_request` incorrectly
-waited for headers in the request although those are not
-supported in HTTP/0.9. Patch by Bénédikt Tran.
+++ /dev/null
-Fix excessive indentation in the default :mod:`argparse`
-:class:`!HelpFormatter`. Patch by Alexander Edland.
+++ /dev/null
-Prevent premature colorization of subparser ``prog`` in :meth:`argparse.ArgumentParser.add_subparsers` to respect color environment variable changes after parser creation.
+++ /dev/null
-Fix :func:`inspect.getsourcelines` for the case when a decorator is followed
-by a comment or an empty line.
+++ /dev/null
-Fix to not print KeyboardInterrupt twice in default asyncio REPL.
+++ /dev/null
-Fix incorrect sharing of current task with the child process while forking in :mod:`asyncio`. Patch by Kumar Aditya.
+++ /dev/null
-Add suggestion to error message for :class:`typing.Generic` subclasses when
-``cls.__parameters__`` is missing due to a parent class failing to call
-:meth:`super().__init_subclass__() <object.__init_subclass__>` in its ``__init_subclass__``.
+++ /dev/null
-:mod:`ensurepip` now fails with a nicer error message when the :mod:`zlib`
-module is not available.
+++ /dev/null
-The ``application/toml`` mime type is now supported by :mod:`mimetypes`.
-Patch by Gil Forcada.
+++ /dev/null
-Optimize :data:`os.environ.clear() <os.environ>` by calling
-:manpage:`clearenv(3)` when this function is available.
-Patch by Victor Stinner.
+++ /dev/null
-Short-circuit the processing of long IPv6 addresses early in :mod:`ipaddress` to prevent excessive
-memory consumption and a minor denial-of-service.
+++ /dev/null
-Indicate through :data:`ssl.HAS_PSK_TLS13` whether the :mod:`ssl` module supports "External PSKs" in TLSv1.3, as described in RFC 9258. Patch by Will Childs-Klein.
+++ /dev/null
-Fix use-after-free in the "unicode-escape" decoder with a non-"strict" error
-handler.
+++ /dev/null
-Fixes multiple issues that allowed ``tarfile`` extraction filters
-(``filter="data"`` and ``filter="tar"``) to be bypassed using crafted
-symlinks and hard links.
-
-Addresses :cve:`2024-12718`, :cve:`2025-4138`, :cve:`2025-4330`, and :cve:`2025-4517`.
-
+++ /dev/null
-Fix support of escapable raw text mode (elements "textarea" and "title")
-in :class:`html.parser.HTMLParser`.
+++ /dev/null
-Fix quadratic complexity in processing specially crafted input in
-:class:`html.parser.HTMLParser`. End-of-file errors are now handled according
-to the HTML5 specs -- comments and declarations are automatically closed,
-tags are ignored.
+++ /dev/null
-Fix comment parsing in :class:`html.parser.HTMLParser` according to the
-HTML5 standard. ``--!>`` now ends the comment. ``-- >`` no longer ends the
-comment. Support abnormally ended empty comments ``<-->`` and ``<--->``.
+++ /dev/null
-Fix CDATA section parsing in :class:`html.parser.HTMLParser` according to
-the HTML5 standard: ``] ]>`` and ``]] >`` no longer end the CDATA section.
-Add private method ``_set_support_cdata()`` which can be used to specify
-how to parse ``<[CDATA[`` --- as a CDATA section in foreign content
-(SVG or MathML) or as a bogus comment in the HTML namespace.
+++ /dev/null
-Fix parsing start and end tags in :class:`html.parser.HTMLParser`
-according to the HTML5 standard.
-
-* Whitespaces no longer accepted between ``</`` and the tag name.
- E.g. ``</ script>`` does not end the script section.
-
-* Vertical tabulation (``\v``) and non-ASCII whitespaces no longer recognized
- as whitespaces. The only whitespaces are ``\t\n\r\f`` and space.
-
-* Null character (U+0000) no longer ends the tag name.
-
-* Attributes and slashes after the tag name in end tags are now ignored,
- instead of terminating after the first ``>`` in quoted attribute value.
- E.g. ``</script/foo=">"/>``.
-
-* Multiple slashes and whitespaces between the last attribute and closing ``>``
- are now ignored in both start and end tags. E.g. ``<a foo=bar/ //>``.
-
-* Multiple ``=`` between attribute name and value are no longer collapsed.
- E.g. ``<a foo==bar>`` produces attribute "foo" with value "=bar".
+++ /dev/null
-:mod:`marshal`: fix a possible crash when deserializing :class:`slice` objects.
+++ /dev/null
-:mod:`sqlite3`: correctly handle maximum number of rows to fetch in
-:meth:`Cursor.fetchmany <sqlite3.Cursor.fetchmany>` and reject negative
-values for :attr:`Cursor.arraysize <sqlite3.Cursor.arraysize>`. Patch by
-Bénédikt Tran.
+++ /dev/null
-:mod:`xml.parsers.expat`: Make sure that parent Expat parsers are only
-garbage-collected once they are no longer referenced by subparsers created
-by :meth:`~xml.parsers.expat.xmlparser.ExternalEntityParserCreate`.
-Patch by Sebastian Pipping.
+++ /dev/null
-Check consistency of the zip64 end of central directory record. Support
-records with "zip64 extensible data" if there are no bytes prepended to the
-ZIP file.
+++ /dev/null
-Fix ``TestPyReplAutoindent.test_auto_indent_default()`` doesn't run
-``input_code``.
+++ /dev/null
-Fixed test case ``test.test_annotationlib.TestStringFormat.test_displays`` which ensures proper handling of complex data structures (lists, sets, dictionaries, and tuples) in string annotations.
+++ /dev/null
-Fix multiprocessing interrupt test. Add an event to synchronize the parent
-process with the child process: wait until the child process starts
-sleeping. Patch by Victor Stinner.
+++ /dev/null
-Expose log formatter to users in TestCase.assertLogs.
-:func:`unittest.TestCase.assertLogs` will now optionally accept a formatter that will be used to format the strings in output if provided.
+++ /dev/null
-Add :func:`!test.support.subTests`.
+++ /dev/null
-Add a new GitHub CI job to test the :mod:`ssl` module with `AWS-LC <https://github.com/aws/aws-lc>`_ as the backing cryptography and TLS library.
+++ /dev/null
-Show verbose output for failing tests during PGO profiling step with --enable-optimizations.
+++ /dev/null
-Fix test__opcode: add ``JUMP_BACKWARD`` to specialization stats.
+++ /dev/null
-Fix regrtest to support excluding tests from ``--pgo`` tests. Patch by
-Victor Stinner.
+++ /dev/null
-The iOS testbed now handles the ``app_packages`` folder as a site directory.
+++ /dev/null
-Restore skipped test and add janky workaround to prevent select buildbots
-from failing with a ResourceWarning.
+++ /dev/null
-Fix regrtest ``--fast-ci --verbose``: don't ignore the ``--verbose`` option
-anymore. Patch by Victor Stinner.
+++ /dev/null
-:term:`REPL` import autocomplete only suggests private modules when explicitly specified.
+++ /dev/null
-The cases generator no longer accepts type annotations on stack items.
-Conversions to non-default types are now done explicitly in bytecodes.c and
-optimizer_bytecodes.c. This will simplify code generation for top-of-stack
-caching and other future features.
+++ /dev/null
-Stubs for ``strip`` are now provided as part of an iOS install.
+++ /dev/null
-Fixes and usability improvements for ``Tools/wasm/emscripten/web_example``
+++ /dev/null
-Have Tools/wasm/wasi detect a WASI SDK install in /opt when it was directly
-extracted from a release tarball.
+++ /dev/null
-Add a ``--logdir`` option to ``Tools/wasm/wasi`` for specifying where to
-write log files.
+++ /dev/null
-The ``wasm_build.py`` script has been removed. ``Tools/wasm/emscripten``
-and ``Tools/wasm/wasi`` should be used instead, as described in the `Dev
-Guide <https://devguide.python.org/contrib/workflows/compile/>`__.
+++ /dev/null
-Have ``Tools/wasm/wasi`` put the build Python into a directory named after
-the build triple instead of "build".
+++ /dev/null
-The iOS test runner has been simplified, resolving some issues that have
-been observed using the runner in GitHub Actions and Azure Pipelines test
-environments.
+++ /dev/null
-A script for building an iOS XCframework was added. As part of this change,
-the top level ``iOS`` folder has been moved to be a subdirectory of the
-``Apple`` folder.
+++ /dev/null
-XCframeworks now include privacy manifests to satisfy Apple App Store
-submission requirements.
+++ /dev/null
-SBOM generation tool didn't cross-check the version and checksum values
-against the ``Modules/expat/refresh.sh`` script, leading to the values
-becoming out-of-date during routine updates.
+++ /dev/null
-Use the Python-specific :c:macro:`Py_DEBUG` macro rather than :c:macro:`!_DEBUG` in Windows-related C code. Patch by Xuehai Pan.
+++ /dev/null
-Avoid using console I/O in WinAPI partitions that don’t support it
+++ /dev/null
-Disable handling of security descriptors by :func:`os.mkdir` with mode ``0o700`` on WinAPI partitions that do not support it. This only affects custom builds for specialized targets.
+++ /dev/null
-Fix compile error when using a WinAPI partition that doesn't support the RPC runtime library.
+++ /dev/null
-Avoid LsaNtStatus to WinError conversion on unsupported WinAPI partitions.
+++ /dev/null
-Fix :func:`sys.getwindowsversion` failing without setting an exception when called on some WinAPI partitions.
+++ /dev/null
-Ensures packages are not accidentally bundled into the traditional
-installer.
+++ /dev/null
-Reverts the change to generate different :file:`pyconfig.h` files based on
-compiler settings, as it was frequently causing extension builds to break.
-In particular, the ``Py_GIL_DISABLED`` preprocessor variable must now always
-be defined explicitly when compiling for the experimental free-threaded
-runtime. The :func:`sysconfig.get_config_var` function can be used to
-determine whether the current runtime was compiled with that flag or not.
+++ /dev/null
-Make :func:`os.path.realpath` ignore Windows error 1005 when in non-strict mode.
+++ /dev/null
-Fix a race in internal calls into WMI that can result in an "invalid handle"
-exception under high load. Patch by Chris Eibl.
+++ /dev/null
-Fix a crash that could occur on Windows when a background thread waits on a
-:c:type:`PyMutex` while the main thread is shutting down the interpreter.
+++ /dev/null
-Update Windows installer to ship with SQLite 3.50.4.
+++ /dev/null
-Suppress build warnings when build on Windows with
-``--experimental-jit-interpreter``.
+++ /dev/null
-Add :func:`winreg.DeleteTree`.
+++ /dev/null
-Fix error installing C runtime on non-updated Windows machines
+++ /dev/null
-Updated bundled version of OpenSSL to 3.0.18.
+++ /dev/null
-Installing with ``py install 3[.x]-dev`` will now select final versions as
-well as prereleases.
+++ /dev/null
-Update macOS installer to ship with SQLite version 3.50.4.
+++ /dev/null
-macOS installer shell path management improvements: separate the installer
-``Shell profile updater`` postinstall script from the
-``Update Shell Profile.command`` to enable more robust error handling.
+++ /dev/null
-Update macOS installer version of OpenSSL to 3.5.4.
+++ /dev/null
-Update macOS installer to use Tcl/Tk 9.0.2.
+++ /dev/null
-Update macOS installer to use libmpdecimal 4.0.1.
-This is Python version 3.15.0 alpha 0
+This is Python version 3.15.0 alpha 1
=====================================
.. image:: https://github.com/python/cpython/actions/workflows/build.yml/badge.svg?branch=main&event=push