Skip to content

Commit 5e6670e

Browse files
committed
Merge remote-tracking branch 'upstream/main' into gh-139269
2 parents 39bcc4c + e7e3d1d commit 5e6670e

File tree

232 files changed

+8461
-6474
lines changed

Some content is hidden

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

232 files changed

+8461
-6474
lines changed

.github/CODEOWNERS

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ Modules/makesetup @erlend-aasland @AA-Turner @emmatyping
8686
Modules/Setup* @erlend-aasland @AA-Turner @emmatyping
8787
Tools/build/regen-configure.sh @AA-Turner
8888

89+
# generate-build-details
90+
Tools/build/generate-build-details.py @FFY00
91+
Lib/test/test_build_details.py @FFY00
92+
8993

9094
# ----------------------------------------------------------------------------
9195
# Documentation
@@ -241,10 +245,10 @@ Lib/test/test_getpath.py @FFY00
241245
Modules/getpath* @FFY00
242246

243247
# Hashing / ``hash()`` and related
244-
Include/cpython/pyhash.h @gpshead @picnixz @tiran
245-
Include/internal/pycore_pyhash.h @gpshead @picnixz @tiran
246-
Include/pyhash.h @gpshead @picnixz @tiran
247-
Python/pyhash.c @gpshead @picnixz @tiran
248+
Include/cpython/pyhash.h @gpshead @picnixz
249+
Include/internal/pycore_pyhash.h @gpshead @picnixz
250+
Include/pyhash.h @gpshead @picnixz
251+
Python/pyhash.c @gpshead @picnixz
248252

249253
# The import system (including importlib)
250254
**/*import* @brettcannon @ericsnowcurrently @ncoghlan @warsaw
@@ -371,14 +375,14 @@ Lib/calendar.py @AA-Turner
371375
Lib/test/test_calendar.py @AA-Turner
372376

373377
# Cryptographic Primitives and Applications
374-
**/*hashlib* @gpshead @picnixz @tiran
375-
**/*hashopenssl* @gpshead @picnixz @tiran
378+
**/*hashlib* @gpshead @picnixz
379+
**/*hashopenssl* @gpshead @picnixz
376380
**/*hmac* @gpshead @picnixz
377381
**/*ssl* @gpshead @picnixz
378382
Modules/_hacl/ @gpshead @picnixz
379-
Modules/*blake* @gpshead @picnixz @tiran
380-
Modules/*md5* @gpshead @picnixz @tiran
381-
Modules/*sha* @gpshead @picnixz @tiran
383+
Modules/*blake* @gpshead @picnixz
384+
Modules/*md5* @gpshead @picnixz
385+
Modules/*sha* @gpshead @picnixz
382386

383387
# Codecs
384388
Modules/cjkcodecs/ @corona10

.github/actionlint.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
self-hosted-runner:
22
# Pending https://github.com/rhysd/actionlint/issues/533
3-
labels: ["windows-11-arm"]
3+
# and https://github.com/rhysd/actionlint/issues/571
4+
labels: ["windows-11-arm", "macos-15-intel"]
45

56
config-variables: null
67

.github/workflows/build.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -202,24 +202,16 @@ jobs:
202202
strategy:
203203
fail-fast: false
204204
matrix:
205-
# Cirrus and macos-14 are M1, macos-13 is default GHA Intel.
206-
# macOS 13 only runs tests against the GIL-enabled CPython.
207-
# Cirrus used for upstream, macos-14 for forks.
205+
# macos-14 is M1, macos-15-intel is Intel.
206+
# macos-15-intel only runs tests against the GIL-enabled CPython.
208207
os:
209-
- ghcr.io/cirruslabs/macos-runner:sonoma
210208
- macos-14
211-
- macos-13
212-
is-fork: # only used for the exclusion trick
213-
- ${{ github.repository_owner != 'python' }}
209+
- macos-15-intel
214210
free-threading:
215211
- false
216212
- true
217213
exclude:
218-
- os: ghcr.io/cirruslabs/macos-runner:sonoma
219-
is-fork: true
220-
- os: macos-14
221-
is-fork: false
222-
- os: macos-13
214+
- os: macos-15-intel
223215
free-threading: true
224216
uses: ./.github/workflows/reusable-macos.yml
225217
with:
@@ -273,7 +265,7 @@ jobs:
273265
# Keep 1.1.1w in our list despite it being upstream EOL and otherwise
274266
# unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
275267
# supported by important vendors such as AWS-LC.
276-
openssl_ver: [1.1.1w, 3.0.17, 3.2.5, 3.3.4, 3.4.2, 3.5.2]
268+
openssl_ver: [1.1.1w, 3.0.18, 3.2.6, 3.3.5, 3.4.3, 3.5.4]
277269
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
278270
env:
279271
OPENSSL_VER: ${{ matrix.openssl_ver }}
@@ -409,9 +401,8 @@ jobs:
409401
fail-fast: false
410402
matrix:
411403
include:
412-
# Use the same runs-on configuration as build-macos and build-ubuntu.
413404
- arch: aarch64
414-
runs-on: ${{ github.repository_owner == 'python' && 'ghcr.io/cirruslabs/macos-runner:sonoma' || 'macos-14' }}
405+
runs-on: macos-14
415406
- arch: x86_64
416407
runs-on: ubuntu-24.04
417408

@@ -421,7 +412,7 @@ jobs:
421412
with:
422413
persist-credentials: false
423414
- name: Build and test
424-
run: ./Android/android.py ci ${{ matrix.arch }}-linux-android
415+
run: ./Android/android.py ci --fast-ci ${{ matrix.arch }}-linux-android
425416

426417
build-wasi:
427418
name: 'WASI'
@@ -438,7 +429,7 @@ jobs:
438429
needs: build-context
439430
if: needs.build-context.outputs.run-tests == 'true'
440431
env:
441-
OPENSSL_VER: 3.0.16
432+
OPENSSL_VER: 3.0.18
442433
PYTHONSTRICTEXTENSIONBUILD: 1
443434
steps:
444435
- uses: actions/checkout@v4
@@ -558,7 +549,7 @@ jobs:
558549
matrix:
559550
os: [ubuntu-24.04]
560551
env:
561-
OPENSSL_VER: 3.0.16
552+
OPENSSL_VER: 3.0.18
562553
PYTHONSTRICTEXTENSIONBUILD: 1
563554
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
564555
steps:

.github/workflows/jit.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
runner: windows-11-arm
8282
- target: x86_64-apple-darwin/clang
8383
architecture: x86_64
84-
runner: macos-13
84+
runner: macos-15-intel
8585
- target: aarch64-apple-darwin/clang
8686
architecture: aarch64
8787
runner: macos-14
@@ -106,15 +106,10 @@ jobs:
106106
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
107107
./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
108108
109-
# The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966.
110-
# This is a bug in the macOS runner image where the pre-installed Python is installed in the same
111-
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
112-
# the symlink to the pre-installed Python so that the Homebrew Python is used instead.
113109
- name: macOS
114110
if: runner.os == 'macOS'
115111
run: |
116112
brew update
117-
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
118113
brew install llvm@${{ matrix.llvm }}
119114
export SDKROOT="$(xcrun --show-sdk-path)"
120115
# Set MACOSX_DEPLOYMENT_TARGET and -Werror=unguarded-availability to

.github/workflows/project-updater.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/reusable-macos.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ jobs:
6060
--prefix=/opt/python-dev \
6161
--with-openssl="$(brew --prefix [email protected])"
6262
- name: Build CPython
63-
if : ${{ inputs.free-threading || inputs.os != 'macos-13' }}
63+
if : ${{ inputs.free-threading || inputs.os != 'macos-15-intel' }}
6464
run: gmake -j8
6565
- name: Build CPython for compiler warning check
66-
if : ${{ !inputs.free-threading && inputs.os == 'macos-13' }}
66+
if : ${{ !inputs.free-threading && inputs.os == 'macos-15-intel' }}
6767
run: set -o pipefail; gmake -j8 --output-sync 2>&1 | tee compiler_output_macos.txt
6868
- name: Display build info
6969
run: make pythoninfo
7070
- name: Check compiler warnings
71-
if : ${{ !inputs.free-threading && inputs.os == 'macos-13' }}
71+
if : ${{ !inputs.free-threading && inputs.os == 'macos-15-intel' }}
7272
run: >-
7373
python3 Tools/build/check_warnings.py
7474
--compiler-output-file-path=compiler_output_macos.txt

.github/workflows/reusable-ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ${{ inputs.os }}
3131
timeout-minutes: 60
3232
env:
33-
OPENSSL_VER: 3.0.15
33+
OPENSSL_VER: 3.0.18
3434
PYTHONSTRICTEXTENSIONBUILD: 1
3535
TERM: linux
3636
steps:

.github/workflows/tail-call.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
# runner: windows-2022
5959
- target: x86_64-apple-darwin/clang
6060
architecture: x86_64
61-
runner: macos-13
61+
runner: macos-15-intel
6262
- target: aarch64-apple-darwin/clang
6363
architecture: aarch64
6464
runner: macos-14
@@ -101,17 +101,10 @@ jobs:
101101
set LLVMInstallDir=C:\Program Files\LLVM
102102
./PCbuild/build.bat --tail-call-interp -p ${{ matrix.architecture }}
103103
104-
# The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966.
105-
# This is a bug in the macOS runner image where the pre-installed Python is installed in the same
106-
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
107-
# the symlink to the pre-installed Python so that the Homebrew Python is used instead.
108-
# Note: when a new LLVM is released, the homebrew installation directory changes, so the builds will fail.
109-
# We either need to upgrade LLVM or change the directory being pointed to.
110104
- name: Native macOS (release)
111105
if: runner.os == 'macOS'
112106
run: |
113107
brew update
114-
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
115108
brew install llvm@${{ matrix.llvm }}
116109
export SDKROOT="$(xcrun --show-sdk-path)"
117110
export PATH="/usr/local/opt/llvm@${{ matrix.llvm }}/bin:$PATH"

.pre-commit-config.yaml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,35 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.12.8
3+
rev: v0.13.2
44
hooks:
5-
- id: ruff
5+
- id: ruff-check
66
name: Run Ruff (lint) on Doc/
77
args: [--exit-non-zero-on-fix]
88
files: ^Doc/
9-
- id: ruff
9+
- id: ruff-check
1010
name: Run Ruff (lint) on Lib/test/
1111
args: [--exit-non-zero-on-fix]
1212
files: ^Lib/test/
13-
- id: ruff
13+
- id: ruff-check
1414
name: Run Ruff (lint) on Tools/build/
1515
args: [--exit-non-zero-on-fix, --config=Tools/build/.ruff.toml]
1616
files: ^Tools/build/
17-
- id: ruff
17+
- id: ruff-check
1818
name: Run Ruff (lint) on Tools/i18n/
1919
args: [--exit-non-zero-on-fix, --config=Tools/i18n/.ruff.toml]
2020
files: ^Tools/i18n/
21-
- id: ruff
21+
- id: ruff-check
2222
name: Run Ruff (lint) on Argument Clinic
2323
args: [--exit-non-zero-on-fix, --config=Tools/clinic/.ruff.toml]
2424
files: ^Tools/clinic/|Lib/test/test_clinic.py
25-
- id: ruff
25+
- id: ruff-check
2626
name: Run Ruff (lint) on Tools/peg_generator/
2727
args: [--exit-non-zero-on-fix, --config=Tools/peg_generator/.ruff.toml]
2828
files: ^Tools/peg_generator/
29+
- id: ruff-check
30+
name: Run Ruff (lint) on Tools/wasm/
31+
args: [--exit-non-zero-on-fix, --config=Tools/wasm/.ruff.toml]
32+
files: ^Tools/wasm/
2933
- id: ruff-format
3034
name: Run Ruff (format) on Doc/
3135
args: [--check]
@@ -34,9 +38,13 @@ repos:
3438
name: Run Ruff (format) on Tools/build/check_warnings.py
3539
args: [--check, --config=Tools/build/.ruff.toml]
3640
files: ^Tools/build/check_warnings.py
41+
- id: ruff-format
42+
name: Run Ruff (format) on Tools/wasm/
43+
args: [--check, --config=Tools/wasm/.ruff.toml]
44+
files: ^Tools/wasm/
3745

3846
- repo: https://github.com/psf/black-pre-commit-mirror
39-
rev: 25.1.0
47+
rev: 25.9.0
4048
hooks:
4149
- id: black
4250
name: Run Black on Tools/jit/
@@ -47,7 +55,6 @@ repos:
4755
hooks:
4856
- id: remove-tabs
4957
types: [python]
50-
exclude: ^Tools/c-analyzer/cpython/_parser.py
5158

5259
- repo: https://github.com/pre-commit/pre-commit-hooks
5360
rev: v6.0.0
@@ -68,7 +75,7 @@ repos:
6875
files: '^\.github/CODEOWNERS|\.(gram)$'
6976

7077
- repo: https://github.com/python-jsonschema/check-jsonschema
71-
rev: 0.33.2
78+
rev: 0.34.0
7279
hooks:
7380
- id: check-dependabot
7481
- id: check-github-workflows
@@ -80,7 +87,7 @@ repos:
8087
- id: actionlint
8188

8289
- repo: https://github.com/woodruffw/zizmor-pre-commit
83-
rev: v1.11.0
90+
rev: v1.14.1
8491
hooks:
8592
- id: zizmor
8693

0 commit comments

Comments
 (0)