Skip to content

Commit 9bf291a

Browse files
Merge branch 'main' into fix-issue-46375
2 parents 7d8793a + 7df8b16 commit 9bf291a

382 files changed

Lines changed: 27555 additions & 23330 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.

.azure-pipelines/pr.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,3 @@ jobs:
2626

2727
steps:
2828
- template: ./posix-steps.yml
29-
30-
31-
- job: Windows_PR_Tests
32-
displayName: Windows PR Tests
33-
dependsOn: Prebuild
34-
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
35-
36-
pool:
37-
vmImage: windows-2022
38-
39-
strategy:
40-
matrix:
41-
win32:
42-
arch: win32
43-
buildOpt: '-p Win32'
44-
testRunTitle: '$(System.PullRequest.TargetBranch)-win32'
45-
testRunPlatform: win32
46-
win64:
47-
arch: amd64
48-
buildOpt: '-p x64'
49-
testRunTitle: '$(System.PullRequest.TargetBranch)-win64'
50-
testRunPlatform: win64
51-
winarm64:
52-
arch: arm64
53-
buildOpt: '-p arm64'
54-
maxParallel: 4
55-
56-
steps:
57-
- template: ./windows-steps.yml
58-
parameters:
59-
targetBranch: $(System.PullRequest.TargetBranch)

.github/workflows/build.yml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ jobs:
118118
path: config.cache
119119
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
120120
- uses: actions/setup-python@v4
121+
with:
122+
python-version: '3.x'
121123
- name: Install Dependencies
122124
run: sudo ./.github/workflows/posix-deps-apt.sh
123125
- name: Add ccache to PATH
@@ -180,7 +182,7 @@ jobs:
180182
- name: Display build info
181183
run: .\python.bat -m test.pythoninfo
182184
- name: Tests
183-
run: .\PCbuild\rt.bat -p Win32 -d -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
185+
run: .\PCbuild\rt.bat -p Win32 -d -q --fast-ci
184186

185187
build_win_amd64:
186188
name: 'Windows (x64)'
@@ -199,7 +201,22 @@ jobs:
199201
- name: Display build info
200202
run: .\python.bat -m test.pythoninfo
201203
- name: Tests
202-
run: .\PCbuild\rt.bat -p x64 -d -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
204+
run: .\PCbuild\rt.bat -p x64 -d -q --fast-ci
205+
206+
build_win_arm64:
207+
name: 'Windows (arm64)'
208+
runs-on: windows-latest
209+
timeout-minutes: 60
210+
needs: check_source
211+
if: needs.check_source.outputs.run_tests == 'true'
212+
env:
213+
IncludeUwp: 'true'
214+
steps:
215+
- uses: actions/checkout@v4
216+
- name: Register MSVC problem matcher
217+
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
218+
- name: Build CPython
219+
run: .\PCbuild\build.bat -e -d -p arm64
203220

204221
build_macos:
205222
name: 'macOS'
@@ -235,7 +252,7 @@ jobs:
235252
- name: Display build info
236253
run: make pythoninfo
237254
- name: Tests
238-
run: make buildbottest TESTOPTS="-j4 -uall,-cpu"
255+
run: make test
239256

240257
build_ubuntu:
241258
name: 'Ubuntu'
@@ -244,7 +261,7 @@ jobs:
244261
needs: check_source
245262
if: needs.check_source.outputs.run_tests == 'true'
246263
env:
247-
OPENSSL_VER: 1.1.1v
264+
OPENSSL_VER: 3.0.11
248265
PYTHONSTRICTEXTENSIONBUILD: 1
249266
steps:
250267
- uses: actions/checkout@v4
@@ -302,7 +319,7 @@ jobs:
302319
run: sudo mount $CPYTHON_RO_SRCDIR -oremount,rw
303320
- name: Tests
304321
working-directory: ${{ env.CPYTHON_BUILDDIR }}
305-
run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"
322+
run: xvfb-run make test
306323

307324
build_ubuntu_ssltests:
308325
name: 'Ubuntu SSL tests with OpenSSL'
@@ -313,7 +330,7 @@ jobs:
313330
strategy:
314331
fail-fast: false
315332
matrix:
316-
openssl_ver: [1.1.1v, 3.0.10, 3.1.2]
333+
openssl_ver: [1.1.1w, 3.0.11, 3.1.3]
317334
env:
318335
OPENSSL_VER: ${{ matrix.openssl_ver }}
319336
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -365,7 +382,7 @@ jobs:
365382
needs: check_source
366383
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
367384
env:
368-
OPENSSL_VER: 1.1.1v
385+
OPENSSL_VER: 3.0.11
369386
PYTHONSTRICTEXTENSIONBUILD: 1
370387
steps:
371388
- uses: actions/checkout@v4
@@ -474,7 +491,7 @@ jobs:
474491
needs: check_source
475492
if: needs.check_source.outputs.run_tests == 'true'
476493
env:
477-
OPENSSL_VER: 1.1.1v
494+
OPENSSL_VER: 3.0.11
478495
PYTHONSTRICTEXTENSIONBUILD: 1
479496
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
480497
steps:
@@ -518,7 +535,7 @@ jobs:
518535
- name: Display build info
519536
run: make pythoninfo
520537
- name: Tests
521-
run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"
538+
run: xvfb-run make test
522539

523540
all-required-green: # This job does nothing and is only used for the branch protection
524541
name: All required checks pass
@@ -530,6 +547,7 @@ jobs:
530547
- check_generated_files
531548
- build_win32
532549
- build_win_amd64
550+
- build_win_arm64
533551
- build_macos
534552
- build_ubuntu
535553
- build_ubuntu_ssltests
@@ -546,6 +564,7 @@ jobs:
546564
build_macos,
547565
build_ubuntu_ssltests,
548566
build_win32,
567+
build_win_arm64,
549568
test_hypothesis,
550569
allowed-skips: >-
551570
${{
@@ -561,6 +580,7 @@ jobs:
561580
check_generated_files,
562581
build_win32,
563582
build_win_amd64,
583+
build_win_arm64,
564584
build_macos,
565585
build_ubuntu,
566586
build_ubuntu_ssltests,

.github/workflows/reusable-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
- name: 'Set up Python'
7575
uses: actions/setup-python@v4
7676
with:
77-
python-version: '3.11' # known to work with Sphinx 3.2
77+
python-version: '3.11' # known to work with Sphinx 4.2
7878
cache: 'pip'
7979
cache-dependency-path: 'Doc/requirements-oldest-sphinx.txt'
8080
- name: 'Install build dependencies'

Doc/c-api/exceptions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ Exception Objects
786786
787787
Implement part of the interpreter's implementation of :keyword:`!except*`.
788788
*orig* is the original exception that was caught, and *excs* is the list of
789-
the exceptions that need to be raised. This list contains the the unhandled
789+
the exceptions that need to be raised. This list contains the unhandled
790790
part of *orig*, if any, as well as the exceptions that were raised from the
791791
:keyword:`!except*` clauses (so they have a different traceback from *orig*) and
792792
those that were reraised (and have the same traceback as *orig*).

Doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
highlight_language = 'python3'
6767

6868
# Minimum version of sphinx required
69-
needs_sphinx = '3.2'
69+
needs_sphinx = '4.2'
7070

7171
# Ignore any .rst files in the includes/ directory;
7272
# they're embedded in pages but not rendered individually.

Doc/extending/windows.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,4 @@ modules (including Python) to be able to see your identifiers, you have to say
132132
Developer Studio will throw in a lot of import libraries that you do not really
133133
need, adding about 100K to your executable. To get rid of them, use the Project
134134
Settings dialog, Link tab, to specify *ignore default libraries*. Add the
135-
correct :file:`msvcrtxx.lib` to the list of libraries.
135+
correct :file:`msvcrt{xx}.lib` to the list of libraries.

Doc/howto/logging-cookbook.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,7 +1728,7 @@ when (and if) the logged message is actually about to be output to a log by a
17281728
handler. So the only slightly unusual thing which might trip you up is that the
17291729
parentheses go around the format string and the arguments, not just the format
17301730
string. That's because the __ notation is just syntax sugar for a constructor
1731-
call to one of the XXXMessage classes.
1731+
call to one of the :samp:`{XXX}Message` classes.
17321732

17331733
If you prefer, you can use a :class:`LoggerAdapter` to achieve a similar effect
17341734
to the above, as in the following example::
@@ -2644,7 +2644,7 @@ when (and if) the logged message is actually about to be output to a log by a
26442644
handler. So the only slightly unusual thing which might trip you up is that the
26452645
parentheses go around the format string and the arguments, not just the format
26462646
string. That’s because the __ notation is just syntax sugar for a constructor
2647-
call to one of the ``XXXMessage`` classes shown above.
2647+
call to one of the :samp:`{XXX}Message` classes shown above.
26482648

26492649

26502650
.. _filters-dictconfig:

Doc/howto/logging.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ provided:
979979

980980
#. :class:`NullHandler` instances do nothing with error messages. They are used
981981
by library developers who want to use logging, but want to avoid the 'No
982-
handlers could be found for logger XXX' message which can be displayed if
982+
handlers could be found for logger *XXX*' message which can be displayed if
983983
the library user has not configured logging. See :ref:`library-config` for
984984
more information.
985985

Doc/library/__future__.rst

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,42 +22,48 @@
2222
can be inspected programmatically via importing :mod:`__future__` and examining
2323
its contents.
2424

25-
Each statement in :file:`__future__.py` is of the form::
25+
.. _future-classes:
2626

27-
FeatureName = _Feature(OptionalRelease, MandatoryRelease,
28-
CompilerFlag)
27+
.. class:: _Feature
2928

29+
Each statement in :file:`__future__.py` is of the form::
3030

31-
where, normally, *OptionalRelease* is less than *MandatoryRelease*, and both are
32-
5-tuples of the same form as :data:`sys.version_info`::
31+
FeatureName = _Feature(OptionalRelease, MandatoryRelease,
32+
CompilerFlag)
3333

34-
(PY_MAJOR_VERSION, # the 2 in 2.1.0a3; an int
35-
PY_MINOR_VERSION, # the 1; an int
36-
PY_MICRO_VERSION, # the 0; an int
37-
PY_RELEASE_LEVEL, # "alpha", "beta", "candidate" or "final"; string
38-
PY_RELEASE_SERIAL # the 3; an int
39-
)
34+
where, normally, *OptionalRelease* is less than *MandatoryRelease*, and both are
35+
5-tuples of the same form as :data:`sys.version_info`::
4036

41-
*OptionalRelease* records the first release in which the feature was accepted.
37+
(PY_MAJOR_VERSION, # the 2 in 2.1.0a3; an int
38+
PY_MINOR_VERSION, # the 1; an int
39+
PY_MICRO_VERSION, # the 0; an int
40+
PY_RELEASE_LEVEL, # "alpha", "beta", "candidate" or "final"; string
41+
PY_RELEASE_SERIAL # the 3; an int
42+
)
4243

43-
In the case of a *MandatoryRelease* that has not yet occurred,
44-
*MandatoryRelease* predicts the release in which the feature will become part of
45-
the language.
44+
.. method:: _Feature.getOptionalRelease()
4645

47-
Else *MandatoryRelease* records when the feature became part of the language; in
48-
releases at or after that, modules no longer need a future statement to use the
49-
feature in question, but may continue to use such imports.
46+
*OptionalRelease* records the first release in which the feature was accepted.
5047

51-
*MandatoryRelease* may also be ``None``, meaning that a planned feature got
52-
dropped.
48+
.. method:: _Feature.getMandatoryRelease()
5349

54-
Instances of class :class:`_Feature` have two corresponding methods,
55-
:meth:`getOptionalRelease` and :meth:`getMandatoryRelease`.
50+
In the case of a *MandatoryRelease* that has not yet occurred,
51+
*MandatoryRelease* predicts the release in which the feature will become part of
52+
the language.
5653

57-
*CompilerFlag* is the (bitfield) flag that should be passed in the fourth
58-
argument to the built-in function :func:`compile` to enable the feature in
59-
dynamically compiled code. This flag is stored in the :attr:`compiler_flag`
60-
attribute on :class:`_Feature` instances.
54+
Else *MandatoryRelease* records when the feature became part of the language; in
55+
releases at or after that, modules no longer need a future statement to use the
56+
feature in question, but may continue to use such imports.
57+
58+
*MandatoryRelease* may also be ``None``, meaning that a planned feature got
59+
dropped or that it is not yet decided.
60+
61+
.. attribute:: _Feature.compiler_flag
62+
63+
*CompilerFlag* is the (bitfield) flag that should be passed in the fourth
64+
argument to the built-in function :func:`compile` to enable the feature in
65+
dynamically compiled code. This flag is stored in the :attr:`_Feature.compiler_flag`
66+
attribute on :class:`_Feature` instances.
6167

6268
No feature description will ever be deleted from :mod:`__future__`. Since its
6369
introduction in Python 2.1 the following features have found their way into the

Doc/library/asyncio-llapi-index.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -484,19 +484,19 @@ Protocol classes can implement the following **callback methods**:
484484
:widths: 50 50
485485
:class: full-width-table
486486

487-
* - ``callback`` :meth:`pipe_data_received()
488-
<SubprocessProtocol.pipe_data_received>`
487+
* - ``callback`` :meth:`~SubprocessProtocol.pipe_data_received`
489488
- Called when the child process writes data into its
490489
*stdout* or *stderr* pipe.
491490

492-
* - ``callback`` :meth:`pipe_connection_lost()
493-
<SubprocessProtocol.pipe_connection_lost>`
491+
* - ``callback`` :meth:`~SubprocessProtocol.pipe_connection_lost`
494492
- Called when one of the pipes communicating with
495493
the child process is closed.
496494

497495
* - ``callback`` :meth:`process_exited()
498496
<SubprocessProtocol.process_exited>`
499-
- Called when the child process has exited.
497+
- Called when the child process has exited. It can be called before
498+
:meth:`~SubprocessProtocol.pipe_data_received` and
499+
:meth:`~SubprocessProtocol.pipe_connection_lost` methods.
500500

501501

502502
Event Loop Policies

0 commit comments

Comments
 (0)