Skip to content

Commit c32532e

Browse files
Merge branch 'main' into feature/add_genericalias_for_sm_cm
2 parents 5639738 + ac7d5ba commit c32532e

File tree

845 files changed

+49244
-12839
lines changed

Some content is hidden

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

845 files changed

+49244
-12839
lines changed

.github/CODEOWNERS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Modules/Setup* @erlend-aasland
3030
Objects/set* @rhettinger
3131
Objects/dict* @methane @markshannon
3232
Objects/typevarobject.c @JelleZijlstra
33+
Objects/unionobject.c @JelleZijlstra
3334
Objects/type* @markshannon
3435
Objects/codeobject.c @markshannon
3536
Objects/frameobject.c @markshannon
@@ -167,6 +168,9 @@ Include/internal/pycore_time.h @pganssle @abalkin
167168
**/*imap* @python/email-team
168169
**/*poplib* @python/email-team
169170

171+
# Exclude .mailmap from being owned by @python/email-team
172+
/.mailmap
173+
170174
# Garbage collector
171175
/Modules/gcmodule.c @pablogsal
172176
/Doc/library/gc.rst @pablogsal
@@ -316,3 +320,9 @@ Lib/test/test__colorize.py @hugovk
316320

317321
# Fuzzing
318322
Modules/_xxtestfuzz/ @ammaraskar
323+
324+
# t-strings
325+
**/*interpolationobject* @lysnikolaou
326+
**/*templateobject* @lysnikolaou
327+
**/*templatelib* @lysnikolaou
328+
**/*tstring* @lysnikolaou

.github/actionlint.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
self-hosted-runner:
2-
labels: ["windows-aarch64"]
2+
# Pending https://github.com/rhysd/actionlint/issues/533
3+
labels: ["windows-11-arm"]
34

45
config-variables: null
56

.github/workflows/build.yml

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -156,28 +156,18 @@ jobs:
156156
strategy:
157157
fail-fast: false
158158
matrix:
159-
os:
160-
- windows-latest
161159
arch:
162160
- x64
161+
- Win32
162+
- arm64
163163
free-threading:
164164
- false
165165
- true
166-
include:
167-
# Forks don't have access to Windows on Arm runners. These jobs are skipped below:
168-
- os: ${{ github.repository_owner == 'python' && 'windows-aarch64' || 'windows-latest' }}
169-
arch: arm64
170-
free-threading: false
171-
# Forks don't have access to Windows on Arm runners. These jobs are skipped below:
172-
- os: ${{ github.repository_owner == 'python' && 'windows-aarch64' || 'windows-latest' }}
173-
arch: arm64
174-
free-threading: true
175-
- os: windows-latest
176-
arch: Win32
177-
free-threading: false
166+
exclude:
167+
# Skip Win32 on free-threaded builds
168+
- { arch: Win32, free-threading: true }
178169
uses: ./.github/workflows/reusable-windows.yml
179170
with:
180-
os: ${{ matrix.os }}
181171
arch: ${{ matrix.arch }}
182172
free-threading: ${{ matrix.free-threading }}
183173

@@ -189,18 +179,12 @@ jobs:
189179
strategy:
190180
fail-fast: false
191181
matrix:
192-
os:
193-
- windows-latest
194182
arch:
195183
- x86
196184
- x64
197-
include:
198-
# Forks don't have access to Windows on Arm runners. These jobs are skipped below:
199-
- os: ${{ github.repository_owner == 'python' && 'windows-aarch64' || 'windows-latest' }}
200-
arch: arm64
185+
- arm64
201186
uses: ./.github/workflows/reusable-windows-msi.yml
202187
with:
203-
os: ${{ matrix.os }}
204188
arch: ${{ matrix.arch }}
205189

206190
build-macos:
@@ -280,7 +264,7 @@ jobs:
280264
fail-fast: false
281265
matrix:
282266
os: [ubuntu-24.04]
283-
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2, 3.4.0]
267+
openssl_ver: [3.0.16, 3.1.8, 3.2.4, 3.3.3, 3.4.1]
284268
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
285269
env:
286270
OPENSSL_VER: ${{ matrix.openssl_ver }}
@@ -347,7 +331,7 @@ jobs:
347331
needs: build-context
348332
if: needs.build-context.outputs.run-tests == 'true'
349333
env:
350-
OPENSSL_VER: 3.0.15
334+
OPENSSL_VER: 3.0.16
351335
PYTHONSTRICTEXTENSIONBUILD: 1
352336
steps:
353337
- uses: actions/checkout@v4
@@ -438,8 +422,9 @@ jobs:
438422
# failing when executed from inside a virtual environment.
439423
"${VENV_PYTHON}" -m test \
440424
-W \
441-
-o \
425+
--slowest \
442426
-j4 \
427+
--timeout 900 \
443428
-x test_asyncio \
444429
-x test_multiprocessing_fork \
445430
-x test_multiprocessing_forkserver \
@@ -466,7 +451,7 @@ jobs:
466451
matrix:
467452
os: [ubuntu-24.04]
468453
env:
469-
OPENSSL_VER: 3.0.15
454+
OPENSSL_VER: 3.0.16
470455
PYTHONSTRICTEXTENSIONBUILD: 1
471456
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
472457
steps:

.github/workflows/jit.yml

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ jobs:
7474
runner: windows-latest
7575
- target: aarch64-pc-windows-msvc/msvc
7676
architecture: ARM64
77-
# Forks don't have access to Windows on Arm runners. These jobs are skipped below:
78-
runner: ${{ github.repository_owner == 'python' && 'windows-aarch64' || 'windows-latest' }}
77+
runner: windows-11-arm
7978
- target: x86_64-apple-darwin/clang
8079
architecture: x86_64
8180
runner: macos-13
@@ -96,11 +95,10 @@ jobs:
9695
with:
9796
python-version: '3.11'
9897

98+
# PCbuild downloads LLVM automatically:
9999
- name: Windows
100-
# Forks don't have access to Windows on Arm runners. Skip those:
101-
if: runner.os == 'Windows' && (matrix.architecture != 'ARM64' || github.repository_owner == 'python')
100+
if: runner.os == 'Windows'
102101
run: |
103-
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
104102
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
105103
./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
106104
@@ -115,7 +113,7 @@ jobs:
115113
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
116114
brew install llvm@${{ matrix.llvm }}
117115
export SDKROOT="$(xcrun --show-sdk-path)"
118-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
116+
./configure --enable-experimental-jit --enable-universalsdk --with-universal-archs=universal2 ${{ matrix.debug && '--with-pydebug' || '' }}
119117
make all --jobs 4
120118
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
121119
@@ -128,29 +126,30 @@ jobs:
128126
make all --jobs 4
129127
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
130128
131-
jit-with-disabled-gil:
132-
name: Free-Threaded (Debug)
133-
needs: interpreter
134-
runs-on: ubuntu-24.04
135-
timeout-minutes: 90
136-
strategy:
137-
fail-fast: false
138-
matrix:
139-
llvm:
140-
- 19
141-
steps:
142-
- uses: actions/checkout@v4
143-
with:
144-
persist-credentials: false
145-
- uses: actions/setup-python@v5
146-
with:
147-
python-version: '3.11'
148-
- name: Build with JIT enabled and GIL disabled
149-
run: |
150-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
151-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
152-
./configure --enable-experimental-jit --with-pydebug --disable-gil
153-
make all --jobs 4
154-
- name: Run tests
155-
run: |
156-
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
129+
# XXX: GH-133171
130+
# jit-with-disabled-gil:
131+
# name: Free-Threaded (Debug)
132+
# needs: interpreter
133+
# runs-on: ubuntu-24.04
134+
# timeout-minutes: 90
135+
# strategy:
136+
# fail-fast: false
137+
# matrix:
138+
# llvm:
139+
# - 19
140+
# steps:
141+
# - uses: actions/checkout@v4
142+
# with:
143+
# persist-credentials: false
144+
# - uses: actions/setup-python@v5
145+
# with:
146+
# python-version: '3.11'
147+
# - name: Build with JIT enabled and GIL disabled
148+
# run: |
149+
# sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
150+
# export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
151+
# ./configure --enable-experimental-jit --with-pydebug --disable-gil
152+
# make all --jobs 4
153+
# - name: Run tests
154+
# run: |
155+
# ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3

.github/workflows/mypy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ on:
88
pull_request:
99
paths:
1010
- ".github/workflows/mypy.yml"
11+
- "Lib/_colorize.py"
1112
- "Lib/_pyrepl/**"
1213
- "Lib/test/libregrtest/**"
14+
- "Lib/tomllib/**"
15+
- "Misc/mypy/**"
1316
- "Tools/build/generate_sbom.py"
1417
- "Tools/cases_generator/**"
1518
- "Tools/clinic/**"
@@ -42,6 +45,7 @@ jobs:
4245
target: [
4346
"Lib/_pyrepl",
4447
"Lib/test/libregrtest",
48+
"Lib/tomllib",
4549
"Tools/build",
4650
"Tools/cases_generator",
4751
"Tools/clinic",

.github/workflows/reusable-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
run: |
6767
set -Eeuo pipefail
6868
# Build docs with the nit-picky option; write warnings to file
69-
make -C Doc/ PYTHON=../python SPHINXOPTS="--quiet --nitpicky --fail-on-warning --keep-going --warning-file sphinx-warnings.txt" html
69+
make -C Doc/ PYTHON=../python SPHINXOPTS="--quiet --nitpicky --fail-on-warning --warning-file sphinx-warnings.txt" html
7070
- name: 'Check warnings'
7171
if: github.event_name == 'pull_request'
7272
run: |
@@ -101,4 +101,4 @@ jobs:
101101
run: make -C Doc/ PYTHON=../python venv
102102
# Use "xvfb-run" since some doctest tests open GUI windows
103103
- name: 'Run documentation doctest'
104-
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="--fail-on-warning --keep-going" doctest
104+
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="--fail-on-warning" doctest

.github/workflows/reusable-windows-msi.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ name: Reusable Windows MSI
33
on:
44
workflow_call:
55
inputs:
6-
os:
7-
description: OS to run on
8-
required: true
9-
type: string
106
arch:
117
description: CPU architecture
128
required: true
@@ -21,7 +17,7 @@ env:
2117
jobs:
2218
build:
2319
name: installer for ${{ inputs.arch }}
24-
runs-on: ${{ inputs.os }}
20+
runs-on: ${{ inputs.arch == 'arm64' && 'windows-11-arm' || 'windows-latest' }}
2521
timeout-minutes: 60
2622
env:
2723
ARCH: ${{ inputs.arch }}
@@ -31,7 +27,5 @@ jobs:
3127
with:
3228
persist-credentials: false
3329
- name: Build CPython installer
34-
# Forks don't have access to Windows on Arm runners. Skip those:
35-
if: inputs.arch != 'arm64' || github.repository_owner == 'python'
3630
run: ./Tools/msi/build.bat --doc -"${ARCH}"
3731
shell: bash

.github/workflows/reusable-windows.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ name: Reusable Windows
33
on:
44
workflow_call:
55
inputs:
6-
os:
7-
description: OS to run on
8-
required: true
9-
type: string
106
arch:
117
description: CPU architecture
128
required: true
@@ -25,7 +21,7 @@ env:
2521
jobs:
2622
build:
2723
name: Build and test (${{ inputs.arch }})
28-
runs-on: ${{ inputs.os }}
24+
runs-on: ${{ inputs.arch == 'arm64' && 'windows-11-arm' || 'windows-latest' }}
2925
timeout-minutes: 60
3026
env:
3127
ARCH: ${{ inputs.arch }}
@@ -37,21 +33,15 @@ jobs:
3733
if: inputs.arch != 'Win32'
3834
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
3935
- name: Build CPython
40-
# Forks don't have access to Windows on Arm runners. Skip those:
41-
if: inputs.arch != 'arm64' || github.repository_owner == 'python'
4236
run: >-
4337
.\\PCbuild\\build.bat
4438
-e -d -v
4539
-p "${ARCH}"
4640
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
4741
shell: bash
4842
- name: Display build info
49-
# Forks don't have access to Windows on Arm runners. Skip those:
50-
if: inputs.arch != 'arm64' || github.repository_owner == 'python'
5143
run: .\\python.bat -m test.pythoninfo
5244
- name: Tests
53-
# Forks don't have access to Windows on Arm runners. Skip those:
54-
if: inputs.arch != 'arm64' || github.repository_owner == 'python'
5545
run: >-
5646
.\\PCbuild\\rt.bat
5747
-p "${ARCH}"

.github/zizmor.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ rules:
44
dangerous-triggers:
55
ignore:
66
- documentation-links.yml
7+
unpinned-uses:
8+
config:
9+
policies:
10+
"*": ref-pin

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,12 @@ Tools/unicode/data/
138138
# hendrikmuhs/ccache-action@v1
139139
/.ccache
140140
/cross-build/
141-
/jit_stencils.h
141+
/jit_stencils*.h
142142
/platform
143143
/profile-clean-stamp
144144
/profile-run-stamp
145145
/profile-bolt-stamp
146+
/profile-gen-stamp
146147
/pybuilddir.txt
147148
/pyconfig.h
148149
/python-config

0 commit comments

Comments
 (0)