Skip to content

Commit be065d5

Browse files
Merge remote-tracking branch 'origin/main' into bitfields
2 parents dee6b90 + 7bdb331 commit be065d5

File tree

2,042 files changed

+165340
-102985
lines changed

Some content is hidden

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

2,042 files changed

+165340
-102985
lines changed

.azure-pipelines/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
displayName: Pre-build checks
99

1010
pool:
11-
vmImage: ubuntu-20.04
11+
vmImage: ubuntu-22.04
1212

1313
steps:
1414
- template: ./prebuild-checks.yml
@@ -20,7 +20,7 @@ jobs:
2020
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))
2121

2222
pool:
23-
vmImage: ubuntu-20.04
23+
vmImage: ubuntu-22.04
2424

2525
steps:
2626
- template: ./docs-steps.yml
@@ -52,12 +52,12 @@ jobs:
5252
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
5353

5454
pool:
55-
vmImage: ubuntu-20.04
55+
vmImage: ubuntu-22.04
5656

5757
variables:
5858
testRunTitle: '$(build.sourceBranchName)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1q
60+
openssl_version: 1.1.1t
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -78,12 +78,12 @@ jobs:
7878
)
7979
8080
pool:
81-
vmImage: ubuntu-20.04
81+
vmImage: ubuntu-22.04
8282

8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1q
86+
openssl_version: 1.1.1t
8787

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

.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

.azure-pipelines/pr.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
displayName: Pre-build checks
99

1010
pool:
11-
vmImage: ubuntu-20.04
11+
vmImage: ubuntu-22.04
1212

1313
steps:
1414
- template: ./prebuild-checks.yml
@@ -20,7 +20,7 @@ jobs:
2020
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))
2121

2222
pool:
23-
vmImage: ubuntu-20.04
23+
vmImage: ubuntu-22.04
2424

2525
steps:
2626
- template: ./docs-steps.yml
@@ -52,12 +52,12 @@ jobs:
5252
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
5353

5454
pool:
55-
vmImage: ubuntu-20.04
55+
vmImage: ubuntu-22.04
5656

5757
variables:
5858
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1q
60+
openssl_version: 1.1.1t
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -78,12 +78,12 @@ jobs:
7878
)
7979
8080
pool:
81-
vmImage: ubuntu-20.04
81+
vmImage: ubuntu-22.04
8282

8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1q
86+
openssl_version: 1.1.1t
8787

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

.azure-pipelines/windows-layout-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ steps:
1212
displayName: Show layout info (${{ parameters.kind }})
1313

1414
- ${{ if eq(parameters.fulltest, 'true') }}:
15-
- script: .\python.exe -m test -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 --junit-xml="$(Build.BinariesDirectory)\test-results-${{ parameters.kind }}.xml" --tempdir "$(Build.BinariesDirectory)\tmp-${{ parameters.kind }}-$(arch)"
15+
- script: .\python.exe -m test -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 --junit-xml="$(Build.BinariesDirectory)\test-results-${{ parameters.kind }}.xml" --tempdir "$(Build.BinariesDirectory)\tmp-${{ parameters.kind }}-$(arch)" -i test_launcher
1616
workingDirectory: $(Build.BinariesDirectory)\layout-${{ parameters.kind }}-$(arch)
1717
displayName: ${{ parameters.kind }} Tests
1818
env:

.gitattributes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ 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
76+
Lib/test/levenshtein_examples.json generated
7677
Lib/test/test_stable_abi_ctypes.py generated
7778
Lib/token.py generated
7879
Objects/typeslots.inc generated
@@ -81,6 +82,7 @@ Parser/parser.c generated
8182
Parser/token.c generated
8283
Programs/test_frozenmain.h generated
8384
Python/Python-ast.c generated
85+
Python/generated_cases.c.h generated
8486
Python/opcode_targets.h generated
8587
Python/stdlib_module_names.h generated
8688
Tools/peg_generator/pegen/grammar_parser.py generated

.github/CODEOWNERS

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@
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+
10+
# Build system
11+
configure* @erlend-aasland @corona10
12+
713
# asyncio
8-
**/*asyncio* @1st1 @asvetlov @gvanrossum
14+
**/*asyncio* @1st1 @asvetlov @gvanrossum @kumaraditya303
915

1016
# Core
1117
**/*context* @1st1
@@ -52,15 +58,15 @@ Python/traceback.c @iritkatriel
5258
/Lib/html/ @ezio-melotti
5359
/Lib/_markupbase.py @ezio-melotti
5460
/Lib/test/test_html*.py @ezio-melotti
55-
/Tools/scripts/*html5* @ezio-melotti
61+
/Tools/build/parse_html5_entities.py @ezio-melotti
5662

5763
# Import (including importlib).
5864
# Ignoring importlib.h so as to not get flagged on
5965
# all pull requests that change the emitted
6066
# bytecode.
6167
**/*import*.c @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
6268
**/*import*.py @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
63-
**/*importlib/resources/* @jaraco @warsaw @brettcannon
69+
**/*importlib/resources/* @jaraco @warsaw @FFY00
6470
**/importlib/metadata/* @jaraco @warsaw
6571

6672
# Dates and times
@@ -132,22 +138,27 @@ Lib/ast.py @isidentical
132138

133139
**/*idlelib* @terryjreedy
134140

135-
**/*typing* @gvanrossum @Fidget-Spinner @JelleZijlstra
141+
**/*typing* @gvanrossum @Fidget-Spinner @JelleZijlstra @AlexWaygood
136142

137-
**/*asyncore @giampaolo
138-
**/*asynchat @giampaolo
139143
**/*ftplib @giampaolo
140144
**/*shutil @giampaolo
141145

142146
**/*enum* @ethanfurman
143147
**/*cgi* @ethanfurman
144148
**/*tarfile* @ethanfurman
145149

146-
**/*tomllib* @encukou
150+
**/*tomllib* @encukou @hauntsaninja
151+
152+
**/*sysconfig* @FFY00
153+
154+
**/*cjkcodecs* @corona10
147155

148156
# macOS
149157
/Mac/ @python/macos-team
150158
**/*osx_support* @python/macos-team
151159

152160
# pathlib
153-
**/*pathlib* @brettcannon
161+
**/*pathlib* @barneygale
162+
163+
# zipfile.Path
164+
**/*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: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,23 @@ 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'
3135
runs-on: ubuntu-latest
3236
outputs:
3337
run_tests: ${{ steps.check.outputs.run_tests }}
34-
run_ssl_tests: ${{ steps.check.outputs.run_ssl_tests }}
3538
steps:
3639
- uses: actions/checkout@v3
3740
- name: Check for source changes
3841
id: check
3942
run: |
4043
if [ -z "$GITHUB_BASE_REF" ]; then
41-
echo '::set-output name=run_tests::true'
42-
echo '::set-output name=run_ssl_tests::true'
44+
echo "run_tests=true" >> $GITHUB_OUTPUT
4345
else
4446
git fetch origin $GITHUB_BASE_REF --depth=1
4547
# git diff "origin/$GITHUB_BASE_REF..." (3 dots) may be more
@@ -55,8 +57,7 @@ jobs:
5557
# into the PR branch anyway.
5658
#
5759
# https://github.com/python/core-workflow/issues/373
58-
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
59-
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qE '(ssl|hashlib|hmac|^.github)' && echo '::set-output name=run_ssl_tests::true' || true
60+
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo "run_tests=true" >> $GITHUB_OUTPUT || true
6061
fi
6162
6263
check_generated_files:
@@ -72,7 +73,7 @@ jobs:
7273
- name: Add ccache to PATH
7374
run: echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
7475
- name: Configure ccache action
75-
uses: hendrikmuhs/ccache-action@v1
76+
uses: hendrikmuhs/ccache-action@v1.2
7677
- name: Check Autoconf version 2.69 and aclocal 1.16.3
7778
run: |
7879
grep "Generated by GNU Autoconf 2.69" configure
@@ -153,15 +154,23 @@ jobs:
153154
needs: check_source
154155
if: needs.check_source.outputs.run_tests == 'true'
155156
env:
157+
HOMEBREW_NO_ANALYTICS: 1
158+
HOMEBREW_NO_AUTO_UPDATE: 1
159+
HOMEBREW_NO_INSTALL_CLEANUP: 1
156160
PYTHONSTRICTEXTENSIONBUILD: 1
157161
steps:
158162
- uses: actions/checkout@v3
159-
- name: Prepare homebrew environment variables
160-
run: |
161-
echo "LDFLAGS=-L$(brew --prefix tcl-tk)/lib" >> $GITHUB_ENV
162-
echo "PKG_CONFIG_PATH=$(brew --prefix [email protected])/lib/pkgconfig:$(brew --prefix tcl-tk)/lib/pkgconfig" >> $GITHUB_ENV
163+
- name: Install Homebrew dependencies
164+
run: brew install pkg-config [email protected] xz gdbm tcl-tk
163165
- name: Configure CPython
164-
run: ./configure --with-pydebug --prefix=/opt/python-dev
166+
run: |
167+
CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \
168+
LDFLAGS="-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" \
169+
PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \
170+
./configure \
171+
--with-pydebug \
172+
--prefix=/opt/python-dev \
173+
--with-openssl="$(brew --prefix [email protected])"
165174
- name: Build CPython
166175
run: make -j4
167176
- name: Display build info
@@ -175,7 +184,7 @@ jobs:
175184
needs: check_source
176185
if: needs.check_source.outputs.run_tests == 'true'
177186
env:
178-
OPENSSL_VER: 1.1.1q
187+
OPENSSL_VER: 1.1.1t
179188
PYTHONSTRICTEXTENSIONBUILD: 1
180189
steps:
181190
- uses: actions/checkout@v3
@@ -201,7 +210,7 @@ jobs:
201210
run: |
202211
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
203212
- name: Configure ccache action
204-
uses: hendrikmuhs/ccache-action@v1
213+
uses: hendrikmuhs/ccache-action@v1.2
205214
- name: Setup directory envs for out-of-tree builds
206215
run: |
207216
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
@@ -230,11 +239,11 @@ jobs:
230239
name: 'Ubuntu SSL tests with OpenSSL'
231240
runs-on: ubuntu-20.04
232241
needs: check_source
233-
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_ssl_tests == 'true'
242+
if: needs.check_source.outputs.run_tests == 'true'
234243
strategy:
235244
fail-fast: false
236245
matrix:
237-
openssl_ver: [1.1.1q, 3.0.5]
246+
openssl_ver: [1.1.1t, 3.0.8, 3.1.0-beta1]
238247
env:
239248
OPENSSL_VER: ${{ matrix.openssl_ver }}
240249
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -264,7 +273,7 @@ jobs:
264273
run: |
265274
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
266275
- name: Configure ccache action
267-
uses: hendrikmuhs/ccache-action@v1
276+
uses: hendrikmuhs/ccache-action@v1.2
268277
- name: Configure CPython
269278
run: ./configure --with-pydebug --with-openssl=$OPENSSL_DIR
270279
- name: Build CPython
@@ -281,7 +290,7 @@ jobs:
281290
needs: check_source
282291
if: needs.check_source.outputs.run_tests == 'true'
283292
env:
284-
OPENSSL_VER: 1.1.1q
293+
OPENSSL_VER: 1.1.1t
285294
PYTHONSTRICTEXTENSIONBUILD: 1
286295
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
287296
steps:
@@ -308,7 +317,7 @@ jobs:
308317
run: |
309318
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
310319
- name: Configure ccache action
311-
uses: hendrikmuhs/ccache-action@v1
320+
uses: hendrikmuhs/ccache-action@v1.2
312321
- name: Configure CPython
313322
run: ./configure --with-address-sanitizer --without-pymalloc
314323
- 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

0 commit comments

Comments
 (0)