Skip to content

Commit 87b4111

Browse files
committed
Merge branch 'main' into dict-thread-safety
2 parents 7232934 + 37430ca commit 87b4111

File tree

142 files changed

+3714
-893
lines changed

Some content is hidden

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

142 files changed

+3714
-893
lines changed

.github/workflows/tail-call.yml

Lines changed: 74 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
name: Tail calling interpreter
22
on:
33
pull_request:
4-
paths:
4+
paths: &paths
55
- '.github/workflows/tail-call.yml'
66
- 'Python/bytecodes.c'
77
- 'Python/ceval.c'
88
- 'Python/ceval_macros.h'
99
- 'Python/generated_cases.c.h'
1010
push:
11-
paths:
12-
- '.github/workflows/tail-call.yml'
13-
- 'Python/bytecodes.c'
14-
- 'Python/ceval.c'
15-
- 'Python/ceval_macros.h'
16-
- 'Python/generated_cases.c.h'
11+
paths: *paths
1712
workflow_dispatch:
1813

1914
permissions:
@@ -25,105 +20,109 @@ concurrency:
2520

2621
env:
2722
FORCE_COLOR: 1
23+
LLVM_VERSION: 21
2824

2925
jobs:
30-
tail-call:
26+
windows:
3127
name: ${{ matrix.target }}
3228
runs-on: ${{ matrix.runner }}
33-
timeout-minutes: 90
29+
timeout-minutes: 60
3430
strategy:
3531
fail-fast: false
3632
matrix:
37-
target:
38-
# Un-comment as we add support for more platforms for tail-calling interpreters.
39-
# - i686-pc-windows-msvc/msvc
40-
- x86_64-pc-windows-msvc/msvc
41-
# - aarch64-pc-windows-msvc/msvc
42-
- x86_64-apple-darwin/clang
43-
- aarch64-apple-darwin/clang
44-
- x86_64-unknown-linux-gnu/gcc
45-
- aarch64-unknown-linux-gnu/gcc
46-
- free-threading
47-
llvm:
48-
- 20
4933
include:
50-
# - target: i686-pc-windows-msvc/msvc
51-
# architecture: Win32
52-
# runner: windows-2022
5334
- target: x86_64-pc-windows-msvc/msvc
5435
architecture: x64
5536
runner: windows-2025-vs2026
56-
# - target: aarch64-pc-windows-msvc/msvc
57-
# architecture: ARM64
58-
# runner: windows-2022
59-
- target: x86_64-apple-darwin/clang
60-
architecture: x86_64
61-
runner: macos-15-intel
62-
- target: aarch64-apple-darwin/clang
63-
architecture: aarch64
64-
runner: macos-14
65-
- target: x86_64-unknown-linux-gnu/gcc
66-
architecture: x86_64
67-
runner: ubuntu-24.04
68-
- target: aarch64-unknown-linux-gnu/gcc
69-
architecture: aarch64
70-
runner: ubuntu-24.04-arm
71-
- target: free-threading
72-
architecture: x86_64
73-
runner: ubuntu-24.04
37+
build_flags: ""
38+
run_tests: true
39+
- target: x86_64-pc-windows-msvc/msvc-free-threading
40+
architecture: x64
41+
runner: windows-2025-vs2026
42+
build_flags: --disable-gil
43+
run_tests: false
7444
steps:
7545
- uses: actions/checkout@v6
7646
with:
7747
persist-credentials: false
7848
- uses: actions/setup-python@v6
7949
with:
8050
python-version: '3.11'
81-
82-
- name: Native Windows MSVC (release)
83-
if: runner.os == 'Windows' && matrix.architecture != 'ARM64'
51+
- name: Build
8452
shell: pwsh
8553
run: |
8654
$env:PlatformToolset = "v145"
87-
./PCbuild/build.bat --tail-call-interp -c Release -p ${{ matrix.architecture }}
88-
./PCbuild/rt.bat -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
89-
90-
# No tests (yet):
91-
- name: Emulated Windows Clang (release)
92-
if: runner.os == 'Windows' && matrix.architecture == 'ARM64'
55+
./PCbuild/build.bat --tail-call-interp ${{ matrix.build_flags }} -c Release -p ${{ matrix.architecture }}
56+
- name: Test
57+
if: matrix.run_tests
9358
shell: pwsh
9459
run: |
95-
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
96-
$env:PlatformToolset = "clangcl"
97-
$env:LLVMToolsVersion = "${{ matrix.llvm }}.1.0"
98-
$env:LLVMInstallDir = "C:\Program Files\LLVM"
99-
./PCbuild/build.bat --tail-call-interp -p ${{ matrix.architecture }}
60+
./PCbuild/rt.bat -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
10061
101-
- name: Native macOS (release)
102-
if: runner.os == 'macOS'
62+
macos:
63+
name: ${{ matrix.target }}
64+
runs-on: ${{ matrix.runner }}
65+
timeout-minutes: 60
66+
strategy:
67+
fail-fast: false
68+
matrix:
69+
include:
70+
- target: x86_64-apple-darwin/clang
71+
runner: macos-15-intel
72+
- target: aarch64-apple-darwin/clang
73+
runner: macos-14
74+
steps:
75+
- uses: actions/checkout@v6
76+
with:
77+
persist-credentials: false
78+
- uses: actions/setup-python@v6
79+
with:
80+
python-version: '3.11'
81+
- name: Install dependencies
10382
run: |
10483
brew update
105-
brew install llvm@${{ matrix.llvm }}
84+
brew install llvm@${{ env.LLVM_VERSION }}
85+
- name: Build
86+
run: |
10687
export SDKROOT="$(xcrun --show-sdk-path)"
107-
export PATH="/usr/local/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
108-
export PATH="/opt/homebrew/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
109-
CC=clang-20 ./configure --with-tail-call-interp
88+
export PATH="/usr/local/opt/llvm@${{ env.LLVM_VERSION }}/bin:$PATH"
89+
export PATH="/opt/homebrew/opt/llvm@${{ env.LLVM_VERSION }}/bin:$PATH"
90+
CC=clang-${{ env.LLVM_VERSION }} ./configure --with-tail-call-interp
11091
make all --jobs 4
92+
- name: Test
93+
run: |
11194
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
11295
113-
- name: Native Linux (debug)
114-
if: runner.os == 'Linux' && matrix.target != 'free-threading'
96+
linux:
97+
name: ${{ matrix.target }}
98+
runs-on: ${{ matrix.runner }}
99+
timeout-minutes: 60
100+
strategy:
101+
fail-fast: false
102+
matrix:
103+
include:
104+
- target: x86_64-unknown-linux-gnu/gcc
105+
runner: ubuntu-24.04
106+
configure_flags: --with-pydebug
107+
- target: x86_64-unknown-linux-gnu/gcc-free-threading
108+
runner: ubuntu-24.04
109+
configure_flags: --disable-gil
110+
- target: aarch64-unknown-linux-gnu/gcc
111+
runner: ubuntu-24.04-arm
112+
configure_flags: --with-pydebug
113+
steps:
114+
- uses: actions/checkout@v6
115+
with:
116+
persist-credentials: false
117+
- uses: actions/setup-python@v6
118+
with:
119+
python-version: '3.11'
120+
- name: Build
115121
run: |
116-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
117-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
118-
CC=clang-20 ./configure --with-tail-call-interp --with-pydebug
122+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }}
123+
export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH"
124+
CC=clang-${{ env.LLVM_VERSION }} ./configure --with-tail-call-interp ${{ matrix.configure_flags }}
119125
make all --jobs 4
120-
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
121-
122-
- name: Native Linux with free-threading (release)
123-
if: matrix.target == 'free-threading'
126+
- name: Test
124127
run: |
125-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
126-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
127-
CC=clang-20 ./configure --with-tail-call-interp --disable-gil
128-
make all --jobs 4
129128
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.14.10
3+
rev: v0.15.0
44
hooks:
55
- id: ruff-check
66
name: Run Ruff (lint) on Apple/
@@ -52,14 +52,14 @@ repos:
5252
files: ^Tools/wasm/
5353

5454
- repo: https://github.com/psf/black-pre-commit-mirror
55-
rev: 25.12.0
55+
rev: 26.1.0
5656
hooks:
5757
- id: black
5858
name: Run Black on Tools/jit/
5959
files: ^Tools/jit/
6060

6161
- repo: https://github.com/Lucas-C/pre-commit-hooks
62-
rev: v1.5.5
62+
rev: v1.5.6
6363
hooks:
6464
- id: remove-tabs
6565
types: [python]
@@ -83,19 +83,19 @@ repos:
8383
files: '^\.github/CODEOWNERS|\.(gram)$'
8484

8585
- repo: https://github.com/python-jsonschema/check-jsonschema
86-
rev: 0.36.0
86+
rev: 0.36.1
8787
hooks:
8888
- id: check-dependabot
8989
- id: check-github-workflows
9090
- id: check-readthedocs
9191

9292
- repo: https://github.com/rhysd/actionlint
93-
rev: v1.7.9
93+
rev: v1.7.10
9494
hooks:
9595
- id: actionlint
9696

9797
- repo: https://github.com/woodruffw/zizmor-pre-commit
98-
rev: v1.19.0
98+
rev: v1.22.0
9999
hooks:
100100
- id: zizmor
101101

0 commit comments

Comments
 (0)