For more information about the strict base64 check, see :func:`binascii.a2b_base64`
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added the *ignorechars* parameter.
- .. deprecated:: next
+ .. deprecated:: 3.15
Accepting the ``+`` and ``/`` characters with an alternative alphabet
is now deprecated.
``/`` in the standard Base64 alphabet, and return the decoded
:class:`bytes`.
- .. deprecated:: next
+ .. deprecated:: 3.15
Accepting the ``+`` and ``/`` characters is now deprecated.
.. versionchanged:: 3.11
Added the *strict_mode* parameter.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added the *ignorechars* parameter.
Invalid Ascii85 data will raise :exc:`binascii.Error`.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: b2a_ascii85(data, /, *, foldspaces=False, wrapcol=0, pad=False, adobe=False)
*adobe* controls whether the encoded byte sequence is framed with ``<~``
and ``~>``, which is used by the Adobe implementation.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: a2b_base85(string, /)
Invalid Base85 data will raise :exc:`binascii.Error`.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: b2a_base85(data, /, *, pad=False)
If *pad* is true, the input is padded with ``b'\0'`` so its length is a
multiple of 4 bytes before encoding.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: a2b_z85(string, /)
Invalid Z85 data will raise :exc:`binascii.Error`.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: b2a_z85(data, /, *, pad=False)
See `Z85 specification <https://rfc.zeromq.org/spec/32/>`_ for more information.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. function:: a2b_qp(data, header=False)
Raises :exc:`TypeError` instead of :exc:`AttributeError` if *cm*
is not a context manager.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added support for arbitrary descriptors :meth:`!__enter__` and
:meth:`!__exit__`.
The passed in object is returned from the function, allowing this
method to be used as a function decorator.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added support for arbitrary descriptors :meth:`!__exit__`.
.. method:: callback(callback, /, *args, **kwds)
Raises :exc:`TypeError` instead of :exc:`AttributeError` if *cm*
is not an asynchronous context manager.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added support for arbitrary descriptors :meth:`!__aenter__` and :meth:`!__aexit__`.
.. method:: push_async_exit(exit)
Similar to :meth:`ExitStack.push` but expects either an asynchronous context manager
or a coroutine function.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added support for arbitrary descriptors :meth:`!__aexit__`.
.. method:: push_async_callback(callback, /, *args, **kwds)
Add ``f_generator`` attribute to frames.
-.. versionchanged:: next
+.. versionchanged:: 3.15
Add ``gi_state`` attribute to generators, ``cr_state`` attribute to
coroutines, and ``ag_state`` attribute to async generators.
.. versionadded:: 3.4
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added the *on_error* parameter.
.. function:: set_start_method(method, force=False)
.. versionchanged:: 3.6
Accepts a :term:`path-like object`.
- .. deprecated:: next
+ .. deprecated:: 3.15
Deprecated in favor of :func:`os.path.commonpath` for path prefixes.
The :func:`os.path.commonprefix` function is being deprecated due to
having a misleading name and module. The function is not safe to use for
Return a tuple containing names of :term:`cell variables <closure variable>` in this table.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. class:: Class
Return ``True`` if the symbol is referenced but not assigned in a nested block.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. method:: is_free_class()
.. versionadded:: 3.11
The module was added with support for TOML 1.0.0.
-.. versionchanged:: next
+.. versionchanged:: 3.15
Added TOML 1.1.0 support.
See the :ref:`What's New <whatsnew315-tomllib-1-1-0>` for details.
.. versionchanged:: 3.12
Leading WHATWG C0 control and space characters are stripped from the URL.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added the *missing_as_none* parameter.
.. _WHATWG spec: https://url.spec.whatwg.org/#concept-basic-url-parser
By default, *keep_empty* is true if *parts* is the result of the
:func:`urlsplit` call with ``missing_as_none=True``.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added the *keep_empty* parameter.
By default, *keep_empty* is true if *parts* is the result of the
:func:`urlparse` call with ``missing_as_none=True``.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added the *keep_empty* parameter.
.. versionchanged:: 3.2
Result is a structured object rather than a simple 2-tuple.
- .. versionchanged:: next
+ .. versionchanged:: 3.15
Added the *missing_as_none* parameter.
.. function:: unwrap(url)
asynchronous functions. Outer comprehensions implicitly become
asynchronous.
-.. versionchanged:: next
+.. versionchanged:: 3.15
Unpacking with the ``*`` operator is now allowed in the expression.
the key. Starting with 3.8, the key is evaluated before the value, as
proposed by :pep:`572`.
-.. versionchanged:: next
+.. versionchanged:: 3.15
Unpacking with the ``**`` operator is now allowed in dictionary comprehensions.
.. _genexpr:
and kill the process. Only enable this in environments where the
huge-page pool is properly sized and fork-safety is not a concern.
- .. versionadded:: next
+ .. versionadded:: 3.15
.. envvar:: PYTHONLEGACYWINDOWSFSENCODING
#define PY_MINOR_VERSION 15
#define PY_MICRO_VERSION 0
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA
-#define PY_RELEASE_SERIAL 5
+#define PY_RELEASE_SERIAL 6
/* Version as a string */
-#define PY_VERSION "3.15.0a5+"
+#define PY_VERSION "3.15.0a6"
/*--end constants--*/
-# Autogenerated by Sphinx on Sun Oct 12 12:02:22 2025
+# Autogenerated by Sphinx on Wed Feb 11 14:22:57 2026
# as part of the release process.
module_docs = {
'bisect': 'bisect#module-bisect',
'builtins': 'builtins#module-builtins',
'bz2': 'bz2#module-bz2',
- 'cProfile': 'profile#module-cProfile',
'calendar': 'calendar#module-calendar',
'cgi': 'cgi#module-cgi',
'cgitb': 'cgitb#module-cgitb',
'mailcap': 'mailcap#module-mailcap',
'marshal': 'marshal#module-marshal',
'math': 'math#module-math',
+ 'math.integer': 'math.integer#module-math.integer',
'mimetypes': 'mimetypes#module-mimetypes',
'mmap': 'mmap#module-mmap',
'modulefinder': 'modulefinder#module-modulefinder',
'posix': 'posix#module-posix',
'pprint': 'pprint#module-pprint',
'profile': 'profile#module-profile',
- 'profiling.sampling': 'profile#module-profiling.sampling',
- 'pstats': 'profile#module-pstats',
+ 'profiling': 'profiling#module-profiling',
+ 'profiling.sampling': 'profiling.sampling#module-profiling.sampling',
+ 'profiling.tracing': 'profiling.tracing#module-profiling.tracing',
+ 'pstats': 'pstats#module-pstats',
'pty': 'pty#module-pty',
'pwd': 'pwd#module-pwd',
'py_compile': 'py_compile#module-py_compile',
-# Autogenerated by Sphinx on Wed Jan 14 16:41:25 2026
+# Autogenerated by Sphinx on Wed Feb 11 14:22:57 2026
# as part of the release process.
topics = {
| "[" [target_list] "]"
| attributeref
| subscription
- | slicing
| "*" target
-(See section Primaries for the syntax definitions for *attributeref*,
-*subscription*, and *slicing*.)
+(See section Primaries for the syntax definitions for *attributeref*
+and *subscription*.)
An assignment statement evaluates the expression list (remember that
this can be a single expression or a comma-separated list, the latter
Assignment is defined recursively depending on the form of the target
(list). When a target is part of a mutable object (an attribute
-reference, subscription or slicing), the mutable object must
-ultimately perform the assignment and decide about its validity, and
-may raise an exception if the assignment is unacceptable. The rules
-observed by various types and the exceptions raised are given with the
-definition of the object types (see section The standard type
-hierarchy).
+reference or subscription), the mutable object must ultimately perform
+the assignment and decide about its validity, and may raise an
+exception if the assignment is unacceptable. The rules observed by
+various types and the exceptions raised are given with the definition
+of the object types (see section The standard type hierarchy).
Assignment of an object to a target list, optionally enclosed in
parentheses or square brackets, is recursively defined as follows.
attributes, such as properties created with "property()".
* If the target is a subscription: The primary expression in the
- reference is evaluated. It should yield either a mutable sequence
- object (such as a list) or a mapping object (such as a dictionary).
- Next, the subscript expression is evaluated.
+ reference is evaluated. Next, the subscript expression is evaluated.
+ Then, the primary’s "__setitem__()" method is called with two
+ arguments: the subscript and the assigned object.
+
+ Typically, "__setitem__()" is defined on mutable sequence objects
+ (such as lists) and mapping objects (such as dictionaries), and
+ behaves as follows.
If the primary is a mutable sequence object (such as a list), the
subscript must yield an integer. If it is negative, the sequence’s
existing key/value pair with the same key value, or insert a new
key/value pair (if no key with the same value existed).
- For user-defined objects, the "__setitem__()" method is called with
- appropriate arguments.
-
-* If the target is a slicing: The primary expression in the reference
- is evaluated. It should yield a mutable sequence object (such as a
- list). The assigned object should be a sequence object of the same
- type. Next, the lower and upper bound expressions are evaluated,
- insofar they are present; defaults are zero and the sequence’s
- length. The bounds should evaluate to integers. If either bound is
- negative, the sequence’s length is added to it. The resulting
- bounds are clipped to lie between zero and the sequence’s length,
- inclusive. Finally, the sequence object is asked to replace the
- slice with the items of the assigned sequence. The length of the
- slice may be different from the length of the assigned sequence,
- thus changing the length of the target sequence, if the target
- sequence allows it.
-
-**CPython implementation detail:** In the current implementation, the
-syntax for targets is taken to be the same as for expressions, and
-invalid syntax is rejected during the code generation phase, causing
-less detailed error messages.
+ If the target is a slicing: The primary expression should evaluate
+ to a mutable sequence object (such as a list). The assigned object
+ should be *iterable*. The slicing’s lower and upper bounds should be
+ integers; if they are "None" (or not present), the defaults are zero
+ and the sequence’s length. If either bound is negative, the
+ sequence’s length is added to it. The resulting bounds are clipped
+ to lie between zero and the sequence’s length, inclusive. Finally,
+ the sequence object is asked to replace the slice with the items of
+ the assigned sequence. The length of the slice may be different
+ from the length of the assigned sequence, thus changing the length
+ of the target sequence, if the target sequence allows it.
Although the definition of assignment implies that overlaps between
the left-hand side and the right-hand side are ‘simultaneous’ (for
binary operation and an assignment statement:
augmented_assignment_stmt: augtarget augop (expression_list | yield_expression)
- augtarget: identifier | attributeref | subscription | slicing
+ augtarget: identifier | attributeref | subscription
augop: "+=" | "-=" | "*=" | "@=" | "/=" | "//=" | "%=" | "**="
| ">>=" | "<<=" | "&=" | "^=" | "|="
binary operation and an assignment statement:
augmented_assignment_stmt: augtarget augop (expression_list | yield_expression)
- augtarget: identifier | attributeref | subscription | slicing
+ augtarget: identifier | attributeref | subscription
augop: "+=" | "-=" | "*=" | "@=" | "/=" | "//=" | "%=" | "**="
| ">>=" | "<<=" | "&=" | "^=" | "|="
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
+Deletion of attribute references and subscriptions is passed to the
+primary object involved; deletion of a slicing is in general
equivalent to assignment of an empty slice of the right type (but even
this is determined by the sliced object).
dict_display: "{" [dict_item_list | dict_comprehension] "}"
dict_item_list: dict_item ("," dict_item)* [","]
+ dict_comprehension: dict_item comp_for
dict_item: expression ":" expression | "**" or_expr
- dict_comprehension: expression ":" expression comp_for
A dictionary display yields a new dictionary object.
Added in version 3.5: Unpacking into dictionary displays, originally
proposed by **PEP 448**.
-A dict comprehension, in contrast to list and set comprehensions,
-needs two expressions separated with a colon followed by the usual
-“for” and “if” clauses. When the comprehension is run, the resulting
-key and value elements are inserted in the new dictionary in the order
-they are produced.
+A dict comprehension may take one of two forms:
+
+* The first form uses two expressions separated with a colon followed
+ by the usual “for” and “if” clauses. When the comprehension is run,
+ the resulting key and value elements are inserted in the new
+ dictionary in the order they are produced.
+
+* The second form uses a single expression prefixed by the "**"
+ dictionary unpacking operator followed by the usual “for” and “if”
+ clauses. When the comprehension is evaluated, the expression is
+ evaluated and then unpacked, inserting zero or more key/value pairs
+ into the new dictionary.
+
+Both forms of dictionary comprehension retain the property that if the
+same key is specified multiple times, the associated value in the
+resulting dictionary will be the last one specified.
Restrictions on the types of the key values are listed earlier in
section The standard type hierarchy. (To summarize, the key type
the evaluation order of key and value was not well-defined. In
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.
''',
'dynamic-features': r'''Interaction with dynamic features
*********************************
The *public names* defined by a module are determined by checking the
module’s namespace for a variable named "__all__"; if defined, it must
be a sequence of strings which are names defined or imported by that
-module. The names given in "__all__" are all considered public and
+module. Names containing non-ASCII characters must be in the
+normalization form NFKC; see Non-ASCII characters in names for
+details. The names given in "__all__" are all considered public and
are required to exist. If "__all__" is not defined, the set of public
names includes all names found in the module’s namespace which do not
begin with an underscore character ("'_'"). "__all__" should contain
| value...}", "{expressions...}" | list display, dictionary display, set |
| | display |
+-------------------------------------------------+---------------------------------------+
-| "x[index]", "x[index:index]", | Subscription, slicing, call, |
-| "x(arguments...)", "x.attribute" | attribute reference |
+| "x[index]", "x[index:index]" "x(arguments...)", | Subscription (including slicing), |
+| "x.attribute" | call, attribute reference |
+-------------------------------------------------+---------------------------------------+
| "await x" | Await expression |
+-------------------------------------------------+---------------------------------------+
and so forth. Missing slice items are always filled in with "None".
-object.__getitem__(self, key)
+object.__getitem__(self, subscript)
+
+ Called to implement *subscription*, that is, "self[subscript]". See
+ Subscriptions and slicings for details on the syntax.
- Called to implement evaluation of "self[key]". For *sequence*
- types, the accepted keys should be integers. Optionally, they may
- support "slice" objects as well. Negative index support is also
- optional. If *key* is of an inappropriate type, "TypeError" may be
- raised; if *key* is a value outside the set of indexes for the
- sequence (after any special interpretation of negative values),
- "IndexError" should be raised. For *mapping* types, if *key* is
- missing (not in the container), "KeyError" should be raised.
+ There are two types of built-in objects that support subscription
+ via "__getitem__()":
+
+ * **sequences**, where *subscript* (also called *index*) should be
+ an integer or a "slice" object. See the sequence documentation
+ for the expected behavior, including handling "slice" objects and
+ negative indices.
+
+ * **mappings**, where *subscript* is also called the *key*. See
+ mapping documentation for the expected behavior.
+
+ If *subscript* is of an inappropriate type, "__getitem__()" should
+ raise "TypeError". If *subscript* has an inappropriate value,
+ "__getitem__()" should raise an "LookupError" or one of its
+ subclasses ("IndexError" for sequences; "KeyError" for mappings).
Note:
- "for" loops expect that an "IndexError" will be raised for
- illegal indexes to allow proper detection of the end of the
- sequence.
+ The sequence iteration protocol (used, for example, in "for"
+ loops), expects that an "IndexError" will be raised for illegal
+ indexes to allow proper detection of the end of a sequence.
Note:
'slicings': r'''Slicings
********
-A slicing selects a range of items in a sequence object (e.g., a
-string, tuple or list). Slicings may be used as expressions or as
-targets in assignment or "del" statements. The syntax for a slicing:
-
- slicing: primary "[" slice_list "]"
- slice_list: slice_item ("," slice_item)* [","]
- slice_item: expression | proper_slice
- proper_slice: [lower_bound] ":" [upper_bound] [ ":" [stride] ]
- lower_bound: expression
- upper_bound: expression
- stride: expression
-
-There is ambiguity in the formal syntax here: anything that looks like
-an expression list also looks like a slice list, so any subscription
-can be interpreted as a slicing. Rather than further complicating the
-syntax, this is disambiguated by defining that in this case the
-interpretation as a subscription takes priority over the
-interpretation as a slicing (this is the case if the slice list
-contains no proper slice).
-
-The semantics for a slicing are as follows. The primary is indexed
-(using the same "__getitem__()" method as normal subscription) with a
-key that is constructed from the slice list, as follows. If the slice
-list contains at least one comma, the key is a tuple containing the
-conversion of the slice items; otherwise, the conversion of the lone
-slice item is the key. The conversion of a slice item that is an
-expression is that expression. The conversion of a proper slice is a
-slice object (see section The standard type hierarchy) whose "start",
-"stop" and "step" attributes are the values of the expressions given
-as lower bound, upper bound and stride, respectively, substituting
-"None" for missing expressions.
+A more advanced form of subscription, *slicing*, is commonly used to
+extract a portion of a sequence. In this form, the subscript is a
+*slice*: up to three expressions separated by colons. Any of the
+expressions may be omitted, but a slice must contain at least one
+colon:
+
+ >>> number_names = ['zero', 'one', 'two', 'three', 'four', 'five']
+ >>> number_names[1:3]
+ ['one', 'two']
+ >>> number_names[1:]
+ ['one', 'two', 'three', 'four', 'five']
+ >>> number_names[:3]
+ ['zero', 'one', 'two']
+ >>> number_names[:]
+ ['zero', 'one', 'two', 'three', 'four', 'five']
+ >>> number_names[::2]
+ ['zero', 'two', 'four']
+ >>> number_names[:-3]
+ ['zero', 'one', 'two']
+ >>> del number_names[4:]
+ >>> number_names
+ ['zero', 'one', 'two', 'three']
+
+When a slice is evaluated, the interpreter constructs a "slice" object
+whose "start", "stop" and "step" attributes, respectively, are the
+results of the expressions between the colons. Any missing expression
+evaluates to "None". This "slice" object is then passed to the
+"__getitem__()" or "__class_getitem__()" *special method*, as above.
+
+ # continuing with the SubscriptionDemo instance defined above:
+ >>> demo[2:3]
+ subscripted with: slice(2, 3, None)
+ >>> demo[::'spam']
+ subscripted with: slice(None, None, 'spam')
''',
'specialattrs': r'''Special Attributes
******************
and so forth. Missing slice items are always filled in with "None".
-object.__getitem__(self, key)
+object.__getitem__(self, subscript)
+
+ Called to implement *subscription*, that is, "self[subscript]". See
+ Subscriptions and slicings for details on the syntax.
+
+ There are two types of built-in objects that support subscription
+ via "__getitem__()":
- Called to implement evaluation of "self[key]". For *sequence*
- types, the accepted keys should be integers. Optionally, they may
- support "slice" objects as well. Negative index support is also
- optional. If *key* is of an inappropriate type, "TypeError" may be
- raised; if *key* is a value outside the set of indexes for the
- sequence (after any special interpretation of negative values),
- "IndexError" should be raised. For *mapping* types, if *key* is
- missing (not in the container), "KeyError" should be raised.
+ * **sequences**, where *subscript* (also called *index*) should be
+ an integer or a "slice" object. See the sequence documentation
+ for the expected behavior, including handling "slice" objects and
+ negative indices.
+
+ * **mappings**, where *subscript* is also called the *key*. See
+ mapping documentation for the expected behavior.
+
+ If *subscript* is of an inappropriate type, "__getitem__()" should
+ raise "TypeError". If *subscript* has an inappropriate value,
+ "__getitem__()" should raise an "LookupError" or one of its
+ subclasses ("IndexError" for sequences; "KeyError" for mappings).
Note:
- "for" loops expect that an "IndexError" will be raised for
- illegal indexes to allow proper detection of the end of the
- sequence.
+ The sequence iteration protocol (used, for example, in "for"
+ loops), expects that an "IndexError" will be raised for illegal
+ indexes to allow proper detection of the end of a sequence.
Note:
Like "find()", but raise "ValueError" when the substring is not
found. For example:
+ >>> 'spam, spam, spam'.index('spam')
+ 0
>>> 'spam, spam, spam'.index('eggs')
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
there is at least one character, "False" otherwise. A character
"c" is alphanumeric if one of the following returns "True":
"c.isalpha()", "c.isdecimal()", "c.isdigit()", or "c.isnumeric()".
+ For example:
+
+ .. doctest::
+
+ >>> 'abc123'.isalnum()
+ True
+ >>> 'abc123!@#'.isalnum()
+ False
+ >>> ''.isalnum()
+ False
+ >>> ' '.isalnum()
+ False
str.isalpha()
found, return a 3-tuple containing the string itself, followed by
two empty strings.
+ For example:
+
+ >>> 'Monty Python'.partition(' ')
+ ('Monty', ' ', 'Python')
+ >>> "Monty Python's Flying Circus".partition(' ')
+ ('Monty', ' ', "Python's Flying Circus")
+ >>> 'Monty Python'.partition('-')
+ ('Monty Python', '', '')
+
+ See also "rpartition()".
+
str.removeprefix(prefix, /)
If the string starts with the *prefix* string, return
str.rindex(sub[, start[, end]])
Like "rfind()" but raises "ValueError" when the substring *sub* is
- not found.
+ not found. For example:
+
+ >>> 'spam, spam, spam'.rindex('spam')
+ 12
+ >>> 'spam, spam, spam'.rindex('eggs')
+ Traceback (most recent call last):
+ File "<stdin-0>", line 1, in <module>
+ 'spam, spam, spam'.rindex('eggs')
+ ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
+ ValueError: substring not found
+
+ See also "index()" and "find()".
str.rjust(width, fillchar=' ', /)
found, return a 3-tuple containing two empty strings, followed by
the string itself.
+ For example:
+
+ >>> 'Monty Python'.rpartition(' ')
+ ('Monty', ' ', 'Python')
+ >>> "Monty Python's Flying Circus".rpartition(' ')
+ ("Monty Python's Flying", ' ', 'Circus')
+ >>> 'Monty Python'.rpartition('-')
+ ('', '', 'Monty Python')
+
+ See also "partition()".
+
str.rsplit(sep=None, maxsplit=-1)
Return a list of the words in the string, using *sep* as the
*chars* argument is a string specifying the set of characters to be
removed. If omitted or "None", the *chars* argument defaults to
removing whitespace. The *chars* argument is not a suffix; rather,
- all combinations of its values are stripped:
+ all combinations of its values are stripped. For example:
>>> ' spacious '.rstrip()
' spacious'
>>> 'mississippi'.rstrip('ipz')
'mississ'
- See "str.removesuffix()" for a method that will remove a single
- suffix string rather than all of a set of characters. For example:
+ See "removesuffix()" for a method that will remove a single suffix
+ string rather than all of a set of characters. For example:
>>> 'Monty Python'.rstrip(' Python')
'M'
>>> 'Monty Python'.removesuffix(' Python')
'Monty'
+ See also "strip()".
+
str.split(sep=None, maxsplit=-1)
Return a list of the words in the string, using *sep* as the
With optional *start*, test string beginning at that position.
With optional *end*, stop comparing string at that position.
+ For example:
+
+ >>> 'Python'.startswith('Py')
+ True
+ >>> 'a tuple of prefixes'.startswith(('at', 'a'))
+ True
+ >>> 'Python is amazing'.startswith('is', 7)
+ True
+
+ See also "endswith()" and "removeprefix()".
+
str.strip(chars=None, /)
Return a copy of the string with the leading and trailing
set of characters to be removed. If omitted or "None", the *chars*
argument defaults to removing whitespace. The *chars* argument is
not a prefix or suffix; rather, all combinations of its values are
- stripped:
+ stripped.
+
+ For example:
>>> ' spacious '.strip()
'spacious'
stripped from the string. Characters are removed from the leading
end until reaching a string character that is not contained in the
set of characters in *chars*. A similar action takes place on the
- trailing end. For example:
+ trailing end.
+
+ For example:
>>> comment_string = '#....... Section 3.2.1 Issue #32 .......'
>>> comment_string.strip('.#! ')
'Section 3.2.1 Issue #32'
+ See also "rstrip()".
+
str.swapcase()
Return a copy of the string with uppercase characters converted to
You can use "str.maketrans()" to create a translation map from
character-to-character mappings in different formats.
+ The following example uses a mapping to replace "'a'" with "'X'",
+ "'b'" with "'Y'", and delete "'c'":
+
+ >>> 'abc123'.translate({ord('a'): 'X', ord('b'): 'Y', ord('c'): None})
+ 'XY123'
+
See also the "codecs" module for a more flexible approach to custom
character mappings.
<rest of the t-string grammar is omitted; see above>
''',
- 'subscriptions': r'''Subscriptions
-*************
+ 'subscriptions': r'''Subscriptions and slicings
+**************************
+
+The *subscription* syntax is usually used for selecting an element
+from a container – for example, to get a value from a "dict":
+
+ >>> digits_by_name = {'one': 1, 'two': 2}
+ >>> digits_by_name['two'] # Subscripting a dictionary using the key 'two'
+ 2
+
+In the subscription syntax, the object being subscribed – a primary –
+is followed by a *subscript* in square brackets. In the simplest case,
+the subscript is a single expression.
-The subscription of an instance of a container class will generally
-select an element from the container. The subscription of a *generic
-class* will generally return a GenericAlias object.
+Depending on the type of the object being subscribed, the subscript is
+sometimes called a *key* (for mappings), *index* (for sequences), or
+*type argument* (for *generic types*). Syntactically, these are all
+equivalent:
- subscription: primary "[" flexible_expression_list "]"
+ >>> colors = ['red', 'blue', 'green', 'black']
+ >>> colors[3] # Subscripting a list using the index 3
+ 'black'
-When an object is subscripted, the interpreter will evaluate the
-primary and the expression list.
+ >>> list[str] # Parameterizing the list type using the type argument str
+ list[str]
-The primary must evaluate to an object that supports subscription. An
-object may support subscription through defining one or both of
-"__getitem__()" and "__class_getitem__()". When the primary is
-subscripted, the evaluated result of the expression list will be
-passed to one of these methods. For more details on when
-"__class_getitem__" is called instead of "__getitem__", see
+At runtime, the interpreter will evaluate the primary and the
+subscript, and call the primary’s "__getitem__()" or
+"__class_getitem__()" *special method* with the subscript as argument.
+For more details on which of these methods is called, see
__class_getitem__ versus __getitem__.
-If the expression list contains at least one comma, or if any of the
-expressions are starred, the expression list will evaluate to a
-"tuple" containing the items of the expression list. Otherwise, the
-expression list will evaluate to the value of the list’s sole member.
-
-Changed in version 3.11: Expressions in an expression list may be
-starred. See **PEP 646**.
-
-For built-in objects, there are two types of objects that support
-subscription via "__getitem__()":
-
-1. Mappings. If the primary is a *mapping*, the expression list must
- evaluate to an object whose value is one of the keys of the
- mapping, and the subscription selects the value in the mapping that
- corresponds to that key. An example of a builtin mapping class is
- the "dict" class.
-
-2. Sequences. If the primary is a *sequence*, the expression list must
- evaluate to an "int" or a "slice" (as discussed in the following
- section). Examples of builtin sequence classes include the "str",
- "list" and "tuple" classes.
-
-The formal syntax makes no special provision for negative indices in
-*sequences*. However, built-in sequences all provide a "__getitem__()"
-method that interprets negative indices by adding the length of the
-sequence to the index so that, for example, "x[-1]" selects the last
-item of "x". The resulting value must be a nonnegative integer less
-than the number of items in the sequence, and the subscription selects
-the item whose index is that value (counting from zero). Since the
-support for negative indices and slicing occurs in the object’s
-"__getitem__()" method, subclasses overriding this method will need to
-explicitly add that support.
-
-A "string" is a special kind of sequence whose items are *characters*.
-A character is not a separate data type but a string of exactly one
-character.
+To show how subscription works, we can define a custom object that
+implements "__getitem__()" and prints out the value of the subscript:
+
+ >>> class SubscriptionDemo:
+ ... def __getitem__(self, key):
+ ... print(f'subscripted with: {key!r}')
+ ...
+ >>> demo = SubscriptionDemo()
+ >>> demo[1]
+ subscripted with: 1
+ >>> demo['a' * 3]
+ subscripted with: 'aaa'
+
+See "__getitem__()" documentation for how built-in types handle
+subscription.
+
+Subscriptions may also be used as targets in assignment or deletion
+statements. In these cases, the interpreter will call the subscripted
+object’s "__setitem__()" or "__delitem__()" *special method*,
+respectively, instead of "__getitem__()".
+
+ >>> colors = ['red', 'blue', 'green', 'black']
+ >>> colors[3] = 'white' # Setting item at index
+ >>> colors
+ ['red', 'blue', 'green', 'white']
+ >>> del colors[3] # Deleting item at index 3
+ >>> colors
+ ['red', 'blue', 'green']
+
+All advanced forms of *subscript* documented in the following sections
+are also usable for assignment and deletion.
+
+
+Slicings
+========
+
+A more advanced form of subscription, *slicing*, is commonly used to
+extract a portion of a sequence. In this form, the subscript is a
+*slice*: up to three expressions separated by colons. Any of the
+expressions may be omitted, but a slice must contain at least one
+colon:
+
+ >>> number_names = ['zero', 'one', 'two', 'three', 'four', 'five']
+ >>> number_names[1:3]
+ ['one', 'two']
+ >>> number_names[1:]
+ ['one', 'two', 'three', 'four', 'five']
+ >>> number_names[:3]
+ ['zero', 'one', 'two']
+ >>> number_names[:]
+ ['zero', 'one', 'two', 'three', 'four', 'five']
+ >>> number_names[::2]
+ ['zero', 'two', 'four']
+ >>> number_names[:-3]
+ ['zero', 'one', 'two']
+ >>> del number_names[4:]
+ >>> number_names
+ ['zero', 'one', 'two', 'three']
+
+When a slice is evaluated, the interpreter constructs a "slice" object
+whose "start", "stop" and "step" attributes, respectively, are the
+results of the expressions between the colons. Any missing expression
+evaluates to "None". This "slice" object is then passed to the
+"__getitem__()" or "__class_getitem__()" *special method*, as above.
+
+ # continuing with the SubscriptionDemo instance defined above:
+ >>> demo[2:3]
+ subscripted with: slice(2, 3, None)
+ >>> demo[::'spam']
+ subscripted with: slice(None, None, 'spam')
+
+
+Comma-separated subscripts
+==========================
+
+The subscript can also be given as two or more comma-separated
+expressions or slices:
+
+ # continuing with the SubscriptionDemo instance defined above:
+ >>> demo[1, 2, 3]
+ subscripted with: (1, 2, 3)
+ >>> demo[1:2, 3]
+ subscripted with: (slice(1, 2, None), 3)
+
+This form is commonly used with numerical libraries for slicing multi-
+dimensional data. In this case, the interpreter constructs a "tuple"
+of the results of the expressions or slices, and passes this tuple to
+the "__getitem__()" or "__class_getitem__()" *special method*, as
+above.
+
+The subscript may also be given as a single expression or slice
+followed by a comma, to specify a one-element tuple:
+
+ >>> demo['spam',]
+ subscripted with: ('spam',)
+
+
+“Starred” subscriptions
+=======================
+
+Added in version 3.11: Expressions in *tuple_slices* may be starred.
+See **PEP 646**.
+
+The subscript can also contain a starred expression. In this case, the
+interpreter unpacks the result into a tuple, and passes this tuple to
+"__getitem__()" or "__class_getitem__()":
+
+ # continuing with the SubscriptionDemo instance defined above:
+ >>> demo[*range(10)]
+ subscripted with: (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
+
+Starred expressions may be combined with comma-separated expressions
+and slices:
+
+ >>> demo['a', 'b', *range(3), 'c']
+ subscripted with: ('a', 'b', 0, 1, 2, 'c')
+
+
+Formal subscription grammar
+===========================
+
+ subscription: primary '[' subscript ']'
+ subscript: single_subscript | tuple_subscript
+ single_subscript: proper_slice | assignment_expression
+ proper_slice: [expression] ":" [expression] [ ":" [expression] ]
+ tuple_subscript: ','.(single_subscript | starred_expression)+ [',']
+
+Recall that the "|" operator denotes ordered choice. Specifically, in
+"subscript", if both alternatives would match, the first
+("single_subscript") has priority.
''',
'truth': r'''Truth Value Testing
*******************
"a[-2]" equals "a[n-2]", the second to last item of sequence a with
length "n".
-Sequences also support slicing: "a[i:j]" selects all items with index
-*k* such that *i* "<=" *k* "<" *j*. When used as an expression, a
-slice is a sequence of the same type. The comment above about negative
-indexes also applies to negative slice positions.
+The resulting value must be a nonnegative integer less than the number
+of items in the sequence. If it is not, an "IndexError" is raised.
+
+Sequences also support slicing: "a[start:stop]" selects all items with
+index *k* such that *start* "<=" *k* "<" *stop*. When used as an
+expression, a slice is a sequence of the same type. The comment above
+about negative subscripts also applies to negative slice positions.
+Note that no error is raised if a slice position is less than zero or
+larger than the length of the sequence.
+
+If *start* is missing or "None", slicing behaves as if *start* was
+zero. If *stop* is missing or "None", slicing behaves as if *stop* was
+equal to the length of the sequence.
Some sequences also support “extended slicing” with a third “step”
parameter: "a[i:j:k]" selects all items of *a* with index *x* where "x
The following types are immutable sequences:
Strings
- A string is a sequence of values that represent Unicode code
- points. All the code points in the range "U+0000 - U+10FFFF" can be
- represented in a string. Python doesn’t have a char type; instead,
- every code point in the string is represented as a string object
- with length "1". The built-in function "ord()" converts a code
- point from its string form to an integer in the range "0 - 10FFFF";
- "chr()" converts an integer in the range "0 - 10FFFF" to the
- corresponding length "1" string object. "str.encode()" can be used
- to convert a "str" to "bytes" using the given text encoding, and
+ A string ("str") is a sequence of values that represent
+ *characters*, or more formally, *Unicode code points*. All the code
+ points in the range "0" to "0x10FFFF" can be represented in a
+ string.
+
+ Python doesn’t have a dedicated *character* type. Instead, every
+ code point in the string is represented as a string object with
+ length "1".
+
+ The built-in function "ord()" converts a code point from its string
+ form to an integer in the range "0" to "0x10FFFF"; "chr()" converts
+ an integer in the range "0" to "0x10FFFF" to the corresponding
+ length "1" string object. "str.encode()" can be used to convert a
+ "str" to "bytes" using the given text encoding, and
"bytes.decode()" can be used to achieve the opposite.
Tuples
- The items of a tuple are arbitrary Python objects. Tuples of two or
- more items are formed by comma-separated lists of expressions. A
- tuple of one item (a ‘singleton’) can be formed by affixing a comma
- to an expression (an expression by itself does not create a tuple,
- since parentheses must be usable for grouping of expressions). An
- empty tuple can be formed by an empty pair of parentheses.
+ The items of a "tuple" are arbitrary Python objects. Tuples of two
+ or more items are formed by comma-separated lists of expressions.
+ A tuple of one item (a ‘singleton’) can be formed by affixing a
+ comma to an expression (an expression by itself does not create a
+ tuple, since parentheses must be usable for grouping of
+ expressions). An empty tuple can be formed by an empty pair of
+ parentheses.
Bytes
- A bytes object is an immutable array. The items are 8-bit bytes,
+ A "bytes" object is an immutable array. The items are 8-bit bytes,
represented by integers in the range 0 <= x < 256. Bytes literals
(like "b'abc'") and the built-in "bytes()" constructor can be used
to create bytes objects. Also, bytes objects can be decoded to
+----------------------------------------------------+----------------------------------------------------+
| Attribute | Meaning |
|====================================================|====================================================|
+| function.__builtins__ | A reference to the "dictionary" that holds the |
+| | function’s builtins namespace. Added in version |
+| | 3.10. |
++----------------------------------------------------+----------------------------------------------------+
| function.__globals__ | A reference to the "dictionary" that holds the |
| | function’s global variables – the global namespace |
| | of the module in which the function was defined. |
--- /dev/null
+.. date: 2026-02-10-08-00-17
+.. gh-issue: 144648
+.. nonce: KEuUXp
+.. release date: 2026-02-11
+.. section: macOS
+
+Allowed _remote_debugging to build on more OS versions by using
+proc_listpids() rather than proc_listallpids().
+
+..
+
+.. date: 2026-02-09-23-01-49
+.. gh-issue: 124111
+.. nonce: WmQG7S
+.. section: macOS
+
+Update macOS installer to use Tcl/Tk 9.0.3.
+
+..
+
+.. date: 2026-02-09-22-43-47
+.. gh-issue: 144551
+.. nonce: VOfgfD
+.. section: macOS
+
+Update macOS installer to use OpenSSL 3.5.5.
+
+..
+
+.. date: 2026-01-05-21-36-58
+.. gh-issue: 80620
+.. nonce: p1bD58
+.. section: Windows
+
+Support negative timestamps in :func:`time.gmtime`, :func:`time.localtime`,
+and various :mod:`datetime` functions.
+
+..
+
+.. date: 2026-02-03-07-57-24
+.. gh-issue: 144415
+.. nonce: U3L15r
+.. section: Tests
+
+The Android testbed now distinguishes between stdout/stderr messages which
+were triggered by a newline, and those triggered by a manual call to
+``flush``. This fixes logging of progress indicators and similar content.
+
+..
+
+.. date: 2026-01-08-16-56-59
+.. gh-issue: 65784
+.. nonce: aKNo1U
+.. section: Tests
+
+Add support for parametrized resource ``wantobjects`` in regrtests, which
+allows to run Tkinter tests with the specified value of
+:data:`!tkinter.wantobjects`, for example ``-u wantobjects=0``.
+
+..
+
+.. date: 2026-01-21-12-34-05
+.. gh-issue: 144125
+.. nonce: TAz5uo
+.. section: Security
+
+:mod:`~email.generator.BytesGenerator` will now refuse to serialize (write)
+headers that are unsafely folded or delimited; see
+:attr:`~email.policy.Policy.verify_generated_headers`. (Contributed by Bas
+Bloemsaat and Petr Viktorin in :gh:`121650`).
+
+..
+
+.. date: 2026-01-16-14-40-31
+.. gh-issue: 143935
+.. nonce: U2YtKl
+.. section: Security
+
+Fixed a bug in the folding of comments when flattening an email message
+using a modern email policy. Comments consisting of a very long sequence of
+non-foldable characters could trigger a forced line wrap that omitted the
+required leading space on the continuation line, causing the remainder of
+the comment to be interpreted as a new header field. This enabled header
+injection with carefully crafted inputs.
+
+..
+
+.. date: 2026-01-16-11-51-19
+.. gh-issue: 143925
+.. nonce: mrtcHW
+.. section: Security
+
+Reject control characters in ``data:`` URL media types.
+
+..
+
+.. date: 2026-01-16-11-43-47
+.. gh-issue: 143923
+.. nonce: DuytMe
+.. section: Security
+
+Reject control characters in POP3 commands.
+
+..
+
+.. date: 2026-01-16-11-41-06
+.. gh-issue: 143921
+.. nonce: AeCOor
+.. section: Security
+
+Reject control characters in IMAP commands.
+
+..
+
+.. date: 2026-01-16-11-13-15
+.. gh-issue: 143919
+.. nonce: kchwZV
+.. section: Security
+
+Reject control characters in :class:`http.cookies.Morsel` fields and values.
+
+..
+
+.. date: 2026-01-16-11-07-36
+.. gh-issue: 143916
+.. nonce: dpWeOD
+.. section: Security
+
+Reject C0 control characters within wsgiref.headers.Headers fields, values,
+and parameters.
+
+..
+
+.. date: 2026-02-06-23-58-54
+.. gh-issue: 144538
+.. nonce: 5_OvGv
+.. section: Library
+
+Bump the version of pip bundled in ensurepip to version 26.0.1
+
+..
+
+.. date: 2026-02-05-17-15-31
+.. gh-issue: 144493
+.. nonce: XuxwVu
+.. section: Library
+
+Improve an exception error message in ``_overlapped.BindLocal()`` that is
+raised when :meth:`asyncio.loop.sock_connect` is called on a
+:class:`asyncio.ProactorEventLoop` with a socket that has an invalid address
+family.
+
+..
+
+.. date: 2026-02-03-14-16-49
+.. gh-issue: 144386
+.. nonce: 9Wa59r
+.. section: Library
+
+Add support for arbitrary descriptors :meth:`!__enter__`, :meth:`!__exit__`,
+:meth:`!__aenter__`, and :meth:`!__aexit__` in :class:`contextlib.ExitStack`
+and :class:`contextlib.AsyncExitStack`, for consistency with the
+:keyword:`with` and :keyword:`async with` statements.
+
+..
+
+.. date: 2026-02-03-08-50-58
+.. gh-issue: 123471
+.. nonce: yF1Gym
+.. section: Library
+
+Make concurrent iteration over
+:class:`itertools.combinations_with_replacement` and
+:class:`itertools.permutations` safe under free-threading.
+
+..
+
+.. date: 2026-02-02-12-09-38
+.. gh-issue: 74453
+.. nonce: 19h4Z5
+.. section: Library
+
+Deprecate :func:`os.path.commonprefix` in favor of
+:func:`os.path.commonpath` for path segment prefixes.
+
+The :func:`os.path.commonprefix` function is being deprecated due to having
+a misleading name and module. The function is not safe to use for path
+prefixes despite being included in a module about path manipulation, meaning
+it is easy to accidentally introduce path traversal vulnerabilities into
+Python programs by using this function.
+
+..
+
+.. date: 2026-02-01-15-25-00
+.. gh-issue: 144380
+.. nonce: U7py_s
+.. section: Library
+
+Improve performance of :class:`io.BufferedReader` line iteration by ~49%.
+
+..
+
+.. date: 2026-01-31-17-15-49
+.. gh-issue: 144363
+.. nonce: X9f0sU
+.. section: Library
+
+Update bundled `libexpat <https://libexpat.github.io/>`_ to 2.7.4
+
+..
+
+.. date: 2026-01-30-13-23-06
+.. gh-issue: 140824
+.. nonce: J1OCrC
+.. section: Library
+
+When :mod:`faulthandler` dumps the list of third-party extension modules,
+ignore sub-modules of stdlib packages. Patch by Victor Stinner.
+
+..
+
+.. date: 2026-01-27-14-23-10
+.. gh-issue: 144206
+.. nonce: l0un4U
+.. section: Library
+
+Improve error messages for buffer overflow in :func:`fcntl.fcntl` and
+:func:`fcntl.ioctl`.
+
+..
+
+.. date: 2026-01-27-10-02-04
+.. gh-issue: 144264
+.. nonce: Wmzbol
+.. section: Library
+
+Speed up Base64 decoding of data containing ignored characters (both in
+non-strict mode and with an explicit *ignorechars* argument). It is now up
+to 2 times faster for multiline Base64 data.
+
+..
+
+.. date: 2026-01-27-09-58-52
+.. gh-issue: 144249
+.. nonce: mCIy95
+.. section: Library
+
+Add filename context to :exc:`OSError` exceptions raised by
+:func:`ssl.SSLContext.load_cert_chain`, allowing users to have more context.
+
+..
+
+.. date: 2026-01-27-00-03-41
+.. gh-issue: 132888
+.. nonce: yhTfUN
+.. section: Library
+
+Fix incorrect use of :func:`ctypes.GetLastError` and add missing error
+checks for Windows API calls in :mod:`!_pyrepl.windows_console`.
+
+..
+
+.. date: 2026-01-26-12-30-57
+.. gh-issue: 142956
+.. nonce: X9CS8J
+.. section: Library
+
+Updated :mod:`tomllib` to parse TOML 1.1.0.
+
+..
+
+.. date: 2026-01-25-03-23-20
+.. gh-issue: 144217
+.. nonce: E1wVXH
+.. section: Library
+
+:mod:`mimetypes`: Add support for DICOM files (for medical imaging) with the
+official MIME type ``application/dicom``. Patch by Benedikt Johannes.
+
+..
+
+.. date: 2026-01-24-23-11-17
+.. gh-issue: 144212
+.. nonce: IXqVL8
+.. section: Library
+
+Mime type ``image/jxl`` is now supported by :mod:`mimetypes`.
+
+..
+
+.. date: 2026-01-24-13-49-05
+.. gh-issue: 143594
+.. nonce: nilGlg
+.. section: Library
+
+Add :meth:`symtable.Function.get_cells` and :meth:`symtable.Symbol.is_cell`
+methods.
+
+..
+
+.. date: 2026-01-23-06-43-21
+.. gh-issue: 144169
+.. nonce: LFy9yi
+.. section: Library
+
+Fix three crashes when non-string keyword arguments are supplied to objects
+in the :mod:`ast` module.
+
+..
+
+.. date: 2026-01-22-10-18-17
+.. gh-issue: 144128
+.. nonce: akwY06
+.. section: Library
+
+Fix a crash in :meth:`array.array.fromlist` when an element's
+:meth:`~object.__index__` method mutates the input list during conversion.
+
+..
+
+.. date: 2026-01-21-19-39-07
+.. gh-issue: 144100
+.. nonce: hLMZ8Y
+.. section: Library
+
+Fixed a crash in ctypes when using a deprecated ``POINTER(str)`` type in
+``argtypes``. Instead of aborting, ctypes now raises a proper Python
+exception when the pointer target type is unresolved.
+
+..
+
+.. date: 2026-01-20-20-54-46
+.. gh-issue: 143658
+.. nonce: v8i1jE
+.. section: Library
+
+:mod:`importlib.metadata`: Use :meth:`str.lower` and :meth:`str.replace` to
+further improve performance of
+:meth:`!importlib.metadata.Prepared.normalize`. Patch by Hugo van Kemenade
+and Henry Schreiner.
+
+..
+
+.. date: 2026-01-20-16-35-55
+.. gh-issue: 144050
+.. nonce: 0kKFbF
+.. section: Library
+
+Fix :func:`stat.filemode` in the pure-Python implementation to avoid
+misclassifying invalid mode values as block devices.
+
+..
+
+.. date: 2026-01-19-16-45-16
+.. gh-issue: 83069
+.. nonce: 0TaeH9
+.. section: Library
+
+:meth:`subprocess.Popen.wait`: when ``timeout`` is not ``None``, an
+efficient event-driven mechanism now waits for process termination, if
+available. Linux >= 5.3 uses :func:`os.pidfd_open` + :func:`select.poll`.
+macOS and other BSD variants use :func:`select.kqueue` + ``KQ_FILTER_PROC``
++ ``KQ_NOTE_EXIT``. Windows keeps using ``WaitForSingleObject`` (unchanged).
+If none of these mechanisms are available, the function falls back to the
+traditional busy loop (non-blocking call and short sleeps). Patch by
+Giampaolo Rodola.
+
+..
+
+.. date: 2026-01-19-12-48-59
+.. gh-issue: 144030
+.. nonce: 7OK_gB
+.. section: Library
+
+The Python implementation of :func:`functools.lru_cache` differed from the
+default C implementation in that it did not check that its argument is
+callable. This discrepancy is now fixed and both raise a :exc:`TypeError`.
+
+..
+
+.. date: 2026-01-19-10-26-59
+.. gh-issue: 144001
+.. nonce: dGj8Nk
+.. section: Library
+
+Added the *ignorechars* parameter in :func:`binascii.a2b_base64` and
+:func:`base64.b64decode`.
+
+..
+
+.. date: 2026-01-19-00-57-40
+.. gh-issue: 144023
+.. nonce: 29XUcp
+.. section: Library
+
+Fixed validation of file descriptor 0 in posix functions when used with
+follow_symlinks parameter.
+
+..
+
+.. date: 2026-01-18-14-35-37
+.. gh-issue: 143999
+.. nonce: MneN4O
+.. section: Library
+
+Fix an issue where :func:`inspect.getgeneratorstate` and
+:func:`inspect.getcoroutinestate` could fail for generators wrapped by
+:func:`types.coroutine` in the suspended state.
+
+..
+
+.. date: 2026-01-17-07-48-27
+.. gh-issue: 143952
+.. nonce: lqJ55y
+.. section: Library
+
+Fixed :mod:`asyncio` debugging tools to work with new remote debugging API.
+Patch by Bartosz Sławecki.
+
+..
+
+.. date: 2026-01-16-14-02-39
+.. gh-issue: 143904
+.. nonce: rErHHA
+.. section: Library
+
+:func:`struct.pack_into` now raises OverflowError instead of IndexError for
+too large *offset* argument.
+
+..
+
+.. date: 2026-01-16-10-53-17
+.. gh-issue: 143897
+.. nonce: hWJBHN
+.. section: Library
+
+Remove the :meth:`!isxidstart` and :meth:`!isxidcontinue` methods of
+:data:`unicodedata.ucd_3_2_0`. They are now only exposed as
+:func:`unicodedata.isxidstart` and :func:`unicodedata.isxidcontinue`.
+
+..
+
+.. date: 2026-01-16-06-22-10
+.. gh-issue: 143831
+.. nonce: VLBTLp
+.. section: Library
+
+:class:`annotationlib.ForwardRef` objects are now hashable when created from
+annotation scopes with closures. Previously, hashing such objects would
+throw an exception. Patch by Bartosz Sławecki.
+
+..
+
+.. date: 2026-01-15-16-04-39
+.. gh-issue: 143874
+.. nonce: 1qQgvo
+.. section: Library
+
+Fixed a bug in :mod:`pdb` where expression results were not sent back to
+remote client.
+
+..
+
+.. date: 2026-01-14-20-35-40
+.. gh-issue: 143754
+.. nonce: m2NQXA
+.. section: Library
+
+Add new :mod:`tkinter` widget methods :meth:`!pack_content`,
+:meth:`!place_content` and :meth:`!grid_content` which are alternative
+spelling of old :meth:`!*_slaves` methods.
+
+..
+
+.. date: 2026-01-13-16-19-50
+.. gh-issue: 143756
+.. nonce: LQOra1
+.. section: Library
+
+Fix potential thread safety issues in :mod:`ssl` module.
+
+..
+
+.. date: 2026-01-13-15-56-03
+.. gh-issue: 132604
+.. nonce: lvjNTr
+.. section: Library
+
+Previously, :class:`~typing.Protocol` classes that were not decorated with
+:deco:`~typing.runtime_checkable`, but that inherited from another
+``Protocol`` class that did have this decorator, could be used in
+:func:`isinstance` and :func:`issubclass` checks. This behavior is now
+deprecated and such checks will throw a :exc:`TypeError` in Python 3.20.
+Patch by Bartosz Sławecki.
+
+..
+
+.. date: 2026-01-13-10-38-43
+.. gh-issue: 143543
+.. nonce: DeQRCO
+.. section: Library
+
+Fix a crash in itertools.groupby that could occur when a user-defined
+:meth:`~object.__eq__` method re-enters the iterator during key comparison.
+
+..
+
+.. date: 2026-01-11-14-14-19
+.. gh-issue: 143689
+.. nonce: fzHJ2W
+.. section: Library
+
+Fix :meth:`io.BufferedReader.read1` state cleanup on buffer allocation
+failure.
+
+..
+
+.. date: 2026-01-09-12-37-19
+.. gh-issue: 143602
+.. nonce: V8vQpj
+.. section: Library
+
+Fix a inconsistency issue in :meth:`~io.RawIOBase.write` that leads to
+unexpected buffer overwrite by deduplicating the buffer exports.
+
+..
+
+.. date: 2026-01-07-19-01-59
+.. gh-issue: 142434
+.. nonce: SHRS5p
+.. section: Library
+
+Use ``ppoll()`` if available in :func:`select.poll` to have a timeout
+resolution of 1 nanosecond, instead of a resolution of 1 ms. Patch by Victor
+Stinner.
+
+..
+
+.. date: 2026-01-07-11-57-59
+.. gh-issue: 140557
+.. nonce: 3P6-nW
+.. section: Library
+
+:class:`array.array` buffers now have the same alignment when empty as when
+allocated. Unaligned buffers can still be created by slicing.
+
+..
+
+.. date: 2026-01-05-05-31-05
+.. gh-issue: 143423
+.. nonce: X7YdnR
+.. section: Library
+
+Fix free-threaded build detection in the sampling profiler when
+Py_GIL_DISABLED is set to 0.
+
+..
+
+.. date: 2025-12-28-15-55-53
+.. gh-issue: 101178
+.. nonce: 26jYPs
+.. section: Library
+
+Add Ascii85, Base85, and Z85 support to :mod:`binascii` and improve the
+performance of the base-85 converters in :mod:`base64`.
+
+..
+
+.. date: 2025-12-19-11-30-31
+.. gh-issue: 142966
+.. nonce: PzGiv2
+.. section: Library
+
+Fix :func:`!ctypes.POINTER.set_type` not updating the format string to match
+the type.
+
+..
+
+.. date: 2025-12-15-02-02-45
+.. gh-issue: 142555
+.. nonce: EC9QN_
+.. section: Library
+
+:mod:`array`: fix a crash in ``a[i] = v`` when converting *i* to an index
+via :meth:`i.__index__ <object.__index__>` or :meth:`i.__float__
+<object.__float__>` mutates the array.
+
+..
+
+.. date: 2025-12-08-18-40-17
+.. gh-issue: 142438
+.. nonce: tH-Y16
+.. section: Library
+
+Fix _decimal builds configured with EXTRA_FUNCTIONALITY by correcting the
+Context.apply wrapper to pass the right argument.
+
+..
+
+.. date: 2025-11-22-20-30-00
+.. gh-issue: 141860
+.. nonce: frksvr
+.. section: Library
+
+Add an ``on_error`` keyword-only parameter to
+:func:`multiprocessing.set_forkserver_preload` to control how import
+failures during module preloading are handled. Accepts ``'ignore'``
+(default, silent), ``'warn'`` (emit :exc:`ImportWarning`), or ``'fail'``
+(raise exception). Contributed by Nick Neumann and Gregory P. Smith.
+
+..
+
+.. date: 2025-11-06-12-03-29
+.. gh-issue: 125346
+.. nonce: 7Gfpgw
+.. section: Library
+
+Accepting ``+`` and ``/`` characters with an alternative alphabet in
+:func:`base64.b64decode` and :func:`base64.urlsafe_b64decode` is now
+deprecated. In future Python versions they will be errors in the strict mode
+and discarded in the non-strict mode.
+
+..
+
+.. date: 2025-10-27-00-13-04
+.. gh-issue: 140715
+.. nonce: WkozE0
+.. section: Library
+
+Add ``'%F'`` support to :meth:`~datetime.datetime.strptime`.
+
+..
+
+.. date: 2024-11-27-13-11-16
+.. gh-issue: 67041
+.. nonce: ym2WKK
+.. section: Library
+
+Add the *missing_as_none* parameter to :func:`~urllib.parse.urlparse`,
+:func:`~urllib.parse.urlsplit` and :func:`~urllib.parse.urldefrag`
+functions. Add the *keep_empty* parameter to
+:func:`~urllib.parse.urlunparse` and :func:`~urllib.parse.urlunsplit`
+functions. This allows to distinguish between empty and not defined URI
+components and preserve empty components.
+
+..
+
+.. date: 2020-07-14-23-54-18
+.. gh-issue: 77188
+.. nonce: TyI3_Q
+.. section: Library
+
+The :mod:`pickle` module now properly handles name-mangled private methods.
+
+..
+
+.. date: 2026-01-13-01-21-20
+.. gh-issue: 143774
+.. nonce: rqGwX1
+.. section: IDLE
+
+Better explain the operation of Format / Format Paragraph.
+
+..
+
+.. date: 2026-02-10-12-08-58
+.. gh-issue: 134584
+.. nonce: P9LDy5
+.. section: Core and Builtins
+
+Optimize and eliminate ref-counting in ``_BINARY_OP_SUBSCR_LIST_SLICE``
+
+..
+
+.. date: 2026-02-08-18-13-38
+.. gh-issue: 144563
+.. nonce: hb3kpp
+.. section: Core and Builtins
+
+Fix interaction of the Tachyon profiler and :mod:`ctypes` and other modules
+that load the Python shared library (if present) in an independent map as
+this was causing the mechanism that loads the binary information to be
+confused. Patch by Pablo Galindo
+
+..
+
+.. date: 2026-02-08-12-47-27
+.. gh-issue: 144601
+.. nonce: E4Yi9J
+.. section: Core and Builtins
+
+Fix crash when importing a module whose ``PyInit`` function raises an
+exception from a subinterpreter.
+
+..
+
+.. date: 2026-02-06-17-59-47
+.. gh-issue: 144549
+.. nonce: 5BhPlY
+.. section: Core and Builtins
+
+Fix building the tail calling interpreter on Visual Studio 2026 with
+free-threading.
+
+..
+
+.. date: 2026-02-05-13-30-00
+.. gh-issue: 144513
+.. nonce: IjSTd7
+.. section: Core and Builtins
+
+Fix potential deadlock when using critical sections during stop-the-world
+pauses in the free-threaded build.
+
+..
+
+.. date: 2026-02-04-12-19-48
+.. gh-issue: 131798
+.. nonce: My5jLy
+.. section: Core and Builtins
+
+Optimise ``_GUARD_TOS_SLICE`` in the JIT.
+
+..
+
+.. date: 2026-02-04-11-19-45
+.. gh-issue: 144330
+.. nonce: kOowSb
+.. section: Core and Builtins
+
+Move ``classmethod`` and ``staticmethod`` initialization from ``__init__()``
+to ``__new__()``. Patch by Victor Stinner.
+
+..
+
+.. date: 2026-02-03-17-08-13
+.. gh-issue: 144446
+.. nonce: db5619
+.. section: Core and Builtins
+
+Fix data races in the free-threaded build when reading frame object
+attributes while another thread is executing the frame.
+
+..
+
+.. date: 2026-02-02-17-50-14
+.. gh-issue: 120321
+.. nonce: Xfr7tL
+.. section: Core and Builtins
+
+Add ``gi_state``, ``cr_state``, and ``ag_state`` attributes to generators,
+coroutines, and async generators that return the current state as a string
+(e.g., ``GEN_RUNNING``). The :mod:`inspect` module functions
+:func:`~inspect.getgeneratorstate`, :func:`~inspect.getcoroutinestate`, and
+:func:`~inspect.getasyncgenstate` now return these attributes directly.
+
+..
+
+.. date: 2026-02-02-17-07-34
+.. gh-issue: 141563
+.. nonce: GheXjr
+.. section: Core and Builtins
+
+Fix thread safety of :c:macro:`! PyDateTime_IMPORT`.
+
+..
+
+.. date: 2026-01-30-15-54-50
+.. gh-issue: 144280
+.. nonce: kgiP5R
+.. section: Core and Builtins
+
+Fix a bug in JIT where the predicate symbol had no truthiness
+
+..
+
+.. date: 2026-01-30-10-38-07
+.. gh-issue: 140550
+.. nonce: Us9vPD
+.. section: Core and Builtins
+
+In :c:member:`PyModuleDef.m_slots`, allow slots that repeat information
+present in :c:type:`PyModuleDef`.
+
+..
+
+.. date: 2026-01-29-16-57-11
+.. gh-issue: 139103
+.. nonce: icXIEQ
+.. section: Core and Builtins
+
+Improve scaling of :func:`~collections.namedtuple` instantiation in the
+free-threaded build.
+
+..
+
+.. date: 2026-01-29-02-18-08
+.. gh-issue: 144307
+.. nonce: CLbm_o
+.. section: Core and Builtins
+
+Prevent a reference leak in module teardown at interpreter finalization.
+
+..
+
+.. date: 2026-01-29-01-42-14
+.. gh-issue: 144319
+.. nonce: _7EtdB
+.. section: Core and Builtins
+
+Add huge pages support for the pymalloc allocator. Patch by Pablo Galindo
+
+..
+
+.. date: 2026-01-27-17-49-43
+.. gh-issue: 120321
+.. nonce: Vo7c9T
+.. section: Core and Builtins
+
+Made ``gi_yieldfrom`` thread-safe in the free-threading build by using a
+lightweight lock on the frame state.
+
+..
+
+.. date: 2026-01-23-20-20-42
+.. gh-issue: 144194
+.. nonce: IbXfxd
+.. section: Core and Builtins
+
+Fix error handling in perf jitdump initialization on memory allocation
+failure.
+
+..
+
+.. date: 2026-01-22-17-04-30
+.. gh-issue: 143962
+.. nonce: dQR1a9
+.. section: Core and Builtins
+
+Name suggestion for not normalized name suggests now the normalized name or
+the closest name to the normalized name. If the suggested name is not ASCII,
+include also its ASCII representation.
+
+..
+
+.. date: 2026-01-22-16-20-16
+.. gh-issue: 144157
+.. nonce: dxyp7k
+.. section: Core and Builtins
+
+:meth:`bytes.translate` now allows the compiler to unroll its loop more
+usefully for a 2x speedup in the common no-deletions specified case.
+
+..
+
+.. date: 2026-01-21-02-30-06
+.. gh-issue: 144068
+.. nonce: 9TTu7v
+.. section: Core and Builtins
+
+Fix JIT tracer memory leak, ensure the JIT tracer state is freed when daemon
+threads are cleaned up during interpreter shutdown.
+
+..
+
+.. date: 2026-01-19-02-33-45
+.. gh-issue: 144012
+.. nonce: wVEEWs
+.. section: Core and Builtins
+
+Check if the result is ``NULL`` in ``BINARY_OP_EXTENT`` opcode.
+
+..
+
+.. date: 2026-01-19-01-56-44
+.. gh-issue: 144007
+.. nonce: 1xjdBf
+.. section: Core and Builtins
+
+Eliminate redundant refcounting in the JIT for ``BINARY_OP``.
+
+..
+
+.. date: 2026-01-19-01-26-12
+.. gh-issue: 144005
+.. nonce: Z3O33m
+.. section: Core and Builtins
+
+Eliminate redundant refcounting from ``BINARY_OP_EXTEND``.
+
+..
+
+.. date: 2026-01-16-23-19-38
+.. gh-issue: 143939
+.. nonce: w9TWch
+.. section: Core and Builtins
+
+Fix erroneous "cannot reuse already awaited coroutine" error that could
+occur when a generator was run during the process of clearing a coroutine's
+frame.
+
+..
+
+.. date: 2026-01-13-22-26-49
+.. gh-issue: 141805
+.. nonce: QzIKPS
+.. section: Core and Builtins
+
+Fix crash in :class:`set` when objects with the same hash are concurrently
+added to the set after removing an element with the same hash while the set
+still contains elements with the same hash.
+
+..
+
+.. date: 2026-01-11-20-11-36
+.. gh-issue: 143670
+.. nonce: klnGoD
+.. section: Core and Builtins
+
+Fixes a crash in ``ga_repr_items_list`` function.
+
+..
+
+.. date: 2026-01-10-10-58-36
+.. gh-issue: 143650
+.. nonce: k8mR4x
+.. section: Core and Builtins
+
+Fix race condition in :mod:`importlib` where a thread could receive a stale
+module reference when another thread's import fails.
+
+..
+
+.. date: 2026-01-08-14-55-31
+.. gh-issue: 143569
+.. nonce: -Ltu3c
+.. section: Core and Builtins
+
+Generator expressions in 3.15 now conform to the documented behavior when
+the iterable does not support iteration. This matches the behavior in 3.14
+and earlier
+
+..
+
+.. date: 2025-12-29-19-31-46
+.. gh-issue: 143192
+.. nonce: JxGAyl
+.. section: Core and Builtins
+
+Improve performance of bitwise operations on multi-digit ints.
+
+..
+
+.. date: 2025-12-24-13-19-16
+.. gh-issue: 132657
+.. nonce: _P4DDb
+.. section: Core and Builtins
+
+If we are specializing to ``LOAD_GLOBAL_MODULE`` or ``LOAD_ATTR_MODULE``,
+try to enable deferred reference counting for the value, if the object is
+owned by a different thread. This applies to the free-threaded build only
+and should improve scaling of multi-threaded programs. Note that when
+deferred reference counting is enabled, the object will be deallocated by
+the GC, rather than by :c:func:`Py_DECREF`.
+
+..
+
+.. date: 2025-12-21-18-12-30
+.. gh-issue: 143055
+.. nonce: PzwccL
+.. section: Core and Builtins
+
+Implement :pep:`798` (Unpacking in Comprehensions). Patch by Adam Hartz.
+
+..
+
+.. date: 2025-11-29-10-06-06
+.. gh-issue: 142037
+.. nonce: OpIGzK
+.. section: Core and Builtins
+
+Improve error messages for printf-style formatting. For errors in the format
+string, always include the position of the start of the format unit. For
+errors related to the formatted arguments, always include the number or the
+name of the argument. Raise more specific errors and include more
+information (type and number of arguments, most probable causes of error).
+
+..
+
+.. date: 2025-10-24-17-30-51
+.. gh-issue: 140557
+.. nonce: X2GETk
+.. section: Core and Builtins
+
+:class:`bytearray` buffers now have the same alignment when empty as when
+allocated. Unaligned buffers can still be created by slicing.
+
+..
+
+.. date: 2025-10-16-22-36-05
+.. gh-issue: 140232
+.. nonce: u3srgv
+.. section: Core and Builtins
+
+Frozenset objects with immutable elements are no longer tracked by the
+garbage collector.
+
+..
+
+.. date: 2024-02-10-05-42-26
+.. gh-issue: 115231
+.. nonce: 6T7dzi
+.. section: Core and Builtins
+
+Setup ``__module__`` attribute for built-in static methods. Patch by Sergey
+B Kirpichev.
+
+..
+
+.. date: 2026-01-16-15-04-26
+.. gh-issue: 143869
+.. nonce: vf94km
+.. section: C API
+
+Added :c:func:`PyLong_GetNativeLayout`, :c:struct:`PyLongLayout`,
+:c:struct:`PyLongExport`, :c:func:`PyLong_Export`,
+:c:func:`PyLong_FreeExport`, :c:struct:`PyLongWriter`,
+:c:func:`PyLongWriter_Create`, :c:func:`PyLongWriter_Finish` and
+:c:func:`PyLongWriter_Discard` to the limited API.
+
+..
+
+.. date: 2025-12-16-18-39-30
+.. gh-issue: 141070
+.. nonce: 4EKDZ1
+.. section: C API
+
+Renamed :c:func:`!PyUnstable_Object_Dump` to :c:func:`PyObject_Dump`.
+
+..
+
+.. date: 2026-02-10-06-31-29
+.. gh-issue: 140421
+.. nonce: vxosUx
+.. section: Build
+
+Disable the perf trampoline on older macOS versions where it cannot be
+built.
+
+..
+
+.. date: 2026-01-28-19-04-12
+.. gh-issue: 144309
+.. nonce: 3sMFOh
+.. section: Build
+
+Build Python with POSIX 2024, instead of POSIX 2008. Patch by Victor
+Stinner.
+
+..
+
+.. date: 2026-01-27-23-39-26
+.. gh-issue: 144278
+.. nonce: tejFwL
+.. section: Build
+
+Enables defining the ``_PY_IMPL_NAME`` and ``_PY_IMPL_CACHE_TAG``
+preprocessor definitions to override :data:`sys.implementation` at build
+time. Definitions need to include quotes when setting to a string literal.
+Setting the cache tag to ``NULL`` has the effect of completely disabling
+automatic creation and use of ``.pyc`` files.
+
+..
+
+.. date: 2026-01-17-15-31-19
+.. gh-issue: 143960
+.. nonce: Zi0EqR
+.. section: Build
+
+Add support for OpenSSL 3.6, drop EOL 3.2. Patch by Hugo van Kemenade.
+
+..
+
+.. date: 2026-01-16-14-27-53
+.. gh-issue: 143941
+.. nonce: TiaE-3
+.. section: Build
+
+Move WASI-related files to :file:`Platforms/WASI`. Along the way, leave a
+deprecated :file:`Tools/wasm/wasi/__main__.py` behind for
+backwards-compatibility.
+
+..
+
+.. date: 2026-01-15-03-36-16
+.. gh-issue: 143842
+.. nonce: EZLutl
+.. section: Build
+
+Prevent static builds from clashing with curses by making the optimizer
+COLORS table static.
+++ /dev/null
-Prevent static builds from clashing with curses by making the optimizer
-COLORS table static.
+++ /dev/null
-Move WASI-related files to :file:`Platforms/WASI`. Along the way, leave a
-deprecated :file:`Tools/wasm/wasi/__main__.py` behind for
-backwards-compatibility.
+++ /dev/null
-Add support for OpenSSL 3.6, drop EOL 3.2. Patch by Hugo van Kemenade.
+++ /dev/null
-Enables defining the ``_PY_IMPL_NAME`` and ``_PY_IMPL_CACHE_TAG`` preprocessor
-definitions to override :data:`sys.implementation` at build time. Definitions
-need to include quotes when setting to a string literal. Setting the cache tag
-to ``NULL`` has the effect of completely disabling automatic creation and use of
-``.pyc`` files.
+++ /dev/null
-Build Python with POSIX 2024, instead of POSIX 2008. Patch by Victor Stinner.
+++ /dev/null
-Disable the perf trampoline on older macOS versions where it cannot be built.
+++ /dev/null
-Renamed :c:func:`!PyUnstable_Object_Dump` to :c:func:`PyObject_Dump`.
+++ /dev/null
-Added :c:func:`PyLong_GetNativeLayout`, :c:struct:`PyLongLayout`,
-:c:struct:`PyLongExport`, :c:func:`PyLong_Export`,
-:c:func:`PyLong_FreeExport`, :c:struct:`PyLongWriter`,
-:c:func:`PyLongWriter_Create`, :c:func:`PyLongWriter_Finish` and
-:c:func:`PyLongWriter_Discard` to the limited API.
+++ /dev/null
-Setup ``__module__`` attribute for built-in static methods. Patch by Sergey
-B Kirpichev.
+++ /dev/null
-Frozenset objects with immutable elements are no longer tracked by the garbage collector.
+++ /dev/null
-:class:`bytearray` buffers now have the same alignment
-when empty as when allocated. Unaligned buffers can still be created by slicing.
+++ /dev/null
-Improve error messages for printf-style formatting.
-For errors in the format string, always include the position of the
-start of the format unit.
-For errors related to the formatted arguments, always include the number
-or the name of the argument.
-Raise more specific errors and include more information (type and number
-of arguments, most probable causes of error).
+++ /dev/null
-Implement :pep:`798` (Unpacking in Comprehensions). Patch by Adam Hartz.
+++ /dev/null
-If we are specializing to ``LOAD_GLOBAL_MODULE`` or ``LOAD_ATTR_MODULE``, try
-to enable deferred reference counting for the value, if the object is owned by
-a different thread. This applies to the free-threaded build only and should
-improve scaling of multi-threaded programs. Note that when deferred reference
-counting is enabled, the object will be deallocated by the GC, rather than by
-:c:func:`Py_DECREF`.
+++ /dev/null
-Improve performance of bitwise operations on multi-digit ints.
+++ /dev/null
-Generator expressions in 3.15 now conform to the documented behavior when
-the iterable does not support iteration. This matches the behavior in 3.14
-and earlier
+++ /dev/null
-Fix race condition in :mod:`importlib` where a thread could receive a stale
-module reference when another thread's import fails.
+++ /dev/null
-Fixes a crash in ``ga_repr_items_list`` function.
+++ /dev/null
-Fix crash in :class:`set` when objects with the same hash are concurrently
-added to the set after removing an element with the same hash while the set
-still contains elements with the same hash.
+++ /dev/null
-Fix erroneous "cannot reuse already awaited coroutine" error that could
-occur when a generator was run during the process of clearing a coroutine's
-frame.
+++ /dev/null
-Eliminate redundant refcounting from ``BINARY_OP_EXTEND``.
+++ /dev/null
-Eliminate redundant refcounting in the JIT for ``BINARY_OP``.
+++ /dev/null
-Check if the result is ``NULL`` in ``BINARY_OP_EXTENT`` opcode.
+++ /dev/null
-Fix JIT tracer memory leak, ensure the JIT tracer state is freed when daemon threads are cleaned up during interpreter shutdown.
+++ /dev/null
-:meth:`bytes.translate` now allows the compiler to unroll its loop more
-usefully for a 2x speedup in the common no-deletions specified case.
+++ /dev/null
-Name suggestion for not normalized name suggests now the normalized name or
-the closest name to the normalized name. If the suggested name is not ASCII,
-include also its ASCII representation.
+++ /dev/null
-Fix error handling in perf jitdump initialization on memory allocation failure.
+++ /dev/null
-Made ``gi_yieldfrom`` thread-safe in the free-threading build
-by using a lightweight lock on the frame state.
+++ /dev/null
-Add huge pages support for the pymalloc allocator. Patch by Pablo Galindo
+++ /dev/null
-Prevent a reference leak in module teardown at interpreter finalization.
+++ /dev/null
-Improve scaling of :func:`~collections.namedtuple` instantiation in the
-free-threaded build.
+++ /dev/null
-In :c:member:`PyModuleDef.m_slots`, allow slots that repeat information
-present in :c:type:`PyModuleDef`.
+++ /dev/null
-Fix a bug in JIT where the predicate symbol had no truthiness
+++ /dev/null
-Fix thread safety of :c:macro:`! PyDateTime_IMPORT`.
+++ /dev/null
-Add ``gi_state``, ``cr_state``, and ``ag_state`` attributes to generators,
-coroutines, and async generators that return the current state as a string
-(e.g., ``GEN_RUNNING``). The :mod:`inspect` module functions
-:func:`~inspect.getgeneratorstate`, :func:`~inspect.getcoroutinestate`, and
-:func:`~inspect.getasyncgenstate` now return these attributes directly.
+++ /dev/null
-Fix data races in the free-threaded build when reading frame object attributes
-while another thread is executing the frame.
+++ /dev/null
-Move ``classmethod`` and ``staticmethod`` initialization from ``__init__()``
-to ``__new__()``. Patch by Victor Stinner.
+++ /dev/null
-Optimise ``_GUARD_TOS_SLICE`` in the JIT.
+++ /dev/null
-Fix potential deadlock when using critical sections during stop-the-world
-pauses in the free-threaded build.
+++ /dev/null
-Fix building the tail calling interpreter on Visual Studio 2026 with free-threading.
+++ /dev/null
-Fix crash when importing a module whose ``PyInit`` function raises an
-exception from a subinterpreter.
+++ /dev/null
-Fix interaction of the Tachyon profiler and :mod:`ctypes` and other modules
-that load the Python shared library (if present) in an independent map as
-this was causing the mechanism that loads the binary information to be
-confused. Patch by Pablo Galindo
+++ /dev/null
-Optimize and eliminate ref-counting in ``_BINARY_OP_SUBSCR_LIST_SLICE``
+++ /dev/null
-Better explain the operation of Format / Format Paragraph.
+++ /dev/null
-The :mod:`pickle` module now properly handles name-mangled private methods.
+++ /dev/null
-Add the *missing_as_none* parameter to :func:`~urllib.parse.urlparse`,
-:func:`~urllib.parse.urlsplit` and :func:`~urllib.parse.urldefrag`
-functions. Add the *keep_empty* parameter to
-:func:`~urllib.parse.urlunparse` and :func:`~urllib.parse.urlunsplit`
-functions. This allows to distinguish between empty and not defined URI
-components and preserve empty components.
+++ /dev/null
-Add ``'%F'`` support to :meth:`~datetime.datetime.strptime`.
+++ /dev/null
-Accepting ``+`` and ``/`` characters with an alternative alphabet in
-:func:`base64.b64decode` and :func:`base64.urlsafe_b64decode` is now
-deprecated.
-In future Python versions they will be errors in the strict mode and
-discarded in the non-strict mode.
+++ /dev/null
-Add an ``on_error`` keyword-only parameter to
-:func:`multiprocessing.set_forkserver_preload` to control how import failures
-during module preloading are handled. Accepts ``'ignore'`` (default, silent),
-``'warn'`` (emit :exc:`ImportWarning`), or ``'fail'`` (raise exception).
-Contributed by Nick Neumann and Gregory P. Smith.
+++ /dev/null
-Fix _decimal builds configured with EXTRA_FUNCTIONALITY by correcting the
-Context.apply wrapper to pass the right argument.
+++ /dev/null
-:mod:`array`: fix a crash in ``a[i] = v`` when converting *i* to
-an index via :meth:`i.__index__ <object.__index__>` or :meth:`i.__float__
-<object.__float__>` mutates the array.
+++ /dev/null
-Fix :func:`!ctypes.POINTER.set_type` not updating the format string to match the type.
+++ /dev/null
-Add Ascii85, Base85, and Z85 support to :mod:`binascii` and improve the
-performance of the base-85 converters in :mod:`base64`.
+++ /dev/null
-Fix free-threaded build detection in the sampling profiler when Py_GIL_DISABLED is set to 0.
+++ /dev/null
-:class:`array.array` buffers now have the same alignment when empty as when
-allocated. Unaligned buffers can still be created by slicing.
+++ /dev/null
-Use ``ppoll()`` if available in :func:`select.poll` to have a timeout
-resolution of 1 nanosecond, instead of a resolution of 1 ms. Patch by Victor
-Stinner.
+++ /dev/null
-Fix a inconsistency issue in :meth:`~io.RawIOBase.write` that leads to
-unexpected buffer overwrite by deduplicating the buffer exports.
+++ /dev/null
-Fix :meth:`io.BufferedReader.read1` state cleanup on buffer allocation failure.
+++ /dev/null
-Fix a crash in itertools.groupby that could occur when a user-defined
-:meth:`~object.__eq__` method re-enters the iterator during key comparison.
+++ /dev/null
-Previously, :class:`~typing.Protocol` classes that were not decorated with :deco:`~typing.runtime_checkable`,
-but that inherited from another ``Protocol`` class that did have this decorator, could be used in :func:`isinstance`
-and :func:`issubclass` checks. This behavior is now deprecated and such checks will throw a :exc:`TypeError`
-in Python 3.20. Patch by Bartosz Sławecki.
+++ /dev/null
-Fix potential thread safety issues in :mod:`ssl` module.
+++ /dev/null
-Add new :mod:`tkinter` widget methods :meth:`!pack_content`,
-:meth:`!place_content` and :meth:`!grid_content` which are alternative
-spelling of old :meth:`!*_slaves` methods.
+++ /dev/null
-Fixed a bug in :mod:`pdb` where expression results were not sent back to remote client.
+++ /dev/null
-:class:`annotationlib.ForwardRef` objects are now hashable when created from
-annotation scopes with closures. Previously, hashing such objects would
-throw an exception. Patch by Bartosz Sławecki.
+++ /dev/null
-Remove the :meth:`!isxidstart` and :meth:`!isxidcontinue` methods of
-:data:`unicodedata.ucd_3_2_0`. They are now only exposed as
-:func:`unicodedata.isxidstart` and :func:`unicodedata.isxidcontinue`.
+++ /dev/null
-:func:`struct.pack_into` now raises OverflowError instead of IndexError for
-too large *offset* argument.
+++ /dev/null
-Fixed :mod:`asyncio` debugging tools to work with new remote debugging API.
-Patch by Bartosz Sławecki.
+++ /dev/null
-Fix an issue where :func:`inspect.getgeneratorstate` and :func:`inspect.getcoroutinestate` could fail for generators wrapped by :func:`types.coroutine` in the suspended state.
+++ /dev/null
-Fixed validation of file descriptor 0 in posix functions when used with
-follow_symlinks parameter.
+++ /dev/null
-Added the *ignorechars* parameter in :func:`binascii.a2b_base64` and
-:func:`base64.b64decode`.
+++ /dev/null
-The Python implementation of :func:`functools.lru_cache` differed from the
-default C implementation in that it did not check that its argument is
-callable. This discrepancy is now fixed and both raise a :exc:`TypeError`.
+++ /dev/null
-:meth:`subprocess.Popen.wait`: when ``timeout`` is not ``None``, an efficient
-event-driven mechanism now waits for process termination, if available. Linux
->= 5.3 uses :func:`os.pidfd_open` + :func:`select.poll`. macOS and other BSD
-variants use :func:`select.kqueue` + ``KQ_FILTER_PROC`` + ``KQ_NOTE_EXIT``.
-Windows keeps using ``WaitForSingleObject`` (unchanged). If none of these
-mechanisms are available, the function falls back to the traditional busy loop
-(non-blocking call and short sleeps). Patch by Giampaolo Rodola.
+++ /dev/null
-Fix :func:`stat.filemode` in the pure-Python implementation to avoid misclassifying
-invalid mode values as block devices.
+++ /dev/null
-:mod:`importlib.metadata`: Use :meth:`str.lower` and :meth:`str.replace` to
-further improve performance of
-:meth:`!importlib.metadata.Prepared.normalize`. Patch by Hugo van Kemenade
-and Henry Schreiner.
+++ /dev/null
-Fixed a crash in ctypes when using a deprecated ``POINTER(str)`` type in
-``argtypes``. Instead of aborting, ctypes now raises a proper Python
-exception when the pointer target type is unresolved.
+++ /dev/null
-Fix a crash in :meth:`array.array.fromlist` when an element's :meth:`~object.__index__` method mutates\r
-the input list during conversion.\r
+++ /dev/null
-Fix three crashes when non-string keyword arguments are supplied to objects
-in the :mod:`ast` module.
+++ /dev/null
-Add :meth:`symtable.Function.get_cells` and :meth:`symtable.Symbol.is_cell` methods.
+++ /dev/null
-Mime type ``image/jxl`` is now supported by :mod:`mimetypes`.
+++ /dev/null
-:mod:`mimetypes`: Add support for DICOM files (for medical imaging) with the official MIME type ``application/dicom``. Patch by Benedikt Johannes.
+++ /dev/null
-Updated :mod:`tomllib` to parse TOML 1.1.0.
+++ /dev/null
-Fix incorrect use of :func:`ctypes.GetLastError` and add missing error
-checks for Windows API calls in :mod:`!_pyrepl.windows_console`.
+++ /dev/null
-Add filename context to :exc:`OSError` exceptions raised by
-:func:`ssl.SSLContext.load_cert_chain`, allowing users to have more context.
+++ /dev/null
-Speed up Base64 decoding of data containing ignored characters (both in
-non-strict mode and with an explicit *ignorechars* argument).
-It is now up to 2 times faster for multiline Base64 data.
+++ /dev/null
-Improve error messages for buffer overflow in :func:`fcntl.fcntl` and
-:func:`fcntl.ioctl`.
+++ /dev/null
-When :mod:`faulthandler` dumps the list of third-party extension modules,
-ignore sub-modules of stdlib packages. Patch by Victor Stinner.
+++ /dev/null
-Update bundled `libexpat <https://libexpat.github.io/>`_ to 2.7.4
+++ /dev/null
-Improve performance of :class:`io.BufferedReader` line iteration by ~49%.
+++ /dev/null
-Deprecate :func:`os.path.commonprefix` in favor of
-:func:`os.path.commonpath` for path segment prefixes.
-
-The :func:`os.path.commonprefix` function is being deprecated due to
-having a misleading name and module. The function is not safe to use for
-path prefixes despite being included in a module about path manipulation,
-meaning it is easy to accidentally introduce path traversal
-vulnerabilities into Python programs by using this function.
+++ /dev/null
-Make concurrent iteration over :class:`itertools.combinations_with_replacement` and :class:`itertools.permutations` safe under free-threading.
+++ /dev/null
-Add support for arbitrary descriptors :meth:`!__enter__`, :meth:`!__exit__`,
-:meth:`!__aenter__`, and :meth:`!__aexit__` in :class:`contextlib.ExitStack`
-and :class:`contextlib.AsyncExitStack`, for consistency with the
-:keyword:`with` and :keyword:`async with` statements.
+++ /dev/null
-Improve an exception error message in ``_overlapped.BindLocal()`` that is raised when :meth:`asyncio.loop.sock_connect` is called on a :class:`asyncio.ProactorEventLoop` with a socket that has an invalid address family.
+++ /dev/null
-Bump the version of pip bundled in ensurepip to version 26.0.1
+++ /dev/null
-Reject C0 control characters within wsgiref.headers.Headers fields, values,
-and parameters.
+++ /dev/null
-Reject control characters in :class:`http.cookies.Morsel` fields and values.
+++ /dev/null
-Reject control characters in IMAP commands.
+++ /dev/null
-Reject control characters in POP3 commands.
+++ /dev/null
-Reject control characters in ``data:`` URL media types.
+++ /dev/null
-Fixed a bug in the folding of comments when flattening an email message
-using a modern email policy. Comments consisting of a very long sequence of
-non-foldable characters could trigger a forced line wrap that omitted the
-required leading space on the continuation line, causing the remainder of
-the comment to be interpreted as a new header field. This enabled header
-injection with carefully crafted inputs.
+++ /dev/null
-:mod:`~email.generator.BytesGenerator` will now refuse to serialize (write) headers
-that are unsafely folded or delimited; see
-:attr:`~email.policy.Policy.verify_generated_headers`. (Contributed by Bas
-Bloemsaat and Petr Viktorin in :gh:`121650`).
+++ /dev/null
-Add support for parametrized resource ``wantobjects`` in regrtests,
-which allows to run Tkinter tests with the specified value of
-:data:`!tkinter.wantobjects`, for example ``-u wantobjects=0``.
+++ /dev/null
-The Android testbed now distinguishes between stdout/stderr messages which
-were triggered by a newline, and those triggered by a manual call to
-``flush``. This fixes logging of progress indicators and similar content.
+++ /dev/null
-Support negative timestamps in :func:`time.gmtime`, :func:`time.localtime`, and various :mod:`datetime` functions.
+++ /dev/null
-Update macOS installer to use OpenSSL 3.5.5.
+++ /dev/null
-Update macOS installer to use Tcl/Tk 9.0.3.
+++ /dev/null
-Allowed _remote_debugging to build on more OS versions by using proc_listpids() rather than proc_listallpids().
-This is Python version 3.15.0 alpha 5
+This is Python version 3.15.0 alpha 6
=====================================
.. image:: https://github.com/python/cpython/actions/workflows/build.yml/badge.svg?branch=main&event=push