Skip to content

Commit 0694b20

Browse files
committed
Merge branch 'main' of https://github.com/python/cpython into issue-142663
2 parents 06846a9 + 12283f6 commit 0694b20

File tree

104 files changed

+4056
-1789
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+4056
-1789
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,4 @@ jobs:
2222
- uses: actions/checkout@v4
2323
with:
2424
persist-credentials: false
25-
- uses: actions/setup-python@v5
26-
with:
27-
python-version: "3.x"
28-
- uses: pre-commit/action@v3.0.1
25+
- uses: j178/prek-action@v1

.github/zizmor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Configuration for the zizmor static analysis tool, run via pre-commit in CI
1+
# Configuration for the zizmor static analysis tool, run via prek in CI
22
# https://woodruffw.github.io/zizmor/configuration/
33
rules:
44
dangerous-triggers:

Doc/library/concurrent.futures.rst

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ the bytes over a shared :mod:`socket <socket>` or
308308

309309
.. note::
310310
The executor may replace uncaught exceptions from *initializer*
311-
with :class:`~concurrent.futures.interpreter.ExecutionFailed`.
311+
with :class:`~concurrent.interpreters.ExecutionFailed`.
312312

313313
Other caveats from parent :class:`ThreadPoolExecutor` apply here.
314314

@@ -320,11 +320,11 @@ likewise serializes the return value when sending it back.
320320
When a worker's current task raises an uncaught exception, the worker
321321
always tries to preserve the exception as-is. If that is successful
322322
then it also sets the ``__cause__`` to a corresponding
323-
:class:`~concurrent.futures.interpreter.ExecutionFailed`
323+
:class:`~concurrent.interpreters.ExecutionFailed`
324324
instance, which contains a summary of the original exception.
325325
In the uncommon case that the worker is not able to preserve the
326326
original as-is then it directly preserves the corresponding
327-
:class:`~concurrent.futures.interpreter.ExecutionFailed`
327+
:class:`~concurrent.interpreters.ExecutionFailed`
328328
instance instead.
329329

330330

@@ -379,6 +379,11 @@ in a REPL or a lambda should not be expected to work.
379379
default in absence of a *mp_context* parameter. This feature is incompatible
380380
with the "fork" start method.
381381

382+
.. note::
383+
Bugs have been reported when using the *max_tasks_per_child* feature that
384+
can result in the :class:`ProcessPoolExecutor` hanging in some
385+
circumstances. Follow its eventual resolution in :gh:`115634`.
386+
382387
.. versionchanged:: 3.3
383388
When one of the worker processes terminates abruptly, a
384389
:exc:`~concurrent.futures.process.BrokenProcessPool` error is now raised.
@@ -715,15 +720,6 @@ Exception classes
715720

716721
.. versionadded:: 3.14
717722

718-
.. exception:: ExecutionFailed
719-
720-
Raised from :class:`~concurrent.futures.InterpreterPoolExecutor` when
721-
the given initializer fails or from
722-
:meth:`~concurrent.futures.Executor.submit` when there's an uncaught
723-
exception from the submitted task.
724-
725-
.. versionadded:: 3.14
726-
727723
.. currentmodule:: concurrent.futures.process
728724

729725
.. exception:: BrokenProcessPool

Doc/library/multiprocessing.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,11 +1693,14 @@ inherited by child processes.
16931693
value is actually a synchronized wrapper for the array.
16941694

16951695
*typecode_or_type* determines the type of the elements of the returned array:
1696-
it is either a ctypes type or a one character typecode of the kind used by
1697-
the :mod:`array` module. If *size_or_initializer* is an integer, then it
1698-
determines the length of the array, and the array will be initially zeroed.
1699-
Otherwise, *size_or_initializer* is a sequence which is used to initialize
1700-
the array and whose length determines the length of the array.
1696+
it is either a :ref:`ctypes type <ctypes-fundamental-data-types>` or a one
1697+
character typecode of the kind used by the :mod:`array` module with the
1698+
exception of ``'w'``, which is not supported. In addition, the ``'c'``
1699+
typecode is an alias for :class:`ctypes.c_char`. If *size_or_initializer*
1700+
is an integer, then it determines the length of the array, and the array
1701+
will be initially zeroed. Otherwise, *size_or_initializer* is a sequence
1702+
which is used to initialize the array and whose length determines the length
1703+
of the array.
17011704

17021705
If *lock* is ``True`` (the default) then a new lock object is created to
17031706
synchronize access to the value. If *lock* is a :class:`Lock` or

Doc/library/profiling.sampling.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,6 +1490,13 @@ Output options
14901490
named ``<format>_<PID>.<ext>`` (for example, ``flamegraph_12345.html``).
14911491
:option:`--heatmap` creates a directory named ``heatmap_<PID>``.
14921492

1493+
.. option:: --browser
1494+
1495+
Automatically open HTML output (:option:`--flamegraph` and
1496+
:option:`--heatmap`) in your default web browser after generation.
1497+
When profiling with :option:`--subprocesses`, only the main process
1498+
opens the browser; subprocess outputs are never auto-opened.
1499+
14931500

14941501
pstats display options
14951502
----------------------

Doc/library/textwrap.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ functions should be good enough; otherwise, you should use an instance of
102102
print(repr(s)) # prints ' hello\n world\n '
103103
print(repr(dedent(s))) # prints 'hello\n world\n'
104104

105+
.. versionchanged:: 3.14
106+
The :func:`!dedent` function now correctly normalizes blank lines containing
107+
only whitespace characters. Previously, the implementation only normalized
108+
blank lines containing tabs and spaces.
105109

106110
.. function:: indent(text, prefix, predicate=None)
107111

Doc/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# won't suddenly cause build failures. Updating the version is fine as long
88
# as no warnings are raised by doing so.
99
# Keep this version in sync with ``Doc/conf.py``.
10-
sphinx~=9.0.0
10+
sphinx<9.0.0
1111

1212
blurb
1313

Doc/tutorial/appendix.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ There are two variants of the interactive :term:`REPL`. The classic
1414
basic interpreter is supported on all platforms with minimal line
1515
control capabilities.
1616

17-
On Windows, or Unix-like systems with :mod:`curses` support,
18-
a new interactive shell is used by default since Python 3.13.
17+
Since Python 3.13, a new interactive shell is used by default.
1918
This one supports color, multiline editing, history browsing, and
2019
paste mode. To disable color, see :ref:`using-on-controlling-color` for
2120
details. Function keys provide some additional functionality.

Doc/whatsnew/3.14.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2265,6 +2265,15 @@ pdb
22652265
(Contributed by Tian Gao in :gh:`124533`.)
22662266

22672267

2268+
textwrap
2269+
--------
2270+
2271+
* Optimize the :func:`~textwrap.dedent` function, improving performance by
2272+
an average of 2.4x, with larger improvements for bigger inputs,
2273+
and fix a bug with incomplete normalization of blank lines with whitespace
2274+
characters other than space and tab.
2275+
2276+
22682277
uuid
22692278
----
22702279

Doc/whatsnew/3.15.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,13 @@ argparse
428428
inline code when color output is enabled.
429429
(Contributed by Savannah Ostrowski in :gh:`142390`.)
430430

431+
base64 & binascii
432+
-----------------
433+
434+
* CPython's underlying base64 implementation now encodes 2x faster and decodes 3x
435+
faster thanks to simple CPU pipelining optimizations.
436+
(Contributed by Gregory P. Smith & Serhiy Storchaka in :gh:`143262`.)
437+
431438
calendar
432439
--------
433440

0 commit comments

Comments
 (0)