Skip to content

Commit 0aea374

Browse files
authored
Merge branch 'main' into fix-gh-153970-calledprocesserror-none
2 parents 46d6a68 + 5afbb60 commit 0aea374

103 files changed

Lines changed: 1591 additions & 475 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,14 @@ PCbuild/*-pgo
124124
PCbuild/*.VC.db
125125
PCbuild/*.VC.opendb
126126
PCbuild/amd64/
127+
PCbuild/amd64t/
127128
PCbuild/arm32/
129+
PCbuild/arm32t/
128130
PCbuild/arm64/
131+
PCbuild/arm64t/
129132
PCbuild/obj/
130133
PCbuild/win32/
134+
PCbuild/win32t/
131135
Tools/unicode/data/
132136
/autom4te.cache
133137
/build/

Doc/library/asyncio-eventloop.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,6 +1873,12 @@ Do not instantiate the :class:`Server` class directly.
18731873
Wait until the :meth:`close` method completes and all active
18741874
connections have finished.
18751875

1876+
.. versionchanged:: 3.12
1877+
``wait_closed()`` now waits until the server is closed and
1878+
all active connections have finished. Previously, it returned
1879+
immediately if the server was already closed, even if
1880+
connections were still active.
1881+
18761882
.. attribute:: sockets
18771883

18781884
List of socket-like objects, ``asyncio.trsock.TransportSocket``, which

Doc/library/ctypes.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,8 +708,7 @@ Specifying function pointers using type annotations
708708

709709
@wrap_dll_function(dll_to_wrap)
710710
def function_ptr_name(arg_name: ctypes_type, ...) -> ctypes_type:
711-
# There should be no body
712-
pass
711+
"""Optional docstring. There should be no function body."""
713712

714713
The body of the decorated function is ignored, and any parameters that are
715714
missing type annotations are skipped. The names of the parameters are ignored
@@ -1867,6 +1866,10 @@ like ``find_library("c")`` will fail and return ``None``.
18671866

18681867
.. availability:: Windows
18691868

1869+
.. soft-deprecated:: 3.16
1870+
This function now always returns ``None``, as there are no more
1871+
VC runtime DLLs that are a single file and supported by Microsoft.
1872+
18701873

18711874
.. _ctypes-listing-loaded-shared-libraries:
18721875

Doc/library/difflib.rst

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,18 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
4040
complicated way on how many elements the sequences have in common; best case
4141
time is linear.
4242

43-
**Automatic junk heuristic:** :class:`SequenceMatcher` supports a heuristic that
44-
automatically treats certain sequence items as junk. The heuristic counts how many
45-
times each individual item appears in the sequence. If an item's duplicates (after
46-
the first one) account for more than 1% of the sequence and the sequence is at least
47-
200 items long, this item is marked as "popular" and is treated as junk for
48-
the purpose of sequence matching. This heuristic can be turned off by setting
49-
the ``autojunk`` argument to ``False`` when creating the :class:`SequenceMatcher`.
43+
**Junk**: :class:`SequenceMatcher` accepts an ``isjunk`` predicate and an
44+
``autojunk`` flag. Items that are considered as junk will not be considered
45+
to find similar content blocks. This can produce better results for humans
46+
(typically breaking on whitespace) and faster (because it reduces the number
47+
of possible combinations). But it can also cause pathological cases where
48+
too many items considered junk cause an unexpectedly large (but correct)
49+
diff result.
50+
You should consider tuning them or turning them off depending on your data.
51+
Moreover, only the second sequence is inspected for junk. This causes the diff
52+
output to not be symmetrical.
53+
When ``autojunk=True``, it will consider as junk the items that account for more
54+
than 1% of the sequence, if it is at least 200 items long.
5055

5156
.. versionchanged:: 3.2
5257
Added the *autojunk* parameter.
@@ -558,16 +563,6 @@ The :class:`SequenceMatcher` class has this constructor:
558563
to try :meth:`quick_ratio` or :meth:`real_quick_ratio` first to get an
559564
upper bound.
560565

561-
.. note::
562-
563-
Caution: The result of a :meth:`ratio` call may depend on the order of
564-
the arguments. For instance::
565-
566-
>>> SequenceMatcher(None, 'tide', 'diet').ratio()
567-
0.25
568-
>>> SequenceMatcher(None, 'diet', 'tide').ratio()
569-
0.5
570-
571566

572567
.. method:: quick_ratio()
573568

Doc/library/exceptions.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ The following exceptions are the exceptions that are usually raised.
215215

216216
The object that was accessed for the named attribute.
217217

218+
When possible, :attr:`name` and :attr:`obj` are set automatically.
219+
218220
.. versionchanged:: 3.10
219221
Added the :attr:`name` and :attr:`obj` attributes.
220222

Doc/library/logging.handlers.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,8 @@ supports sending logging messages to a remote or local Unix syslog.
631631
the form of a ``(host, port)`` tuple. If *address* is not specified,
632632
``('localhost', 514)`` is used. The address is used to open a socket. An
633633
alternative to providing a ``(host, port)`` tuple is providing an address as a
634-
string, for example '/dev/log'. In this case, a Unix domain socket is used to
634+
string or a :class:`bytes` object, for example '/dev/log'.
635+
In this case, a Unix domain socket is used to
635636
send the message to the syslog. If *facility* is not specified,
636637
:const:`LOG_USER` is used. The type of socket opened depends on the
637638
*socktype* argument, which defaults to :const:`socket.SOCK_DGRAM` and thus
@@ -664,6 +665,9 @@ supports sending logging messages to a remote or local Unix syslog.
664665
.. versionchanged:: 3.14
665666
*timeout* was added.
666667

668+
.. versionchanged:: next
669+
*address* can now be a :class:`bytes` object.
670+
667671
.. method:: close()
668672

669673
Closes the socket to the remote host.

Doc/library/msvcrt.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,23 @@ Console I/O
135135

136136
.. function:: putch(char)
137137

138-
Print the byte string *char* to the console without buffering.
138+
Print the byte string *char* to the console without buffering. Raises
139+
:exc:`OSError` on failure, for example when the process has no console
140+
attached.
141+
142+
.. versionchanged:: next
143+
Failures are now reported by raising :exc:`OSError` instead of being
144+
silently ignored.
139145

140146

141147
.. function:: putwch(unicode_char)
142148

143149
Wide char variant of :func:`putch`, accepting a Unicode value.
144150

151+
.. versionchanged:: next
152+
Failures are now reported by raising :exc:`OSError` instead of being
153+
silently ignored.
154+
145155

146156
.. function:: ungetch(char)
147157

Doc/library/stdtypes.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4876,8 +4876,9 @@ copying.
48764876
Cast a memoryview to a new format or shape. *shape* defaults to
48774877
``[byte_length//new_itemsize]``, which means that the result view
48784878
will be one-dimensional. The return value is a new memoryview, but
4879-
the buffer itself is not copied. Supported casts are 1D -> C-:term:`contiguous`
4880-
and C-contiguous -> 1D.
4879+
the buffer itself is not copied. Supported casts are
4880+
1D -> C-:term:`contiguous`, C-contiguous -> 1D, and
4881+
F-contiguous -> 1D.
48814882

48824883
The destination format is restricted to a single element native format in
48834884
:mod:`struct` syntax. One of the formats must be a byte format
@@ -4964,6 +4965,10 @@ copying.
49644965
.. versionchanged:: 3.5
49654966
The source format is no longer restricted when casting to a byte view.
49664967

4968+
.. versionchanged:: next
4969+
Casting a multi-dimensional F-contiguous view to a one-dimensional
4970+
view is now supported.
4971+
49674972
.. method:: count(value, /)
49684973

49694974
Count the number of occurrences of *value*.

Doc/library/warnings.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ Available Functions
566566
and calls to :func:`simplefilter`.
567567

568568

569-
.. decorator:: deprecated(msg, *, category=DeprecationWarning, stacklevel=1)
569+
.. decorator:: deprecated(message, /, *, category=DeprecationWarning, stacklevel=1)
570570

571571
Decorator to indicate that a class, function or overload is deprecated.
572572

Doc/license.rst

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,3 +1216,52 @@ license::
12161216
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
12171217
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
12181218
DAMAGE.
1219+
1220+
1221+
Unicode Character Database
1222+
--------------------------
1223+
1224+
An extract of the `Unicode Character Database <https://www.unicode.org/ucd/>`__,
1225+
converted to an internal format, is used by the :mod:`unicodedata` module and
1226+
for the Unicode support of the :class:`str` type. The original Unicode data
1227+
files are distributed under the `Unicode License <https://www.unicode.org/license.txt>`__::
1228+
1229+
UNICODE LICENSE V3
1230+
1231+
COPYRIGHT AND PERMISSION NOTICE
1232+
1233+
Copyright © 1991-2026 Unicode, Inc.
1234+
1235+
NOTICE TO USER: Carefully read the following legal agreement. BY
1236+
DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
1237+
SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
1238+
TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
1239+
DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
1240+
1241+
Permission is hereby granted, free of charge, to any person obtaining a
1242+
copy of data files and any associated documentation (the "Data Files") or
1243+
software and any associated documentation (the "Software") to deal in the
1244+
Data Files or Software without restriction, including without limitation
1245+
the rights to use, copy, modify, merge, publish, distribute, and/or sell
1246+
copies of the Data Files or Software, and to permit persons to whom the
1247+
Data Files or Software are furnished to do so, provided that either (a)
1248+
this copyright and permission notice appear with all copies of the Data
1249+
Files or Software, or (b) this copyright and permission notice appear in
1250+
associated Documentation.
1251+
1252+
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
1253+
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1254+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
1255+
THIRD PARTY RIGHTS.
1256+
1257+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
1258+
BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
1259+
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
1260+
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
1261+
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
1262+
FILES OR SOFTWARE.
1263+
1264+
Except as contained in this notice, the name of a copyright holder shall
1265+
not be used in advertising or otherwise to promote the sale, use or other
1266+
dealings in these Data Files or Software without prior written
1267+
authorization of the copyright holder.

0 commit comments

Comments
 (0)