Skip to content

Commit 6a0ea81

Browse files
committed
Merge remote-tracking branch 'upstream/main' into tachyon-ndjson-kolektor
* upstream/main: (119 commits) gh-144270: Make SubElement parent and tag positional-only (GH-144845) gh-146558: JIT optimize dict access for objects with known hash (#146559) gh-139922: always run MSVC 64-bit tail-calling CI (GH-146570) gh-126835: Fix _PY_IS_SMALL_INT() macro (#146631) gh-146587: fix type slot assignment incase of multiple slots for same name (#146593) gh-138122: Add differential flame graph (#145785) gh-146416: Emscripten: Improve standard stream handling in node_entry.mjs (#146417) gh-146444: Don't package as part of iOS 'build hosts' target (#146628) gh-138850: Add --disable-epoll to configure (GH-145768) gh-146444: Make Platforms/Apple/ compatible with Python 3.9 (#146624) gh-138577: Fix keyboard shortcuts in getpass with echo_char (#141597) gh-146556: Fix infinite loop in annotationlib.get_annotations() on circular __wrapped__ (#146557) gh-146579: _zstd: Fix decompression options dict error message (#146577) gh-146083: Upgrade bundled Expat to 2.7.5 (#146085) gh-146080: fix a crash in SNI callbacks when the SSL object is gone (#146573) gh-146090: fix memory management of internal `sqlite3` callback contexts (#146569) gh-145876: Do not mask KeyErrors raised during dictionary unpacking in call (GH-146472) gh-146004: fix test_args_from_interpreter_flags on windows (#146580) gh-139003: Use frozenset for module level attributes in _pyrepl.utils (#139004) GH-146527: Add more data to GC statistics and add it to PyDebugOffsets (#146532) ...
2 parents c15d318 + afd8113 commit 6a0ea81

File tree

445 files changed

+14200
-4376
lines changed

Some content is hidden

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

445 files changed

+14200
-4376
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,4 @@ Tools/peg_generator/pegen/grammar_parser.py generated
112112
aclocal.m4 generated
113113
configure generated
114114
*.min.js generated
115+
package-lock.json generated

.github/CODEOWNERS

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -427,19 +427,19 @@ Lib/dataclasses.py @ericvsmith
427427
Lib/test/test_dataclasses/ @ericvsmith
428428

429429
# Dates and times
430-
Doc/**/*time.rst @pganssle @abalkin @StanFromIreland
430+
Doc/**/*time.rst @pganssle @StanFromIreland
431431
Doc/library/datetime-* @pganssle @StanFromIreland
432432
Doc/library/zoneinfo.rst @pganssle @StanFromIreland
433-
Include/datetime.h @pganssle @abalkin @StanFromIreland
434-
Include/internal/pycore_time.h @pganssle @abalkin @StanFromIreland
433+
Include/datetime.h @pganssle @StanFromIreland
434+
Include/internal/pycore_time.h @pganssle @StanFromIreland
435435
Lib/test/test_zoneinfo/ @pganssle @StanFromIreland
436436
Lib/zoneinfo/ @pganssle @StanFromIreland
437-
Lib/*time.py @pganssle @abalkin @StanFromIreland
438-
Lib/test/datetimetester.py @pganssle @abalkin @StanFromIreland
439-
Lib/test/test_*time.py @pganssle @abalkin @StanFromIreland
437+
Lib/*time.py @pganssle @StanFromIreland
438+
Lib/test/datetimetester.py @pganssle @StanFromIreland
439+
Lib/test/test_*time.py @pganssle @StanFromIreland
440440
Modules/*zoneinfo* @pganssle @StanFromIreland
441-
Modules/*time* @pganssle @abalkin @StanFromIreland
442-
Python/pytime.c @pganssle @abalkin @StanFromIreland
441+
Modules/*time* @pganssle @StanFromIreland
442+
Python/pytime.c @pganssle @StanFromIreland
443443

444444
# Dbm
445445
Doc/library/dbm.rst @corona10 @erlend-aasland @serhiy-storchaka

.github/actionlint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
self-hosted-runner:
2+
# Pending release of actionlint > 1.7.11 for macos-26-intel support
3+
# https://github.com/rhysd/actionlint/pull/629
4+
labels: ["macos-26-intel"]
5+
16
config-variables: null
27

38
paths:

.github/workflows/build.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,21 @@ jobs:
165165
free-threading:
166166
- false
167167
- true
168+
interpreter:
169+
- switch-case
168170
exclude:
169171
# Skip Win32 on free-threaded builds
170172
- { arch: Win32, free-threading: true }
173+
include:
174+
# msvc::musttail is currently only supported on x64,
175+
# and only supported on 3.15+.
176+
- { arch: x64, free-threading: false, interpreter: tail-call }
177+
- { arch: x64, free-threading: true, interpreter: tail-call }
171178
uses: ./.github/workflows/reusable-windows.yml
172179
with:
173180
arch: ${{ matrix.arch }}
174181
free-threading: ${{ matrix.free-threading }}
182+
interpreter: ${{ matrix.interpreter }}
175183

176184
build-windows-msi:
177185
# ${{ '' } is a hack to nest jobs under the same sidebar category.
@@ -198,16 +206,16 @@ jobs:
198206
strategy:
199207
fail-fast: false
200208
matrix:
201-
# macos-14 is M1, macos-15-intel is Intel.
202-
# macos-15-intel only runs tests against the GIL-enabled CPython.
209+
# macos-26 is Apple Silicon, macos-26-intel is Intel.
210+
# macos-26-intel only runs tests against the GIL-enabled CPython.
203211
os:
204-
- macos-14
205-
- macos-15-intel
212+
- macos-26
213+
- macos-26-intel
206214
free-threading:
207215
- false
208216
- true
209217
exclude:
210-
- os: macos-15-intel
218+
- os: macos-26-intel
211219
free-threading: true
212220
uses: ./.github/workflows/reusable-macos.yml
213221
with:
@@ -336,7 +344,7 @@ jobs:
336344
matrix:
337345
include:
338346
- arch: aarch64
339-
runs-on: macos-14
347+
runs-on: macos-26
340348
- arch: x86_64
341349
runs-on: ubuntu-24.04
342350

@@ -369,7 +377,13 @@ jobs:
369377
sudo xcode-select --switch /Applications/Xcode_15.4.app
370378
371379
- name: Build and test
372-
run: python3 Apple ci iOS --fast-ci --simulator 'iPhone SE (3rd generation),OS=17.5'
380+
run: python3 Platforms/Apple ci iOS --fast-ci --simulator 'iPhone SE (3rd generation),OS=17.5'
381+
382+
build-emscripten:
383+
name: 'Emscripten'
384+
needs: build-context
385+
if: needs.build-context.outputs.run-emscripten == 'true'
386+
uses: ./.github/workflows/reusable-emscripten.yml
373387

374388
build-wasi:
375389
name: 'WASI'
@@ -650,6 +664,7 @@ jobs:
650664
- build-ubuntu
651665
- build-ubuntu-ssltests
652666
- build-ios
667+
- build-emscripten
653668
- build-wasi
654669
- test-hypothesis
655670
- build-asan
@@ -664,6 +679,7 @@ jobs:
664679
with:
665680
allowed-failures: >-
666681
build-android,
682+
build-emscripten,
667683
build-windows-msi,
668684
build-ubuntu-ssltests,
669685
test-hypothesis,
@@ -706,5 +722,6 @@ jobs:
706722
}}
707723
${{ !fromJSON(needs.build-context.outputs.run-android) && 'build-android,' || '' }}
708724
${{ !fromJSON(needs.build-context.outputs.run-ios) && 'build-ios,' || '' }}
725+
${{ !fromJSON(needs.build-context.outputs.run-emscripten) && 'build-emscripten,' || '' }}
709726
${{ !fromJSON(needs.build-context.outputs.run-wasi) && 'build-wasi,' || '' }}
710727
jobs: ${{ toJSON(needs) }}

.github/workflows/jit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ jobs:
9999
- false
100100
include:
101101
- target: x86_64-apple-darwin/clang
102-
runner: macos-15-intel
102+
runner: macos-26-intel
103103
- target: aarch64-apple-darwin/clang
104-
runner: macos-14
104+
runner: macos-26
105105
steps:
106106
- uses: actions/checkout@v6
107107
with:

.github/workflows/reusable-context.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ on: # yamllint disable-line rule:truthy
4141
run-ubuntu:
4242
description: Whether to run the Ubuntu tests
4343
value: ${{ jobs.compute-changes.outputs.run-ubuntu }} # bool
44+
run-emscripten:
45+
description: Whether to run the Emscripten tests
46+
value: ${{ jobs.compute-changes.outputs.run-emscripten }} # bool
4447
run-wasi:
4548
description: Whether to run the WASI tests
4649
value: ${{ jobs.compute-changes.outputs.run-wasi }} # bool
@@ -65,6 +68,7 @@ jobs:
6568
run-macos: ${{ steps.changes.outputs.run-macos }}
6669
run-tests: ${{ steps.changes.outputs.run-tests }}
6770
run-ubuntu: ${{ steps.changes.outputs.run-ubuntu }}
71+
run-emscripten: ${{ steps.changes.outputs.run-emscripten }}
6872
run-wasi: ${{ steps.changes.outputs.run-wasi }}
6973
run-windows-msi: ${{ steps.changes.outputs.run-windows-msi }}
7074
run-windows-tests: ${{ steps.changes.outputs.run-windows-tests }}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Reusable Emscripten
2+
3+
on:
4+
workflow_call:
5+
6+
env:
7+
FORCE_COLOR: 1
8+
9+
jobs:
10+
build-emscripten-reusable:
11+
name: 'build and test'
12+
runs-on: ubuntu-24.04
13+
timeout-minutes: 60
14+
steps:
15+
- uses: actions/checkout@v6
16+
with:
17+
persist-credentials: false
18+
- name: "Read Emscripten config"
19+
id: emscripten-config
20+
shell: python
21+
run: |
22+
import hashlib
23+
import json
24+
import os
25+
import tomllib
26+
from pathlib import Path
27+
28+
config = tomllib.loads(Path("Platforms/emscripten/config.toml").read_text())
29+
h = hashlib.sha256()
30+
h.update(json.dumps(config["dependencies"], sort_keys=True).encode())
31+
h.update(Path("Platforms/emscripten/make_libffi.sh").read_bytes())
32+
h.update(b'1') # Update to explicitly bust cache
33+
emsdk_cache = Path(os.environ["RUNNER_TEMP"]) / "emsdk-cache"
34+
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
35+
f.write(f"emscripten-version={config['emscripten-version']}\n")
36+
f.write(f"node-version={config['node-version']}\n")
37+
f.write(f"deps-hash={h.hexdigest()}\n")
38+
with open(os.environ["GITHUB_ENV"], "a") as f:
39+
f.write(f"EMSDK_CACHE={emsdk_cache}\n")
40+
- name: "Install Node.js"
41+
uses: actions/setup-node@v6
42+
with:
43+
node-version: ${{ steps.emscripten-config.outputs.node-version }}
44+
- name: "Cache Emscripten SDK"
45+
id: emsdk-cache
46+
uses: actions/cache@v5
47+
with:
48+
path: ${{ env.EMSDK_CACHE }}
49+
key: emsdk-${{ steps.emscripten-config.outputs.emscripten-version }}-${{ steps.emscripten-config.outputs.deps-hash }}
50+
restore-keys: emsdk-${{ steps.emscripten-config.outputs.emscripten-version }}
51+
- name: "Install Python"
52+
uses: actions/setup-python@v6
53+
with:
54+
python-version: '3.x'
55+
- name: "Runner image version"
56+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
57+
- name: "Install Emscripten"
58+
run: python3 Platforms/emscripten install-emscripten
59+
- name: "Configure build Python"
60+
run: python3 Platforms/emscripten configure-build-python -- --config-cache --with-pydebug
61+
- name: "Make build Python"
62+
run: python3 Platforms/emscripten make-build-python
63+
- name: "Make dependencies"
64+
run: >-
65+
python3 Platforms/emscripten make-dependencies
66+
${{ steps.emsdk-cache.outputs.cache-hit == 'true' && '--check-up-to-date' || '' }}
67+
- name: "Configure host Python"
68+
run: python3 Platforms/emscripten configure-host --host-runner node -- --config-cache
69+
- name: "Make host Python"
70+
run: python3 Platforms/emscripten make-host
71+
- name: "Display build info"
72+
run: python3 Platforms/emscripten run --pythoninfo
73+
- name: "Test"
74+
run: python3 Platforms/emscripten run --test

.github/workflows/reusable-macos.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ jobs:
5252
--prefix=/opt/python-dev \
5353
--with-openssl="$(brew --prefix openssl@3.5)"
5454
- name: Build CPython
55-
if : ${{ inputs.free-threading || inputs.os != 'macos-15-intel' }}
55+
if : ${{ inputs.free-threading || inputs.os != 'macos-26-intel' }}
5656
run: gmake -j8
5757
- name: Build CPython for compiler warning check
58-
if : ${{ !inputs.free-threading && inputs.os == 'macos-15-intel' }}
58+
if : ${{ !inputs.free-threading && inputs.os == 'macos-26-intel' }}
5959
run: set -o pipefail; gmake -j8 --output-sync 2>&1 | tee compiler_output_macos.txt
6060
- name: Display build info
6161
run: make pythoninfo
6262
- name: Check compiler warnings
63-
if : ${{ !inputs.free-threading && inputs.os == 'macos-15-intel' }}
63+
if : ${{ !inputs.free-threading && inputs.os == 'macos-26-intel' }}
6464
run: >-
6565
python3 Tools/build/check_warnings.py
6666
--compiler-output-file-path=compiler_output_macos.txt

.github/workflows/reusable-windows.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
required: false
1313
type: boolean
1414
default: false
15+
interpreter:
16+
description: Which interpreter to build (switch-case or tail-call)
17+
required: true
18+
type: string
1519

1620
env:
1721
FORCE_COLOR: 1
@@ -20,7 +24,7 @@ env:
2024
2125
jobs:
2226
build:
23-
name: Build and test (${{ inputs.arch }})
27+
name: Build and test (${{ inputs.arch }}, ${{ inputs.interpreter }})
2428
runs-on: ${{ inputs.arch == 'arm64' && 'windows-11-arm' || 'windows-2025-vs2026' }}
2529
timeout-minutes: 60
2630
env:
@@ -33,9 +37,12 @@ jobs:
3337
if: inputs.arch != 'Win32'
3438
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
3539
- name: Build CPython
40+
# msvc::musttail is not supported for debug builds, so we have to
41+
# switch to release.
3642
run: >-
3743
.\\PCbuild\\build.bat
38-
-e -d -v
44+
-e -v
45+
${{ inputs.interpreter == 'switch-case' && '-d' || '--tail-call-interp -c Release' }}
3946
-p "${ARCH}"
4047
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
4148
shell: bash
@@ -45,6 +52,7 @@ jobs:
4552
run: >-
4653
.\\PCbuild\\rt.bat
4754
-p "${ARCH}"
48-
-d -q --fast-ci
55+
-q --fast-ci
56+
${{ inputs.interpreter == 'switch-case' && '-d' || '' }}
4957
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
5058
shell: bash

.github/workflows/tail-call.yml

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,6 @@ env:
2323
LLVM_VERSION: 21
2424

2525
jobs:
26-
windows:
27-
name: ${{ matrix.target }}
28-
runs-on: ${{ matrix.runner }}
29-
timeout-minutes: 60
30-
strategy:
31-
fail-fast: false
32-
matrix:
33-
include:
34-
- target: x86_64-pc-windows-msvc/msvc
35-
architecture: x64
36-
runner: windows-2025-vs2026
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
44-
steps:
45-
- uses: actions/checkout@v6
46-
with:
47-
persist-credentials: false
48-
- uses: actions/setup-python@v6
49-
with:
50-
python-version: '3.11'
51-
- name: Build
52-
shell: pwsh
53-
run: |
54-
./PCbuild/build.bat --tail-call-interp ${{ matrix.build_flags }} -c Release -p ${{ matrix.architecture }}
55-
- name: Test
56-
if: matrix.run_tests
57-
shell: pwsh
58-
run: |
59-
./PCbuild/rt.bat -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
60-
6126
macos:
6227
name: ${{ matrix.target }}
6328
runs-on: ${{ matrix.runner }}
@@ -67,9 +32,9 @@ jobs:
6732
matrix:
6833
include:
6934
- target: x86_64-apple-darwin/clang
70-
runner: macos-15-intel
35+
runner: macos-26-intel
7136
- target: aarch64-apple-darwin/clang
72-
runner: macos-14
37+
runner: macos-26
7338
steps:
7439
- uses: actions/checkout@v6
7540
with:

0 commit comments

Comments
 (0)