cpython/Misc/NEWS.d/3.13.1.rst

1882 lines
42 KiB
ReStructuredText

.. date: 2024-09-24-10-48-46
.. gh-issue: 124448
.. nonce: bFMrS6
.. release date: 2024-12-03
.. section: macOS
Update bundled Tcl/Tk in macOS installer to 8.6.15.
..
.. date: 2024-11-16-22-08-41
.. gh-issue: 126911
.. nonce: HchCZZ
.. section: Windows
Update credits command output.
..
.. date: 2024-11-12-22-31-13
.. gh-issue: 118973
.. nonce: _lfxW6
.. section: Windows
Ensures the experimental free-threaded install includes the ``_tkinter``
module. The optional Tcl/Tk component must also be installed in order for
the module to work.
..
.. date: 2024-11-07-20-42-31
.. gh-issue: 126497
.. nonce: EARpd-
.. section: Windows
Fixes venv failure due to missing redirector executables in experimental
free-threaded installs.
..
.. date: 2024-10-29-20-09-52
.. gh-issue: 126074
.. nonce: 83ZzZs
.. section: Windows
Removed unnecessary DLLs from Windows embeddable package
..
.. date: 2024-10-29-19-48-03
.. gh-issue: 125315
.. nonce: jdB9qN
.. section: Windows
Avoid crashing in :mod:`platform` due to slow WMI calls on some Windows
machines.
..
.. date: 2024-10-29-09-39-06
.. gh-issue: 126084
.. nonce: 3wAL8o
.. section: Windows
Fix venvwlauncher to launch pythonw instead of python so no extra console
window is created.
..
.. date: 2024-10-23-17-24-23
.. gh-issue: 125842
.. nonce: m3EF9E
.. section: Windows
Fix a :exc:`SystemError` when :func:`sys.exit` is called with ``0xffffffff``
on Windows.
..
.. date: 2024-10-15-21-28-43
.. gh-issue: 125550
.. nonce: hmGWCP
.. section: Windows
Enable the :ref:`launcher` to detect Python 3.14 installs from the Windows
Store.
..
.. date: 2024-09-24-19-04-56
.. gh-issue: 124448
.. nonce: srVT3d
.. section: Windows
Updated bundled Tcl/Tk to 8.6.15.
..
.. date: 2024-11-13-22-23-36
.. gh-issue: 126807
.. nonce: vpaWuN
.. section: Tools/Demos
Fix extraction warnings in :program:`pygettext.py` caused by mistaking
function definitions for function calls.
..
.. date: 2024-10-30-13-59-07
.. gh-issue: 126167
.. nonce: j5cCWE
.. section: Tools/Demos
The iOS testbed was modified so that it can be used by third-party projects
for testing purposes.
..
.. date: 2024-11-17-16-56-48
.. gh-issue: 126909
.. nonce: 60VTxW
.. section: Tests
Fix test_os extended attribute tests to work on filesystems with 1 KiB xattr
size limit.
..
.. date: 2024-10-07-14-13-38
.. gh-issue: 125041
.. nonce: PKLWDf
.. section: Tests
Re-enable skipped tests for :mod:`zlib` on the s390x architecture: only skip
checks of the compressed bytes, which can be different between zlib's
software implementation and the hardware-accelerated implementation.
..
.. date: 2024-09-30-22-52-44
.. gh-issue: 124295
.. nonce: VZy5kx
.. section: Tests
Add translation tests to the :mod:`argparse` module.
..
.. date: 2024-11-13-11-09-12
.. gh-issue: 126623
.. nonce: TO7NnR
.. section: Security
Upgrade libexpat to 2.6.4
..
.. date: 2024-10-09-20-08-13
.. gh-issue: 125140
.. nonce: YgNWRB
.. section: Security
Remove the current directory from ``sys.path`` when using PyREPL.
..
.. date: 2024-08-07-10-42-13
.. gh-issue: 122792
.. nonce: oiTMo9
.. section: Security
Changed IPv4-mapped ``ipaddress.IPv6Address`` to consistently use the mapped
IPv4 address value for deciding properties. Properties which have their
behavior fixed are ``is_multicast``, ``is_reserved``, ``is_link_local``,
``is_global``, and ``is_unspecified``.
..
.. date: 2024-11-30-21-46-15
.. gh-issue: 127321
.. nonce: M78fBv
.. section: Library
:func:`pdb.set_trace` will not stop at an opcode that does not have an
associated line number anymore.
..
.. date: 2024-11-27-16-06-10
.. gh-issue: 127303
.. nonce: asqkgh
.. section: Library
Publicly expose :data:`~token.EXACT_TOKEN_TYPES` in :attr:`!token.__all__`.
..
.. date: 2024-11-27-14-06-35
.. gh-issue: 123967
.. nonce: wxUmnW
.. section: Library
Fix faulthandler for trampoline frames. If the top-most frame is a
trampoline frame, skip it. Patch by Victor Stinner.
..
.. date: 2024-11-24-14-20-17
.. gh-issue: 127182
.. nonce: WmfY2g
.. section: Library
Fix :meth:`!io.StringIO.__setstate__` crash, when :const:`None` was passed
as the first value.
..
.. date: 2024-11-24-12-41-31
.. gh-issue: 127217
.. nonce: UAXGFr
.. section: Library
Fix :func:`urllib.request.pathname2url` for paths starting with multiple
slashes on Posix.
..
.. date: 2024-11-22-10-42-34
.. gh-issue: 127035
.. nonce: UnbDlr
.. section: Library
Fix :mod:`shutil.which` on Windows. Now it looks at direct match if and only
if the command ends with a PATHEXT extension or X_OK is not in mode. Support
extensionless files if "." is in PATHEXT. Support PATHEXT extensions that
end with a dot.
..
.. date: 2024-11-22-09-23-41
.. gh-issue: 122273
.. nonce: H8M6fd
.. section: Library
Support PyREPL history on Windows. Patch by devdanzin and Victor Stinner.
..
.. date: 2024-11-22-03-40-02
.. gh-issue: 127078
.. nonce: gI_PaP
.. section: Library
Fix issue where :func:`urllib.request.url2pathname` failed to discard an
extra slash before a UNC drive in the URL path on Windows.
..
.. date: 2024-11-22-02-31-55
.. gh-issue: 126766
.. nonce: jfkhBH
.. section: Library
Fix issue where :func:`urllib.request.url2pathname` failed to discard any
'localhost' authority present in the URL.
..
.. date: 2024-11-21-16-23-16
.. gh-issue: 127065
.. nonce: cfL1zd
.. section: Library
Fix crash when calling a :func:`operator.methodcaller` instance from
multiple threads in the free threading build.
..
.. date: 2024-11-20-16-58-59
.. gh-issue: 126997
.. nonce: 0PI41Y
.. section: Library
Fix support of STRING and GLOBAL opcodes with non-ASCII arguments in
:mod:`pickletools`. :func:`pickletools.dis` now outputs non-ASCII bytes in
STRING, BINSTRING and SHORT_BINSTRING arguments as escaped (``\xXX``).
..
.. date: 2024-11-20-11-37-08
.. gh-issue: 126316
.. nonce: ElkZmE
.. section: Library
:mod:`grp`: Make :func:`grp.getgrall` thread-safe by adding a mutex. Patch
by Victor Stinner.
..
.. date: 2024-11-20-08-54-11
.. gh-issue: 126618
.. nonce: ef_53g
.. section: Library
Fix the representation of :class:`itertools.count` objects when the count
value is :data:`sys.maxsize`.
..
.. date: 2024-11-15-01-50-36
.. gh-issue: 85168
.. nonce: bP8VIN
.. section: Library
Fix issue where :func:`urllib.request.url2pathname` and
:func:`~urllib.request.pathname2url` always used UTF-8 when quoting and
unquoting file URIs. They now use the :term:`filesystem encoding and error
handler`.
..
.. date: 2024-11-14-22-25-49
.. gh-issue: 67877
.. nonce: G9hw0w
.. section: Library
Fix memory leaks when :mod:`regular expression <re>` matching terminates
abruptly, either because of a signal or because memory allocation fails.
..
.. date: 2024-11-13-22-25-57
.. gh-issue: 126789
.. nonce: lKzlc7
.. section: Library
Fixed the values of :py:func:`sysconfig.get_config_vars`,
:py:func:`sysconfig.get_paths`, and their siblings when the :py:mod:`site`
initialization happens after :py:mod:`sysconfig` has built a cache for
:py:func:`sysconfig.get_config_vars`.
..
.. date: 2024-11-13-20-03-18
.. gh-issue: 126188
.. nonce: RJLKk-
.. section: Library
Update bundled pip to 24.3.1
..
.. date: 2024-11-13-19-15-18
.. gh-issue: 126780
.. nonce: ZZqJvI
.. section: Library
Fix :func:`os.path.normpath` for drive-relative paths on Windows.
..
.. date: 2024-11-12-21-43-12
.. gh-issue: 126766
.. nonce: oi2KJ7
.. section: Library
Fix issue where :func:`urllib.request.url2pathname` failed to discard two
leading slashes introducing an empty authority section.
..
.. date: 2024-11-12-13-14-47
.. gh-issue: 126727
.. nonce: 5Eqfqd
.. section: Library
``locale.nl_langinfo(locale.ERA)`` now returns multiple era description
segments separated by semicolons. Previously it only returned the first
segment on platforms with Glibc.
..
.. date: 2024-11-11-13-24-22
.. gh-issue: 126699
.. nonce: ONGbMd
.. section: Library
Allow :class:`collections.abc.AsyncIterator` to be a base for Protocols.
..
.. date: 2024-11-11-13-00-21
.. gh-issue: 126654
.. nonce: 4gfP2y
.. section: Library
Fix crash when non-dict was passed to several functions in ``_interpreters``
module.
..
.. date: 2024-11-10-18-14-51
.. gh-issue: 104745
.. nonce: zAa5Ke
.. section: Library
Limit starting a patcher (from :func:`unittest.mock.patch` or
:func:`unittest.mock.patch.object`) more than once without stopping it
..
.. date: 2024-11-09-10-31-10
.. gh-issue: 126595
.. nonce: A-7MyC
.. section: Library
Fix a crash when instantiating :class:`itertools.count` with an initial
count of :data:`sys.maxsize` on debug builds. Patch by Bénédikt Tran.
..
.. date: 2024-11-08-17-05-10
.. gh-issue: 120423
.. nonce: 7rdLVV
.. section: Library
Fix issue where :func:`urllib.request.pathname2url` mishandled Windows paths
with embedded forward slashes.
..
.. date: 2024-11-08-11-06-14
.. gh-issue: 126565
.. nonce: dFFO22
.. section: Library
Improve performances of :meth:`zipfile.Path.open` for non-reading modes.
..
.. date: 2024-11-07-22-41-47
.. gh-issue: 126505
.. nonce: iztYE1
.. section: Library
Fix bugs in compiling case-insensitive :mod:`regular expressions <re>` with
character classes containing non-BMP characters: upper-case non-BMP
character did was ignored and the ASCII flag was ignored when matching a
character range whose upper bound is beyond the BMP region.
..
.. date: 2024-11-07-01-40-11
.. gh-issue: 117378
.. nonce: o9O5uM
.. section: Library
Fixed the :mod:`multiprocessing` ``"forkserver"`` start method forkserver
process to correctly inherit the parent's :data:`sys.path` during the
importing of :func:`multiprocessing.set_forkserver_preload` modules in the
same manner as :data:`sys.path` is configured in workers before executing
work items.
This bug caused some forkserver module preloading to silently fail to
preload. This manifested as a performance degration in child processes when
the ``sys.path`` was required due to additional repeated work in every
worker.
It could also have a side effect of ``""`` remaining in :data:`sys.path`
during forkserver preload imports instead of the absolute path from
:func:`os.getcwd` at multiprocessing import time used in the worker
``sys.path``.
The ``sys.path`` differences between phases in the child process could
potentially have caused preload to import incorrect things from the wrong
location. We are unaware of that actually having happened in practice.
..
.. date: 2024-11-06-23-40-28
.. gh-issue: 125679
.. nonce: Qq9xF5
.. section: Library
The :class:`multiprocessing.Lock` and :class:`multiprocessing.RLock`
``repr`` values no longer say "unknown" on macOS.
..
.. date: 2024-11-06-18-30-50
.. gh-issue: 126476
.. nonce: F1wh3c
.. section: Library
Raise :class:`calendar.IllegalMonthError` (now a subclass of
:class:`IndexError`) for :func:`calendar.month` when the input month is not
correct.
..
.. date: 2024-11-06-13-41-38
.. gh-issue: 126489
.. nonce: toaf-0
.. section: Library
The Python implementation of :mod:`pickle` no longer calls
:meth:`pickle.Pickler.persistent_id` for the result of
:meth:`!persistent_id`.
..
.. date: 2024-11-03-09-42-42
.. gh-issue: 126313
.. nonce: EFP6Dl
.. section: Library
Fix an issue in :func:`curses.napms` when :func:`curses.initscr` has not yet
been called. Patch by Bénédikt Tran.
..
.. date: 2024-11-02-19-20-44
.. gh-issue: 126303
.. nonce: yVvyWB
.. section: Library
Fix pickling and copying of :class:`os.sched_param` objects.
..
.. date: 2024-11-01-14-31-41
.. gh-issue: 126138
.. nonce: yTniOG
.. section: Library
Fix a use-after-free crash on :class:`asyncio.Task` objects whose underlying
coroutine yields an object that implements an evil
:meth:`~object.__getattribute__`. Patch by Nico Posada.
..
.. date: 2024-10-31-14-06-28
.. gh-issue: 126220
.. nonce: uJAJCU
.. section: Library
Fix crash in :class:`!cProfile.Profile` and :class:`!_lsprof.Profiler` when
their callbacks were directly called with 0 arguments.
..
.. date: 2024-10-30-23-59-36
.. gh-issue: 126212
.. nonce: _9uYjT
.. section: Library
Fix issue where :func:`urllib.request.pathname2url` and
:func:`~urllib.request.url2pathname` removed slashes from Windows DOS drive
paths and URLs.
..
.. date: 2024-10-30-23-42-44
.. gh-issue: 126223
.. nonce: k2qooc
.. section: Library
Raise a :exc:`UnicodeEncodeError` instead of a :exc:`SystemError` upon
calling :func:`!_interpreters.create` with an invalid Unicode character.
..
.. date: 2024-10-30-20-45-17
.. gh-issue: 126205
.. nonce: CHEmtx
.. section: Library
Fix issue where :func:`urllib.request.pathname2url` generated URLs beginning
with four slashes (rather than two) when given a Windows UNC path.
..
.. date: 2024-10-29-11-45-44
.. gh-issue: 126105
.. nonce: cOL-R6
.. section: Library
Fix a crash in :mod:`ast` when the :attr:`ast.AST._fields` attribute is
deleted.
..
.. date: 2024-10-29-10-58-52
.. gh-issue: 126106
.. nonce: rlF798
.. section: Library
Fixes a possible ``NULL`` pointer dereference in :mod:`ssl`.
..
.. date: 2024-10-29-10-38-28
.. gh-issue: 126080
.. nonce: qKRBuo
.. section: Library
Fix a use-after-free crash on :class:`asyncio.Task` objects for which the
underlying event loop implements an evil :meth:`~object.__getattribute__`.
Reported by Nico-Posada. Patch by Bénédikt Tran.
..
.. date: 2024-10-28-22-35-22
.. gh-issue: 126083
.. nonce: TuI--n
.. section: Library
Fixed a reference leak in :class:`asyncio.Task` objects when reinitializing
the same object with a non-``None`` context. Patch by Nico Posada.
..
.. date: 2024-10-26-12-50-48
.. gh-issue: 125984
.. nonce: d4vp5_
.. section: Library
Fix use-after-free crashes on :class:`asyncio.Future` objects for which the
underlying event loop implements an evil :meth:`~object.__getattribute__`.
Reported by Nico-Posada. Patch by Bénédikt Tran.
..
.. date: 2024-10-25-11-13-24
.. gh-issue: 125969
.. nonce: YvbrTr
.. section: Library
Fix an out-of-bounds crash when an evil :meth:`asyncio.loop.call_soon`
mutates the length of the internal callbacks list. Patch by Bénédikt Tran.
..
.. date: 2024-10-25-10-53-56
.. gh-issue: 125966
.. nonce: eOCYU_
.. section: Library
Fix a use-after-free crash in :meth:`asyncio.Future.remove_done_callback`.
Patch by Bénédikt Tran.
..
.. date: 2024-10-24-14-08-10
.. gh-issue: 125789
.. nonce: eaiAMw
.. section: Library
Fix possible crash when mutating list of callbacks returned by
:attr:`!asyncio.Future._callbacks`. It now always returns a new copy in C
implementation :mod:`!_asyncio`. Patch by Kumar Aditya.
..
.. date: 2024-10-24-10-49-47
.. gh-issue: 124452
.. nonce: eqTRgx
.. section: Library
Fix an issue in :meth:`email.policy.EmailPolicy.header_source_parse` and
:meth:`email.policy.Compat32.header_source_parse` that introduced spurious
leading whitespaces into header values when the header includes a newline
character after the header name delimiter (``:``) and before the value.
..
.. date: 2024-10-23-17-45-40
.. gh-issue: 125884
.. nonce: 41E_PD
.. section: Library
Fixed the bug for :mod:`pdb` where it can't set breakpoints on functions
with certain annotations.
..
.. date: 2024-10-22-13-28-00
.. gh-issue: 125355
.. nonce: zssHm_
.. section: Library
Fix several bugs in :meth:`argparse.ArgumentParser.parse_intermixed_args`.
* The parser no longer changes temporarily during parsing.
* Default values are not processed twice.
* Required mutually exclusive groups containing positional arguments are now supported.
* The missing arguments report now includes the names of all required optional and positional arguments.
* Unknown options can be intermixed with positional arguments in parse_known_intermixed_args().
..
.. date: 2024-10-19-16-06-52
.. gh-issue: 125666
.. nonce: jGfdCP
.. section: Library
Avoid the exiting the interpreter if a null byte is given as input in the
new REPL.
..
.. date: 2024-10-19-13-37-37
.. gh-issue: 125710
.. nonce: FyFAAr
.. section: Library
[Enum] fix hashable<->nonhashable comparisons for member values
..
.. date: 2024-10-19-11-06-06
.. gh-issue: 125631
.. nonce: BlhVvR
.. section: Library
Restore ability to set :attr:`~pickle.Pickler.persistent_id` and
:attr:`~pickle.Unpickler.persistent_load` attributes of instances of the
:class:`!Pickler` and :class:`!Unpickler` classes in the :mod:`pickle`
module.
..
.. date: 2024-10-19-01-30-40
.. gh-issue: 125378
.. nonce: WTosxX
.. section: Library
Fixed the bug in :mod:`pdb` where after a multi-line command, an empty line
repeats the first line of the multi-line command, instead of the full
command.
..
.. date: 2024-10-18-09-51-29
.. gh-issue: 125682
.. nonce: vsj4cU
.. section: Library
Reject non-ASCII digits in the Python implementation of :func:`json.loads`
conforming to the JSON specification.
..
.. date: 2024-10-18-08-58-10
.. gh-issue: 125660
.. nonce: sDdDqO
.. section: Library
Reject invalid unicode escapes for Python implementation of
:func:`json.loads`.
..
.. date: 2024-10-17-16-10-29
.. gh-issue: 125259
.. nonce: oMew0c
.. section: Library
Fix the notes removal logic for errors thrown in enum initialization.
..
.. date: 2024-10-16-20-32-40
.. gh-issue: 125590
.. nonce: stHzOP
.. section: Library
Allow ``FrameLocalsProxy`` to delete and pop if the key is not a fast
variable.
..
.. date: 2024-10-15-14-01-03
.. gh-issue: 125519
.. nonce: TqGh6a
.. section: Library
Improve traceback if :func:`importlib.reload` is called with an object that
is not a module. Patch by Alex Waygood.
..
.. date: 2024-10-14-17-29-34
.. gh-issue: 125451
.. nonce: fmP3T9
.. section: Library
Fix deadlock when :class:`concurrent.futures.ProcessPoolExecutor` shuts down
concurrently with an error when feeding a job to a worker process.
..
.. date: 2024-10-14-04-44-12
.. gh-issue: 125422
.. nonce: MlVuC6
.. section: Library
Fixed the bug where :mod:`pdb` and :mod:`bdb` can step into the bottom
caller frame.
..
.. date: 2024-10-14-02-27-03
.. gh-issue: 100141
.. nonce: NuAcwa
.. section: Library
Fixed the bug where :mod:`pdb` will be stuck in an infinite loop when
debugging an empty file.
..
.. date: 2024-10-14-02-07-44
.. gh-issue: 125115
.. nonce: IOf3ON
.. section: Library
Fixed a bug in :mod:`pdb` where arguments starting with ``-`` can't be
passed to the debugged script.
..
.. date: 2024-10-13-20-21-35
.. gh-issue: 53203
.. nonce: Rz1c8A
.. section: Library
Fix :func:`time.strptime` for ``%c``, ``%x`` and ``%X`` formats in many
locales that use non-ASCII digits, like Persian, Burmese, Odia and Shan.
..
.. date: 2024-10-13-15-04-58
.. gh-issue: 125398
.. nonce: UW7Ndv
.. section: Library
Fix the conversion of the :envvar:`!VIRTUAL_ENV` path in the activate script
in :mod:`venv` when running in Git Bash for Windows.
..
.. date: 2024-10-12-15-49-17
.. gh-issue: 125316
.. nonce: t15RnJ
.. section: Library
Fix using :func:`functools.partial` as :class:`enum.Enum` member. A
FutureWarning with suggestion to use :func:`enum.member` is now emitted when
the ``partial`` instance is used as an enum member.
..
.. date: 2024-10-11-00-40-13
.. gh-issue: 125245
.. nonce: 8vReM-
.. section: Library
Fix race condition when importing :mod:`collections.abc`, which could
incorrectly return an empty module.
..
.. date: 2024-10-10-20-39-57
.. gh-issue: 125243
.. nonce: eUbbtu
.. section: Library
Fix data race when creating :class:`zoneinfo.ZoneInfo` objects in the free
threading build.
..
.. date: 2024-10-10-19-57-35
.. gh-issue: 125254
.. nonce: RtZxXS
.. section: Library
Fix a bug where ArgumentError includes the incorrect ambiguous option in
:mod:`argparse`.
..
.. date: 2024-10-10-18-33-31
.. gh-issue: 125235
.. nonce: 0kOB5I
.. section: Library
Keep :mod:`tkinter` TCL paths in venv pointing to base installation on
Windows.
..
.. date: 2024-10-09-21-42-43
.. gh-issue: 61011
.. nonce: pQXZb1
.. section: Library
Fix inheritance of nested mutually exclusive groups from parent parser in
:class:`argparse.ArgumentParser`. Previously, all nested mutually exclusive
groups lost their connection to the group containing them and were displayed
as belonging directly to the parser.
..
.. date: 2024-10-09-17-07-33
.. gh-issue: 52551
.. nonce: PBakSY
.. section: Library
Fix encoding issues in :func:`time.strftime`, the
:meth:`~datetime.datetime.strftime` method of the :mod:`datetime` classes
:class:`~datetime.datetime`, :class:`~datetime.date` and
:class:`~datetime.time` and formatting of these classes. Characters not
encodable in the current locale are now acceptable in the format string.
Surrogate pairs and sequence of surrogatescape-encoded bytes are no longer
recombinated. Embedded null character no longer terminates the format
string.
..
.. date: 2024-10-09-07-09-00
.. gh-issue: 125118
.. nonce: J9rQ1S
.. section: Library
Don't copy arbitrary values to :c:expr:`_Bool` in the :mod:`struct` module.
..
.. date: 2024-10-08-21-17-16
.. gh-issue: 125069
.. nonce: 0RP0Mx
.. section: Library
Fix an issue where providing a :class:`pathlib.PurePath` object as an
initializer argument to a second :class:`~pathlib.PurePath` object with a
different :attr:`~pathlib.PurePath.parser` resulted in arguments to the
former object's initializer being joined by the latter object's parser.
..
.. date: 2024-10-08-13-28-22
.. gh-issue: 125096
.. nonce: Vz0W5g
.. section: Library
If the :envvar:`PYTHON_BASIC_REPL` environment variable is set, the
:mod:`site` module no longer imports the :mod:`!_pyrepl` module. Moreover,
the :mod:`site` module now respects :option:`-E` and :option:`-I` command
line options: ignore :envvar:`PYTHON_BASIC_REPL` in this case. Patch by
Victor Stinner.
..
.. date: 2024-10-08-12-09-09
.. gh-issue: 124969
.. nonce: _VBQLq
.. section: Library
Fix ``locale.nl_langinfo(locale.ALT_DIGITS)`` on platforms with glibc. Now
it returns a string consisting of up to 100 semicolon-separated symbols (an
empty string in most locales) on all Posix platforms. Previously it only
returned the first symbol or an empty string.
..
.. date: 2024-10-05-15-49-53
.. gh-issue: 124960
.. nonce: Bol9hT
.. section: Library
Fix support for the ``barry_as_FLUFL`` future flag in the new REPL.
..
.. date: 2024-10-04-22-43-48
.. gh-issue: 124984
.. nonce: xjMv9b
.. section: Library
Fixed thread safety in :mod:`ssl` in the free-threaded build. OpenSSL
operations are now protected by a per-object lock.
..
.. date: 2024-10-04-08-46-00
.. gh-issue: 124958
.. nonce: rea9-x
.. section: Library
Fix refcycles in exceptions raised from :class:`asyncio.TaskGroup` and the
python implementation of :class:`asyncio.Future`
..
.. date: 2024-10-03-20-45-57
.. gh-issue: 53203
.. nonce: 3Sk4Ia
.. section: Library
Fix :func:`time.strptime` for ``%c`` and ``%x`` formats in many locales:
Arabic, Bislama, Breton, Bodo, Kashubian, Chuvash, Estonian, French, Irish,
Ge'ez, Gurajati, Manx Gaelic, Hebrew, Hindi, Chhattisgarhi, Haitian Kreyol,
Japanese, Kannada, Korean, Marathi, Malay, Norwegian, Nynorsk, Punjabi,
Rajasthani, Tok Pisin, Yoruba, Yue Chinese, Yau/Nungon and Chinese.
..
.. date: 2024-10-02-21-11-18
.. gh-issue: 124917
.. nonce: Lnwh5b
.. section: Library
Allow calling :func:`os.path.exists` and :func:`os.path.lexists` with
keyword arguments on Windows. Fixes a regression in 3.13.0.
..
.. date: 2024-10-02-15-05-45
.. gh-issue: 124653
.. nonce: tqsTu9
.. section: Library
Fix detection of the minimal Queue API needed by the :mod:`logging` module.
Patch by Bénédikt Tran.
..
.. date: 2024-10-01-17-12-20
.. gh-issue: 124858
.. nonce: Zy0tvT
.. section: Library
Fix reference cycles left in tracebacks in :func:`asyncio.open_connection`
when used with ``happy_eyeballs_delay``
..
.. date: 2024-10-01-13-46-58
.. gh-issue: 124390
.. nonce: dK1Zcm
.. section: Library
Fixed :exc:`AssertionError` when using
:func:`!asyncio.staggered.staggered_race` with
:attr:`asyncio.eager_task_factory`.
..
.. date: 2024-09-28-02-03-04
.. gh-issue: 124651
.. nonce: bLBGtH
.. section: Library
Properly quote template strings in :mod:`venv` activation scripts.
..
.. date: 2024-09-27-15-16-04
.. gh-issue: 116850
.. nonce: dBkR0-
.. section: Library
Fix :mod:`argparse` for namespaces with not directly writable dict (e.g.
classes).
..
.. date: 2024-09-26-22-14-12
.. gh-issue: 58573
.. nonce: hozbm9
.. section: Library
Fix conflicts between abbreviated long options in the parent parser and
subparsers in :mod:`argparse`.
..
.. date: 2024-09-26-13-43-39
.. gh-issue: 124594
.. nonce: peYhsP
.. section: Library
All :mod:`asyncio` REPL prompts run in the same :class:`context
<contextvars.Context>`. Contributed by Bartosz Sławecki.
..
.. date: 2024-09-26-09-18-09
.. gh-issue: 61181
.. nonce: dwjmch
.. section: Library
Fix support of :ref:`choices` with string value in :mod:`argparse`.
Substrings of the specified string no longer considered valid values.
..
.. date: 2024-09-25-18-08-29
.. gh-issue: 80259
.. nonce: kO5Tw7
.. section: Library
Fix :mod:`argparse` support of positional arguments with ``nargs='?'``,
``default=argparse.SUPPRESS`` and specified ``type``.
..
.. date: 2024-09-25-18-07-51
.. gh-issue: 120378
.. nonce: NlBSz_
.. section: Library
Fix a crash related to an integer overflow in :func:`curses.resizeterm` and
:func:`curses.resize_term`.
..
.. date: 2024-09-24-22-38-51
.. gh-issue: 123884
.. nonce: iEPTK4
.. section: Library
Fixed bug in itertools.tee() handling of other tee inputs (a tee in a tee).
The output now has the promised *n* independent new iterators. Formerly,
the first iterator was identical (not independent) to the input iterator.
This would sometimes give surprising results.
..
.. date: 2024-09-24-18-16-59
.. gh-issue: 58956
.. nonce: 0wFrBR
.. section: Library
Fixed a bug in :mod:`pdb` where sometimes the breakpoint won't trigger if it
was set on a function which is already in the call stack.
..
.. date: 2024-09-24-12-34-48
.. gh-issue: 124345
.. nonce: s3vKql
.. section: Library
:mod:`argparse` vim supports abbreviated single-dash long options separated
by ``=`` from its value.
..
.. date: 2024-09-23-17-33-47
.. gh-issue: 104860
.. nonce: O86OSc
.. section: Library
Fix disallowing abbreviation of single-dash long options in :mod:`argparse`
with ``allow_abbrev=False``.
..
.. date: 2024-09-21-23-56-41
.. gh-issue: 63143
.. nonce: YKu-LQ
.. section: Library
Fix parsing mutually exclusive arguments in :mod:`argparse`. Arguments with
the value identical to the default value (e.g. booleans, small integers,
empty or 1-character strings) are no longer considered "not present".
..
.. date: 2024-09-21-22-32-21
.. gh-issue: 72795
.. nonce: naLmkX
.. section: Library
Positional arguments with :ref:`nargs` equal to ``'*'`` or
:data:`!argparse.REMAINDER` are no longer required. This allows to use
positional argument with ``nargs='*'`` and without ``default`` in mutually
exclusive group and improves error message about required arguments.
..
.. date: 2024-09-21-19-02-37
.. gh-issue: 59317
.. nonce: OAhNZZ
.. section: Library
Fix parsing positional argument with :ref:`nargs` equal to ``'?'`` or
``'*'`` if it is preceded by an option and another positional argument.
..
.. date: 2024-09-20-12-23-11
.. gh-issue: 53780
.. nonce: mrV1zi
.. section: Library
:mod:`argparse` now ignores the first ``"--"`` (double dash) between an
option and command.
..
.. date: 2024-09-19-20-15-00
.. gh-issue: 124217
.. nonce: j0KlQB
.. section: Library
Add RFC 9637 reserved IPv6 block ``3fff::/20`` in :mod:`ipaddress` module.
..
.. date: 2024-09-19-10-36-18
.. gh-issue: 81691
.. nonce: Hyhp_U
.. section: Library
Fix handling of multiple ``"--"`` (double dashes) in :mod:`argparse`. Only
the first one has now been removed, all subsequent ones are now taken
literally.
..
.. date: 2024-09-16-12-31-48
.. gh-issue: 123978
.. nonce: z3smEu
.. section: Library
Remove broken :func:`time.thread_time` and :func:`time.thread_time_ns` on
NetBSD.
..
.. date: 2024-09-13-18-24-27
.. gh-issue: 124008
.. nonce: XaiPQx
.. section: Library
Fix possible crash (in debug build), incorrect output or returning incorrect
value from raw binary ``write()`` when writing to console on Windows.
..
.. date: 2024-09-11-13-33-19
.. gh-issue: 123935
.. nonce: fRZ_56
.. section: Library
Fix parent slots detection for dataclasses that inherit from classes with
``__dictoffset__``.
..
.. date: 2024-09-06-00-00-43
.. gh-issue: 122765
.. nonce: tx4hsr
.. section: Library
Fix unbalanced quote errors occurring when activate.csh in :mod:`venv` was
sourced with a custom prompt containing unpaired quotes or newlines.
..
.. date: 2024-08-28-19-27-35
.. gh-issue: 123370
.. nonce: SPZ9Ux
.. section: Library
Fix the canvas not clearing after running turtledemo clock.
..
.. date: 2024-08-23-15-49-10
.. gh-issue: 116810
.. nonce: QLBUU8
.. section: Library
Resolve a memory leak introduced in CPython 3.10's :mod:`ssl` when the
:attr:`ssl.SSLSocket.session` property was accessed. Speeds up read and
write access to said property by no longer unnecessarily cloning session
objects via serialization.
..
.. date: 2024-07-23-02-24-50
.. gh-issue: 120754
.. nonce: nHb5mG
.. section: Library
Update unbounded ``read`` calls in :mod:`zipfile` to specify an explicit
``size`` putting a limit on how much data they may read. This also updates
handling around ZIP max comment size to match the standard instead of
reading comments that are one byte too long.
..
.. date: 2024-06-06-04-06-05
.. gh-issue: 70764
.. nonce: 6511hw
.. section: Library
Fixed an issue where :func:`inspect.getclosurevars` would incorrectly
classify an attribute name as a global variable when the name exists both as
an attribute name and a global variable.
..
.. date: 2024-06-05-19-09-36
.. gh-issue: 118289
.. nonce: moL9_d
.. section: Library
:func:`!posixpath.realpath` now raises :exc:`NotADirectoryError` when
*strict* mode is enabled and a non-directory path with a trailing slash is
supplied.
..
.. date: 2024-06-02-11-48-19
.. gh-issue: 119826
.. nonce: N1obGa
.. section: Library
Always return an absolute path for :func:`os.path.abspath` on Windows.
..
.. date: 2024-04-19-05-58-50
.. gh-issue: 117766
.. nonce: J3xepp
.. section: Library
Always use :func:`str` to print ``choices`` in :mod:`argparse`.
..
.. date: 2023-10-26-16-36-22
.. gh-issue: 101955
.. nonce: Ixu3IF
.. section: Library
Fix SystemError when match regular expression pattern containing some
combination of possessive quantifier, alternative and capture group.
..
.. date: 2023-02-15-23-54-42
.. gh-issue: 88110
.. nonce: KU6erv
.. section: Library
Fixed :class:`multiprocessing.Process` reporting a ``.exitcode`` of 1 even
on success when using the ``"fork"`` start method while using a
:class:`concurrent.futures.ThreadPoolExecutor`.
..
.. date: 2022-10-15-10-18-20
.. gh-issue: 71936
.. nonce: MzJjc_
.. section: Library
Fix a race condition in :class:`multiprocessing.pool.Pool`.
..
.. bpo: 46128
.. date: 2021-12-19-10-47-24
.. nonce: Qv3EK1
.. section: Library
Strip :class:`unittest.IsolatedAsyncioTestCase` stack frames from reported
stacktraces.
..
.. bpo: 14074
.. date: 2018-12-04-07-36-27
.. nonce: fMLKCu
.. section: Library
Fix :mod:`argparse` metavar processing to allow positional arguments to have
a tuple metavar.
..
.. date: 2024-10-04-15-34-34
.. gh-issue: 122392
.. nonce: V8K3w2
.. section: IDLE
Increase currently inadequate vertical spacing for the IDLE browsers (path,
module, and stack) on high-resolution monitors.
..
.. date: 2024-11-09-19-43-10
.. gh-issue: 126622
.. nonce: YacfDc
.. section: Documentation
Added stub pages for removed modules explaining their removal, where to find
replacements, and linking to the last Python version that supported them.
Contributed by Ned Batchelder.
..
.. date: 2024-10-10-23-46-54
.. gh-issue: 125277
.. nonce: QAby09
.. section: Documentation
Require Sphinx 7.2.6 or later to build the Python documentation. Patch by
Adam Turner.
..
.. date: 2024-10-10-02-56-24
.. gh-issue: 124872
.. nonce: 0mDDOq
.. section: Documentation
Added definitions for :term:`context`, :term:`current context`, and
:term:`context management protocol`, updated related definitions to be
consistent, and expanded the documentation for :class:`contextvars.Context`.
..
.. date: 2024-10-07-00-31-17
.. gh-issue: 125018
.. nonce: yKnymn
.. section: Documentation
The :mod:`importlib.metadata` documentation now includes semantic
cross-reference targets for the significant documented APIs. This means
intersphinx references like :func:`importlib.metadata.version` will now work
as expected.
..
.. date: 2024-08-01-17-18-21
.. gh-issue: 70870
.. nonce: fZnBM9
.. section: Documentation
Clarified the dual usage of the term "free variable" (both the formal
meaning of any reference to names defined outside the local scope, and the
narrower pragmatic meaning of nonlocal variables named in ``co_freevars``).
..
.. date: 2024-07-19-12-22-48
.. gh-issue: 121277
.. nonce: wF_zKd
.. section: Documentation
Writers of CPython's documentation can now use ``next`` as the version for
the ``versionchanged``, ``versionadded``, ``deprecated`` directives.
..
.. date: 2023-03-28-22-24-45
.. gh-issue: 60712
.. nonce: So5uad
.. section: Documentation
Include the :class:`object` type in the lists of documented types. Change by
Furkan Onder and Martin Panter.
..
.. bpo: 34008
.. date: 2018-07-04-20-35-25
.. nonce: bqecIb
.. section: Documentation
The :c:func:`Py_Main` documentation moved from the "Very High Level API"
section to the "Initialization and Finalization" section.
Also make it explicit that we expect ``Py_Main`` to typically be called
instead of ``Py_Initialize`` rather than after it (since ``Py_Main`` makes
its own call to ``Py_Initialize``). Document that calling both is supported
but is version dependent on which settings will be applied correctly.
..
.. date: 2024-11-24-07-01-28
.. gh-issue: 113841
.. nonce: WFg-Bu
.. section: Core and Builtins
Fix possible undefined behavior division by zero in :class:`complex`'s
:c:func:`_Py_c_pow`.
..
.. date: 2024-11-19-21-49-58
.. gh-issue: 127020
.. nonce: 5vvI17
.. section: Core and Builtins
Fix a crash in the free threading build when :c:func:`PyCode_GetCode`,
:c:func:`PyCode_GetVarnames`, :c:func:`PyCode_GetCellvars`, or
:c:func:`PyCode_GetFreevars` were called from multiple threads at the same
time.
..
.. date: 2024-11-18-23-18-17
.. gh-issue: 126980
.. nonce: r8QHdi
.. section: Core and Builtins
Fix :meth:`~object.__buffer__` of :class:`bytearray` crashing when
:attr:`~inspect.BufferFlags.READ` or :attr:`~inspect.BufferFlags.WRITE` are
passed as flags.
..
.. date: 2024-11-16-11-11-35
.. gh-issue: 126881
.. nonce: ijofLZ
.. section: Core and Builtins
Fix crash in finalization of dtoa state. Patch by Kumar Aditya.
..
.. date: 2024-11-12-19-24-00
.. gh-issue: 126341
.. nonce: 5SdAe1
.. section: Core and Builtins
Now :exc:`ValueError` is raised instead of :exc:`SystemError` when trying to
iterate over a released :class:`memoryview` object.
..
.. date: 2024-11-11-17-02-48
.. gh-issue: 126688
.. nonce: QiOXUi
.. section: Core and Builtins
Fix a crash when calling :func:`os.fork` on some operating systems,
including SerenityOS.
..
.. date: 2024-11-09-16-10-22
.. gh-issue: 126066
.. nonce: 9zs4m4
.. section: Library
Fix :mod:`importlib` to not write an incomplete .pyc files when a ulimit or
some other operating system mechanism is preventing the write to go through
fully.
..
.. date: 2024-11-02-14-43-46
.. gh-issue: 126312
.. nonce: LMHzLT
.. section: Core and Builtins
Fix crash during garbage collection on an object frozen by :func:`gc.freeze`
on the free-threaded build.
..
.. date: 2024-10-29-15-17-31
.. gh-issue: 126139
.. nonce: B4OQ8a
.. section: Core and Builtins
Provide better error location when attempting to use a :term:`future
statement <__future__>` with an unknown future feature.
..
.. date: 2024-10-26-23-50-03
.. gh-issue: 126018
.. nonce: Hq-qcM
.. section: Core and Builtins
Fix a crash in :func:`sys.audit` when passing a non-string as first argument
and Python was compiled in debug mode.
..
.. date: 2024-10-24-22-43-03
.. gh-issue: 125942
.. nonce: 3UQht1
.. section: Core and Builtins
On Android, the ``errors`` setting of :any:`sys.stdout` was changed from
``surrogateescape`` to ``backslashreplace``.
..
.. date: 2024-10-23-14-42-27
.. gh-issue: 125859
.. nonce: m3EF9E
.. section: Core and Builtins
Fix a crash in the free threading build when :func:`gc.get_objects` or
:func:`gc.get_referrers` is called during an in-progress garbage collection.
..
.. date: 2024-10-18-16-00-10
.. gh-issue: 125703
.. nonce: QRoqMo
.. section: Core and Builtins
Correctly honour :mod:`tracemalloc` hooks in specialized ``Py_DECREF``
paths. Patch by Pablo Galindo
..
.. date: 2024-10-18-10-11-43
.. gh-issue: 125593
.. nonce: Q97m3A
.. section: Core and Builtins
Use color to highlight error locations in traceback from exception group
..
.. date: 2024-10-16-12-12-39
.. gh-issue: 125444
.. nonce: 9tG2X6
.. section: Core and Builtins
Fix illegal instruction for older Arm architectures. Patch by Diego Russo,
testing by Ross Burton.
..
.. date: 2024-10-15-15-29-41
.. gh-issue: 124375
.. nonce: wNrWVa
.. section: Core and Builtins
Fix a crash in the free threading build when the GC runs concurrently with a
new thread starting.
..
.. date: 2024-10-10-14-47-13
.. gh-issue: 125221
.. nonce: nfSQzT
.. section: Core and Builtins
Fix possible race condition when calling :meth:`~object.__reduce_ex__` for
the first time in the free threading build.
..
.. date: 2024-10-09-13-53-50
.. gh-issue: 125038
.. nonce: ffSLCz
.. section: Core and Builtins
Fix crash when iterating over a generator expression after direct changes on
``gi_frame.f_locals``. Patch by Mikhail Efimov.
..
.. date: 2024-10-03-14-39-41
.. gh-issue: 123378
.. nonce: dCxANf
.. section: Core and Builtins
Fix a crash in the :meth:`~object.__str__` method of :exc:`UnicodeError`
objects when the :attr:`UnicodeError.start` and :attr:`UnicodeError.end`
values are invalid or out-of-range. Patch by Bénédikt Tran.
..
.. date: 2024-09-26-18-21-06
.. gh-issue: 116510
.. nonce: FacUWO
.. section: Core and Builtins
Fix a crash caused by immortal interned strings being shared between
sub-interpreters that use basic single-phase init. In that case, the string
can be used by an interpreter that outlives the interpreter that created and
interned it. For interpreters that share obmalloc state, also share the
interned dict with the main interpreter.
..
.. date: 2024-09-19-13-17-31
.. gh-issue: 122878
.. nonce: 4iFpsB
.. section: Core and Builtins
Use the ``pager`` binary, if available (e.g. on Debian and derivatives), to
display REPL ``help()``.
..
.. date: 2024-09-17-22-06-01
.. gh-issue: 124188
.. nonce: aFqNAB
.. section: Core and Builtins
Fix reading and decoding a line from the source file witn non-UTF-8 encoding
for syntax errors raised in the compiler.
..
.. date: 2024-09-11-01-32-07
.. gh-issue: 123930
.. nonce: BkPfB6
.. section: Core and Builtins
Improve the error message when a script shadowing a module from the standard
library causes :exc:`ImportError` to be raised during a "from" import.
Similarly, improve the error message when a script shadowing a third party
module attempts to "from" import an attribute from that third party module
while still initialising.
..
.. date: 2024-08-12-11-19-37
.. gh-issue: 122907
.. nonce: q68096
.. section: Core and Builtins
Building with ``HAVE_DYNAMIC_LOADING`` now works as well as it did in 3.12.
Existing deficiences will be addressed separately. (See
https://github.com/python/cpython/issues/122950.)
..
.. date: 2024-05-12-03-10-36
.. gh-issue: 118950
.. nonce: 5Wc4vp
.. section: Library
Fix bug where SSLProtocol.connection_lost wasn't getting called when OSError
was thrown on writing to socket.
..
.. date: 2023-12-30-00-21-45
.. gh-issue: 113570
.. nonce: _XQgsW
.. section: Library
Fixed a bug in ``reprlib.repr`` where it incorrectly called the repr method
on shadowed Python built-in types.
..
.. date: 2023-09-22-21-01-56
.. gh-issue: 109746
.. nonce: 32MHt9
.. section: Core and Builtins
If :func:`!_thread.start_new_thread` fails to start a new thread, it deletes
its state from interpreter and thus avoids its repeated cleanup on
finalization.
..
.. date: 2024-11-07-20-24-58
.. gh-issue: 126554
.. nonce: ri12eb
.. section: C API
Fix error handling in :class:`ctypes.CDLL` objects which could result in a
crash in rare situations.
..
.. date: 2024-10-16-19-28-23
.. gh-issue: 125608
.. nonce: gTsU2g
.. section: C API
Fix a bug where dictionary watchers (e.g., :c:func:`PyDict_Watch`) on an
object's attribute dictionary (:attr:`~object.__dict__`) were not triggered
when the object's attributes were modified.
..
.. bpo: 34008
.. date: 2018-06-30-21-48-16
.. nonce: 2Wjtm0
.. section: C API
Added ``Py_IsInitialized`` to the list of APIs that are safe to call before
the interpreter is initialized, and updated the embedding tests to cover it.
..
.. date: 2024-11-07-15-03-34
.. gh-issue: 123877
.. nonce: 9dWXe2
.. section: Build
Set ``wasm32-wasip1`` as the WASI target. The old ``wasm32-wasi`` target is
deprecated so it can be used for an eventual WASI 1.0.
..
.. date: 2024-11-04-09-42-04
.. gh-issue: 89640
.. nonce: QBv05o
.. section: Build
Hard-code float word ordering as little endian on WASM.
..
.. date: 2024-10-24-22-14-35
.. gh-issue: 125940
.. nonce: 2wMtTA
.. section: Build
The Android build now supports `16 KB page sizes
<https://developer.android.com/guide/practices/page-sizes>`__.
..
.. date: 2024-10-16-09-37-51
.. gh-issue: 89640
.. nonce: UDsW-j
.. section: Build
Improve detection of float word ordering on Linux when link-time
optimizations are enabled.
..
.. date: 2024-10-13-21-11-30
.. gh-issue: 125269
.. nonce: BC-fdo
.. section: Build
Fix detection of whether ``-latomic`` is needed when cross-compiling CPython
using the configure script.
..
.. date: 2024-08-14-19-17-34
.. gh-issue: 121634
.. nonce: eOMfHG
.. section: Build
Allow for specifying the target compile triple for WASI.
..
.. date: 2024-08-12-15-48-49
.. gh-issue: 122578
.. nonce: YJ3xEa
.. section: Build
Use WASI SDK 24 for testing.
..
.. date: 2024-03-03-20-28-23
.. gh-issue: 115382
.. nonce: 97hJFE
.. section: Build
Fix cross compile failures when the host and target SOABIs match.