Returns true on success; on failure, it returns false and raises the
appropriate exception.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. c:function:: int PyArg_ParseArrayAndKeywords(PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames, const char *format, const char * const *kwlist, ...)
Returns true on success; on failure, it returns false and raises the
appropriate exception.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. c:function:: int PyArg_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, ...)
Frozen dictionary objects
^^^^^^^^^^^^^^^^^^^^^^^^^
-.. versionadded:: next
+.. versionadded:: 3.15
.. c:var:: PyTypeObject PyFrozenDict_Type
This function may now execute a remote debugger script, if remote
debugging is enabled.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
The exception set by :c:func:`PyThreadState_SetAsyncExc` is now raised.
Gets the current lazy imports mode.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. c:function:: PyObject* PyImport_GetLazyImportsFilter()
Return a :term:`strong reference` to the current lazy imports filter,
or ``NULL`` if none exists. This function always succeeds.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. c:function:: int PyImport_SetLazyImportsMode(PyImport_LazyImportsMode mode)
This function always returns ``0``.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. c:function:: int PyImport_SetLazyImportsFilter(PyObject *filter)
Return ``0`` on success and ``-1`` with an exception set otherwise.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. c:type:: PyImport_LazyImportsMode
Disable lazy imports entirely. Even explicit ``lazy`` statements become
eager imports.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. c:function:: PyObject* PyImport_CreateModuleFromInitfunc(PyObject *spec, PyObject* (*initfunc)(void))
Returns 1 if the object was made immortal and returns 0 if it was not.
This function cannot fail.
- .. versionadded:: next
+ .. versionadded:: 3.15
:attr:`!C.t` will be ``20``, and the class attributes :attr:`!C.x` and
:attr:`!C.y` will not be set.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
If *metadata* is ``None``, use an empty :class:`frozendict`, instead
of a :func:`~types.MappingProxyType` of an empty :class:`dict`.
A dictionary mapping parameter names to parameter values.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
It is now a :class:`frozendict` instead of a
:class:`types.MappingProxyType`.
A subclass of :exc:`ImportError` which is raised when a lazy import fails
because it (directly or indirectly) tries to import itself.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. exception:: IndexError
The semantics of the default *locals* namespace have been adjusted as
described for the :func:`locals` builtin.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
*globals* can now be a :class:`frozendict`.
The semantics of the default *locals* namespace have been adjusted as
described for the :func:`locals` builtin.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
*globals* can now be a :class:`frozendict`.
Subclasses of :class:`!type` which don't override ``type.__new__`` may no
longer use the one-argument form to get the type of an object.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
*dict* can now be a :class:`frozendict`.
instead of a :class:`list` or other
:class:`collection <collections.abc.Collection>` type.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. class:: PathEntryFinder
instead of a :class:`list` or other
:class:`collection <collections.abc.Collection>` type.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. class:: Loader
returns the mailbox object as the context object, and at context end calls :meth:`close`,
thereby releasing the lock.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Support for the :keyword:`with` statement was added.
:class:`!Mailbox` instances have the following methods:
Added format version 5, which allows marshalling slices.
-.. versionchanged:: next
+.. versionchanged:: 3.15
Added format version 6, which allows marshalling :class:`frozendict`.
.. versionchanged:: 3.6
Accepts a :term:`path-like object`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
``os.listdir(-1)`` now fails with ``OSError(errno.EBADF)`` rather than
listing the current directory.
.. versionchanged:: 3.7
Added support for :ref:`file descriptors <path_fd>` on Unix.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
``os.scandir(-1)`` now fails with ``OSError(errno.EBADF)`` rather than
listing the current directory.
.. versionchanged:: 3.6
Accepts a :term:`path-like object`.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
``os.listxattr(-1)`` now fails with ``OSError(errno.EBADF)`` rather than
listing extended attributes of the current directory.
:func:`~re.match`. Use that name when you need to retain compatibility with
older Python versions.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
The alternate :func:`~re.prefixmatch` name of this API was added as a
more explicitly descriptive name than :func:`~re.match`. Use it to better
express intent. The norm in other languages and regular expression
:meth:`~Pattern.match`. Use that name when you need to retain compatibility
with older Python versions.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
The alternate :meth:`~Pattern.prefixmatch` name of this API was added as
a more explicitly descriptive name than :meth:`~Pattern.match`. Use it to
better express intent. The norm in other languages and regular expression
as it has been used in code for over 30 years.
Code supporting older versions of Python should continue to use *match*.
-.. versionadded:: next
+.. versionadded:: 3.15
Making a Phonebook
^^^^^^^^^^^^^^^^^^
This function is now made thread-safe during creation of standard
``.zip`` and tar archives.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Accepts a :term:`path-like object` for *base_name*, *root_dir* and
*base_dir*.
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.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
*dict* can now be a :class:`frozendict`.
:class:`!frozendict` is not a :class:`!dict` subclass but inherits directly
from ``object``.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. _typecontextmanager:
See also :func:`set_lazy_imports` and :pep:`810`.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: get_lazy_imports_filter()
:func:`set_lazy_imports_filter` for details on the filter function
signature.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: getrefcount(object)
See also :func:`get_lazy_imports` and :pep:`810`.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: set_lazy_imports_filter(filter)
See also :func:`get_lazy_imports_filter` and :pep:`810`.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: setprofile(profilefunc)
actually accessed. This type can be used to detect lazy imports
programmatically.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. seealso:: :pep:`810`
>>> unicodedata.block('S')
'Basic Latin'
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: mirrored(chr, /)
attributes. *extra* contains additional attributes, given as keyword
arguments. Returns an element instance.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
*attrib* can now be a :class:`frozendict`.
an optional dictionary, containing element attributes. *extra* contains
additional attributes, given as keyword arguments.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
*attrib* can now be a :class:`frozendict`.
.. versionchanged:: 3.12
``type`` is now a soft keyword.
-.. versionchanged:: next
+.. versionchanged:: 3.15
``lazy`` is now a soft keyword.
.. index::
See :pep:`810` for the full specification of lazy imports.
-.. versionadded:: next
+.. versionadded:: 3.15
.. _future:
If false (``0``) suppress these warnings. Set to true by default.
See also :envvar:`PYTHON_PATHCONFIG_WARNINGS`.
- .. versionadded:: next
+ .. versionadded:: 3.15
* :samp:`-X tlbc={0,1}` enables (1, the default) or disables (0) thread-local
bytecode in builds configured with :option:`--disable-gil`. When disabled,
(the default) respects the ``lazy`` keyword in source code.
See also :envvar:`PYTHON_LAZY_IMPORTS`.
- .. versionadded:: next
+ .. versionadded:: 3.15
It also allows passing arbitrary values and retrieving them through the
:data:`sys._xoptions` dictionary.
stderr. If false (``0``) suppress these warnings. Set to true by default.
See also :option:`-X pathconfig_warnings<-X>`.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. envvar:: PYTHON_JIT
See also the :option:`-X lazy_imports <-X>` command-line option.
- .. versionadded:: next
+ .. versionadded:: 3.15
Debug-mode variables
~~~~~~~~~~~~~~~~~~~~
#define PY_MINOR_VERSION 15
#define PY_MICRO_VERSION 0
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA
-#define PY_RELEASE_SERIAL 6
+#define PY_RELEASE_SERIAL 7
/* Version as a string */
-#define PY_VERSION "3.15.0a6+"
+#define PY_VERSION "3.15.0a7"
/*--end constants--*/
-# Autogenerated by Sphinx on Wed Feb 11 14:22:57 2026
+# Autogenerated by Sphinx on Tue Mar 10 14:31:07 2026
# as part of the release process.
module_docs = {
-# Autogenerated by Sphinx on Wed Feb 11 14:22:57 2026
+# Autogenerated by Sphinx on Tue Mar 10 14:31:07 2026
# as part of the release process.
topics = {
Is semantically equivalent to:
- iter = (ITER)
- iter = type(iter).__aiter__(iter)
+ iter = (ITER).__aiter__()
running = True
while running:
try:
- TARGET = await type(iter).__anext__(iter)
+ TARGET = await iter.__anext__()
except StopAsyncIteration:
running = False
else:
else:
SUITE2
-See also "__aiter__()" and "__anext__()" for details.
+except that implicit special method lookup is used for "__aiter__()"
+and "__anext__()".
It is a "SyntaxError" to use an "async for" statement outside the body
of a coroutine function.
is semantically equivalent to:
manager = (EXPRESSION)
- aenter = type(manager).__aenter__
- aexit = type(manager).__aexit__
- value = await aenter(manager)
+ aenter = manager.__aenter__
+ aexit = manager.__aexit__
+ value = await aenter()
hit_except = False
try:
SUITE
except:
hit_except = True
- if not await aexit(manager, *sys.exc_info()):
+ if not await aexit(*sys.exc_info()):
raise
finally:
if not hit_except:
- await aexit(manager, None, None, None)
+ await aexit(None, None, None)
-See also "__aenter__()" and "__aexit__()" for details.
+except that implicit special method lookup is used for "__aenter__()"
+and "__aexit__()".
It is a "SyntaxError" to use an "async with" statement outside the
body of a coroutine function.
'atom-literals': r'''Literals
********
-Python supports string and bytes literals and various numeric
-literals:
+A *literal* is a textual representation of a value. Python supports
+numeric, string and bytes literals. Format strings and template
+strings are treated as string literals.
+
+Numeric literals consist of a single "NUMBER" token, which names an
+integer, floating-point number, or an imaginary number. See the
+Numeric literals section in Lexical analysis documentation for
+details.
+
+String and bytes literals may consist of several tokens. See section
+String literal concatenation for details.
+
+Note that negative and complex numbers, like "-3" or "3+4.2j", are
+syntactically not literals, but unary or binary arithmetic operations
+involving the "-" or "+" operator.
+
+Evaluation of a literal yields an object of the given type ("int",
+"float", "complex", "str", "bytes", or "Template") with the given
+value. The value may be approximated in the case of floating-point and
+imaginary literals.
+
+The formal grammar for literals is:
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.
-See section String literal concatenation for details on "strings".
+
+Literals and object identity
+============================
All literals correspond to immutable data types, and hence the
object’s identity is less important than its value. Multiple
occurrence in the program text or a different occurrence) may obtain
the same object or a different object with the same value.
+CPython implementation detail: For example, in CPython, *small*
+integers with the same value evaluate to the same object:
+
+ >>> x = 7
+ >>> y = 7
+ >>> x is y
+ True
+
+However, large integers evaluate to different objects:
+
+ >>> x = 123456789
+ >>> y = 123456789
+ >>> x is y
+ False
+
+This behavior may change in future versions of CPython. In particular,
+the boundary between “small” and “large” integers has already changed
+in the past.CPython will emit a "SyntaxWarning" when you compare
+literals using "is":
+
+ >>> x = 7
+ >>> x is 7
+ <input>:1: SyntaxWarning: "is" with 'int' literal. Did you mean "=="?
+ True
+
+See When can I rely on identity tests with the is operator? for more
+information.
+
+Template strings are immutable but may reference mutable objects as
+"Interpolation" values. For the purposes of this section, two
+t-strings have the “same value” if both their structure and the
+*identity* of the values match.
+
+**CPython implementation detail:** Currently, each evaluation of a
+template string results in a different object.
+
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:
+Multiple adjacent string or bytes literals, 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:
>>> t"Hello" t"{name}!"
Template(strings=('Hello', '!'), interpolations=(...))
+
+Formally:
+
+ strings: (STRING | fstring)+ | tstring+
''',
'attribute-access': r'''Customizing attribute access
****************************
The "%" (modulo) operator yields the remainder from the division of
the first argument by the second. The numeric arguments are first
-converted to a common type. A zero right argument raises the
+converted to a common type. A zero right argument raises the
"ZeroDivisionError" exception. The arguments may be floating-point
numbers, e.g., "3.14%0.7" equals "0.34" (since "3.14" equals "4*0.7 +
0.34".) The modulo operator always yields a result with the same sign
is semantically equivalent to:
manager = (EXPRESSION)
- enter = type(manager).__enter__
- exit = type(manager).__exit__
- value = enter(manager)
+ enter = manager.__enter__
+ exit = manager.__exit__
+ value = enter()
hit_except = False
try:
SUITE
except:
hit_except = True
- if not exit(manager, *sys.exc_info()):
+ if not exit(*sys.exc_info()):
raise
finally:
if not hit_except:
- exit(manager, None, None, None)
+ exit(None, None, None)
+
+except that implicit special method lookup is used for "__enter__()"
+and "__exit__()".
With more than one item, the context managers are processed as if
multiple "with" statements were nested:
Is semantically equivalent to:
- iter = (ITER)
- iter = type(iter).__aiter__(iter)
+ iter = (ITER).__aiter__()
running = True
while running:
try:
- TARGET = await type(iter).__anext__(iter)
+ TARGET = await iter.__anext__()
except StopAsyncIteration:
running = False
else:
else:
SUITE2
-See also "__aiter__()" and "__anext__()" for details.
+except that implicit special method lookup is used for "__aiter__()"
+and "__anext__()".
It is a "SyntaxError" to use an "async for" statement outside the body
of a coroutine function.
is semantically equivalent to:
manager = (EXPRESSION)
- aenter = type(manager).__aenter__
- aexit = type(manager).__aexit__
- value = await aenter(manager)
+ aenter = manager.__aenter__
+ aexit = manager.__aexit__
+ value = await aenter()
hit_except = False
try:
SUITE
except:
hit_except = True
- if not await aexit(manager, *sys.exc_info()):
+ if not await aexit(*sys.exc_info()):
raise
finally:
if not hit_except:
- await aexit(manager, None, None, None)
+ await aexit(None, None, None)
-See also "__aenter__()" and "__aexit__()" for details.
+except that implicit special method lookup is used for "__aenter__()"
+and "__aexit__()".
It is a "SyntaxError" to use an "async with" statement outside the
body of a coroutine function.
* a class that inherits from any of the above
- The standard library classes "dict", "frozendict"
- and "types.MappingProxyType" are mappings.
+ The standard library classes "dict" and "types.MappingProxyType"
+ are mappings.
[4] A string literal appearing as the first statement in the function
body is transformed into the function’s "__doc__" attribute and
When a description of an arithmetic operator below uses the phrase
“the numeric arguments are converted to a common real type”, this
-means that the operator implementation for built-in types works as
-follows:
-
-* If both arguments are complex numbers, no conversion is performed;
+means that the operator implementation for built-in numeric types
+works as described in the Numeric Types section of the standard
+library documentation.
-* if either argument is a complex or a floating-point number, the
- other is converted to a floating-point number;
-
-* otherwise, both must be integers and no conversion is necessary.
-
-Some additional rules apply for certain operators (e.g., a string as a
-left argument to the ‘%’ operator). Extensions must define their own
-conversion behavior.
+Some additional rules apply for certain operators and non-numeric
+operands (for example, a string as a left argument to the "%"
+operator). Extensions must define their own conversion behavior.
''',
'customization': r'''Basic customization
*******************
intended to provide protection against a denial-of-service caused
by carefully chosen inputs that exploit the worst case
performance of a dict insertion, *O*(*n*^2) complexity. See
- http://ocert.org/advisories/ocert-2011-003.html for
+ https://ocert.org/advisories/ocert-2011-003.html for
details.Changing hash values affects the iteration order of sets.
Python has never made guarantees about this ordering (and it
typically varies between 32-bit and 64-bit builds).See also
CPython, the value was evaluated before the key. Starting with 3.8,
the key is evaluated before the value, as proposed by **PEP 572**.
-Changed in version 3.15.0a5 (unreleased): Unpacking with the "**"
-operator is now allowed in dictionary comprehensions.
+Changed in version 3.15: Unpacking with the "**" operator is now
+allowed in dictionary comprehensions.
''',
'dynamic-features': r'''Interaction with dynamic features
*********************************
* "type", when used in the "type" statement.
+* "lazy", when used before an "import" statement.
+
These syntactically act as keywords in their specific contexts, but
this distinction is done at the parser level, not when tokenizing.
Changed in version 3.12: "type" is now a soft keyword.
+Changed in version 3.15.0a6 (unreleased): "lazy" is now a soft
+keyword.
+
Reserved classes of identifiers
===============================
'import': r'''The "import" statement
**********************
- import_stmt: "import" module ["as" identifier] ("," module ["as" identifier])*
- | "from" relative_module "import" identifier ["as" identifier]
+ import_stmt: ["lazy"] "import" module ["as" identifier] ("," module ["as" identifier])*
+ | ["lazy"] "from" relative_module "import" identifier ["as" identifier]
("," identifier ["as" identifier])*
- | "from" relative_module "import" "(" identifier ["as" identifier]
+ | ["lazy"] "from" relative_module "import" "(" identifier ["as" identifier]
("," identifier ["as" identifier])* [","] ")"
| "from" relative_module "import" "*"
module: (identifier ".")* identifier
"sys.path", "sys.meta_path", "sys.path_hooks".
+Lazy imports
+============
+
+The "lazy" keyword is a soft keyword that only has special meaning
+when it appears immediately before an "import" or "from" statement.
+When an import statement is preceded by the "lazy" keyword, the import
+becomes *lazy*: the module is not loaded immediately at the import
+statement. Instead, a lazy proxy object is created and bound to the
+name. The actual module is loaded on first use of that name.
+
+Lazy imports are only permitted at module scope. Using "lazy" inside a
+function, class body, or "try"/"except"/"finally" block raises a
+"SyntaxError". Star imports cannot be lazy ("lazy from module import
+*" is a syntax error), and future statements cannot be lazy.
+
+When using "lazy from ... import", each imported name is bound to a
+lazy proxy object. The first access to any of these names triggers
+loading of the entire module and resolves only that specific name to
+its actual value. Other names remain as lazy proxies until they are
+accessed.
+
+Example:
+
+ lazy import json
+ import sys
+
+ print('json' in sys.modules) # False - json module not yet loaded
+
+ # First use triggers loading
+ result = json.dumps({"hello": "world"})
+
+ print('json' in sys.modules) # True - now loaded
+
+If an error occurs during module loading (such as "ImportError" or
+"SyntaxError"), it is raised at the point where the lazy import is
+first used, not at the import statement itself.
+
+See **PEP 810** for the full specification of lazy imports.
+
+Added in version 3.15.0a6 (unreleased).
+
+
Future statements
=================
The power operator has the same semantics as the built-in "pow()"
function, when called with two arguments: it yields its left argument
-raised to the power of its right argument. The numeric arguments are
-first converted to a common type, and the result is of that type.
+raised to the power of its right argument. Numeric arguments are first
+converted to a common type, and the result is of that type.
For int operands, the result has the same type as the operands unless
the second argument is negative; in that case, all arguments are
intended to provide protection against a denial-of-service caused
by carefully chosen inputs that exploit the worst case
performance of a dict insertion, *O*(*n*^2) complexity. See
- http://ocert.org/advisories/ocert-2011-003.html for
+ https://ocert.org/advisories/ocert-2011-003.html for
details.Changing hash values affects the iteration order of sets.
Python has never made guarantees about this ordering (and it
typically varies between 32-bit and 64-bit builds).See also
"c.isalpha()", "c.isdecimal()", "c.isdigit()", or "c.isnumeric()".
For example:
- .. doctest::
-
- >>> 'abc123'.isalnum()
- True
- >>> 'abc123!@#'.isalnum()
- False
- >>> ''.isalnum()
- False
- >>> ' '.isalnum()
- False
+ >>> 'abc123'.isalnum()
+ True
+ >>> 'abc123!@#'.isalnum()
+ False
+ >>> ''.isalnum()
+ False
+ >>> ' '.isalnum()
+ False
str.isalpha()
a third argument, it must be a string, whose characters will be
mapped to "None" in the result.
+ Changed in version 3.15.0a6 (unreleased): *dict* can now be a
+ "frozendict".
+
str.partition(sep, /)
Split the string at the first occurrence of *sep*, and return a
space). The original string is returned if *width* is less than or
equal to "len(s)".
+ For example:
+
+ >>> 'Python'.rjust(10)
+ ' Python'
+ >>> 'Python'.rjust(10, '.')
+ '....Python'
+ >>> 'Monty Python'.rjust(10, '.')
+ 'Monty Python'
+
+ See also "ljust()" and "zfill()".
+
str.rpartition(sep, /)
Split the string at the last occurrence of *sep*, and return a
'00042'
>>> "-42".zfill(5)
'-0042'
+
+ See also "rjust()".
''',
'strings': '''String and Bytes literals
*************************
See Function definitions for more information.
''',
- 'typesmapping': r'''Mapping Types — "dict"
-**********************
+ 'typesmapping': r'''Mapping types — "dict", "frozendict"
+************************************
-A *mapping* object maps *hashable* values to arbitrary objects.
-Mappings are mutable objects. There is currently only one standard
-mapping type, the *dictionary*. (For other containers see the built-
-in "list", "set", and "tuple" classes, and the "collections" module.)
+A *mapping* object maps *hashable* values to arbitrary objects. There
+are currently two standard mapping types, the *dictionary* and
+"frozendict". (For other containers see the built-in "list", "set",
+and "tuple" classes, and the "collections" module.)
A dictionary’s keys are *almost* arbitrary values. Values that are
not *hashable*, that is, values containing lists, dictionaries or
Changed in version 3.8: Dictionaries are now reversible.
+ See also:
+
+ "frozendict" and "types.MappingProxyType" can be used to create a
+ read-only view of a "dict".
+
See also:
- "frozendict" and "types.MappingProxyType" can be used to create a read-only
- view of a "dict".
+ For detailed information on thread-safety guarantees for "dict"
+ objects, see Thread safety for dict objects.
Dictionary view objects
mappingproxy({'bacon': 1, 'spam': 500})
>>> values.mapping['spam']
500
+
+
+Frozen dictionaries
+===================
+
+class frozendict(**kwargs)
+class frozendict(mapping, /, **kwargs)
+class frozendict(iterable, /, **kwargs)
+
+ Return a new frozen dictionary initialized from an optional
+ positional argument and a possibly empty set of keyword arguments.
+
+ A "frozendict" has a similar API to the "dict" API, with the
+ following differences:
+
+ * "dict" has more methods than "frozendict":
+
+ * "__delitem__()"
+
+ * "__setitem__()"
+
+ * "clear()"
+
+ * "pop()"
+
+ * "popitem()"
+
+ * "setdefault()"
+
+ * "update()"
+
+ * A "frozendict" can be hashed with "hash(frozendict)" if all keys
+ and values can be hashed.
+
+ * "frozendict |= other" does not modify the "frozendict" in-place
+ but creates a new frozen dictionary.
+
+ "frozendict" is not a "dict" subclass but inherits directly from
+ "object".
+
+ Added in version 3.15.0a6 (unreleased).
''',
'typesmethods': r'''Methods
*******
empty for the duration, and raises "ValueError" if it can detect
that the list has been mutated during a sort.
-Thread safety: Reading a single element from a "list" is *atomic*:
-
- lst[i] # list.__getitem__
-
-The following methods traverse the list and use *atomic* reads of each
-item to perform their function. That means that they may return
-results affected by concurrent modifications:
-
- item in lst
- lst.index(item)
- lst.count(item)
-
-All of the above methods/operations are also lock-free. They do not
-block concurrent modifications. Other operations that hold a lock will
-not block these from observing intermediate states.All other
-operations from here on block using the per-object lock.Writing a
-single item via "lst[i] = x" is safe to call from multiple threads and
-will not corrupt the list.The following operations return new objects
-and appear *atomic* to other threads:
-
- lst1 + lst2 # concatenates two lists into a new list
- x * lst # repeats lst x times into a new list
- lst.copy() # returns a shallow copy of the list
-
-Methods that only operate on a single elements with no shifting
-required are *atomic*:
-
- lst.append(x) # append to the end of the list, no shifting required
- lst.pop() # pop element from the end of the list, no shifting required
-
-The "clear()" method is also *atomic*. Other threads cannot observe
-elements being removed.The "sort()" method is not *atomic*. Other
-threads cannot observe intermediate states during sorting, but the
-list appears empty for the duration of the sort.The following
-operations may allow lock-free operations to observe intermediate
-states since they modify multiple elements in place:
-
- lst.insert(idx, item) # shifts elements
- lst.pop(idx) # idx not at the end of the list, shifts elements
- lst *= x # copies elements in place
-
-The "remove()" method may allow concurrent modifications since element
-comparison may execute arbitrary Python code (via
-"__eq__()")."extend()" is safe to call from multiple threads.
-However, its guarantees depend on the iterable passed to it. If it is
-a "list", a "tuple", a "set", a "frozenset", a "dict" or a dictionary
-view object (but not their subclasses), the "extend" operation is safe
-from concurrent modifications to the iterable. Otherwise, an iterator
-is created which can be concurrently modified by another thread. The
-same applies to inplace concatenation of a list with other iterables
-when using "lst += iterable".Similarly, assigning to a list slice with
-"lst[i:j] = iterable" is safe to call from multiple threads, but
-"iterable" is only locked when it is also a "list" (but not its
-subclasses).Operations that involve multiple accesses, as well as
-iteration, are never atomic. For example:
-
- # NOT atomic: read-modify-write
- lst[i] = lst[i] + 1
-
- # NOT atomic: check-then-act
- if lst:
- item = lst.pop()
-
- # NOT thread-safe: iteration while modifying
- for item in lst:
- process(item) # another thread may modify lst
-
-Consider external synchronization when sharing "list" instances across
-threads. See Python support for free threading for more information.
+See also:
+
+ For detailed information on thread-safety guarantees for "list"
+ objects, see Thread safety for list objects.
Tuples
is semantically equivalent to:
manager = (EXPRESSION)
- enter = type(manager).__enter__
- exit = type(manager).__exit__
- value = enter(manager)
+ enter = manager.__enter__
+ exit = manager.__exit__
+ value = enter()
hit_except = False
try:
SUITE
except:
hit_except = True
- if not exit(manager, *sys.exc_info()):
+ if not exit(*sys.exc_info()):
raise
finally:
if not hit_except:
- exit(manager, None, None, None)
+ exit(None, None, None)
+
+except that implicit special method lookup is used for "__enter__()"
+and "__exit__()".
With more than one item, the context managers are processed as if
multiple "with" statements were nested:
--- /dev/null
+.. date: 2026-03-10-09-46-44
+.. gh-issue: 145731
+.. nonce: 5uEGgb
+.. release date: 2026-03-10
+.. section: Windows
+
+Fix negative timestamp during DST on Windows. Patch by Hugo van Kemenade.
+
+..
+
+.. date: 2026-02-27-10-57-20
+.. gh-issue: 145307
+.. nonce: ueoT7j
+.. section: Windows
+
+Defers loading of the ``psapi.dll`` module until it is used by
+:func:`ctypes.util.dllist`.
+
+..
+
+.. date: 2026-02-13-11-07-51
+.. gh-issue: 144551
+.. nonce: ENtMYD
+.. section: Windows
+
+Updated bundled version of OpenSSL to 3.5.5.
+
+..
+
+.. date: 2026-03-04-17-39-15
+.. gh-issue: 144741
+.. nonce: 0RHhBF
+.. section: Tests
+
+Fix ``test_frame_pointer_unwind`` when Python is built with
+:option:`--enable-shared`. Classify also libpython frames as ``"python"``.
+Patch by Victor Stinner.
+
+..
+
+.. date: 2026-02-12-12-12-00
+.. gh-issue: 144739
+.. nonce: -fx1tN
+.. section: Tests
+
+When Python was compiled with system expat older then 2.7.2 but tests run
+with newer expat, still skip
+:class:`!test.test_pyexpat.MemoryProtectionTest`.
+
+..
+
+.. date: 2026-03-04-18-59-17
+.. gh-issue: 145506
+.. nonce: 6hwvEh
+.. section: Security
+
+Fixes :cve:`2026-2297` by ensuring that ``SourcelessFileLoader`` uses
+:func:`io.open_code` when opening ``.pyc`` files.
+
+..
+
+.. date: 2026-01-31-21-56-54
+.. gh-issue: 144370
+.. nonce: fp9m8t
+.. section: Security
+
+Disallow usage of control characters in status in :mod:`wsgiref.handlers` to
+prevent HTTP header injections. Patch by Benedikt Johannes.
+
+..
+
+.. date: 2026-03-07-15-00-00
+.. gh-issue: 145623
+.. nonce: 2Y7LzT
+.. section: Library
+
+Fix crash in :mod:`struct` when calling :func:`repr` or ``__sizeof__()`` on
+an uninitialized :class:`struct.Struct` object created via
+``Struct.__new__()`` without calling ``__init__()``.
+
+..
+
+.. date: 2026-03-05-19-01-28
+.. gh-issue: 145551
+.. nonce: gItPRl
+.. section: Library
+
+Fix InvalidStateError when cancelling process created by
+:func:`asyncio.create_subprocess_exec` or
+:func:`asyncio.create_subprocess_shell`. Patch by Daan De Meyer.
+
+..
+
+.. date: 2026-03-05-16-06-09
+.. gh-issue: 141510
+.. nonce: dFPAQS
+.. section: Library
+
+:mod:`marshal` now supports :class:`frozendict` objects. The marshal format
+version was increased to 6. Patch by Victor Stinner.
+
+..
+
+.. date: 2026-03-03-11-49-44
+.. gh-issue: 145417
+.. nonce: m_HxIL
+.. section: Library
+
+:mod:`venv`: Prevent incorrect preservation of SELinux context when copying
+the ``Activate.ps1`` script. The script inherited the SELinux security
+context of the system template directory, rather than the destination
+project directory.
+
+..
+
+.. date: 2026-03-02-20-08-09
+.. gh-issue: 145335
+.. nonce: lVTBvd
+.. section: Library
+
+``os.listdir(-1)`` and ``os.scandir(-1)`` now fail with
+``OSError(errno.EBADF)`` rather than listing the current directory.
+``os.listxattr(-1)`` now fails with ``OSError(errno.EBADF)`` rather than
+listing extended attributes of the current directory. Patch by Victor
+Stinner.
+
+..
+
+.. date: 2026-03-02-19-41-39
+.. gh-issue: 145376
+.. nonce: OOzSOh
+.. section: Library
+
+Fix double free and null pointer dereference in unusual error scenarios in
+:mod:`hashlib` and :mod:`hmac` modules.
+
+..
+
+.. date: 2026-02-28-00-55-00
+.. gh-issue: 145301
+.. nonce: Lk2bRl
+.. section: Library
+
+:mod:`hmac`: fix a crash when the initialization of the underlying C
+extension module fails.
+
+..
+
+.. date: 2026-02-27-19-00-26
+.. gh-issue: 145301
+.. nonce: 2Wih4b
+.. section: Library
+
+:mod:`hashlib`: fix a crash when the initialization of the underlying C
+extension module fails.
+
+..
+
+.. date: 2026-02-27-18-04-51
+.. gh-issue: 76007
+.. nonce: 17idfK
+.. section: Library
+
+The ``version`` attribute of the :mod:`tarfile` module is deprecated and
+slated for removal in Python 3.20.
+
+..
+
+.. date: 2026-02-23-20-52-55
+.. gh-issue: 145158
+.. nonce: vWJtxI
+.. section: Library
+
+Avoid undefined behaviour from signed integer overflow when parsing format
+strings in the :mod:`struct` module.
+
+..
+
+.. date: 2026-02-21-17-34-53
+.. gh-issue: 123853
+.. nonce: 6RUwWh
+.. section: Library
+
+Removed Windows 95 compatibility for :func:`locale.getdefaultlocale`.
+
+..
+
+.. date: 2026-02-20-13-03-10
+.. gh-issue: 66802
+.. nonce: OYcAi_
+.. section: Library
+
+Add :func:`unicodedata.block` function to return the `Unicode block
+<https://www.unicode.org/versions/Unicode17.0.0/core-spec/chapter-3/#G64189>`_
+of a character.
+
+..
+
+.. date: 2026-02-19-20-54-25
+.. gh-issue: 145033
+.. nonce: X9EBPQ
+.. section: Library
+
+Add :data:`typing.TypeForm`, implementing :pep:`747`. Patch by Jelle
+Zijlstra.
+
+..
+
+.. date: 2026-02-19-18-02-54
+.. gh-issue: 141510
+.. nonce: qzvYsO
+.. section: Library
+
+:func:`dataclasses.field`: if *metadata* is ``None``, use an empty
+:class:`frozendict`, instead of a :func:`~types.MappingProxyType` of an
+empty :class:`dict`. Patch by Victor Stinner.
+
+..
+
+.. date: 2026-02-19-17-50-47
+.. gh-issue: 145006
+.. nonce: 9gqA0Q
+.. section: Library
+
+Add :exc:`ModuleNotFoundError` hints when a module for a different ABI
+exists.
+
+..
+
+.. date: 2026-02-19-16-26-08
+.. gh-issue: 141510
+.. nonce: 4Qxy8_
+.. section: Library
+
+``ParameterizedMIMEHeader.params`` of :mod:`email.headerregistry` is now a
+:class:`frozendict` instead of a :class:`types.MappingProxyType`. Patch by
+Victor Stinner.
+
+..
+
+.. date: 2026-02-19-15-42-06
+.. gh-issue: 134872
+.. nonce: sjYX1-
+.. section: Library
+
+Add valid import name suggestions on :exc:`ModuleNotFoundError`.
+
+..
+
+.. date: 2026-02-19-10-57-40
+.. gh-issue: 88091
+.. nonce: N7qGV-
+.. section: Library
+
+Fix :func:`unicodedata.decomposition` for Hangul characters.
+
+..
+
+.. date: 2026-02-19-00-00-00
+.. gh-issue: 144986
+.. nonce: atexit-leak
+.. section: Library
+
+Fix a memory leak in :func:`atexit.register`. Patch by Shamil Abdulaev.
+
+..
+
+.. date: 2026-02-18-13-45-00
+.. gh-issue: 144777
+.. nonce: R97q0a
+.. section: Library
+
+Fix data races in :class:`io.IncrementalNewlineDecoder` in the
+:term:`free-threaded build`.
+
+..
+
+.. date: 2026-02-18-00-00-00
+.. gh-issue: 144809
+.. nonce: nYpEUx
+.. section: Library
+
+Make :class:`collections.deque` copy atomic in the :term:`free-threaded
+build`.
+
+..
+
+.. date: 2026-02-17-11-28-37
+.. gh-issue: 141510
+.. nonce: OpAz0M
+.. section: Library
+
+The :mod:`copy` module now supports the :class:`frozendict` type. Patch by
+Pieter Eendebak based on work by Victor Stinner.
+
+..
+
+.. date: 2026-02-17-11-15-17
+.. gh-issue: 141510
+.. nonce: ZmqEUb
+.. section: Library
+
+The :mod:`json` module now supports the :class:`frozendict` type. Patch by
+Victor Stinner.
+
+..
+
+.. date: 2026-02-15-12-02-20
+.. gh-issue: 144835
+.. nonce: w_oS_J
+.. section: Library
+
+Added missing explanations for some parameters in :func:`glob.glob` and
+:func:`glob.iglob`.
+
+..
+
+.. date: 2026-02-15-00-00-00
+.. gh-issue: 144833
+.. nonce: TUelo1
+.. section: Library
+
+Fixed a use-after-free in :mod:`ssl` when ``SSL_new()`` returns NULL in
+``newPySSLSocket()``. The error was reported via a dangling pointer after
+the object had already been freed.
+
+..
+
+.. date: 2026-02-14-14-56-44
+.. gh-issue: 140715
+.. nonce: AbSheM
+.. section: Library
+
+Add ``'%D'`` support to :meth:`~datetime.datetime.strptime`.
+
+..
+
+.. date: 2026-02-13-14-20-10
+.. gh-issue: 144782
+.. nonce: 0Y8TKj
+.. section: Library
+
+Fix :class:`argparse.ArgumentParser` to be :mod:`pickleable <pickle>`.
+
+..
+
+.. date: 2026-02-13-11-14-18
+.. gh-issue: 144763
+.. nonce: cDwnEE
+.. section: Library
+
+Fix a race condition in :mod:`tracemalloc`: it no longer detaches the
+attached thread state to acquire its internal lock. Patch by Victor Stinner.
+
+..
+
+.. date: 2026-02-13-00-00-00
+.. gh-issue: 142224
+.. nonce: BidiMissing
+.. section: Library
+
+:func:`unicodedata.bidirectional` now return the correct default bidi class
+for unassigned code points.
+
+..
+
+.. date: 2026-02-12-17-56-17
+.. gh-issue: 117865
+.. nonce: jE1ema
+.. section: Library
+
+Reduce the import time of :mod:`inspect` module by ~20%.
+
+..
+
+.. date: 2026-02-10-22-05-51
+.. gh-issue: 144156
+.. nonce: UbrC7F
+.. section: Library
+
+Fix the folding of headers by the :mod:`email` library when :rfc:`2047`
+encoded words are used. Now whitespace is correctly preserved and also
+correctly added between adjacent encoded words. The latter property was
+broken by the fix for gh-92081, which mostly fixed previous failures to
+preserve whitespace.
+
+..
+
+.. date: 2026-02-10-16-56-05
+.. gh-issue: 66305
+.. nonce: PZ6GN8
+.. section: Library
+
+Fixed a hang on Windows in the :mod:`tempfile` module when trying to create
+a temporary file or subdirectory in a non-writable directory.
+
+..
+
+.. date: 2026-02-09-02-16-36
+.. gh-issue: 144615
+.. nonce: s04x4n
+.. section: Library
+
+Methods directly decorated with :deco:`functools.singledispatchmethod` now
+dispatch on the second argument when called after being accessed as class
+attributes. Patch by Bartosz Sławecki.
+
+..
+
+.. date: 2026-02-08-17-09-10
+.. gh-issue: 144321
+.. nonce: w58PhQ
+.. section: Library
+
+The functional syntax for creating :class:`typing.NamedTuple` classes now
+supports passing any :term:`iterable` of fields and types. Previously, only
+sequences were supported.
+
+..
+
+.. date: 2026-02-07-16-37-42
+.. gh-issue: 144475
+.. nonce: 8tFEXw
+.. section: Library
+
+Calling :func:`repr` on :func:`functools.partial` is now safer when the
+partial object's internal attributes are replaced while the string
+representation is being generated.
+
+..
+
+.. date: 2026-02-07-16-31-42
+.. gh-issue: 144285
+.. nonce: iyH9iL
+.. section: Library
+
+Attribute suggestions in :exc:`AttributeError` tracebacks are now formatted
+differently to make them easier to understand, for example: ``Did you mean
+'.datetime.now' instead of '.now'``. Contributed by Bartosz Sławecki.
+
+..
+
+.. date: 2026-02-03-19-57-41
+.. gh-issue: 144316
+.. nonce: wop870
+.. section: Library
+
+Fix crash in ``_remote_debugging`` that caused ``test_external_inspection``
+to intermittently fail. Patch by Taegyun Kim.
+
+..
+
+.. date: 2026-01-17-08-44-25
+.. gh-issue: 143637
+.. nonce: qyPqDo
+.. section: Library
+
+Fixed a crash in socket.sendmsg() that could occur if ancillary data is
+mutated re-entrantly during argument parsing.
+
+..
+
+.. date: 2026-01-12-19-39-57
+.. gh-issue: 140652
+.. nonce: HvM9Bl
+.. section: Library
+
+Fix a crash in :func:`!_interpchannels.list_all` after closing a channel.
+
+..
+
+.. date: 2026-01-11-18-35-52
+.. gh-issue: 143698
+.. nonce: gXDzsJ
+.. section: Library
+
+Allow *scheduler* and *setpgroup* arguments to be explicitly :const:`None`
+when calling :func:`os.posix_spawn` or :func:`os.posix_spawnp`. Patch by
+Bénédikt Tran.
+
+..
+
+.. date: 2026-01-11-16-59-22
+.. gh-issue: 143698
+.. nonce: b-Cpeb
+.. section: Library
+
+Raise :exc:`TypeError` instead of :exc:`SystemError` when the *scheduler* in
+:func:`os.posix_spawn` or :func:`os.posix_spawnp` is not a tuple. Patch by
+Bénédikt Tran.
+
+..
+
+.. date: 2026-01-11-13-03-32
+.. gh-issue: 142516
+.. nonce: u7An-s
+.. section: Library
+
+:mod:`ssl`: fix reference leaks in :class:`ssl.SSLContext` objects. Patch by
+Bénédikt Tran.
+
+..
+
+.. date: 2026-01-10-22-58-30
+.. gh-issue: 85809
+.. nonce: 0eW4wt
+.. section: Library
+
+Added :term:`path-like object` support for :func:`shutil.make_archive`.
+
+..
+
+.. date: 2026-01-01-05-26-00
+.. gh-issue: 143304
+.. nonce: Kv7x9Q
+.. section: Library
+
+Fix :class:`ctypes.CDLL` to honor the ``handle`` parameter on POSIX systems.
+
+..
+
+.. date: 2025-12-18-00-14-16
+.. gh-issue: 142781
+.. nonce: gcOeYF
+.. section: Library
+
+:mod:`zoneinfo`: fix a crash when instantiating :class:`~zoneinfo.ZoneInfo`
+objects for which the internal class-level cache is inconsistent.
+
+..
+
+.. date: 2025-12-16-13-34-48
+.. gh-issue: 142787
+.. nonce: wNitJX
+.. section: Library
+
+Fix assertion failure in :mod:`sqlite3` blob subscript when slicing with
+indices that result in an empty slice.
+
+..
+
+.. date: 2025-12-06-16-14-18
+.. gh-issue: 142352
+.. nonce: pW5HLX88
+.. section: Library
+
+Fix :meth:`asyncio.StreamWriter.start_tls` to transfer buffered data from
+:class:`~asyncio.StreamReader` to the SSL layer, preventing data loss when
+upgrading a connection to TLS mid-stream (e.g., when implementing PROXY
+protocol support).
+
+..
+
+.. date: 2025-10-10-14-08-58
+.. gh-issue: 139899
+.. nonce: 09leRY
+.. section: Library
+
+Introduced :meth:`importlib.abc.MetaPathFinder.discover` and
+:meth:`importlib.abc.PathEntryFinder.discover` to allow module and submodule
+name discovery without assuming the use of traditional filesystem based
+imports.
+
+..
+
+.. date: 2025-08-04-23-20-43
+.. gh-issue: 137335
+.. nonce: IIjDJN
+.. section: Library
+
+Get rid of any possibility of a name conflict for named pipes in
+:mod:`multiprocessing` and :mod:`asyncio` on Windows, no matter how small.
+
+..
+
+.. date: 2025-06-24-19-07-18
+.. gh-issue: 135883
+.. nonce: 38cePA
+.. section: Library
+
+Fix :mod:`sqlite3`'s :ref:`interactive shell <sqlite3-cli>` keeping part of
+previous commands when scrolling history.
+
+..
+
+.. date: 2024-09-30-15-31-59
+.. gh-issue: 124748
+.. nonce: KYzYFp
+.. section: Library
+
+Improve :exc:`TypeError` error message when
+:meth:`!weakref.WeakKeyDictionary.update` is used with keyword-only
+parameters.
+
+..
+
+.. date: 2023-02-05-20-02-30
+.. gh-issue: 80667
+.. nonce: 7LmzeA
+.. section: Library
+
+Add support for Tangut Ideographs names in :mod:`unicodedata`.
+
+..
+
+.. bpo: 42353
+.. date: 2022-02-05-00-15-03
+.. nonce: 0ebVGG
+.. section: Library
+
+The :mod:`re` module gains a new :func:`re.prefixmatch` function as an
+explicit spelling of what has to date always been known as :func:`re.match`.
+:class:`re.Pattern` similary gains a :meth:`re.Pattern.prefixmatch` method.
+
+Why? Explicit is better than implicit. Other widely used languages all use
+the term "match" to mean what Python uses the term "search" for. The
+unadorened "match" name in Python has been a frequent case of confusion and
+coding bugs due to the inconsistency with the rest if the software industry.
+
+We do not plan to deprecate and remove the older ``match`` name.
+
+..
+
+.. bpo: 40243
+.. date: 2020-04-10-14-29-53
+.. nonce: 85HRib
+.. section: Library
+
+Fix :meth:`!unicodedata.ucd_3_2_0.numeric` for non-decimal values.
+
+..
+
+.. bpo: 40212
+.. date: 2020-04-07-05-09-34
+.. nonce: oPYeBs
+.. section: Library
+
+Re-enable :func:`os.posix_fallocate` and :func:`os.posix_fadvise` on AIX.
+
+..
+
+.. bpo: 3405
+.. date: 2018-05-11-12-26-16
+.. nonce: CacMw9
+.. section: Library
+
+Add support for user data of Tk virtual events and detail for ``Enter``,
+``Leave``, ``FocusIn``, ``FocusOut``, and ``ConfigureRequest`` events to
+:mod:`tkinter`.
+
+..
+
+.. bpo: 32234
+.. date: 2017-12-15-09-32-57
+.. nonce: XaOkhR
+.. section: Library
+
+:class:`mailbox.Mailbox` instances can now be used as a context manager. The
+Mailbox is locked on context entry and unlocked and closed at context exit.
+
+..
+
+.. date: 2026-03-03-08-18-00
+.. gh-issue: 145450
+.. nonce: VI7GXj
+.. section: Documentation
+
+Document missing public :class:`wave.Wave_write` getter methods.
+
+..
+
+.. date: 2026-01-06-16-04-08
+.. gh-issue: 110937
+.. nonce: SyO5lk
+.. section: Documentation
+
+Document rest of full public :class:`importlib.metadata.Distribution` API.
+Also add the (already documented) :class:`~importlib.metadata.PackagePath`
+to ``__all__``.
+
+..
+
+.. date: 2025-08-02-18-59-01
+.. gh-issue: 136246
+.. nonce: RIK7nE
+.. section: Documentation
+
+A new "Improve this page" link is available in the left-hand sidebar of the
+docs, offering links to create GitHub issues, discussion forum posts, or
+pull requests.
+
+..
+
+.. date: 2026-03-09-18-52-03
+.. gh-issue: 145701
+.. nonce: 79KQyO
+.. section: Core and Builtins
+
+Fix :exc:`SystemError` when ``__classdict__`` or
+``__conditional_annotations__`` is in a class-scope inlined comprehension.
+Found by OSS Fuzz in :oss-fuzz:`491105000`.
+
+..
+
+.. date: 2026-03-06-21-05-05
+.. gh-issue: 145615
+.. nonce: NKXXZgDW
+.. section: Core and Builtins
+
+Fixed a memory leak in the :term:`free-threaded build` where mimalloc pages
+could become permanently unreclaimable until the owning thread exited.
+
+..
+
+.. date: 2026-03-06-01-36-20
+.. gh-issue: 116738
+.. nonce: OWVWRx
+.. section: Core and Builtins
+
+Make :meth:`!mmap.mmap.set_name` thread-safe on the :term:`free threaded
+<free threading>` build.
+
+..
+
+.. date: 2026-03-05-19-10-56
+.. gh-issue: 145566
+.. nonce: H4RupyYN
+.. section: Core and Builtins
+
+In the free threading build, skip the stop-the-world pause when reassigning
+``__class__`` on a newly created object.
+
+..
+
+.. date: 2026-03-05-16-16-17
+.. gh-issue: 143055
+.. nonce: qDUFlY
+.. section: Core and Builtins
+
+Fix crash in AST unparser when unparsing dict comprehension unpacking. Found
+by OSS Fuzz in :oss-fuzz:`489790200`.
+
+..
+
+.. date: 2026-03-01-13-37-31
+.. gh-issue: 145335
+.. nonce: e36kPJ
+.. section: Core and Builtins
+
+Fix a crash in :func:`os.pathconf` when called with ``-1`` as the path
+argument.
+
+..
+
+.. date: 2026-02-28-16-46-17
+.. gh-issue: 145376
+.. nonce: lG5u1a
+.. section: Core and Builtins
+
+Fix reference leaks in various unusual error scenarios.
+
+..
+
+.. date: 2026-02-26-21-36-00
+.. gh-issue: 145234
+.. nonce: w0mQ9n
+.. section: Core and Builtins
+
+Fixed a ``SystemError`` in the parser when an encoding cookie (for example,
+UTF-7) decodes to carriage returns (``\r``). Newlines are now normalized
+after decoding in the string tokenizer.
+
+Patch by Pablo Galindo.
+
+..
+
+.. date: 2026-02-26-21-07-38
+.. gh-issue: 145275
+.. nonce: qE-3O1
+.. section: Core and Builtins
+
+Added the :option:`-X pathconfig_warnings<-X>` and
+:envvar:`PYTHON_PATHCONFIG_WARNINGS` options, allowing to disable warnings
+from :ref:`sys-path-init`.
+
+..
+
+.. date: 2026-02-26-20-51-54
+.. gh-issue: 145273
+.. nonce: B5QcUp
+.. section: Core and Builtins
+
+A warning is now shown during :ref:`sys-path-init` if it can't find a valid
+standard library.
+
+..
+
+.. date: 2026-02-26-18-00-00
+.. gh-issue: 145241
+.. nonce: hL2k9Q
+.. section: Core and Builtins
+
+Specialized the parser error for when ``with`` items are followed by a
+trailing comma (for example, ``with item,:``), raising a clearer
+:exc:`SyntaxError` message. Patch by Pablo Galindo and Bartosz Sławecki.
+
+..
+
+.. date: 2026-02-26-12-00-00
+.. gh-issue: 130555
+.. nonce: TMSOIu
+.. section: Core and Builtins
+
+Fix use-after-free in :meth:`dict.clear` when the dictionary values are
+embedded in an object and a destructor causes re-entrant mutation of the
+dictionary.
+
+..
+
+.. date: 2026-02-25-15-02-08
+.. gh-issue: 145197
+.. nonce: G6hAUk
+.. section: Core and Builtins
+
+Fix JIT trace crash when recording function from cleared generator frame.
+
+..
+
+.. date: 2026-02-24-18-30-56
+.. gh-issue: 145187
+.. nonce: YjPu1Z
+.. section: Core and Builtins
+
+Fix compiler assertion fail when a type parameter bound contains an invalid
+expression in a conditional block.
+
+..
+
+.. date: 2026-02-23-23-18-28
+.. gh-issue: 145142
+.. nonce: T-XbVe
+.. section: Core and Builtins
+
+Fix a crash in the free-threaded build when the dictionary argument to
+:meth:`str.maketrans` is concurrently modified.
+
+..
+
+.. date: 2026-02-22-22-05-09
+.. gh-issue: 145118
+.. nonce: TaKMJE
+.. section: Core and Builtins
+
+:meth:`str.maketrans` now accepts :class:`frozendict`.
+
+..
+
+.. date: 2026-02-22-20-15-00
+.. gh-issue: 144015
+.. nonce: pystrhex_simd
+.. section: Core and Builtins
+
+Speed up :meth:`bytes.hex`, :meth:`bytearray.hex`, :func:`binascii.hexlify`,
+and :mod:`hashlib` ``.hexdigest()`` operations with SIMD on x86-64, ARM64,
+and ARM32 with NEON when built with gcc (version 12 or higher) or clang
+(version 3 or higher) compilers. Around 1.1-3x faster for common 16-64 byte
+inputs such as hashlib hex digests, and up to 8x faster for larger data.
+
+..
+
+.. date: 2026-02-22-19-05-03
+.. gh-issue: 145118
+.. nonce: bU6Sic
+.. section: Core and Builtins
+
+:func:`type` now accepts :class:`frozendict` as an argument.
+
+..
+
+.. date: 2026-02-22-07-51-10
+.. gh-issue: 145064
+.. nonce: iIMGKA
+.. section: Core and Builtins
+
+Fix JIT optimizer assertion failure during ``CALL_ALLOC_AND_ENTER_INIT``
+side exit.
+
+..
+
+.. date: 2026-02-21-12-16-46
+.. gh-issue: 145055
+.. nonce: VyT-zI
+.. section: Core and Builtins
+
+:func:`exec` and :func:`eval` now accept :class:`frozendict` for *globals*.
+Patch by Victor Stinner.
+
+..
+
+.. date: 2026-02-21-09-47-45
+.. gh-issue: 145058
+.. nonce: e-RBw-
+.. section: Core and Builtins
+
+Fix a crash when :func:`!__lazy_import__` is passed a non-string argument,
+by raising an :exc:`TypeError` instead.
+
+..
+
+.. date: 2026-02-19-12-49-15
+.. gh-issue: 144995
+.. nonce: Ob2oYJ
+.. section: Core and Builtins
+
+Optimize :class:`memoryview` comparison: a :class:`memoryview` is equal to
+itself, there is no need to compare values. Patch by Victor Stinner.
+
+..
+
+.. date: 2026-02-18-21-44-39
+.. gh-issue: 141510
+.. nonce: 7LST2O
+.. section: Core and Builtins
+
+Update specializer to support frozendict. Patch by Donghee Na.
+
+..
+
+.. date: 2026-02-17-22-27-11
+.. gh-issue: 141510
+.. nonce: -4yYsf
+.. section: Core and Builtins
+
+Optimize :meth:`!frozendict.fromkeys` to avoid unnecessary thread-safety
+operations in frozendict cases. Patch by Donghee Na.
+
+..
+
+.. date: 2026-02-17-21-04-03
+.. gh-issue: 100239
+.. nonce: LyVabQ
+.. section: Core and Builtins
+
+Speedup ``BINARY_OP_EXTEND`` for exact floats and medium-size integers by up
+to 15%. Patch by Chris Eibl.
+
+..
+
+.. date: 2026-02-17-18-27-28
+.. gh-issue: 144914
+.. nonce: DcXO4m
+.. section: Core and Builtins
+
+Use ``mimalloc`` for raw memory allocations such as via
+:c:func:`PyMem_RawMalloc` for better performance on :term:`free-threaded
+builds <free-threaded build>`. Patch by Kumar Aditya.
+
+..
+
+.. date: 2026-02-16-12-28-43
+.. gh-issue: 144872
+.. nonce: k9_Q30
+.. section: Core and Builtins
+
+Fix heap buffer overflow in the parser found by OSS-Fuzz.
+
+..
+
+.. date: 2026-02-13-18-30-59
+.. gh-issue: 144766
+.. nonce: JGu3x3
+.. section: Core and Builtins
+
+Fix a crash in fork child process when perf support is enabled.
+
+..
+
+.. date: 2026-02-13-12-00-00
+.. gh-issue: 144759
+.. nonce: d3qYpe
+.. section: Core and Builtins
+
+Fix undefined behavior in the lexer when ``start`` and ``multi_line_start``
+pointers are ``NULL`` in ``_PyLexer_remember_fstring_buffers()`` and
+``_PyLexer_restore_fstring_buffers()``. The ``NULL`` pointer arithmetic
+(``NULL - valid_pointer``) is now guarded with explicit ``NULL`` checks.
+
+..
+
+.. date: 2026-02-12-19-01-13
+.. gh-issue: 141510
+.. nonce: KlKjZg
+.. section: Core and Builtins
+
+Add built-in :class:`frozendict` type. Patch by Victor Stinner.
+
+..
+
+.. date: 2026-02-12-12-39-50
+.. gh-issue: 144681
+.. nonce: Ns2OT2
+.. section: Core and Builtins
+
+Fix a JIT assertion failure when a conditional branch jumps to the same
+target as the fallthrough path.
+
+..
+
+.. date: 2026-02-11-13-30-11
+.. gh-issue: 143300
+.. nonce: yjB63-
+.. section: Core and Builtins
+
+Add :c:func:`PyUnstable_SetImmortal` C-API function to mark objects as
+:term:`immortal`.
+
+..
+
+.. date: 2026-02-11-11-28-25
+.. gh-issue: 144702
+.. nonce: XjFumv
+.. section: Core and Builtins
+
+Clarify the error message raised when a class pattern is used to match on a
+non-class object.
+
+..
+
+.. date: 2026-02-08-13-14-00
+.. gh-issue: 144569
+.. nonce: pjlJVe
+.. section: Core and Builtins
+
+Optimize ``BINARY_SLICE`` for list, tuple, and unicode by avoiding temporary
+``slice`` object creation.
+
+..
+
+.. date: 2026-02-06-21-45-52
+.. gh-issue: 144438
+.. nonce: GI_uB1LR
+.. section: Core and Builtins
+
+Align the QSBR thread state array to a 64-byte cache line boundary to avoid
+false sharing in the :term:`free-threaded build`.
+
+..
+
+.. date: 2025-12-06-15-46-32
+.. gh-issue: 142349
+.. nonce: IdTuYL
+.. section: Core and Builtins
+
+Implement :pep:`810`. Patch by Pablo Galindo and Dino Viehland.
+
+..
+
+.. date: 2025-11-09-15-44-58
+.. gh-issue: 141226
+.. nonce: KTb_3F
+.. section: Core and Builtins
+
+Deprecate :pep:`456` support for providing an external definition of the
+string hashing scheme. Removal is scheduled for Python 3.19. Patch by
+Bénédikt Tran.
+
+..
+
+.. date: 2025-09-15-13-28-48
+.. gh-issue: 138912
+.. nonce: 61EYbn
+.. section: Core and Builtins
+
+Improve :opcode:`MATCH_CLASS` performance by up to 52% in certain cases.
+Patch by Marc Mueller.
+
+..
+
+.. date: 2025-02-19-21-06-30
+.. gh-issue: 130327
+.. nonce: z3TaR8
+.. section: Core and Builtins
+
+Fix erroneous clearing of an object's :attr:`~object.__dict__` if
+overwritten at runtime.
+
+..
+
+.. date: 2023-07-26-00-03-00
+.. gh-issue: 80667
+.. nonce: N7Dh8B
+.. section: Core and Builtins
+
+Literals using the ``\N{name}`` escape syntax can now construct CJK
+ideographs and Hangul syllables using case-insensitive names.
+
+..
+
+.. date: 2026-03-03-14-59-57
+.. gh-issue: 142417
+.. nonce: HiNP5j
+.. section: C API
+
+Restore private provisional ``_Py_InitializeMain()`` function removed in
+Python 3.14. Patch by Victor Stinner.
+
+..
+
+.. date: 2026-02-24-14-46-05
+.. gh-issue: 144748
+.. nonce: uhnFtE
+.. section: C API
+
+:c:func:`PyErr_CheckSignals` now raises the exception scheduled by
+:c:func:`PyThreadState_SetAsyncExc`, if any.
+
+..
+
+.. date: 2026-02-18-15-12-34
+.. gh-issue: 144981
+.. nonce: 4ZdM63
+.. section: C API
+
+Made :c:func:`PyUnstable_Code_SetExtra`, :c:func:`PyUnstable_Code_GetExtra`,
+and :c:func:`PyUnstable_Eval_RequestCodeExtraIndex` thread-safe on the
+:term:`free threaded <free threading>` build.
+
+..
+
+.. date: 2026-02-12-19-03-31
+.. gh-issue: 141510
+.. nonce: U_1tjz
+.. section: C API
+
+Add the following functions for the new :class:`frozendict` type:
+
+* :c:func:`PyAnyDict_Check`
+* :c:func:`PyAnyDict_CheckExact`
+* :c:func:`PyFrozenDict_Check`
+* :c:func:`PyFrozenDict_CheckExact`
+* :c:func:`PyFrozenDict_New`
+
+Patch by Victor Stinner.
+
+..
+
+.. date: 2026-02-10-14-49-49
+.. gh-issue: 121617
+.. nonce: 57vMqa
+.. section: C API
+
+``Python.h`` now also includes ``<string.h>`` in the limited C API version
+3.11 and newer to fix the :c:macro:`Py_CLEAR` macro which uses ``memcpy()``.
+Patch by Victor Stinner.
+
+..
+
+.. date: 2026-01-27-18-15-15
+.. gh-issue: 144175
+.. nonce: qHK5Jf
+.. section: C API
+
+Add :c:func:`PyArg_ParseArray` and :c:func:`PyArg_ParseArrayAndKeywords`
+functions to parse arguments of functions using the :c:macro:`METH_FASTCALL`
+calling convention. Patch by Victor Stinner.
+
+..
+
+.. date: 2026-02-27-18-10-02
+.. gh-issue: 144533
+.. nonce: 21fk9L
+.. section: Build
+
+Use wasmtime's ``--argv0`` to auto-discover sysconfig in WASI builds
+
+..
+
+.. date: 2026-02-22-13-35-20
+.. gh-issue: 145110
+.. nonce: KgWofW
+.. section: Build
+
+Fix targets "Clean" and "CLeanAll" in case of PGO builds on Windows. Patch
+by Chris Eibl.
+
+..
+
+.. date: 2026-02-10-18-26-04
+.. gh-issue: 144679
+.. nonce: FIH73W
+.. section: Build
+
+When building with Visual Studio 2026 (Version 18), use PlatformToolSet v145
+by default. Patch by Chris Eibl.
+
+..
+
+.. date: 2026-02-10-16-59-56
+.. gh-issue: 144675
+.. nonce: Wrf3Es
+.. section: Build
+
+Update to WASI SDK 30.
+
+..
+
+.. date: 2025-07-21-00-33-38
+.. gh-issue: 136677
+.. nonce: Y1_3ec
+.. section: Build
+
+Introduce executable specific linker flags to ``./configure``.
+++ /dev/null
-Introduce executable specific linker flags to ``./configure``.
+++ /dev/null
-Update to WASI SDK 30.
+++ /dev/null
-When building with Visual Studio 2026 (Version 18), use PlatformToolSet v145
-by default. Patch by Chris Eibl.
+++ /dev/null
-Fix targets "Clean" and "CLeanAll" in case of PGO builds on Windows. Patch by
-Chris Eibl.
+++ /dev/null
-Use wasmtime's ``--argv0`` to auto-discover sysconfig in WASI builds
+++ /dev/null
-Add :c:func:`PyArg_ParseArray` and :c:func:`PyArg_ParseArrayAndKeywords`
-functions to parse arguments of functions using the :c:macro:`METH_FASTCALL`
-calling convention. Patch by Victor Stinner.
+++ /dev/null
-``Python.h`` now also includes ``<string.h>`` in the limited C API version 3.11
-and newer to fix the :c:macro:`Py_CLEAR` macro which uses ``memcpy()``. Patch
-by Victor Stinner.
+++ /dev/null
-Add the following functions for the new :class:`frozendict` type:
-
-* :c:func:`PyAnyDict_Check`
-* :c:func:`PyAnyDict_CheckExact`
-* :c:func:`PyFrozenDict_Check`
-* :c:func:`PyFrozenDict_CheckExact`
-* :c:func:`PyFrozenDict_New`
-
-Patch by Victor Stinner.
+++ /dev/null
-Made :c:func:`PyUnstable_Code_SetExtra`, :c:func:`PyUnstable_Code_GetExtra`,
-and :c:func:`PyUnstable_Eval_RequestCodeExtraIndex` thread-safe on the
-:term:`free threaded <free threading>` build.
+++ /dev/null
-:c:func:`PyErr_CheckSignals` now raises the exception scheduled by
-:c:func:`PyThreadState_SetAsyncExc`, if any.
+++ /dev/null
-Restore private provisional ``_Py_InitializeMain()`` function removed in
-Python 3.14. Patch by Victor Stinner.
+++ /dev/null
-Literals using the ``\N{name}`` escape syntax can now construct CJK
-ideographs and Hangul syllables using case-insensitive names.
+++ /dev/null
-Fix erroneous clearing of an object's :attr:`~object.__dict__` if
-overwritten at runtime.
+++ /dev/null
-Improve :opcode:`MATCH_CLASS` performance by up to 52% in certain cases. Patch by Marc Mueller.
+++ /dev/null
-Deprecate :pep:`456` support for providing an external definition
-of the string hashing scheme. Removal is scheduled for Python 3.19.
-Patch by Bénédikt Tran.
+++ /dev/null
-Implement :pep:`810`. Patch by Pablo Galindo and Dino Viehland.
+++ /dev/null
-Align the QSBR thread state array to a 64-byte cache line boundary to
-avoid false sharing in the :term:`free-threaded build`.
+++ /dev/null
-Optimize ``BINARY_SLICE`` for list, tuple, and unicode by avoiding temporary ``slice`` object creation.
+++ /dev/null
-Clarify the error message raised when a class pattern is used to match on a
-non-class object.
+++ /dev/null
-Add :c:func:`PyUnstable_SetImmortal` C-API function to mark objects as :term:`immortal`.
+++ /dev/null
-Fix a JIT assertion failure when a conditional branch jumps to the same target as the fallthrough path.
+++ /dev/null
-Add built-in :class:`frozendict` type. Patch by Victor Stinner.
+++ /dev/null
-Fix undefined behavior in the lexer when ``start`` and ``multi_line_start``
-pointers are ``NULL`` in ``_PyLexer_remember_fstring_buffers()`` and
-``_PyLexer_restore_fstring_buffers()``. The ``NULL`` pointer arithmetic
-(``NULL - valid_pointer``) is now guarded with explicit ``NULL`` checks.
+++ /dev/null
-Fix a crash in fork child process when perf support is enabled.
+++ /dev/null
-Fix heap buffer overflow in the parser found by OSS-Fuzz.
+++ /dev/null
-Use ``mimalloc`` for raw memory allocations such as via :c:func:`PyMem_RawMalloc` for better performance on :term:`free-threaded builds <free-threaded build>`. Patch by Kumar Aditya.
+++ /dev/null
-Speedup ``BINARY_OP_EXTEND`` for exact floats and medium-size integers by up
-to 15%. Patch by Chris Eibl.
+++ /dev/null
-Optimize :meth:`!frozendict.fromkeys` to avoid unnecessary thread-safety operations
-in frozendict cases. Patch by Donghee Na.
+++ /dev/null
-Update specializer to support frozendict. Patch by Donghee Na.
+++ /dev/null
-Optimize :class:`memoryview` comparison: a :class:`memoryview` is equal to
-itself, there is no need to compare values. Patch by Victor Stinner.
+++ /dev/null
-Fix a crash when :func:`!__lazy_import__` is passed a non-string argument,
-by raising an :exc:`TypeError` instead.
+++ /dev/null
-:func:`exec` and :func:`eval` now accept :class:`frozendict` for *globals*.
-Patch by Victor Stinner.
+++ /dev/null
-Fix JIT optimizer assertion failure during ``CALL_ALLOC_AND_ENTER_INIT`` side exit.
+++ /dev/null
-:func:`type` now accepts :class:`frozendict` as an argument.
+++ /dev/null
-Speed up :meth:`bytes.hex`, :meth:`bytearray.hex`, :func:`binascii.hexlify`,
-and :mod:`hashlib` ``.hexdigest()`` operations with SIMD on x86-64, ARM64,
-and ARM32 with NEON when built with gcc (version 12 or higher) or clang
-(version 3 or higher) compilers. Around 1.1-3x faster for common 16-64 byte
-inputs such as hashlib hex digests, and up to 8x faster for larger data.
+++ /dev/null
-:meth:`str.maketrans` now accepts :class:`frozendict`.
+++ /dev/null
-Fix a crash in the free-threaded build when the dictionary argument to
-:meth:`str.maketrans` is concurrently modified.
+++ /dev/null
-Fix compiler assertion fail when a type parameter bound contains an invalid
-expression in a conditional block.
+++ /dev/null
-Fix JIT trace crash when recording function from cleared generator frame.
+++ /dev/null
-Fix use-after-free in :meth:`dict.clear` when the dictionary values are
-embedded in an object and a destructor causes re-entrant mutation of the
-dictionary.
+++ /dev/null
-Specialized the parser error for when ``with`` items are followed
-by a trailing comma (for example, ``with item,:``), raising a clearer
-:exc:`SyntaxError` message. Patch by Pablo Galindo and Bartosz Sławecki.
+++ /dev/null
-A warning is now shown during :ref:`sys-path-init` if it can't find a valid
-standard library.
+++ /dev/null
-Added the :option:`-X pathconfig_warnings<-X>` and
-:envvar:`PYTHON_PATHCONFIG_WARNINGS` options, allowing to disable warnings
-from :ref:`sys-path-init`.
+++ /dev/null
-Fixed a ``SystemError`` in the parser when an encoding cookie (for example,
-UTF-7) decodes to carriage returns (``\r``). Newlines are now normalized after
-decoding in the string tokenizer.
-
-Patch by Pablo Galindo.
+++ /dev/null
-Fix reference leaks in various unusual error scenarios.
+++ /dev/null
-Fix a crash in :func:`os.pathconf` when called with ``-1`` as the path\r
-argument.
+++ /dev/null
-Fix crash in AST unparser when unparsing dict comprehension unpacking.
-Found by OSS Fuzz in :oss-fuzz:`489790200`.
+++ /dev/null
-In the free threading build, skip the stop-the-world pause when reassigning
-``__class__`` on a newly created object.
+++ /dev/null
-Make :meth:`!mmap.mmap.set_name` thread-safe on the :term:`free threaded <free
-threading>` build.
+++ /dev/null
-Fixed a memory leak in the :term:`free-threaded build` where mimalloc pages
-could become permanently unreclaimable until the owning thread exited.
+++ /dev/null
-Fix :exc:`SystemError` when ``__classdict__`` or
-``__conditional_annotations__`` is in a class-scope inlined comprehension.
-Found by OSS Fuzz in :oss-fuzz:`491105000`.
+++ /dev/null
-A new "Improve this page" link is available in the left-hand sidebar of the
-docs, offering links to create GitHub issues, discussion forum posts, or
-pull requests.
+++ /dev/null
-Document rest of full public :class:`importlib.metadata.Distribution` API. Also add the (already documented) :class:`~importlib.metadata.PackagePath` to ``__all__``.
+++ /dev/null
-Document missing public :class:`wave.Wave_write` getter methods.
+++ /dev/null
-:class:`mailbox.Mailbox` instances can now be used as a context manager.
-The Mailbox is locked on context entry and unlocked and closed at context exit.
+++ /dev/null
-Add support for user data of Tk virtual events and detail for
-``Enter``, ``Leave``, ``FocusIn``, ``FocusOut``, and
-``ConfigureRequest`` events to :mod:`tkinter`.
+++ /dev/null
-Re-enable :func:`os.posix_fallocate` and :func:`os.posix_fadvise` on AIX.
+++ /dev/null
-Fix :meth:`!unicodedata.ucd_3_2_0.numeric` for non-decimal values.
+++ /dev/null
-The :mod:`re` module gains a new :func:`re.prefixmatch` function as an
-explicit spelling of what has to date always been known as :func:`re.match`.
-:class:`re.Pattern` similary gains a :meth:`re.Pattern.prefixmatch` method.
-
-Why? Explicit is better than implicit. Other widely used languages all use
-the term "match" to mean what Python uses the term "search" for. The
-unadorened "match" name in Python has been a frequent case of confusion and
-coding bugs due to the inconsistency with the rest if the software industry.
-
-We do not plan to deprecate and remove the older ``match`` name.
+++ /dev/null
-Add support for Tangut Ideographs names in :mod:`unicodedata`.
+++ /dev/null
-Improve :exc:`TypeError` error message when :meth:`!weakref.WeakKeyDictionary.update`\r
-is used with keyword-only parameters.\r
+++ /dev/null
-Fix :mod:`sqlite3`'s :ref:`interactive shell <sqlite3-cli>` keeping part of
-previous commands when scrolling history.
+++ /dev/null
-Get rid of any possibility of a name conflict for named pipes in
-:mod:`multiprocessing` and :mod:`asyncio` on Windows, no matter how small.
+++ /dev/null
-Introduced :meth:`importlib.abc.MetaPathFinder.discover`
-and :meth:`importlib.abc.PathEntryFinder.discover` to allow module and submodule
-name discovery without assuming the use of traditional filesystem based imports.
+++ /dev/null
-Fix :meth:`asyncio.StreamWriter.start_tls` to transfer buffered data from
-:class:`~asyncio.StreamReader` to the SSL layer, preventing data loss when
-upgrading a connection to TLS mid-stream (e.g., when implementing PROXY
-protocol support).
+++ /dev/null
-Fix assertion failure in :mod:`sqlite3` blob subscript when slicing with\r
-indices that result in an empty slice.
+++ /dev/null
-:mod:`zoneinfo`: fix a crash when instantiating :class:`~zoneinfo.ZoneInfo`
-objects for which the internal class-level cache is inconsistent.
+++ /dev/null
-Fix :class:`ctypes.CDLL` to honor the ``handle`` parameter on POSIX systems.
+++ /dev/null
-Added :term:`path-like object` support for :func:`shutil.make_archive`.
+++ /dev/null
-:mod:`ssl`: fix reference leaks in :class:`ssl.SSLContext` objects. Patch by
-Bénédikt Tran.
+++ /dev/null
-Raise :exc:`TypeError` instead of :exc:`SystemError` when the *scheduler*
-in :func:`os.posix_spawn` or :func:`os.posix_spawnp` is not a tuple.
-Patch by Bénédikt Tran.
+++ /dev/null
-Allow *scheduler* and *setpgroup* arguments to be explicitly :const:`None`
-when calling :func:`os.posix_spawn` or :func:`os.posix_spawnp`. Patch by
-Bénédikt Tran.
+++ /dev/null
-Fix a crash in :func:`!_interpchannels.list_all` after closing a channel.
+++ /dev/null
-Fixed a crash in socket.sendmsg() that could occur if ancillary data is mutated re-entrantly during argument parsing.
+++ /dev/null
-Fix crash in ``_remote_debugging`` that caused ``test_external_inspection`` to intermittently fail. Patch by Taegyun Kim.
+++ /dev/null
-Attribute suggestions in :exc:`AttributeError` tracebacks are now formatted differently
-to make them easier to understand, for example: ``Did you mean '.datetime.now' instead of '.now'``.
-Contributed by Bartosz Sławecki.
+++ /dev/null
-Calling :func:`repr` on :func:`functools.partial` is now safer
-when the partial object's internal attributes are replaced while
-the string representation is being generated.
+++ /dev/null
-The functional syntax for creating :class:`typing.NamedTuple`
-classes now supports passing any :term:`iterable` of fields and types.
-Previously, only sequences were supported.
+++ /dev/null
-Methods directly decorated with :deco:`functools.singledispatchmethod` now
-dispatch on the second argument when called after being accessed as class
-attributes. Patch by Bartosz Sławecki.
+++ /dev/null
-Fixed a hang on Windows in the :mod:`tempfile` module when
-trying to create a temporary file or subdirectory in a non-writable
-directory.
+++ /dev/null
-Fix the folding of headers by the :mod:`email` library when :rfc:`2047` encoded words are used. Now whitespace is correctly preserved and also correctly added between adjacent encoded words. The latter property was broken by the fix for gh-92081, which mostly fixed previous failures to preserve whitespace.
+++ /dev/null
-Reduce the import time of :mod:`inspect` module by ~20%.
+++ /dev/null
-:func:`unicodedata.bidirectional` now return the correct default bidi class
-for unassigned code points.
+++ /dev/null
-Fix a race condition in :mod:`tracemalloc`: it no longer detaches the attached
-thread state to acquire its internal lock. Patch by Victor Stinner.
+++ /dev/null
-Fix :class:`argparse.ArgumentParser` to be :mod:`pickleable <pickle>`.
+++ /dev/null
-Add ``'%D'`` support to :meth:`~datetime.datetime.strptime`.
+++ /dev/null
-Fixed a use-after-free in :mod:`ssl` when ``SSL_new()`` returns NULL in
-``newPySSLSocket()``. The error was reported via a dangling pointer after the
-object had already been freed.
+++ /dev/null
-Added missing explanations for some parameters in :func:`glob.glob` and
-:func:`glob.iglob`.
+++ /dev/null
-The :mod:`json` module now supports the :class:`frozendict` type. Patch by
-Victor Stinner.
+++ /dev/null
-The :mod:`copy` module now supports the :class:`frozendict` type. Patch by\r
-Pieter Eendebak based on work by Victor Stinner.
+++ /dev/null
-Make :class:`collections.deque` copy atomic in the :term:`free-threaded build`.
+++ /dev/null
-Fix data races in :class:`io.IncrementalNewlineDecoder` in the :term:`free-threaded build`.
+++ /dev/null
-Fix a memory leak in :func:`atexit.register`.
-Patch by Shamil Abdulaev.
+++ /dev/null
-Fix :func:`unicodedata.decomposition` for Hangul characters.
+++ /dev/null
-Add valid import name suggestions on :exc:`ModuleNotFoundError`.
+++ /dev/null
-``ParameterizedMIMEHeader.params`` of :mod:`email.headerregistry` is now a
-:class:`frozendict` instead of a :class:`types.MappingProxyType`. Patch by
-Victor Stinner.
+++ /dev/null
-Add :exc:`ModuleNotFoundError` hints when a module for a different ABI
-exists.
+++ /dev/null
-:func:`dataclasses.field`: if *metadata* is ``None``, use an empty
-:class:`frozendict`, instead of a :func:`~types.MappingProxyType` of an
-empty :class:`dict`. Patch by Victor Stinner.
+++ /dev/null
-Add :data:`typing.TypeForm`, implementing :pep:`747`. Patch by Jelle
-Zijlstra.
+++ /dev/null
-Add :func:`unicodedata.block` function to return the `Unicode block
-<https://www.unicode.org/versions/Unicode17.0.0/core-spec/chapter-3/#G64189>`_ of a
-character.
+++ /dev/null
-Removed Windows 95 compatibility for :func:`locale.getdefaultlocale`.\r
+++ /dev/null
-Avoid undefined behaviour from signed integer overflow when parsing format
-strings in the :mod:`struct` module.
+++ /dev/null
-The ``version`` attribute of the :mod:`tarfile` module is deprecated and
-slated for removal in Python 3.20.
+++ /dev/null
-:mod:`hashlib`: fix a crash when the initialization of the underlying C
-extension module fails.
+++ /dev/null
-:mod:`hmac`: fix a crash when the initialization of the underlying C
-extension module fails.
+++ /dev/null
-Fix double free and null pointer dereference in unusual error scenarios
-in :mod:`hashlib` and :mod:`hmac` modules.
+++ /dev/null
-``os.listdir(-1)`` and ``os.scandir(-1)`` now fail with
-``OSError(errno.EBADF)`` rather than listing the current directory.
-``os.listxattr(-1)`` now fails with ``OSError(errno.EBADF)`` rather than
-listing extended attributes of the current directory. Patch by Victor
-Stinner.
+++ /dev/null
-:mod:`venv`: Prevent incorrect preservation of SELinux context
-when copying the ``Activate.ps1`` script. The script inherited
-the SELinux security context of the system template directory,
-rather than the destination project directory.
+++ /dev/null
-:mod:`marshal` now supports :class:`frozendict` objects. The marshal format
-version was increased to 6. Patch by Victor Stinner.
+++ /dev/null
-Fix InvalidStateError when cancelling process created by :func:`asyncio.create_subprocess_exec` or :func:`asyncio.create_subprocess_shell`. Patch by Daan De Meyer.
+++ /dev/null
-Fix crash in :mod:`struct` when calling :func:`repr` or
-``__sizeof__()`` on an uninitialized :class:`struct.Struct`
-object created via ``Struct.__new__()`` without calling ``__init__()``.
+++ /dev/null
-Disallow usage of control characters in status in :mod:`wsgiref.handlers` to prevent HTTP header injections.
-Patch by Benedikt Johannes.
+++ /dev/null
-Fixes :cve:`2026-2297` by ensuring that ``SourcelessFileLoader`` uses
-:func:`io.open_code` when opening ``.pyc`` files.
+++ /dev/null
-When Python was compiled with system expat older then 2.7.2 but tests run
-with newer expat, still skip
-:class:`!test.test_pyexpat.MemoryProtectionTest`.
+++ /dev/null
-Fix ``test_frame_pointer_unwind`` when Python is built with
-:option:`--enable-shared`. Classify also libpython frames as ``"python"``.
-Patch by Victor Stinner.
+++ /dev/null
-Updated bundled version of OpenSSL to 3.5.5.
+++ /dev/null
-Defers loading of the ``psapi.dll`` module until it is used by
-:func:`ctypes.util.dllist`.
+++ /dev/null
-Fix negative timestamp during DST on Windows. Patch by Hugo van Kemenade.
-This is Python version 3.15.0 alpha 6
+This is Python version 3.15.0 alpha 7
=====================================
.. image:: https://github.com/python/cpython/actions/workflows/build.yml/badge.svg?branch=main&event=push