Skip to content

Commit 2b20233

Browse files
authored
Merge branch 'main' into fix/hashlib/error-branches-127667
2 parents 1b7c775 + 2a66dd3 commit 2b20233

File tree

484 files changed

+13515
-5736
lines changed

Some content is hidden

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

484 files changed

+13515
-5736
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
- uses: actions/checkout@v4
5959
with:
6060
fetch-depth: 1
61+
persist-credentials: false
6162
- name: Runner image version
6263
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
6364
- name: Check Autoconf and aclocal versions
@@ -94,6 +95,8 @@ jobs:
9495
if: needs.check_source.outputs.run_tests == 'true'
9596
steps:
9697
- uses: actions/checkout@v4
98+
with:
99+
persist-credentials: false
97100
- uses: actions/setup-python@v5
98101
with:
99102
python-version: '3.x'
@@ -120,7 +123,7 @@ jobs:
120123
- name: Build CPython
121124
run: |
122125
make -j4 regen-all
123-
make regen-stdlib-module-names regen-sbom
126+
make regen-stdlib-module-names regen-sbom regen-unicodedata
124127
- name: Check for changes
125128
run: |
126129
git add -u
@@ -235,10 +238,19 @@ jobs:
235238
free-threading:
236239
- false
237240
- true
241+
os:
242+
- ubuntu-24.04
243+
- ubuntu-24.04-aarch64
244+
is-fork: # only used for the exclusion trick
245+
- ${{ github.repository_owner != 'python' }}
246+
exclude:
247+
- os: ubuntu-24.04-aarch64
248+
is-fork: true
238249
uses: ./.github/workflows/reusable-ubuntu.yml
239250
with:
240251
config_hash: ${{ needs.check_source.outputs.config_hash }}
241252
free-threading: ${{ matrix.free-threading }}
253+
os: ${{ matrix.os }}
242254

243255
build_ubuntu_ssltests:
244256
name: 'Ubuntu SSL tests with OpenSSL'
@@ -259,6 +271,8 @@ jobs:
259271
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
260272
steps:
261273
- uses: actions/checkout@v4
274+
with:
275+
persist-credentials: false
262276
- name: Runner image version
263277
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
264278
- name: Restore config.cache
@@ -319,6 +333,8 @@ jobs:
319333
PYTHONSTRICTEXTENSIONBUILD: 1
320334
steps:
321335
- uses: actions/checkout@v4
336+
with:
337+
persist-credentials: false
322338
- name: Register gcc problem matcher
323339
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
324340
- name: Install Dependencies
@@ -402,7 +418,7 @@ jobs:
402418
#
403419
# (GH-104097) test_sysconfig is skipped because it has tests that are
404420
# failing when executed from inside a virtual environment.
405-
${{ env.VENV_PYTHON }} -m test \
421+
"${VENV_PYTHON}" -m test \
406422
-W \
407423
-o \
408424
-j4 \
@@ -437,6 +453,8 @@ jobs:
437453
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
438454
steps:
439455
- uses: actions/checkout@v4
456+
with:
457+
persist-credentials: false
440458
- name: Runner image version
441459
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
442460
- name: Restore config.cache

.github/workflows/documentation-links.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ on:
1010
- 'Doc/**'
1111
- '.github/workflows/doc.yml'
1212

13-
permissions:
14-
pull-requests: write
15-
1613
concurrency:
1714
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1815
cancel-in-progress: true
1916

2017
jobs:
2118
documentation-links:
2219
runs-on: ubuntu-latest
20+
permissions:
21+
pull-requests: write
22+
2323
steps:
2424
- uses: readthedocs/actions/preview@v1
2525
with:

.github/workflows/jit.yml

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ concurrency:
2828
jobs:
2929
interpreter:
3030
name: Interpreter (Debug)
31-
runs-on: ubuntu-22.04
31+
runs-on: ubuntu-24.04
3232
timeout-minutes: 90
3333
steps:
3434
- uses: actions/checkout@v4
35+
with:
36+
persist-credentials: false
3537
- name: Build tier two interpreter
3638
run: |
3739
./configure --enable-experimental-jit=interpreter --with-pydebug
@@ -78,12 +80,15 @@ jobs:
7880
runner: macos-14
7981
- target: x86_64-unknown-linux-gnu/gcc
8082
architecture: x86_64
81-
runner: ubuntu-22.04
83+
runner: ubuntu-24.04
8284
- target: aarch64-unknown-linux-gnu/gcc
8385
architecture: aarch64
84-
runner: ubuntu-22.04
86+
# Forks don't have access to our paid AArch64 runners. These jobs are skipped below:
87+
runner: ${{ github.repository_owner == 'python' && 'ubuntu-24.04-aarch64' || 'ubuntu-24.04' }}
8588
steps:
8689
- uses: actions/checkout@v4
90+
with:
91+
persist-credentials: false
8792
- uses: actions/setup-python@v5
8893
with:
8994
python-version: '3.11'
@@ -118,43 +123,27 @@ jobs:
118123
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
119124
120125
- name: Native Linux
121-
if: runner.os == 'Linux' && matrix.architecture == 'x86_64'
126+
# Forks don't have access to our paid AArch64 runners. Skip those:
127+
if: runner.os == 'Linux' && (matrix.architecture == 'x86_64' || github.repository_owner == 'python')
122128
run: |
123129
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
124130
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
125131
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
126132
make all --jobs 4
127133
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
128134
129-
- name: Emulated Linux
130-
if: runner.os == 'Linux' && matrix.architecture != 'x86_64'
131-
# The --ignorefile on ./python -m test is used to exclude tests known to fail when running on an emulated Linux.
132-
run: |
133-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
134-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
135-
./configure --prefix="$(pwd)/../build"
136-
make install --jobs 4
137-
make clean --jobs 4
138-
export HOST=${{ matrix.architecture }}-linux-gnu
139-
sudo apt install --yes "gcc-$HOST" qemu-user
140-
export QEMU_LD_PREFIX="/usr/$HOST"
141-
CC="$HOST-gcc" \
142-
CPP="$HOST-gcc --preprocess" \
143-
HOSTRUNNER=qemu-${{ matrix.architecture }} \
144-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }} --build=x86_64-linux-gnu --host="$HOST" --with-build-python=../build/bin/python3 --with-pkg-config=no ac_cv_buggy_getaddrinfo=no ac_cv_file__dev_ptc=no ac_cv_file__dev_ptmx=yes
145-
make all --jobs 4
146-
./python -m test --ignorefile=Tools/jit/ignore-tests-emulated-linux.txt --multiprocess 0 --timeout 4500 --verbose2 --verbose3
147-
148135
jit-with-disabled-gil:
149136
name: Free-Threaded (Debug)
150137
needs: interpreter
151-
runs-on: ubuntu-22.04
138+
runs-on: ubuntu-24.04
152139
strategy:
153140
matrix:
154141
llvm:
155142
- 19
156143
steps:
157144
- uses: actions/checkout@v4
145+
with:
146+
persist-credentials: false
158147
- uses: actions/setup-python@v5
159148
with:
160149
python-version: '3.11'

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020

2121
steps:
2222
- uses: actions/checkout@v4
23+
with:
24+
persist-credentials: false
2325
- uses: actions/setup-python@v5
2426
with:
2527
python-version: "3.x"

.github/workflows/mypy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ jobs:
5151
timeout-minutes: 10
5252
steps:
5353
- uses: actions/checkout@v4
54+
with:
55+
persist-credentials: false
5456
- uses: actions/setup-python@v5
5557
with:
5658
python-version: "3.13"

.github/workflows/require-pr-label.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ on:
44
pull_request:
55
types: [opened, reopened, labeled, unlabeled, synchronize]
66

7-
permissions:
8-
issues: write
9-
pull-requests: write
10-
117
jobs:
128
label-dnm:
139
name: DO-NOT-MERGE
1410
if: github.repository_owner == 'python'
1511
runs-on: ubuntu-latest
12+
permissions:
13+
issues: write
14+
pull-requests: write
1615
timeout-minutes: 10
1716

1817
steps:
@@ -28,6 +27,9 @@ jobs:
2827
name: Unresolved review
2928
if: github.repository_owner == 'python'
3029
runs-on: ubuntu-latest
30+
permissions:
31+
issues: write
32+
pull-requests: write
3133
timeout-minutes: 10
3234

3335
steps:

.github/workflows/reusable-change-detection.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ jobs:
6161
- run: >-
6262
echo '${{ github.event_name }}'
6363
- uses: actions/checkout@v4
64+
with:
65+
persist-credentials: false
6466
- name: Check for source changes
6567
id: check
6668
run: |

.github/workflows/reusable-docs.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@ jobs:
2222
env:
2323
branch_base: 'origin/${{ github.event.pull_request.base.ref }}'
2424
branch_pr: 'origin/${{ github.event.pull_request.head.ref }}'
25+
commits: ${{ github.event.pull_request.commits }}
2526
refspec_base: '+${{ github.event.pull_request.base.sha }}:remotes/origin/${{ github.event.pull_request.base.ref }}'
2627
refspec_pr: '+${{ github.event.pull_request.head.sha }}:remotes/origin/${{ github.event.pull_request.head.ref }}'
2728
steps:
2829
- name: 'Check out latest PR branch commit'
2930
uses: actions/checkout@v4
3031
with:
32+
persist-credentials: false
3133
ref: >-
3234
${{
3335
github.event_name == 'pull_request'
@@ -39,15 +41,15 @@ jobs:
3941
if: github.event_name == 'pull_request'
4042
run: |
4143
# Fetch enough history to find a common ancestor commit (aka merge-base):
42-
git fetch origin ${{ env.refspec_pr }} --depth=$(( ${{ github.event.pull_request.commits }} + 1 )) \
44+
git fetch origin "${refspec_pr}" --depth=$(( commits + 1 )) \
4345
--no-tags --prune --no-recurse-submodules
4446
4547
# This should get the oldest commit in the local fetched history (which may not be the commit the PR branched from):
46-
COMMON_ANCESTOR=$( git rev-list --first-parent --max-parents=0 --max-count=1 ${{ env.branch_pr }} )
48+
COMMON_ANCESTOR=$( git rev-list --first-parent --max-parents=0 --max-count=1 "${branch_pr}" )
4749
DATE=$( git log --date=iso8601 --format=%cd "${COMMON_ANCESTOR}" )
4850
4951
# Get all commits since that commit date from the base branch (eg: master or main):
50-
git fetch origin ${{ env.refspec_base }} --shallow-since="${DATE}" \
52+
git fetch origin "${refspec_base}" --shallow-since="${DATE}" \
5153
--no-tags --prune --no-recurse-submodules
5254
- name: 'Set up Python'
5355
uses: actions/setup-python@v5
@@ -69,7 +71,7 @@ jobs:
6971
if: github.event_name == 'pull_request'
7072
run: |
7173
python Doc/tools/check-warnings.py \
72-
--annotate-diff '${{ env.branch_base }}' '${{ env.branch_pr }}' \
74+
--annotate-diff "${branch_base}" "${branch_pr}" \
7375
--fail-if-regression \
7476
--fail-if-improved \
7577
--fail-if-new-news-nit
@@ -81,6 +83,8 @@ jobs:
8183
timeout-minutes: 60
8284
steps:
8385
- uses: actions/checkout@v4
86+
with:
87+
persist-credentials: false
8488
- name: 'Set up Python'
8589
uses: actions/setup-python@v5
8690
with:
@@ -99,6 +103,8 @@ jobs:
99103
timeout-minutes: 60
100104
steps:
101105
- uses: actions/checkout@v4
106+
with:
107+
persist-credentials: false
102108
- uses: actions/cache@v4
103109
with:
104110
path: ~/.cache/pip

.github/workflows/reusable-macos.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
runs-on: ${{ inputs.os }}
3030
steps:
3131
- uses: actions/checkout@v4
32+
with:
33+
persist-credentials: false
3234
- name: Runner image version
3335
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
3436
- name: Restore config.cache
@@ -40,7 +42,7 @@ jobs:
4042
run: |
4143
brew install pkg-config [email protected] xz gdbm tcl-tk@8 make
4244
# Because alternate versions are not symlinked into place by default:
43-
brew link tcl-tk@8
45+
brew link --overwrite tcl-tk@8
4446
- name: Configure CPython
4547
run: |
4648
GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \

.github/workflows/reusable-tsan.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,13 @@ jobs:
2323
name: 'Thread sanitizer'
2424
runs-on: ubuntu-24.04
2525
timeout-minutes: 60
26+
env:
27+
OPTIONS: ${{ inputs.options }}
28+
SUPPRESSIONS_PATH: ${{ inputs.suppressions_path }}
2629
steps:
2730
- uses: actions/checkout@v4
31+
with:
32+
persist-credentials: false
2833
- name: Runner image version
2934
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
3035
- name: Restore config.cache
@@ -47,7 +52,7 @@ jobs:
4752
sudo sysctl -w vm.mmap_rnd_bits=28
4853
- name: TSAN Option Setup
4954
run: |
50-
echo "TSAN_OPTIONS=log_path=${GITHUB_WORKSPACE}/tsan_log suppressions=${GITHUB_WORKSPACE}/${{ inputs.suppressions_path }} handle_segv=0" >> "$GITHUB_ENV"
55+
echo "TSAN_OPTIONS=log_path=${GITHUB_WORKSPACE}/tsan_log suppressions=${GITHUB_WORKSPACE}/${SUPPRESSIONS_PATH} handle_segv=0" >> "$GITHUB_ENV"
5156
echo "CC=clang" >> "$GITHUB_ENV"
5257
echo "CXX=clang++" >> "$GITHUB_ENV"
5358
- name: Add ccache to PATH
@@ -59,7 +64,7 @@ jobs:
5964
save: ${{ github.event_name == 'push' }}
6065
max-size: "200M"
6166
- name: Configure CPython
62-
run: ${{ inputs.options }}
67+
run: "${OPTIONS}"
6368
- name: Build CPython
6469
run: make -j4
6570
- name: Display build info

0 commit comments

Comments
 (0)