Skip to content

Commit c24ad0a

Browse files
committed
Merge branch 'main' into feat/binary_shift_optimization
2 parents 9ed09aa + b8de8b7 commit c24ad0a

File tree

255 files changed

+14356
-7497
lines changed

Some content is hidden

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

255 files changed

+14356
-7497
lines changed

.azure-pipelines/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
variables:
5858
testRunTitle: '$(build.sourceBranchName)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1l
60+
openssl_version: 1.1.1m
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -83,7 +83,7 @@ jobs:
8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1l
86+
openssl_version: 1.1.1m
8787

8888
steps:
8989
- template: ./posix-steps.yml

.azure-pipelines/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
variables:
5858
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1l
60+
openssl_version: 1.1.1m
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -83,7 +83,7 @@ jobs:
8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1l
86+
openssl_version: 1.1.1m
8787

8888
steps:
8989
- template: ./posix-steps.yml

.github/workflows/build.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ jobs:
9090
if test -n "$changes"; then
9191
echo "Generated files not up to date."
9292
echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)"
93-
echo "configure files must be regenerated with a specific, unpatched version of autoconf."
93+
echo "configure files must be regenerated with a specific version of autoconf."
9494
echo "$changes"
95+
echo ""
96+
git diff --staged || true
9597
exit 1
9698
fi
9799
- name: Check exported libpython symbols
@@ -161,7 +163,7 @@ jobs:
161163
needs: check_source
162164
if: needs.check_source.outputs.run_tests == 'true'
163165
env:
164-
OPENSSL_VER: 1.1.1l
166+
OPENSSL_VER: 1.1.1m
165167
PYTHONSTRICTEXTENSIONBUILD: 1
166168
steps:
167169
- uses: actions/checkout@v2
@@ -176,7 +178,7 @@ jobs:
176178
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
177179
- name: 'Restore OpenSSL build'
178180
id: cache-openssl
179-
uses: actions/[email protected].6
181+
uses: actions/[email protected].7
180182
with:
181183
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
182184
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -220,7 +222,7 @@ jobs:
220222
strategy:
221223
fail-fast: false
222224
matrix:
223-
openssl_ver: [1.1.1l, 3.0.0]
225+
openssl_ver: [1.1.1m, 3.0.1]
224226
env:
225227
OPENSSL_VER: ${{ matrix.openssl_ver }}
226228
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -239,7 +241,7 @@ jobs:
239241
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
240242
- name: 'Restore OpenSSL build'
241243
id: cache-openssl
242-
uses: actions/[email protected].6
244+
uses: actions/[email protected].7
243245
with:
244246
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
245247
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -267,7 +269,7 @@ jobs:
267269
needs: check_source
268270
if: needs.check_source.outputs.run_tests == 'true'
269271
env:
270-
OPENSSL_VER: 1.1.1l
272+
OPENSSL_VER: 1.1.1m
271273
PYTHONSTRICTEXTENSIONBUILD: 1
272274
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
273275
steps:
@@ -283,7 +285,7 @@ jobs:
283285
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
284286
- name: 'Restore OpenSSL build'
285287
id: cache-openssl
286-
uses: actions/[email protected].6
288+
uses: actions/[email protected].7
287289
with:
288290
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
289291
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}

Doc/c-api/apiabiversion.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ See :ref:`stable` for a discussion of API and ABI stability across versions.
6363
.. c:var:: const unsigned long Py_Version
6464
6565
The Python runtime version number encoded in a single constant integer, with
66-
the same format as the c:macro:`PY_VERSION_HEX` macro.
66+
the same format as the :c:macro:`PY_VERSION_HEX` macro.
6767
This contains the Python version used at run time.
6868

6969
.. versionadded:: 3.11

Doc/c-api/buffer.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,27 +470,27 @@ Buffer-related functions
470470
.. versionadded:: 3.9
471471
472472
473-
.. c:function:: int PyBuffer_IsContiguous(Py_buffer *view, char order)
473+
.. c:function:: int PyBuffer_IsContiguous(const Py_buffer *view, char order)
474474
475475
Return ``1`` if the memory defined by the *view* is C-style (*order* is
476476
``'C'``) or Fortran-style (*order* is ``'F'``) :term:`contiguous` or either one
477477
(*order* is ``'A'``). Return ``0`` otherwise. This function always succeeds.
478478
479479
480-
.. c:function:: void* PyBuffer_GetPointer(Py_buffer *view, Py_ssize_t *indices)
480+
.. c:function:: void* PyBuffer_GetPointer(const Py_buffer *view, const Py_ssize_t *indices)
481481
482482
Get the memory area pointed to by the *indices* inside the given *view*.
483483
*indices* must point to an array of ``view->ndim`` indices.
484484
485485
486-
.. c:function:: int PyBuffer_FromContiguous(Py_buffer *view, void *buf, Py_ssize_t len, char fort)
486+
.. c:function:: int PyBuffer_FromContiguous(const Py_buffer *view, const void *buf, Py_ssize_t len, char fort)
487487
488488
Copy contiguous *len* bytes from *buf* to *view*.
489489
*fort* can be ``'C'`` or ``'F'`` (for C-style or Fortran-style ordering).
490490
``0`` is returned on success, ``-1`` on error.
491491
492492
493-
.. c:function:: int PyBuffer_ToContiguous(void *buf, Py_buffer *src, Py_ssize_t len, char order)
493+
.. c:function:: int PyBuffer_ToContiguous(void *buf, const Py_buffer *src, Py_ssize_t len, char order)
494494
495495
Copy *len* bytes from *src* to its contiguous representation in *buf*.
496496
*order* can be ``'C'`` or ``'F'`` or ``'A'`` (for C-style or Fortran-style

Doc/c-api/capsule.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,14 @@ Refer to :ref:`using-capsules` for more information on using these objects.
103103
Import a pointer to a C object from a capsule attribute in a module. The
104104
*name* parameter should specify the full name to the attribute, as in
105105
``module.attribute``. The *name* stored in the capsule must match this
106-
string exactly. If *no_block* is true, import the module without blocking
107-
(using :c:func:`PyImport_ImportModuleNoBlock`). If *no_block* is false,
108-
import the module conventionally (using :c:func:`PyImport_ImportModule`).
106+
string exactly.
109107
110108
Return the capsule's internal *pointer* on success. On failure, set an
111109
exception and return ``NULL``.
112110
111+
.. versionchanged:: 3.3
112+
*no_block* has no effect anymore.
113+
113114
114115
.. c:function:: int PyCapsule_IsValid(PyObject *capsule, const char *name)
115116

Doc/c-api/memoryview.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ any other object.
2727
2828
.. versionadded:: 3.3
2929
30-
.. c:function:: PyObject *PyMemoryView_FromBuffer(Py_buffer *view)
30+
.. c:function:: PyObject *PyMemoryView_FromBuffer(const Py_buffer *view)
3131
3232
Create a memoryview object wrapping the given buffer structure *view*.
3333
For simple byte buffers, :c:func:`PyMemoryView_FromMemory` is the preferred
@@ -61,4 +61,3 @@ any other object.
6161
on or ``NULL`` if the memoryview has been created by one of the functions
6262
:c:func:`PyMemoryView_FromMemory` or :c:func:`PyMemoryView_FromBuffer`.
6363
*mview* **must** be a memoryview instance.
64-

Doc/distutils/sourcedist.rst

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,25 @@ option, for example::
2323

2424
to create a gzipped tarball and a zip file. The available formats are:
2525

26-
+-----------+-------------------------+---------+
27-
| Format | Description | Notes |
28-
+===========+=========================+=========+
29-
| ``zip`` | zip file (:file:`.zip`) | (1),(3) |
30-
+-----------+-------------------------+---------+
31-
| ``gztar`` | gzip'ed tar file | \(2) |
32-
| | (:file:`.tar.gz`) | |
33-
+-----------+-------------------------+---------+
34-
| ``bztar`` | bzip2'ed tar file | |
35-
| | (:file:`.tar.bz2`) | |
36-
+-----------+-------------------------+---------+
37-
| ``xztar`` | xz'ed tar file | |
38-
| | (:file:`.tar.xz`) | |
39-
+-----------+-------------------------+---------+
40-
| ``ztar`` | compressed tar file | \(4) |
41-
| | (:file:`.tar.Z`) | |
42-
+-----------+-------------------------+---------+
43-
| ``tar`` | tar file (:file:`.tar`) | |
44-
+-----------+-------------------------+---------+
26+
+-----------+-------------------------+-------------+
27+
| Format | Description | Notes |
28+
+===========+=========================+=============+
29+
| ``zip`` | zip file (:file:`.zip`) | (1),(3) |
30+
+-----------+-------------------------+-------------+
31+
| ``gztar`` | gzip'ed tar file | \(2) |
32+
| | (:file:`.tar.gz`) | |
33+
+-----------+-------------------------+-------------+
34+
| ``bztar`` | bzip2'ed tar file | \(5) |
35+
| | (:file:`.tar.bz2`) | |
36+
+-----------+-------------------------+-------------+
37+
| ``xztar`` | xz'ed tar file | \(5) |
38+
| | (:file:`.tar.xz`) | |
39+
+-----------+-------------------------+-------------+
40+
| ``ztar`` | compressed tar file | (4),(5) |
41+
| | (:file:`.tar.Z`) | |
42+
+-----------+-------------------------+-------------+
43+
| ``tar`` | tar file (:file:`.tar`) | \(5) |
44+
+-----------+-------------------------+-------------+
4545

4646
.. versionchanged:: 3.5
4747
Added support for the ``xztar`` format.
@@ -61,6 +61,9 @@ Notes:
6161
(4)
6262
requires the :program:`compress` program. Notice that this format is now
6363
pending for deprecation and will be removed in the future versions of Python.
64+
(5)
65+
deprecated by `PEP 527 <https://www.python.org/dev/peps/pep-0527/>`_;
66+
`PyPI <https://pypi.org>`_ only accepts ``.zip`` and ``.tar.gz`` files.
6467

6568
When using any ``tar`` format (``gztar``, ``bztar``, ``xztar``, ``ztar`` or
6669
``tar``), under Unix you can specify the ``owner`` and ``group`` names

Doc/library/2to3.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,8 @@ and off individually. They are described here in more detail.
338338
339339
.. 2to3fixer:: nonzero
340340
341-
Renames :meth:`__nonzero__` to :meth:`~object.__bool__`.
341+
Renames definitions of methods called :meth:`__nonzero__`
342+
to :meth:`~object.__bool__`.
342343
343344
.. 2to3fixer:: numliterals
344345

Doc/library/argparse.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,6 +1898,12 @@ Argument groups
18981898
Note that any arguments not in your user-defined groups will end up back
18991899
in the usual "positional arguments" and "optional arguments" sections.
19001900

1901+
.. versionchanged:: 3.11
1902+
Calling :meth:`add_argument_group` on an argument group is deprecated.
1903+
This feature was never supported and does not always work correctly.
1904+
The function exists on the API by accident through inheritance and
1905+
will be removed in the future.
1906+
19011907

19021908
Mutual exclusion
19031909
^^^^^^^^^^^^^^^^
@@ -1936,6 +1942,12 @@ Mutual exclusion
19361942
*title* and *description* arguments of
19371943
:meth:`~ArgumentParser.add_argument_group`.
19381944

1945+
.. versionchanged:: 3.11
1946+
Calling :meth:`add_argument_group` or :meth:`add_mutually_exclusive_group`
1947+
on a mutually exclusive group is deprecated. These features were never
1948+
supported and do not always work correctly. The functions exist on the
1949+
API by accident through inheritance and will be removed in the future.
1950+
19391951

19401952
Parser defaults
19411953
^^^^^^^^^^^^^^^

Doc/library/ast.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,37 @@ Control flow
11671167
type_ignores=[])
11681168

11691169

1170+
.. class:: TryStar(body, handlers, orelse, finalbody)
1171+
1172+
``try`` blocks which are followed by ``except*`` clauses. The attributes are the
1173+
same as for :class:`Try` but the :class:`ExceptHandler` nodes in ``handlers``
1174+
are interpreted as ``except*`` blocks rather then ``except``.
1175+
1176+
.. doctest::
1177+
1178+
>>> print(ast.dump(ast.parse("""
1179+
... try:
1180+
... ...
1181+
... except* Exception:
1182+
... ...
1183+
... """), indent=4))
1184+
Module(
1185+
body=[
1186+
TryStar(
1187+
body=[
1188+
Expr(
1189+
value=Constant(value=Ellipsis))],
1190+
handlers=[
1191+
ExceptHandler(
1192+
type=Name(id='Exception', ctx=Load()),
1193+
body=[
1194+
Expr(
1195+
value=Constant(value=Ellipsis))])],
1196+
orelse=[],
1197+
finalbody=[])],
1198+
type_ignores=[])
1199+
1200+
11701201
.. class:: ExceptHandler(type, name, body)
11711202

11721203
A single ``except`` clause. ``type`` is the exception type it will match,

Doc/library/asyncio-api-index.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,6 @@ Exceptions
203203
:class: full-width-table
204204

205205

206-
* - :exc:`asyncio.TimeoutError`
207-
- Raised on timeout by functions like :func:`wait_for`.
208-
Keep in mind that ``asyncio.TimeoutError`` is **unrelated**
209-
to the built-in :exc:`TimeoutError` exception.
210-
211206
* - :exc:`asyncio.CancelledError`
212207
- Raised when a Task is cancelled. See also :meth:`Task.cancel`.
213208

Doc/library/asyncio-eventloop.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ an event loop:
6464

6565
.. function:: new_event_loop()
6666

67-
Create a new event loop object.
67+
Create and return a new event loop object.
6868

6969
Note that the behaviour of :func:`get_event_loop`, :func:`set_event_loop`,
7070
and :func:`new_event_loop` functions can be altered by
@@ -897,7 +897,7 @@ convenient.
897897

898898
.. versionchanged:: 3.7
899899
Even though the method was always documented as a coroutine
900-
method, before Python 3.7 it returned an :class:`Future`.
900+
method, before Python 3.7 it returned a :class:`Future`.
901901
Since Python 3.7, this is an ``async def`` method.
902902

903903
.. coroutinemethod:: loop.sock_connect(sock, address)

Doc/library/asyncio-exceptions.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ Exceptions
1313

1414
.. exception:: TimeoutError
1515

16-
The operation has exceeded the given deadline.
16+
A deprecated alias of :exc:`TimeoutError`,
17+
raised when the operation has exceeded the given deadline.
1718

18-
.. important::
19-
This exception is different from the builtin :exc:`TimeoutError`
20-
exception.
19+
.. versionchanged:: 3.11
20+
21+
This class was made an alias of :exc:`TimeoutError`.
2122

2223

2324
.. exception:: CancelledError

0 commit comments

Comments
 (0)