Skip to content

Commit b98c9b2

Browse files
committed
Merge branch 'main' into object_dump
2 parents 56ac7ef + 4695ec1 commit b98c9b2

File tree

451 files changed

+13736
-6295
lines changed

Some content is hidden

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

451 files changed

+13736
-6295
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Include/opcode_ids.h generated
8383
Include/token.h generated
8484
Lib/_opcode_metadata.py generated
8585
Lib/keyword.py generated
86+
Lib/idlelib/help.html generated
8687
Lib/test/certdata/*.pem generated
8788
Lib/test/certdata/*.0 generated
8889
Lib/test/levenshtein_examples.json generated

.github/workflows/build.yml

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -109,20 +109,10 @@ jobs:
109109
python-version: '3.x'
110110
- name: Runner image version
111111
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
112-
- name: Restore config.cache
113-
uses: actions/cache@v4
114-
with:
115-
path: config.cache
116-
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
117-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}-${{ env.pythonLocation }}
118112
- name: Install dependencies
119113
run: sudo ./.github/workflows/posix-deps-apt.sh
120114
- name: Add ccache to PATH
121115
run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
122-
- name: Configure ccache action
123-
uses: hendrikmuhs/ccache-action@v1.2
124-
with:
125-
save: false
126116
- name: Configure CPython
127117
run: |
128118
# Build Python with the libpython dynamic library
@@ -215,7 +205,6 @@ jobs:
215205
free-threading: true
216206
uses: ./.github/workflows/reusable-macos.yml
217207
with:
218-
config_hash: ${{ needs.build-context.outputs.config-hash }}
219208
free-threading: ${{ matrix.free-threading }}
220209
os: ${{ matrix.os }}
221210

@@ -247,7 +236,6 @@ jobs:
247236
bolt: true
248237
uses: ./.github/workflows/reusable-ubuntu.yml
249238
with:
250-
config_hash: ${{ needs.build-context.outputs.config-hash }}
251239
bolt-optimizations: ${{ matrix.bolt }}
252240
free-threading: ${{ matrix.free-threading }}
253241
os: ${{ matrix.os }}
@@ -278,11 +266,6 @@ jobs:
278266
persist-credentials: false
279267
- name: Runner image version
280268
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
281-
- name: Restore config.cache
282-
uses: actions/cache@v4
283-
with:
284-
path: config.cache
285-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
286269
- name: Register gcc problem matcher
287270
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
288271
- name: Install dependencies
@@ -304,10 +287,6 @@ jobs:
304287
- name: Add ccache to PATH
305288
run: |
306289
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
307-
- name: Configure ccache action
308-
uses: hendrikmuhs/ccache-action@v1.2
309-
with:
310-
save: false
311290
- name: Configure CPython
312291
run: ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR"
313292
- name: Build CPython
@@ -339,11 +318,6 @@ jobs:
339318
persist-credentials: false
340319
- name: Runner image version
341320
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
342-
- name: Restore config.cache
343-
uses: actions/cache@v4
344-
with:
345-
path: config.cache
346-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
347321
- name: Register gcc problem matcher
348322
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
349323
- name: Install dependencies
@@ -370,10 +344,6 @@ jobs:
370344
- name: Add ccache to PATH
371345
run: |
372346
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
373-
- name: Configure ccache action
374-
uses: hendrikmuhs/ccache-action@v1.2
375-
with:
376-
save: false
377347
- name: Configure CPython
378348
run: |
379349
./configure CFLAGS="-fdiagnostics-format=json" \
@@ -442,8 +412,6 @@ jobs:
442412
needs: build-context
443413
if: needs.build-context.outputs.run-tests == 'true'
444414
uses: ./.github/workflows/reusable-wasi.yml
445-
with:
446-
config_hash: ${{ needs.build-context.outputs.config-hash }}
447415

448416
test-hypothesis:
449417
name: "Hypothesis tests on Ubuntu"
@@ -479,10 +447,6 @@ jobs:
479447
- name: Add ccache to PATH
480448
run: |
481449
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
482-
- name: Configure ccache action
483-
uses: hendrikmuhs/ccache-action@v1.2
484-
with:
485-
save: false
486450
- name: Setup directory envs for out-of-tree builds
487451
run: |
488452
echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
@@ -493,11 +457,6 @@ jobs:
493457
run: sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR"
494458
- name: Runner image version
495459
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
496-
- name: Restore config.cache
497-
uses: actions/cache@v4
498-
with:
499-
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
500-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
501460
- name: Configure CPython out-of-tree
502461
working-directory: ${{ env.CPYTHON_BUILDDIR }}
503462
run: |
@@ -581,11 +540,6 @@ jobs:
581540
persist-credentials: false
582541
- name: Runner image version
583542
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
584-
- name: Restore config.cache
585-
uses: actions/cache@v4
586-
with:
587-
path: config.cache
588-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
589543
- name: Register gcc problem matcher
590544
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
591545
- name: Install dependencies
@@ -611,11 +565,6 @@ jobs:
611565
- name: Add ccache to PATH
612566
run: |
613567
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
614-
- name: Configure ccache action
615-
uses: hendrikmuhs/ccache-action@v1.2
616-
with:
617-
save: ${{ github.event_name == 'push' }}
618-
max-size: "200M"
619568
- name: Configure CPython
620569
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc
621570
- name: Build CPython
@@ -647,7 +596,6 @@ jobs:
647596
uses: ./.github/workflows/reusable-san.yml
648597
with:
649598
sanitizer: ${{ matrix.sanitizer }}
650-
config_hash: ${{ needs.build-context.outputs.config-hash }}
651599
free-threading: ${{ matrix.free-threading }}
652600

653601
cross-build-linux:
@@ -662,11 +610,6 @@ jobs:
662610
persist-credentials: false
663611
- name: Runner image version
664612
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
665-
- name: Restore config.cache
666-
uses: actions/cache@v4
667-
with:
668-
path: config.cache
669-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
670613
- name: Register gcc problem matcher
671614
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
672615
- name: Set build dir

.github/workflows/jit.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
- true
6969
- false
7070
llvm:
71-
- 20
71+
- 21
7272
include:
7373
- target: i686-pc-windows-msvc/msvc
7474
architecture: Win32
@@ -138,7 +138,7 @@ jobs:
138138
fail-fast: false
139139
matrix:
140140
llvm:
141-
- 20
141+
- 21
142142
steps:
143143
- uses: actions/checkout@v4
144144
with:
@@ -166,7 +166,7 @@ jobs:
166166
fail-fast: false
167167
matrix:
168168
llvm:
169-
- 20
169+
- 21
170170
steps:
171171
- uses: actions/checkout@v4
172172
with:
@@ -193,7 +193,7 @@ jobs:
193193
fail-fast: false
194194
matrix:
195195
llvm:
196-
- 20
196+
- 21
197197
steps:
198198
- uses: actions/checkout@v4
199199
with:

.github/workflows/reusable-context.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ on: # yamllint disable-line rule:truthy
1717
# || 'falsy-branch'
1818
# }}
1919
#
20-
config-hash:
21-
description: Config hash value for use in cache keys
22-
value: ${{ jobs.compute-changes.outputs.config-hash }} # str
2320
run-docs:
2421
description: Whether to build the docs
2522
value: ${{ jobs.compute-changes.outputs.run-docs }} # bool
@@ -42,7 +39,6 @@ jobs:
4239
runs-on: ubuntu-latest
4340
timeout-minutes: 10
4441
outputs:
45-
config-hash: ${{ steps.config-hash.outputs.hash }}
4642
run-ci-fuzz: ${{ steps.changes.outputs.run-ci-fuzz }}
4743
run-docs: ${{ steps.changes.outputs.run-docs }}
4844
run-tests: ${{ steps.changes.outputs.run-tests }}
@@ -100,8 +96,3 @@ jobs:
10096
GITHUB_EVENT_NAME: ${{ github.event_name }}
10197
CCF_TARGET_REF: ${{ github.base_ref || github.event.repository.default_branch }}
10298
CCF_HEAD_REF: ${{ github.event.pull_request.head.sha || github.sha }}
103-
104-
- name: Compute hash for config cache key
105-
id: config-hash
106-
run: |
107-
echo "hash=${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}" >> "$GITHUB_OUTPUT"

.github/workflows/reusable-macos.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: Reusable macOS
33
on:
44
workflow_call:
55
inputs:
6-
config_hash:
7-
required: true
8-
type: string
96
free-threading:
107
required: false
118
type: boolean
@@ -36,11 +33,6 @@ jobs:
3633
persist-credentials: false
3734
- name: Runner image version
3835
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
39-
- name: Restore config.cache
40-
uses: actions/cache@v4
41-
with:
42-
path: config.cache
43-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }}
4436
- name: Install Homebrew dependencies
4537
run: |
4638
brew install pkg-config openssl@3.0 xz gdbm tcl-tk@9 make

.github/workflows/reusable-san.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
sanitizer:
77
required: true
88
type: string
9-
config_hash:
10-
required: true
11-
type: string
129
free-threading:
1310
description: Whether to use free-threaded mode
1411
required: false
@@ -34,11 +31,6 @@ jobs:
3431
persist-credentials: false
3532
- name: Runner image version
3633
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
37-
- name: Restore config.cache
38-
uses: actions/cache@v4
39-
with:
40-
path: config.cache
41-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.sanitizer }}-${{ inputs.config_hash }}
4234
- name: Install dependencies
4335
run: |
4436
sudo ./.github/workflows/posix-deps-apt.sh
@@ -77,11 +69,6 @@ jobs:
7769
- name: Add ccache to PATH
7870
run: |
7971
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
80-
- name: Configure ccache action
81-
uses: hendrikmuhs/ccache-action@v1.2
82-
with:
83-
save: ${{ github.event_name == 'push' }}
84-
max-size: "200M"
8572
- name: Configure CPython
8673
run: >-
8774
./configure

.github/workflows/reusable-ubuntu.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: Reusable Ubuntu
33
on:
44
workflow_call:
55
inputs:
6-
config_hash:
7-
required: true
8-
type: string
96
bolt-optimizations:
107
description: Whether to enable BOLT optimizations
118
required: false
@@ -64,11 +61,6 @@ jobs:
6461
- name: Add ccache to PATH
6562
run: |
6663
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
67-
- name: Configure ccache action
68-
uses: hendrikmuhs/ccache-action@v1.2
69-
with:
70-
save: ${{ github.event_name == 'push' }}
71-
max-size: "200M"
7264
- name: Setup directory envs for out-of-tree builds
7365
run: |
7466
echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
@@ -79,11 +71,6 @@ jobs:
7971
run: sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR"
8072
- name: Runner image version
8173
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
82-
- name: Restore config.cache
83-
uses: actions/cache@v4
84-
with:
85-
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
86-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }}
8774
- name: Configure CPython out-of-tree
8875
working-directory: ${{ env.CPYTHON_BUILDDIR }}
8976
# `test_unpickle_module_race` writes to the source directory, which is

.github/workflows/reusable-wasi.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ name: Reusable WASI
22

33
on:
44
workflow_call:
5-
inputs:
6-
config_hash:
7-
required: true
8-
type: string
95

106
env:
117
FORCE_COLOR: 1
@@ -42,11 +38,6 @@ jobs:
4238
mkdir "${WASI_SDK_PATH}" && \
4339
curl -s -S --location "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-arm64-linux.tar.gz" | \
4440
tar --strip-components 1 --directory "${WASI_SDK_PATH}" --extract --gunzip
45-
- name: "Configure ccache action"
46-
uses: hendrikmuhs/ccache-action@v1.2
47-
with:
48-
save: ${{ github.event_name == 'push' }}
49-
max-size: "200M"
5041
- name: "Add ccache to PATH"
5142
run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
5243
- name: "Install Python"
@@ -55,24 +46,10 @@ jobs:
5546
python-version: '3.x'
5647
- name: "Runner image version"
5748
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
58-
- name: "Restore Python build config.cache"
59-
uses: actions/cache@v4
60-
with:
61-
path: ${{ env.CROSS_BUILD_PYTHON }}/config.cache
62-
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python.
63-
# Include the hash of `Tools/wasm/wasi/__main__.py` as it may change the environment variables.
64-
# (Make sure to keep the key in sync with the other config.cache step below.)
65-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi/__main__.py') }}-${{ env.pythonLocation }}
6649
- name: "Configure build Python"
6750
run: python3 Tools/wasm/wasi configure-build-python -- --config-cache --with-pydebug
6851
- name: "Make build Python"
6952
run: python3 Tools/wasm/wasi make-build-python
70-
- name: "Restore host config.cache"
71-
uses: actions/cache@v4
72-
with:
73-
path: ${{ env.CROSS_BUILD_WASI }}/config.cache
74-
# Should be kept in sync with the other config.cache step above.
75-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi/__main__.py') }}-${{ env.pythonLocation }}
7653
- name: "Configure host"
7754
# `--with-pydebug` inferred from configure-build-python
7855
run: python3 Tools/wasm/wasi configure-host -- --config-cache

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ Tools/unicode/data/
135135
/config.log
136136
/config.status
137137
/config.status.lineno
138-
# hendrikmuhs/ccache-action@v1
139138
/.ccache
140139
/cross-build/
141140
/jit_stencils*.h

Apple/testbed/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import json
33
import os
44
import re
5+
import shlex
56
import shutil
67
import subprocess
78
import sys
@@ -252,7 +253,7 @@ def update_test_plan(testbed_path, platform, args):
252253
test_plan = json.load(f)
253254

254255
test_plan["defaultOptions"]["commandLineArgumentEntries"] = [
255-
{"argument": arg} for arg in args
256+
{"argument": shlex.quote(arg)} for arg in args
256257
]
257258

258259
with test_plan_path.open("w", encoding="utf-8") as f:

0 commit comments

Comments
 (0)