Skip to content

Commit c196466

Browse files
committed
Merge remote-tracking branch 'upstream/main' into bpo-1572968-GIL-mmap-module
2 parents 45399a6 + 2e279e8 commit c196466

File tree

1,531 files changed

+63599
-63590
lines changed

Some content is hidden

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

1,531 files changed

+63599
-63590
lines changed

.azure-pipelines/posix-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ steps:
6868
- ${{ if eq(parameters.patchcheck, 'true') }}:
6969
- script: |
7070
git fetch origin
71-
./python Tools/scripts/patchcheck.py --ci true
71+
./python Tools/patchcheck/patchcheck.py --ci true
7272
displayName: 'Run patchcheck.py'
7373
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
7474

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Doc/library/token-list.inc generated
6969
Include/internal/pycore_ast.h generated
7070
Include/internal/pycore_ast_state.h generated
7171
Include/internal/pycore_opcode.h generated
72-
Include/internal/pycore_runtime_init_generated.h generated
72+
Include/internal/pycore_*_generated.h generated
7373
Include/opcode.h generated
7474
Include/token.h generated
7575
Lib/keyword.py generated
@@ -82,6 +82,7 @@ Parser/parser.c generated
8282
Parser/token.c generated
8383
Programs/test_frozenmain.h generated
8484
Python/Python-ast.c generated
85+
Python/generated_cases.c.h generated
8586
Python/opcode_targets.h generated
8687
Python/stdlib_module_names.h generated
8788
Tools/peg_generator/pegen/grammar_parser.py generated

.github/CODEOWNERS

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
# It uses the same pattern rule for gitignore file
55
# https://git-scm.com/docs/gitignore#_pattern_format
66

7+
# GitHub
8+
.github/** @ezio-melotti
9+
710
# asyncio
8-
**/*asyncio* @1st1 @asvetlov @gvanrossum
11+
**/*asyncio* @1st1 @asvetlov @gvanrossum @kumaraditya303
912

1013
# Core
1114
**/*context* @1st1
@@ -52,15 +55,15 @@ Python/traceback.c @iritkatriel
5255
/Lib/html/ @ezio-melotti
5356
/Lib/_markupbase.py @ezio-melotti
5457
/Lib/test/test_html*.py @ezio-melotti
55-
/Tools/scripts/*html5* @ezio-melotti
58+
/Tools/build/parse_html5_entities.py @ezio-melotti
5659

5760
# Import (including importlib).
5861
# Ignoring importlib.h so as to not get flagged on
5962
# all pull requests that change the emitted
6063
# bytecode.
6164
**/*import*.c @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
6265
**/*import*.py @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
63-
**/*importlib/resources/* @jaraco @warsaw @brettcannon
66+
**/*importlib/resources/* @jaraco @warsaw @brettcannon @FFY00
6467
**/importlib/metadata/* @jaraco @warsaw
6568

6669
# Dates and times
@@ -132,10 +135,8 @@ Lib/ast.py @isidentical
132135

133136
**/*idlelib* @terryjreedy
134137

135-
**/*typing* @gvanrossum @Fidget-Spinner @JelleZijlstra
138+
**/*typing* @gvanrossum @Fidget-Spinner @JelleZijlstra @AlexWaygood
136139

137-
**/*asyncore @giampaolo
138-
**/*asynchat @giampaolo
139140
**/*ftplib @giampaolo
140141
**/*shutil @giampaolo
141142

@@ -145,9 +146,14 @@ Lib/ast.py @isidentical
145146

146147
**/*tomllib* @encukou
147148

149+
**/*sysconfig* @FFY00
150+
148151
# macOS
149152
/Mac/ @python/macos-team
150153
**/*osx_support* @python/macos-team
151154

152155
# pathlib
153156
**/*pathlib* @brettcannon
157+
158+
# zipfile.Path
159+
**/*zipfile/*_path.py @jaraco

.github/CONTRIBUTING.rst

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,9 @@ Contributing to Python
44
Build Status
55
------------
66

7-
- main
7+
- `Buildbot status overview <https://buildbot.python.org/all/#/release_status>`_
88

9-
+ `Stable buildbots <https://buildbot.python.org/3.x.stable/>`_
10-
11-
- 3.9
12-
13-
+ `Stable buildbots <https://buildbot.python.org/3.9.stable/>`_
14-
15-
- 3.8
16-
17-
+ `Stable buildbots <https://buildbot.python.org/3.8.stable/>`_
18-
19-
- 3.7
20-
21-
+ `Stable buildbots <https://buildbot.python.org/3.7.stable/>`_
9+
- `GitHub Actions status <https://github.com/python/cpython/actions/workflows/build.yml>`_
2210

2311

2412
Thank You
@@ -38,7 +26,7 @@ also suggestions on how you can most effectively help the project.
3826

3927
Please be aware that our workflow does deviate slightly from the typical GitHub
4028
project. Details on how to properly submit a pull request are covered in
41-
`Lifecycle of a Pull Request <https://devguide.python.org/pullrequest/>`_.
29+
`Lifecycle of a Pull Request <https://devguide.python.org/getting-started/pull-request-lifecycle.html>`_.
4230
We utilize various bots and status checks to help with this, so do follow the
4331
comments they leave and their "Details" links, respectively. The key points of
4432
our workflow that are not covered by a bot or status check are:

.github/SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
The Python team applies security fixes according to the table
66
in [the devguide](
7-
https://devguide.python.org/#status-of-python-branches
7+
https://devguide.python.org/versions/#supported-versions
88
).
99

1010
## Reporting a Vulnerability

.github/workflows/build.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ on:
2525
permissions:
2626
contents: read
2727

28+
concurrency:
29+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
30+
cancel-in-progress: true
31+
2832
jobs:
2933
check_source:
3034
name: 'Check for source changes'
@@ -37,7 +41,7 @@ jobs:
3741
id: check
3842
run: |
3943
if [ -z "$GITHUB_BASE_REF" ]; then
40-
echo '::set-output name=run_tests::true'
44+
echo "run_tests=true" >> $GITHUB_OUTPUT
4145
else
4246
git fetch origin $GITHUB_BASE_REF --depth=1
4347
# git diff "origin/$GITHUB_BASE_REF..." (3 dots) may be more
@@ -53,7 +57,7 @@ jobs:
5357
# into the PR branch anyway.
5458
#
5559
# https://github.com/python/core-workflow/issues/373
56-
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
60+
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo "run_tests=true" >> $GITHUB_OUTPUT || true
5761
fi
5862
5963
check_generated_files:
@@ -69,7 +73,7 @@ jobs:
6973
- name: Add ccache to PATH
7074
run: echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
7175
- name: Configure ccache action
72-
uses: hendrikmuhs/ccache-action@v1
76+
uses: hendrikmuhs/ccache-action@v1.2
7377
- name: Check Autoconf version 2.69 and aclocal 1.16.3
7478
run: |
7579
grep "Generated by GNU Autoconf 2.69" configure
@@ -172,7 +176,7 @@ jobs:
172176
needs: check_source
173177
if: needs.check_source.outputs.run_tests == 'true'
174178
env:
175-
OPENSSL_VER: 1.1.1q
179+
OPENSSL_VER: 1.1.1s
176180
PYTHONSTRICTEXTENSIONBUILD: 1
177181
steps:
178182
- uses: actions/checkout@v3
@@ -198,7 +202,7 @@ jobs:
198202
run: |
199203
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
200204
- name: Configure ccache action
201-
uses: hendrikmuhs/ccache-action@v1
205+
uses: hendrikmuhs/ccache-action@v1.2
202206
- name: Setup directory envs for out-of-tree builds
203207
run: |
204208
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
@@ -231,7 +235,7 @@ jobs:
231235
strategy:
232236
fail-fast: false
233237
matrix:
234-
openssl_ver: [1.1.1q, 3.0.5]
238+
openssl_ver: [1.1.1s, 3.0.7]
235239
env:
236240
OPENSSL_VER: ${{ matrix.openssl_ver }}
237241
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -261,7 +265,7 @@ jobs:
261265
run: |
262266
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
263267
- name: Configure ccache action
264-
uses: hendrikmuhs/ccache-action@v1
268+
uses: hendrikmuhs/ccache-action@v1.2
265269
- name: Configure CPython
266270
run: ./configure --with-pydebug --with-openssl=$OPENSSL_DIR
267271
- name: Build CPython
@@ -278,7 +282,7 @@ jobs:
278282
needs: check_source
279283
if: needs.check_source.outputs.run_tests == 'true'
280284
env:
281-
OPENSSL_VER: 1.1.1q
285+
OPENSSL_VER: 1.1.1s
282286
PYTHONSTRICTEXTENSIONBUILD: 1
283287
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
284288
steps:
@@ -305,7 +309,7 @@ jobs:
305309
run: |
306310
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
307311
- name: Configure ccache action
308-
uses: hendrikmuhs/ccache-action@v1
312+
uses: hendrikmuhs/ccache-action@v1.2
309313
- name: Configure CPython
310314
run: ./configure --with-address-sanitizer --without-pymalloc
311315
- name: Build CPython

.github/workflows/build_msi.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ on:
1818
permissions:
1919
contents: read
2020

21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
23+
cancel-in-progress: true
24+
2125
jobs:
2226
build:
2327
name: Windows Installer

.github/workflows/doc.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ on:
2828
permissions:
2929
contents: read
3030

31+
concurrency:
32+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
33+
cancel-in-progress: true
34+
3135
jobs:
3236
build_doc:
3337
name: 'Docs'
@@ -46,9 +50,14 @@ jobs:
4650
run: make -C Doc/ venv
4751
- name: 'Check documentation'
4852
run: make -C Doc/ check
53+
- name: 'Upload NEWS'
54+
uses: actions/upload-artifact@v3
55+
with:
56+
name: NEWS
57+
path: Doc/build/NEWS
4958
- name: 'Build HTML documentation'
5059
run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html
51-
- name: 'Upload'
60+
- name: 'Upload docs'
5261
uses: actions/upload-artifact@v3
5362
with:
5463
name: doc-html

.github/workflows/project-updater.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- opened
77
- labeled
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
add-to-project:
1114
name: Add issues to projects

.github/workflows/verify-ensurepip-wheels.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,20 @@ on:
66
paths:
77
- 'Lib/ensurepip/_bundled/**'
88
- '.github/workflows/verify-ensurepip-wheels.yml'
9-
- 'Tools/scripts/verify_ensurepip_wheels.py'
9+
- 'Tools/build/verify_ensurepip_wheels.py'
1010
pull_request:
1111
paths:
1212
- 'Lib/ensurepip/_bundled/**'
1313
- '.github/workflows/verify-ensurepip-wheels.yml'
14-
- 'Tools/scripts/verify_ensurepip_wheels.py'
14+
- 'Tools/build/verify_ensurepip_wheels.py'
1515

1616
permissions:
1717
contents: read
1818

19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
21+
cancel-in-progress: true
22+
1923
jobs:
2024
verify:
2125
runs-on: ubuntu-latest
@@ -25,4 +29,4 @@ jobs:
2529
with:
2630
python-version: '3'
2731
- name: Compare checksums of bundled pip and setuptools to ones published on PyPI
28-
run: ./Tools/scripts/verify_ensurepip_wheels.py
32+
run: ./Tools/build/verify_ensurepip_wheels.py

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ gmon.out
4141
.DS_Store
4242

4343
*.exe
44-
!Lib/distutils/command/*.exe
4544

4645
# Ignore core dumps... but not Tools/msi/core/ or the like.
4746
core
@@ -58,7 +57,6 @@ Doc/.venv/
5857
Doc/env/
5958
Doc/.env/
6059
Include/pydtrace_probes.h
61-
Lib/distutils/command/*.pdb
6260
Lib/lib2to3/*.pickle
6361
Lib/site-packages/*
6462
!Lib/site-packages/README.txt
@@ -116,6 +114,7 @@ PCbuild/win32/
116114
Tools/unicode/data/
117115
/autom4te.cache
118116
/build/
117+
/builddir/
119118
/config.cache
120119
/config.log
121120
/config.status
@@ -143,7 +142,7 @@ Tools/ssl/win32
143142
Tools/freeze/test/outdir
144143

145144
# The frozen modules are always generated by the build so we don't
146-
# keep them in the repo. Also see Tools/scripts/freeze_modules.py.
145+
# keep them in the repo. Also see Tools/build/freeze_modules.py.
147146
Python/frozen_modules/*.h
148147
# The manifest can be generated at any time with "make regen-frozen".
149148
Python/frozen_modules/MANIFEST

0 commit comments

Comments
 (0)