Skip to content

Commit 049e663

Browse files
authored
Merge branch 'main' into fix/sqlite/uaf-in-cursor-143198
2 parents 75b2a0c + 3c4429f commit 049e663

File tree

62 files changed

+2072
-1100
lines changed

Some content is hidden

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

62 files changed

+2072
-1100
lines changed

Doc/library/concurrent.futures.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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.

Doc/library/inspect.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
273273
+-----------------+-------------------+---------------------------+
274274
| | ag_running | is the generator running? |
275275
+-----------------+-------------------+---------------------------+
276+
| | ag_suspended | is the generator |
277+
| | | suspended? |
278+
+-----------------+-------------------+---------------------------+
276279
| | ag_code | code |
277280
+-----------------+-------------------+---------------------------+
278281
| coroutine | __name__ | name |
@@ -286,6 +289,9 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
286289
+-----------------+-------------------+---------------------------+
287290
| | cr_running | is the coroutine running? |
288291
+-----------------+-------------------+---------------------------+
292+
| | cr_suspended | is the coroutine |
293+
| | | suspended? |
294+
+-----------------+-------------------+---------------------------+
289295
| | cr_code | code |
290296
+-----------------+-------------------+---------------------------+
291297
| | cr_origin | where coroutine was |
@@ -319,6 +325,18 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
319325

320326
Add ``__builtins__`` attribute to functions.
321327

328+
.. versionchanged:: 3.11
329+
330+
Add ``gi_suspended`` attribute to generators.
331+
332+
.. versionchanged:: 3.11
333+
334+
Add ``cr_suspended`` attribute to coroutines.
335+
336+
.. versionchanged:: 3.12
337+
338+
Add ``ag_suspended`` attribute to async generators.
339+
322340
.. versionchanged:: 3.14
323341

324342
Add ``f_generator`` attribute to frames.

Doc/library/socket.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,10 +1072,16 @@ The :mod:`socket` module also offers various network-related services:
10721072
a string representing the canonical name of the *host* if
10731073
:const:`AI_CANONNAME` is part of the *flags* argument; else *canonname*
10741074
will be empty. *sockaddr* is a tuple describing a socket address, whose
1075-
format depends on the returned *family* (a ``(address, port)`` 2-tuple for
1076-
:const:`AF_INET`, a ``(address, port, flowinfo, scope_id)`` 4-tuple for
1077-
:const:`AF_INET6`), and is meant to be passed to the :meth:`socket.connect`
1078-
method.
1075+
format depends on the returned *family* and flags Python was compiled with,
1076+
and is meant to be passed to the :meth:`socket.connect` method.
1077+
1078+
*sockaddr* can be one of the following:
1079+
1080+
* a ``(address, port)`` 2-tuple for :const:`AF_INET`
1081+
* a ``(address, port, flowinfo, scope_id)`` 4-tuple for :const:`AF_INET6` if
1082+
Python was compiled with ``--enable-ipv6`` (the default)
1083+
* a 2-tuple containing raw data for :const:`AF_INET6` if Python was
1084+
compiled with ``--disable-ipv6``
10791085

10801086
.. note::
10811087

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/library/zoneinfo.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ The ``ZoneInfo`` class has two alternate constructors:
206206

207207
Objects created via this constructor cannot be pickled (see `pickling`_).
208208

209+
:exc:`ValueError` is raised if the data read from *file_obj* is not a valid
210+
TZif file.
211+
209212
.. classmethod:: ZoneInfo.no_cache(key)
210213

211214
An alternate constructor that bypasses the constructor's cache. It is

Doc/reference/import.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -832,9 +832,7 @@ entirely with a custom meta path hook.
832832

833833
If it is acceptable to only alter the behaviour of import statements
834834
without affecting other APIs that access the import system, then replacing
835-
the builtin :func:`__import__` function may be sufficient. This technique
836-
may also be employed at the module level to only alter the behaviour of
837-
import statements within that module.
835+
the builtin :func:`__import__` function may be sufficient.
838836

839837
To selectively prevent the import of some modules from a hook early on the
840838
meta path (rather than disabling the standard import system entirely),

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/tools/extensions/lexers/asdl_lexer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ASDLLexer(RegexLexer):
2222
bygroups(Keyword, Text, Name.Tag),
2323
),
2424
(
25-
r"(\w+)(\*\s|\?\s|\s)(\w+)",
25+
r"(\w+)([\?\*]*\s)(\w+)",
2626
bygroups(Name.Builtin.Pseudo, Operator, Name),
2727
),
2828
# Keep in line with ``builtin_types`` from Parser/asdl.py.

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: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -854,11 +854,13 @@ Optimizations
854854

855855
* Builds using Visual Studio 2026 (MSVC 18) may now use the new
856856
:ref:`tail-calling interpreter <whatsnew314-tail-call-interpreter>`.
857-
Results on an early experimental MSVC compiler reported roughly 15% speedup
858-
on the geometric mean of pyperformance on Windows x86-64 over
859-
the switch-case interpreter. We have
860-
observed speedups ranging from 15% for large pure-Python libraries
857+
Results on Visual Studio 18.1.1 report between
858+
`15-20% <https://github.com/faster-cpython/ideas/blob/main/results/5800X-msvc.pgo2-vs-msvc.pgo.tc.svg>`__
859+
speedup on the geometric mean of pyperformance on Windows x86-64 over
860+
the switch-case interpreter on an AMD Ryzen 7 5800X. We have
861+
observed speedups ranging from 14% for large pure-Python libraries
861862
to 40% for long-running small pure-Python scripts on Windows.
863+
This was made possible by a new feature introduced in MSVC 18.
862864
(Contributed by Chris Eibl, Ken Jin, and Brandt Bucher in :gh:`143068`.
863865
Special thanks to the MSVC team including Hulon Jenkins.)
864866

0 commit comments

Comments
 (0)