Skip to content

Commit 4621dee

Browse files
itamarometa-codesync[bot]
authored andcommitted
Import upstream 3.14.1 release
Summary: Imported python/cpython `3.14.1` from upstream rev [`57e0d17`](https://www.github.com/python/cpython/commit/57e0d177c26d4a508ef46adae9cbae46fca39f70) (committed 2025-12-02 12:51:18+00:00). # Commit Info Base: (`3.14.0`) - [`ebf955d`](https://www.github.com/python/cpython/commit/ebf955df7a89ed0c7968f79faec1de49f61ed7cb) (commit date: 2025-10-07 09:34:30+00:00) Imported: (`3.14.1`) - [`57e0d17`](https://www.github.com/python/cpython/commit/57e0d177c26d4a508ef46adae9cbae46fca39f70) (commit date: 2025-12-02 12:51:18+00:00) # Files added ``` Apple/.ruff.toml Doc/c-api/curses.rst Doc/c-api/picklebuffer.rst Doc/includes/optional-module.rst InternalDocs/stack_protection.md Lib/ensurepip/_bundled/pip-25.3-py3-none-any.whl Lib/pathlib/_local.py Lib/test/mp_preload_main.py Lib/test/test_free_threading/test_capi.py Lib/test/test_free_threading/test_cprofile.py Lib/test/test_free_threading/test_csv.py Lib/test/test_free_threading/test_dbm_gnu.py Lib/test/test_free_threading/test_io.py Lib/test/test_free_threading/test_mmap.py Lib/test/test_free_threading/test_re.py Lib/test/test_free_threading/test_resource.py Lib/test/test_free_threading/test_uuid.py Misc/NEWS.d/3.14.1.rst Modules/clinic/mmapmodule.c.h Tools/wasm/.ruff.toml ``` # Files removed ``` Lib/ensurepip/_bundled/pip-25.2-py3-none-any.whl Tools/wasm/mypy.ini ``` Reviewed By: fried Differential Revision: D88171463 fbshipit-source-id: 4ac5cf9f358e033fdb27c26afaad87e771a83301
1 parent 5139e89 commit 4621dee

687 files changed

Lines changed: 31495 additions & 15343 deletions

File tree

Some content is hidden

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

.devcontainer/devcontainer.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
{
2-
"image": "ghcr.io/python/devcontainer:2024.09.25.11038928730",
2+
"image": "ghcr.io/python/devcontainer:latest",
33
"onCreateCommand": [
44
// Install common tooling.
55
"dnf",
66
"install",
77
"-y",
8-
"which",
9-
"zsh",
10-
"fish",
118
// For umask fix below.
129
"/usr/bin/setfacl"
1310
],

.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/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ configure* @erlend-aasland @corona10
1616
Makefile.pre.in @erlend-aasland
1717
Modules/Setup* @erlend-aasland
1818

19+
# generate-build-details
20+
Tools/build/generate-build-details.py @FFY00
21+
Lib/test/test_build_details.py @FFY00
22+
1923
# argparse
2024
**/*argparse* @savannahostrowski
2125

@@ -27,6 +31,7 @@ Modules/Setup* @erlend-aasland
2731
**/*genobject* @markshannon
2832
**/*hamt* @1st1
2933
**/*jit* @brandtbucher @savannahostrowski
34+
Python/perf_jit_trampoline.c # Exclude the owners of "**/*jit*", above.
3035
Objects/set* @rhettinger
3136
Objects/dict* @methane @markshannon
3237
Objects/typevarobject.c @JelleZijlstra

.github/workflows/build.yml

Lines changed: 28 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -156,20 +156,10 @@ jobs:
156156
python-version: '3.x'
157157
- name: Runner image version
158158
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
159-
- name: Restore config.cache
160-
uses: actions/cache@v4
161-
with:
162-
path: config.cache
163-
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
164-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}-${{ env.pythonLocation }}
165159
- name: Install dependencies
166160
run: sudo ./.github/workflows/posix-deps-apt.sh
167161
- name: Add ccache to PATH
168162
run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
169-
- name: Configure ccache action
170-
uses: hendrikmuhs/ccache-action@v1.2
171-
with:
172-
save: false
173163
- name: Configure CPython
174164
run: |
175165
# Build Python with the libpython dynamic library
@@ -249,28 +239,19 @@ jobs:
249239
strategy:
250240
fail-fast: false
251241
matrix:
252-
# Cirrus and macos-14 are M1, macos-15-intel is default GHA Intel.
253-
# macOS 13 only runs tests against the GIL-enabled CPython.
254-
# Cirrus used for upstream, macos-14 for forks.
242+
# macos-14 is M1, macos-15-intel is Intel.
243+
# macos-15-intel only runs tests against the GIL-enabled CPython.
255244
os:
256-
- ghcr.io/cirruslabs/macos-runner:sonoma
257245
- macos-14
258246
- macos-15-intel
259-
is-fork: # only used for the exclusion trick
260-
- ${{ github.repository_owner != 'python' }}
261247
free-threading:
262248
- false
263249
- true
264250
exclude:
265-
- os: ghcr.io/cirruslabs/macos-runner:sonoma
266-
is-fork: true
267-
- os: macos-14
268-
is-fork: false
269251
- os: macos-15-intel
270252
free-threading: true
271253
uses: ./.github/workflows/reusable-macos.yml
272254
with:
273-
config_hash: ${{ needs.build-context.outputs.config-hash }}
274255
free-threading: ${{ matrix.free-threading }}
275256
os: ${{ matrix.os }}
276257

@@ -302,7 +283,6 @@ jobs:
302283
bolt: true
303284
uses: ./.github/workflows/reusable-ubuntu.yml
304285
with:
305-
config_hash: ${{ needs.build-context.outputs.config-hash }}
306286
bolt-optimizations: ${{ matrix.bolt }}
307287
free-threading: ${{ matrix.free-threading }}
308288
os: ${{ matrix.os }}
@@ -333,11 +313,6 @@ jobs:
333313
persist-credentials: false
334314
- name: Runner image version
335315
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
336-
- name: Restore config.cache
337-
uses: actions/cache@v4
338-
with:
339-
path: config.cache
340-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
341316
- name: Register gcc problem matcher
342317
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
343318
- name: Install dependencies
@@ -359,10 +334,6 @@ jobs:
359334
- name: Add ccache to PATH
360335
run: |
361336
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
362-
- name: Configure ccache action
363-
uses: hendrikmuhs/ccache-action@v1.2
364-
with:
365-
save: false
366337
- name: Configure CPython
367338
run: ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR"
368339
- name: Build CPython
@@ -381,9 +352,8 @@ jobs:
381352
fail-fast: false
382353
matrix:
383354
include:
384-
# Use the same runs-on configuration as build-macos and build-ubuntu.
385355
- arch: aarch64
386-
runs-on: ${{ github.repository_owner == 'python' && 'ghcr.io/cirruslabs/macos-runner:sonoma' || 'macos-14' }}
356+
runs-on: macos-14
387357
- arch: x86_64
388358
runs-on: ubuntu-24.04
389359

@@ -395,13 +365,34 @@ jobs:
395365
- name: Build and test
396366
run: ./Android/android.py ci --fast-ci ${{ matrix.arch }}-linux-android
397367

368+
build-ios:
369+
name: iOS
370+
needs: build-context
371+
if: needs.build-context.outputs.run-tests == 'true'
372+
timeout-minutes: 60
373+
runs-on: macos-15
374+
steps:
375+
- uses: actions/checkout@v4
376+
with:
377+
persist-credentials: false
378+
379+
# GitHub recommends explicitly selecting the desired Xcode version:
380+
# https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140
381+
# This became a necessity as a result of
382+
# https://github.com/actions/runner-images/issues/12541 and
383+
# https://github.com/actions/runner-images/issues/12751.
384+
- name: Select Xcode version
385+
run: |
386+
sudo xcode-select --switch /Applications/Xcode_16.4.app
387+
388+
- name: Build and test
389+
run: python3 Apple ci iOS --fast-ci --simulator 'iPhone 16e,OS=18.5'
390+
398391
build-wasi:
399392
name: 'WASI'
400393
needs: build-context
401394
if: needs.build-context.outputs.run-tests == 'true'
402395
uses: ./.github/workflows/reusable-wasi.yml
403-
with:
404-
config_hash: ${{ needs.build-context.outputs.config-hash }}
405396

406397
test-hypothesis:
407398
name: "Hypothesis tests on Ubuntu"
@@ -437,10 +428,6 @@ jobs:
437428
- name: Add ccache to PATH
438429
run: |
439430
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
440-
- name: Configure ccache action
441-
uses: hendrikmuhs/ccache-action@v1.2
442-
with:
443-
save: false
444431
- name: Setup directory envs for out-of-tree builds
445432
run: |
446433
echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
@@ -451,11 +438,6 @@ jobs:
451438
run: sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR"
452439
- name: Runner image version
453440
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
454-
- name: Restore config.cache
455-
uses: actions/cache@v4
456-
with:
457-
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
458-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
459441
- name: Configure CPython out-of-tree
460442
working-directory: ${{ env.CPYTHON_BUILDDIR }}
461443
run: |
@@ -539,11 +521,6 @@ jobs:
539521
persist-credentials: false
540522
- name: Runner image version
541523
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
542-
- name: Restore config.cache
543-
uses: actions/cache@v4
544-
with:
545-
path: config.cache
546-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
547524
- name: Register gcc problem matcher
548525
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
549526
- name: Install dependencies
@@ -569,11 +546,6 @@ jobs:
569546
- name: Add ccache to PATH
570547
run: |
571548
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
572-
- name: Configure ccache action
573-
uses: hendrikmuhs/ccache-action@v1.2
574-
with:
575-
save: ${{ github.event_name == 'push' }}
576-
max-size: "200M"
577549
- name: Configure CPython
578550
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc
579551
- name: Build CPython
@@ -605,7 +577,6 @@ jobs:
605577
uses: ./.github/workflows/reusable-san.yml
606578
with:
607579
sanitizer: ${{ matrix.sanitizer }}
608-
config_hash: ${{ needs.build-context.outputs.config-hash }}
609580
free-threading: ${{ matrix.free-threading }}
610581

611582
cross-build-linux:
@@ -620,11 +591,6 @@ jobs:
620591
persist-credentials: false
621592
- name: Runner image version
622593
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
623-
- name: Restore config.cache
624-
uses: actions/cache@v4
625-
with:
626-
path: config.cache
627-
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
628594
- name: Register gcc problem matcher
629595
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
630596
- name: Set build dir
@@ -703,6 +669,7 @@ jobs:
703669
- build-ubuntu
704670
- build-ubuntu-ssltests
705671
- build-android
672+
- build-ios
706673
- build-wasi
707674
- test-hypothesis
708675
- build-asan
@@ -737,6 +704,7 @@ jobs:
737704
build-ubuntu,
738705
build-ubuntu-ssltests,
739706
build-android,
707+
build-ios,
740708
build-wasi,
741709
test-hypothesis,
742710
build-asan,

.github/workflows/jit.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,26 @@ jobs:
152152
# - name: Run tests
153153
# run: |
154154
# ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
155+
tail-call-jit:
156+
name: JIT with tail calling interpreter
157+
needs: interpreter
158+
runs-on: ubuntu-24.04
159+
timeout-minutes: 90
160+
strategy:
161+
fail-fast: false
162+
matrix:
163+
llvm:
164+
- 19
165+
steps:
166+
- uses: actions/checkout@v4
167+
with:
168+
persist-credentials: false
169+
- uses: actions/setup-python@v5
170+
with:
171+
python-version: '3.11'
172+
- name: Build with JIT and tailcall
173+
run: |
174+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
175+
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
176+
CC=clang-${{ matrix.llvm }} ./configure --enable-experimental-jit --with-tail-call-interp --with-pydebug
177+
make all --jobs 4

.github/workflows/mypy.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ on:
2929
- "Tools/jit/**"
3030
- "Tools/peg_generator/**"
3131
- "Tools/requirements-dev.txt"
32-
- "Tools/wasm/**"
3332
workflow_dispatch:
3433

3534
permissions:
@@ -61,7 +60,6 @@ jobs:
6160
"Tools/clinic",
6261
"Tools/jit",
6362
"Tools/peg_generator",
64-
"Tools/wasm",
6563
]
6664
steps:
6765
- uses: actions/checkout@v4

.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@8 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

0 commit comments

Comments
 (0)