Skip to content

Commit 0b635d8

Browse files
authored
Merge branch 'main' into issue111801-test_isinstance-wasi
2 parents 3b79704 + 9a71750 commit 0b635d8

Some content is hidden

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

51 files changed

+382
-333
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ repos:
2828
hooks:
2929
- id: sphinx-lint
3030
args: [--enable=default-role]
31-
files: ^Doc/|^Misc/NEWS.d/next/
31+
files: ^Doc/|^Misc/NEWS.d/
3232

3333
- repo: meta
3434
hooks:

Doc/license.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,3 +1066,32 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
10661066
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
10671067
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
10681068
SOFTWARE.
1069+
1070+
1071+
asyncio
1072+
----------
1073+
1074+
Parts of the :mod:`asyncio` module are incorporated from
1075+
`uvloop 0.16 <https://github.com/MagicStack/uvloop/tree/v0.16.0>`_,
1076+
which is distributed under the MIT license::
1077+
1078+
Copyright (c) 2015-2021 MagicStack Inc. http://magic.io
1079+
1080+
Permission is hereby granted, free of charge, to any person obtaining
1081+
a copy of this software and associated documentation files (the
1082+
"Software"), to deal in the Software without restriction, including
1083+
without limitation the rights to use, copy, modify, merge, publish,
1084+
distribute, sublicense, and/or sell copies of the Software, and to
1085+
permit persons to whom the Software is furnished to do so, subject to
1086+
the following conditions:
1087+
1088+
The above copyright notice and this permission notice shall be
1089+
included in all copies or substantial portions of the Software.
1090+
1091+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1092+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1093+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1094+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1095+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1096+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1097+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Include/internal/pycore_pymem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ extern int _PyMem_SetDefaultAllocator(
6464
- PYMEM_FORBIDDENBYTE: untouchable bytes at each end of a block
6565
6666
Byte patterns 0xCB, 0xDB and 0xFB have been replaced with 0xCD, 0xDD and
67-
0xFD to use the same values than Windows CRT debug malloc() and free().
67+
0xFD to use the same values as Windows CRT debug malloc() and free().
6868
If modified, _PyMem_IsPtrFreed() should be updated as well. */
6969
#define PYMEM_CLEANBYTE 0xCD
7070
#define PYMEM_DEADBYTE 0xDD

Lib/asyncio/constants.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Contains code from https://github.com/MagicStack/uvloop/tree/v0.16.0
2+
# SPDX-License-Identifier: PSF-2.0 AND (MIT OR Apache-2.0)
3+
# SPDX-FileCopyrightText: Copyright (c) 2015-2021 MagicStack Inc. http://magic.io
4+
15
import enum
26

37
# After the connection is lost, log warnings after this many write()s.

Lib/asyncio/events.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
"""Event loop and event loop policy."""
22

3+
# Contains code from https://github.com/MagicStack/uvloop/tree/v0.16.0
4+
# SPDX-License-Identifier: PSF-2.0 AND (MIT OR Apache-2.0)
5+
# SPDX-FileCopyrightText: Copyright (c) 2015-2021 MagicStack Inc. http://magic.io
6+
37
__all__ = (
48
'AbstractEventLoopPolicy',
59
'AbstractEventLoop', 'AbstractServer',

Lib/asyncio/sslproto.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Contains code from https://github.com/MagicStack/uvloop/tree/v0.16.0
2+
# SPDX-License-Identifier: PSF-2.0 AND (MIT OR Apache-2.0)
3+
# SPDX-FileCopyrightText: Copyright (c) 2015-2021 MagicStack Inc. http://magic.io
4+
15
import collections
26
import enum
37
import warnings

Lib/test/test_asyncio/test_ssl.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Contains code from https://github.com/MagicStack/uvloop/tree/v0.16.0
2+
# SPDX-License-Identifier: PSF-2.0 AND (MIT OR Apache-2.0)
3+
# SPDX-FileCopyrightText: Copyright (c) 2015-2021 MagicStack Inc. http://magic.io
4+
15
import asyncio
26
import contextlib
37
import gc

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,7 @@ Carsten Klein
964964
Bastian Kleineidam
965965
Joel Klimont
966966
Bob Kline
967+
Alois Klink
967968
Matthias Klose
968969
Jeremy Kloth
969970
Thomas Kluyver

Misc/NEWS.d/3.10.0a1.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.. release date: 2020-10-05
55
.. section: Security
66
7-
Fixes `python3x._pth` being ignored on Windows, caused by the fix for
7+
Fixes ``python3x._pth`` being ignored on Windows, caused by the fix for
88
:issue:`29778` (CVE-2020-15801).
99

1010
..
@@ -217,7 +217,7 @@ Port the :mod:`_opcode` extension module to multi-phase initialization
217217
.. nonce: 3-VJiH
218218
.. section: Core and Builtins
219219
220-
Fixes the wrong error description in the error raised by using 2 `,` in
220+
Fixes the wrong error description in the error raised by using 2 ``,`` in
221221
format string in f-string and :meth:`str.format`.
222222

223223
..
@@ -747,7 +747,7 @@ Galindo.
747747
748748
Fix a bug where a line with only a line continuation character is not
749749
considered a blank line at tokenizer level. In such cases, more than a
750-
single `NEWLINE` token was emitted. The old parser was working around the
750+
single ``NEWLINE`` token was emitted. The old parser was working around the
751751
issue, but the new parser threw a :exc:`SyntaxError` for valid input due to
752752
this. For example, an empty line following a line continuation character was
753753
interpreted as a :exc:`SyntaxError`.
@@ -1157,7 +1157,7 @@ The :class:`threading.Thread` constructor now uses the target name if the
11571157
.. nonce: bnh-VG
11581158
.. section: Library
11591159
1160-
fix `tkinter.EventType` Enum so all members are strings, and none are tuples
1160+
fix ``tkinter.EventType`` Enum so all members are strings, and none are tuples
11611161

11621162
..
11631163
@@ -1229,8 +1229,8 @@ Previously there was no way to check that without using private API. See the
12291229
.. nonce: pI_uZQ
12301230
.. section: Library
12311231
1232-
Honor `object` overrides in `Enum` class creation (specifically, `__str__`,
1233-
`__repr__`, `__format__`, and `__reduce_ex__`).
1232+
Honor ``object`` overrides in ``Enum`` class creation (specifically, ``__str__``,
1233+
``__repr__``, ``__format__``, and ``__reduce_ex__``).
12341234

12351235
..
12361236
@@ -1239,7 +1239,7 @@ Honor `object` overrides in `Enum` class creation (specifically, `__str__`,
12391239
.. nonce: IpYkEe
12401240
.. section: Library
12411241
1242-
`enum.Flag` and `enum.IntFlag` members are now iterable
1242+
``enum.Flag`` and ``enum.IntFlag`` members are now iterable.
12431243

12441244
..
12451245
@@ -1557,7 +1557,7 @@ activation.
15571557
.. nonce: wqrj8C
15581558
.. section: Library
15591559
1560-
Recursive evaluation of `typing.ForwardRef` in `get_type_hints`.
1560+
Recursive evaluation of ``typing.ForwardRef`` in ``get_type_hints``.
15611561

15621562
..
15631563
@@ -1851,8 +1851,8 @@ Merry.
18511851
.. nonce: 1dk8Bu
18521852
.. section: Library
18531853
1854-
:mod:`ensurepip` now disables the use of `pip` cache when installing the
1855-
bundled versions of `pip` and `setuptools`. Patch by Krzysztof Konopko.
1854+
:mod:`ensurepip` now disables the use of ``pip`` cache when installing the
1855+
bundled versions of ``pip`` and ``setuptools``. Patch by Krzysztof Konopko.
18561856

18571857
..
18581858
@@ -1933,7 +1933,7 @@ Smith and Tal Einat.
19331933
.. nonce: n7fOwS
19341934
.. section: Library
19351935
1936-
Added a `defaults` parameter to :class:`logging.Formatter`, to allow
1936+
Added a ``defaults`` parameter to :class:`logging.Formatter`, to allow
19371937
specifying default values for custom fields. Patch by Asaf Alon and Bar
19381938
Harel.
19391939

@@ -2225,7 +2225,7 @@ policy.
22252225
.. nonce: ps7Yf1
22262226
.. section: Library
22272227
2228-
func:`hashlib.new` passed ``usedforsecurity`` to OpenSSL EVP constructor
2228+
:func:`hashlib.new` passed ``usedforsecurity`` to OpenSSL EVP constructor
22292229
``_hashlib.new()``. test_hashlib and test_smtplib handle strict security
22302230
policy better.
22312231

@@ -2393,8 +2393,8 @@ closes connection during TLS negotiation
23932393
.. nonce: kOOaHn
23942394
.. section: Library
23952395
2396-
fix default `_missing_` so a duplicate `ValueError` is not set as the
2397-
`__context__` of the original `ValueError`
2396+
fix default ``_missing_`` so a duplicate ``ValueError`` is not set as the
2397+
``__context__`` of the original ``ValueError``.
23982398

23992399
..
24002400

Misc/NEWS.d/3.10.0a2.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ Goldschmidt.
8888
.. nonce: d4a-8o
8989
.. section: Core and Builtins
9090
91-
Fix a bug in the parser, where a curly brace following a `primary` didn't
92-
fail immediately. This led to invalid expressions like `a {b}` to throw a
91+
Fix a bug in the parser, where a curly brace following a ``primary`` didn't
92+
fail immediately. This led to invalid expressions like ``a {b}`` to throw a
9393
:exc:`SyntaxError` with a wrong offset, or invalid expressions ending with a
94-
curly brace like `a {` to not fail immediately in the REPL.
94+
curly brace like ``a {`` to not fail immediately in the REPL.
9595

9696
..
9797
@@ -214,7 +214,7 @@ Micro optimization for range.index if step is 1. Patch by Donghee Na.
214214
.. nonce: qPWjJA
215215
.. section: Core and Builtins
216216
217-
Add `sys._current_exceptions()` function to retrieve a dictionary mapping
217+
Add ``sys._current_exceptions()`` function to retrieve a dictionary mapping
218218
each thread's identifier to the topmost exception currently active in that
219219
thread at the time the function is called.
220220

@@ -302,7 +302,7 @@ type to a heap type. Patch by Mohamed Koubaa and Victor Stinner.
302302
.. section: Library
303303
304304
Fix memory leak in :func:`subprocess.Popen` in case an uid (gid) specified
305-
in `user` (`group`, `extra_groups`) overflows `uid_t` (`gid_t`).
305+
in ``user`` (``group``, ``extra_groups``) overflows ``uid_t`` (``gid_t``).
306306

307307
..
308308
@@ -649,7 +649,7 @@ Document __format__ functionality for IP addresses.
649649
.. nonce: CzBMit
650650
.. section: Documentation
651651
652-
Document the default implementation of `object.__eq__`.
652+
Document the default implementation of ``object.__eq__``.
653653

654654
..
655655
@@ -878,7 +878,7 @@ targeting 3.10 or later.
878878
.. nonce: sh8IDY
879879
.. section: C API
880880
881-
Add `_Py_closerange` function to provide performant closing of a range of
881+
Add ``_Py_closerange`` function to provide performant closing of a range of
882882
file descriptors.
883883

884884
..
@@ -898,7 +898,7 @@ available again in limited API.
898898
.. nonce: ZZ5wJG
899899
.. section: C API
900900
901-
Add `PyIter_Send` function to allow sending value into
901+
Add ``PyIter_Send`` function to allow sending value into
902902
generator/coroutine/iterator without raising StopIteration exception to
903903
signal return.
904904

Misc/NEWS.d/3.10.0a3.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ fixes union type expressions not de-duplicating ``GenericAlias`` objects.
247247
.. nonce: B-Veg7
248248
.. section: Core and Builtins
249249
250-
The import system triggers a `ImportWarning` when it falls back to using
251-
`load_module()`.
250+
The import system triggers a ``ImportWarning`` when it falls back to using
251+
``load_module()``.
252252

253253
..
254254
@@ -464,8 +464,8 @@ Support signal module on VxWorks.
464464
.. nonce: r9rNCj
465465
.. section: Library
466466
467-
We fixed an issue in `pickle.whichmodule` in which importing
468-
`multiprocessing` could change the how pickle identifies which module an
467+
We fixed an issue in ``pickle.whichmodule`` in which importing
468+
``multiprocessing`` could change the how pickle identifies which module an
469469
object belongs to, potentially breaking the unpickling of those objects.
470470

471471
..
@@ -602,7 +602,7 @@ function when ``os.open`` fails.
602602
.. nonce: F363jO
603603
.. section: Library
604604
605-
Fix `os.sendfile()` on illumos.
605+
Fix ``os.sendfile()`` on illumos.
606606

607607
..
608608
@@ -718,8 +718,8 @@ Improve asyncio.wait function to create the futures set just one time.
718718
.. nonce: BzizYV
719719
.. section: Library
720720
721-
Update various modules in the stdlib to fall back on `__spec__.loader` when
722-
`__loader__` isn't defined on a module.
721+
Update various modules in the stdlib to fall back on ``__spec__.loader`` when
722+
``__loader__`` isn't defined on a module.
723723

724724
..
725725
@@ -728,8 +728,8 @@ Update various modules in the stdlib to fall back on `__spec__.loader` when
728728
.. nonce: CAsI3O
729729
.. section: Library
730730
731-
The `load_module()` methods found in importlib now trigger a
732-
DeprecationWarning.
731+
The ``load_module()`` methods found in ``importlib`` now trigger a
732+
``DeprecationWarning``.
733733

734734
..
735735
@@ -872,7 +872,7 @@ extension during TLS handshake when no custom context is supplied.
872872
.. nonce: 5mi7b0
873873
.. section: Library
874874
875-
Add func:`os.eventfd` to provide a low level interface for Linux's event
875+
Add :func:`os.eventfd` to provide a low level interface for Linux's event
876876
notification file descriptor.
877877

878878
..

Misc/NEWS.d/3.10.0a4.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ Define THREAD_STACK_SIZE for VxWorks.
516516
.. nonce: x8TASR
517517
.. section: Library
518518
519-
[Enum] `_EnumDict.update()` is now supported
519+
[Enum] ``_EnumDict.update()`` is now supported.
520520

521521
..
522522

Misc/NEWS.d/3.10.0a7.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ the annotations _Py_NO_SANITIZE_ADDRESS, _Py_NO_SANITIZE_THREAD, and
261261
_Py_NO_SANITIZE_MEMORY. Those annotations are no longer needed.
262262

263263
To disable the radix tree map, set a preprocessor flag as follows:
264-
`-DWITH_PYMALLOC_RADIX_TREE=0`.
264+
``-DWITH_PYMALLOC_RADIX_TREE=0``.
265265

266266
Co-authored-by: Tim Peters <[email protected]>
267267

@@ -664,11 +664,11 @@ on failure.
664664
.. nonce: f1dr_5
665665
.. section: Library
666666
667-
Enum's `repr()` and `str()` have changed: `repr()` is now
668-
*EnumClass.MemberName* and `str()` is *MemberName*. Additionally, stdlib
667+
Enum's ``repr()`` and ``str()`` have changed: ``repr()`` is now
668+
*EnumClass.MemberName* and ``str()`` is *MemberName*. Additionally, stdlib
669669
Enum's whose contents are available as module attributes, such as
670-
`RegexFlag.IGNORECASE`, have their `repr()` as *module.name*, e.g.
671-
`re.IGNORECASE`.
670+
``RegexFlag.IGNORECASE``, have their ``repr()`` as *module.name*, e.g.
671+
``re.IGNORECASE``.
672672

673673
..
674674

Misc/NEWS.d/3.10.0b1.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,8 +1181,8 @@ Lewis Gaul.
11811181
.. nonce: NzLVaR
11821182
.. section: Library
11831183
1184-
Add `pathlib.Path.hardlink_to()` method that supersedes `link_to()`. The new
1185-
method has the same argument order as `symlink_to()`.
1184+
Add ``pathlib.Path.hardlink_to()`` method that supersedes ``link_to()``. The new
1185+
method has the same argument order as ``symlink_to()``.
11861186

11871187
..
11881188

Misc/NEWS.d/3.11.0a1.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3204,7 +3204,7 @@ deprecated, for removal in 3.14.
32043204
.. section: Library
32053205
32063206
When :class:`http.server.SimpleHTTPRequestHandler` sends a ``301 (Moved
3207-
Permanently)`` for a directory path not ending with `/`, add a
3207+
Permanently)`` for a directory path not ending with ``/``, add a
32083208
``Content-Length: 0`` header. This improves the behavior for certain
32093209
clients.
32103210

@@ -3240,7 +3240,7 @@ Patch by Erlend E. Aasland.
32403240
.. nonce: m72tlH
32413241
.. section: Library
32423242
3243-
AIX: `Lib/_aix_support.get_platform()` may fail in an AIX WPAR. The fileset
3243+
AIX: ``Lib/_aix_support.get_platform()`` may fail in an AIX WPAR. The fileset
32443244
bos.rte appears to have a builddate in both LPAR and WPAR so this fileset is
32453245
queried rather than bos.mp64. To prevent a similar situation (no builddate
32463246
in ODM) a value (9988) sufficient for completing a build is provided. Patch
@@ -3685,9 +3685,9 @@ equivalents are valid.
36853685
.. nonce: aJuvQF
36863686
.. section: Documentation
36873687
3688-
Removed the othergui.rst file, any references to it, and the list of GUI
3688+
Removed the ``othergui.rst`` file, any references to it, and the list of GUI
36893689
frameworks in the FAQ. In their place I've added links to the Python Uncyclo
3690-
`page on GUI frameworks <https://wiki.python.org/moin/GuiProgramming>`.
3690+
`page on GUI frameworks <https://wiki.python.org/moin/GuiProgramming>`_.
36913691

36923692
..
36933693

0 commit comments

Comments
 (0)