Skip to content

Commit ec8450a

Browse files
itamarometa-codesync[bot]
authored andcommitted
Import CPython 3.14.4 release
Summary: Imported python/cpython `3.14.4` from upstream rev [`23116f9`](https://www.github.com/python/cpython/commit/23116f998f6789d8c2fbe5ed5b8146854c8c2a4f) (committed 2026-04-07 13:12:57+00:00). # Commit Info Base: (`3.14.3`) - [`323c59a`](https://www.github.com/python/cpython/commit/323c59a5e348347be2ce2b7ea55fcb30bf68b2d3) (commit date: 2026-02-03 15:31:53+00:00) Imported: (`3.14.4`) - [`23116f9`](https://www.github.com/python/cpython/commit/23116f998f6789d8c2fbe5ed5b8146854c8c2a4f) (commit date: 2026-04-07 13:12:57+00:00) # Noteworthy file changes - Stdlib files (1 added, 1 removed) - Test files (4 added, 1 removed) - Low-signal files (17 added, 1 removed) (NEWS.d, docs, .github) - Other files (20 added, 15 removed) Complete list of added/removed files: https://www.internalfb.com/intern/everpaste/?color=0&handle=GPP0Fye0h6jC4FoDACLvpiSaN29tbr0LAAAz Reviewed By: alexmalyshev Differential Revision: D102256875 fbshipit-source-id: 4175fc293da3b181f85fd5a3be5de32cc617a527
1 parent 7627b90 commit ec8450a

650 files changed

Lines changed: 26339 additions & 15239 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.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,5 @@ Python/stdlib_module_names.h generated
106106
Tools/peg_generator/pegen/grammar_parser.py generated
107107
aclocal.m4 generated
108108
configure generated
109+
*.min.js generated
110+
package-lock.json generated

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
# GitHub
88
.github/** @ezio-melotti @hugovk @AA-Turner @webknjaz
9+
.github/workflows/jit.yml @savannahostrowski
10+
Tools/build/compute-changes.py @AA-Turner @hugovk @webknjaz
11+
Lib/test/test_tools/test_compute_changes.py @AA-Turner @hugovk @webknjaz
912

1013
# pre-commit
1114
.pre-commit-config.yaml @hugovk
@@ -161,6 +164,7 @@ Doc/c-api/module.rst @ericsnowcurrently
161164
# Dates and times
162165
**/*datetime* @pganssle @abalkin
163166
**/*str*time* @pganssle @abalkin
167+
Doc/library/datetime-* @pganssle
164168
Doc/library/time.rst @pganssle @abalkin
165169
Lib/test/test_time.py @pganssle @abalkin
166170
Modules/timemodule.c @pganssle @abalkin

.github/actionlint.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
self-hosted-runner:
2-
# Pending https://github.com/rhysd/actionlint/issues/533
3-
# and https://github.com/rhysd/actionlint/issues/571
4-
labels: ["windows-11-arm", "macos-15-intel"]
5-
61
config-variables: null
72

83
paths:

.github/workflows/add-issue-header.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
# Only ever run once
1313
- opened
1414

15+
permissions: {}
1516

1617
jobs:
1718
add-header:
@@ -20,7 +21,7 @@ jobs:
2021
issues: write
2122
timeout-minutes: 5
2223
steps:
23-
- uses: actions/github-script@v8
24+
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
2425
with:
2526
# language=JavaScript
2627
script: |

.github/workflows/build.yml

Lines changed: 71 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ on:
1111
- 'main'
1212
- '3.*'
1313

14-
permissions:
15-
contents: read
14+
permissions: {}
1615

1716
concurrency:
1817
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#concurrency
@@ -55,16 +54,16 @@ jobs:
5554
needs: build-context
5655
if: needs.build-context.outputs.run-tests == 'true'
5756
steps:
58-
- uses: actions/checkout@v6
57+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5958
with:
6059
persist-credentials: false
61-
- uses: actions/setup-python@v6
60+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
6261
with:
6362
python-version: '3.x'
6463
- name: Install dependencies
6564
run: |
6665
sudo ./.github/workflows/posix-deps-apt.sh
67-
sudo apt-get install -yq abigail-tools
66+
sudo apt-get install -yq --no-install-recommends abigail-tools
6867
- name: Build CPython
6968
env:
7069
CFLAGS: -g3 -O0
@@ -89,7 +88,7 @@ jobs:
8988
if: ${{ failure() && steps.check.conclusion == 'failure' }}
9089
run: |
9190
make regen-abidump
92-
- uses: actions/upload-artifact@v6
91+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
9392
name: Publish updated ABI files
9493
if: ${{ failure() && steps.check.conclusion == 'failure' }}
9594
with:
@@ -111,7 +110,7 @@ jobs:
111110
run: |
112111
apt update && apt install git -yq
113112
git config --global --add safe.directory "$GITHUB_WORKSPACE"
114-
- uses: actions/checkout@v6
113+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
115114
with:
116115
fetch-depth: 1
117116
persist-credentials: false
@@ -148,18 +147,16 @@ jobs:
148147
needs: build-context
149148
if: needs.build-context.outputs.run-tests == 'true'
150149
steps:
151-
- uses: actions/checkout@v6
150+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
152151
with:
153152
persist-credentials: false
154-
- uses: actions/setup-python@v6
153+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
155154
with:
156155
python-version: '3.x'
157156
- name: Runner image version
158157
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
159158
- name: Install dependencies
160159
run: sudo ./.github/workflows/posix-deps-apt.sh
161-
- name: Add ccache to PATH
162-
run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
163160
- name: Configure CPython
164161
run: |
165162
# Build Python with the libpython dynamic library
@@ -242,10 +239,10 @@ jobs:
242239
strategy:
243240
fail-fast: false
244241
matrix:
245-
# macos-14 is M1, macos-15-intel is Intel.
242+
# macos-26 is Apple Silicon, macos-15-intel is Intel.
246243
# macos-15-intel only runs tests against the GIL-enabled CPython.
247244
os:
248-
- macos-14
245+
- macos-26
249246
- macos-15-intel
250247
free-threading:
251248
- false
@@ -291,7 +288,7 @@ jobs:
291288
os: ${{ matrix.os }}
292289

293290
build-ubuntu-ssltests:
294-
name: 'Ubuntu SSL tests with OpenSSL'
291+
name: 'Ubuntu SSL tests'
295292
runs-on: ${{ matrix.os }}
296293
timeout-minutes: 60
297294
needs: build-context
@@ -300,18 +297,25 @@ jobs:
300297
fail-fast: false
301298
matrix:
302299
os: [ubuntu-24.04]
303-
# Keep 1.1.1w in our list despite it being upstream EOL and otherwise
304-
# unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
305-
# supported by important vendors such as AWS-LC.
306-
openssl_ver: [1.1.1w, 3.0.18, 3.2.6, 3.3.5, 3.4.3, 3.5.4]
307-
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
300+
ssllib:
301+
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
302+
## OpenSSL
303+
# Keep 1.1.1w in our list despite it being upstream EOL and otherwise
304+
# unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
305+
# supported by important vendors such as AWS-LC.
306+
- { name: openssl, version: 1.1.1w }
307+
- { name: openssl, version: 3.0.19 }
308+
- { name: openssl, version: 3.3.6 }
309+
- { name: openssl, version: 3.4.4 }
310+
- { name: openssl, version: 3.5.5 }
311+
- { name: openssl, version: 3.6.1 }
308312
env:
309-
OPENSSL_VER: ${{ matrix.openssl_ver }}
313+
SSLLIB_VER: ${{ matrix.ssllib.version }}
310314
MULTISSL_DIR: ${{ github.workspace }}/multissl
311-
OPENSSL_DIR: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}
312-
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
315+
SSLLIB_DIR: ${{ github.workspace }}/multissl/${{ matrix.ssllib.name }}/${{ matrix.ssllib.version }}
316+
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/${{ matrix.ssllib.name }}/${{ matrix.ssllib.version }}/lib
313317
steps:
314-
- uses: actions/checkout@v6
318+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
315319
with:
316320
persist-credentials: false
317321
- name: Runner image version
@@ -320,29 +324,37 @@ jobs:
320324
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
321325
- name: Install dependencies
322326
run: sudo ./.github/workflows/posix-deps-apt.sh
323-
- name: Configure OpenSSL env vars
324-
run: |
325-
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
326-
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> "$GITHUB_ENV"
327-
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
328-
- name: 'Restore OpenSSL build'
329-
id: cache-openssl
330-
uses: actions/cache@v5
327+
- name: 'Restore SSL library build'
328+
id: cache-ssl-lib
329+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
331330
with:
332-
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
333-
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
334-
- name: Install OpenSSL
335-
if: steps.cache-openssl.outputs.cache-hit != 'true'
336-
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
337-
- name: Add ccache to PATH
331+
path: ./multissl/${{ matrix.ssllib.name }}/${{ matrix.ssllib.version }}
332+
key: ${{ matrix.os }}-multissl-${{ matrix.ssllib.name }}-${{ matrix.ssllib.version }}
333+
- name: Install SSL Library
334+
if: steps.cache-ssl-lib.outputs.cache-hit != 'true'
338335
run: |
339-
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
336+
python3 Tools/ssl/multissltests.py \
337+
--steps=library \
338+
--base-directory "$MULTISSL_DIR" \
339+
'--${{ matrix.ssllib.name }}' '${{ matrix.ssllib.version }}' \
340+
--system Linux
340341
- name: Configure CPython
341-
run: ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR"
342+
run: |
343+
./configure CFLAGS="-fdiagnostics-format=json" \
344+
--config-cache \
345+
--enable-slower-safety \
346+
--with-pydebug \
347+
--with-openssl="$SSLLIB_DIR" \
348+
--with-builtin-hashlib-hashes=blake2 \
349+
--with-ssl-default-suites=openssl
342350
- name: Build CPython
343351
run: make -j4
344352
- name: Display build info
345353
run: make pythoninfo
354+
- name: Verify python is linked to the right lib
355+
run: |
356+
./python -c 'import ssl; print(ssl.OPENSSL_VERSION)' \
357+
| grep -iE '${{ matrix.ssllib.name }}.*${{ matrix.ssllib.version }}'
346358
- name: SSL tests
347359
run: ./python Lib/test/ssltests.py
348360

@@ -356,13 +368,13 @@ jobs:
356368
matrix:
357369
include:
358370
- arch: aarch64
359-
runs-on: macos-14
371+
runs-on: macos-26
360372
- arch: x86_64
361373
runs-on: ubuntu-24.04
362374

363375
runs-on: ${{ matrix.runs-on }}
364376
steps:
365-
- uses: actions/checkout@v6
377+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
366378
with:
367379
persist-credentials: false
368380
- name: Build and test
@@ -375,7 +387,7 @@ jobs:
375387
timeout-minutes: 60
376388
runs-on: macos-14
377389
steps:
378-
- uses: actions/checkout@v6
390+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
379391
with:
380392
persist-credentials: false
381393

@@ -391,6 +403,12 @@ jobs:
391403
- name: Build and test
392404
run: python3 Apple ci iOS --fast-ci --simulator 'iPhone SE (3rd generation),OS=17.5'
393405

406+
build-emscripten:
407+
name: 'Emscripten'
408+
needs: build-context
409+
if: needs.build-context.outputs.run-emscripten == 'true'
410+
uses: ./.github/workflows/reusable-emscripten.yml
411+
394412
build-wasi:
395413
name: 'WASI'
396414
needs: build-context
@@ -407,7 +425,7 @@ jobs:
407425
OPENSSL_VER: 3.0.18
408426
PYTHONSTRICTEXTENSIONBUILD: 1
409427
steps:
410-
- uses: actions/checkout@v6
428+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
411429
with:
412430
persist-credentials: false
413431
- name: Register gcc problem matcher
@@ -421,16 +439,13 @@ jobs:
421439
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
422440
- name: 'Restore OpenSSL build'
423441
id: cache-openssl
424-
uses: actions/cache@v5
442+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
425443
with:
426444
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
427445
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
428446
- name: Install OpenSSL
429447
if: steps.cache-openssl.outputs.cache-hit != 'true'
430448
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
431-
- name: Add ccache to PATH
432-
run: |
433-
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
434449
- name: Setup directory envs for out-of-tree builds
435450
run: |
436451
echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
@@ -471,7 +486,7 @@ jobs:
471486
./python -m venv "$VENV_LOC" && "$VENV_PYTHON" -m pip install -r "${GITHUB_WORKSPACE}/Tools/requirements-hypothesis.txt"
472487
- name: 'Restore Hypothesis database'
473488
id: cache-hypothesis-database
474-
uses: actions/cache@v5
489+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
475490
with:
476491
path: ${{ env.CPYTHON_BUILDDIR }}/.hypothesis/
477492
key: hypothesis-database-${{ github.head_ref || github.run_id }}
@@ -498,7 +513,7 @@ jobs:
498513
-x test_subprocess \
499514
-x test_signal \
500515
-x test_sysconfig
501-
- uses: actions/upload-artifact@v6
516+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
502517
if: always()
503518
with:
504519
name: hypothesis-example-db
@@ -519,7 +534,7 @@ jobs:
519534
PYTHONSTRICTEXTENSIONBUILD: 1
520535
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
521536
steps:
522-
- uses: actions/checkout@v6
537+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
523538
with:
524539
persist-credentials: false
525540
- name: Runner image version
@@ -529,7 +544,7 @@ jobs:
529544
- name: Install dependencies
530545
run: sudo ./.github/workflows/posix-deps-apt.sh
531546
- name: Set up GCC-10 for ASAN
532-
uses: egor-tensin/setup-gcc@v2
547+
uses: egor-tensin/setup-gcc@a2861a8b8538f49cf2850980acccf6b05a1b2ae4 # v2.0
533548
with:
534549
version: 10
535550
- name: Configure OpenSSL env vars
@@ -539,16 +554,13 @@ jobs:
539554
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
540555
- name: 'Restore OpenSSL build'
541556
id: cache-openssl
542-
uses: actions/cache@v5
557+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
543558
with:
544559
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
545560
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
546561
- name: Install OpenSSL
547562
if: steps.cache-openssl.outputs.cache-hit != 'true'
548563
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
549-
- name: Add ccache to PATH
550-
run: |
551-
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
552564
- name: Configure CPython
553565
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc
554566
- name: Build CPython
@@ -589,7 +601,7 @@ jobs:
589601
needs: build-context
590602
if: needs.build-context.outputs.run-ubuntu == 'true'
591603
steps:
592-
- uses: actions/checkout@v6
604+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
593605
with:
594606
persist-credentials: false
595607
- name: Runner image version
@@ -675,6 +687,7 @@ jobs:
675687
- build-ubuntu
676688
- build-ubuntu-ssltests
677689
- build-ios
690+
- build-emscripten
678691
- build-wasi
679692
- test-hypothesis
680693
- build-asan
@@ -689,6 +702,7 @@ jobs:
689702
with:
690703
allowed-failures: >-
691704
build-android,
705+
build-emscripten,
692706
build-windows-msi,
693707
build-ubuntu-ssltests,
694708
test-hypothesis,
@@ -725,5 +739,6 @@ jobs:
725739
}}
726740
${{ !fromJSON(needs.build-context.outputs.run-android) && 'build-android,' || '' }}
727741
${{ !fromJSON(needs.build-context.outputs.run-ios) && 'build-ios,' || '' }}
742+
${{ !fromJSON(needs.build-context.outputs.run-emscripten) && 'build-emscripten,' || '' }}
728743
${{ !fromJSON(needs.build-context.outputs.run-wasi) && 'build-wasi,' || '' }}
729744
jobs: ${{ toJSON(needs) }}

.github/workflows/documentation-links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
timeout-minutes: 5
2323

2424
steps:
25-
- uses: readthedocs/actions/preview@v1
25+
- uses: readthedocs/actions/preview@b8bba1484329bda1a3abe986df7ebc80a8950333 # v1.5
2626
with:
2727
project-slug: "cpython-previews"
2828
single-version: "true"

0 commit comments

Comments
 (0)