Skip to content

Commit dfb556b

Browse files
authored
Merge branch 'main' into thread-hang-memory
2 parents 99790f1 + f1de65b commit dfb556b

File tree

207 files changed

+3873
-1986
lines changed

Some content is hidden

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

207 files changed

+3873
-1986
lines changed

.github/CODEOWNERS

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,7 @@ InternalDocs/jit.md @brandtbucher @savannahostrowski @diegorusso @AA-T
298298
# Lazy imports (PEP 810)
299299
Objects/lazyimportobject.c @yhg1s @DinoV @pablogsal
300300
Include/internal/pycore_lazyimportobject.h @yhg1s @DinoV @pablogsal
301-
Lib/test/test_import/test_lazy_imports.py @yhg1s @DinoV @pablogsal
302-
Lib/test/test_import/data/lazy_imports/ @yhg1s @DinoV @pablogsal
301+
Lib/test/test_lazy_import @yhg1s @DinoV @pablogsal
303302

304303
# Micro-op / μop / Tier 2 Optimiser
305304
Python/optimizer.c @markshannon @Fidget-Spinner
@@ -426,19 +425,19 @@ Lib/dataclasses.py @ericvsmith
426425
Lib/test/test_dataclasses/ @ericvsmith
427426

428427
# Dates and times
429-
Doc/**/*time.rst @pganssle @abalkin
430-
Doc/library/datetime-* @pganssle
431-
Doc/library/zoneinfo.rst @pganssle
432-
Include/datetime.h @pganssle @abalkin
433-
Include/internal/pycore_time.h @pganssle @abalkin
434-
Lib/test/test_zoneinfo/ @pganssle
435-
Lib/zoneinfo/ @pganssle
436-
Lib/*time.py @pganssle @abalkin
437-
Lib/test/datetimetester.py @pganssle @abalkin
438-
Lib/test/test_*time.py @pganssle @abalkin
439-
Modules/*zoneinfo* @pganssle
440-
Modules/*time* @pganssle @abalkin
441-
Python/pytime.c @pganssle @abalkin
428+
Doc/**/*time.rst @pganssle @abalkin @StanFromIreland
429+
Doc/library/datetime-* @pganssle @StanFromIreland
430+
Doc/library/zoneinfo.rst @pganssle @StanFromIreland
431+
Include/datetime.h @pganssle @abalkin @StanFromIreland
432+
Include/internal/pycore_time.h @pganssle @abalkin @StanFromIreland
433+
Lib/test/test_zoneinfo/ @pganssle @StanFromIreland
434+
Lib/zoneinfo/ @pganssle @StanFromIreland
435+
Lib/*time.py @pganssle @abalkin @StanFromIreland
436+
Lib/test/datetimetester.py @pganssle @abalkin @StanFromIreland
437+
Lib/test/test_*time.py @pganssle @abalkin @StanFromIreland
438+
Modules/*zoneinfo* @pganssle @StanFromIreland
439+
Modules/*time* @pganssle @abalkin @StanFromIreland
440+
Python/pytime.c @pganssle @abalkin @StanFromIreland
442441

443442
# Dbm
444443
Doc/library/dbm.rst @corona10 @erlend-aasland @serhiy-storchaka

.github/workflows/build.yml

Lines changed: 35 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ jobs:
111111
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
112112
- name: Install dependencies
113113
run: sudo ./.github/workflows/posix-deps-apt.sh
114-
- name: Add ccache to PATH
115-
run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
116114
- name: Configure CPython
117115
run: |
118116
# Build Python with the libpython dynamic library
@@ -255,8 +253,8 @@ jobs:
255253
os: ${{ matrix.os }}
256254
test-opts: ${{ matrix.test-opts || '' }}
257255

258-
build-ubuntu-ssltests-openssl:
259-
name: 'Ubuntu SSL tests with OpenSSL'
256+
build-ubuntu-ssltests:
257+
name: 'Ubuntu SSL tests'
260258
runs-on: ${{ matrix.os }}
261259
timeout-minutes: 60
262260
needs: build-context
@@ -265,16 +263,25 @@ jobs:
265263
fail-fast: false
266264
matrix:
267265
os: [ubuntu-24.04]
268-
# Keep 1.1.1w in our list despite it being upstream EOL and otherwise
269-
# unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
270-
# supported by important vendors such as AWS-LC.
271-
openssl_ver: [1.1.1w, 3.0.19, 3.3.6, 3.4.4, 3.5.5, 3.6.1]
272-
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
266+
ssllib:
267+
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
268+
## OpenSSL
269+
# Keep 1.1.1w in our list despite it being upstream EOL and otherwise
270+
# unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
271+
# supported by important vendors such as AWS-LC.
272+
- { name: openssl, version: 1.1.1w }
273+
- { name: openssl, version: 3.0.19 }
274+
- { name: openssl, version: 3.3.6 }
275+
- { name: openssl, version: 3.4.4 }
276+
- { name: openssl, version: 3.5.5 }
277+
- { name: openssl, version: 3.6.1 }
278+
## AWS-LC
279+
- { name: aws-lc, version: 1.68.0 }
273280
env:
274-
OPENSSL_VER: ${{ matrix.openssl_ver }}
281+
SSLLIB_VER: ${{ matrix.ssllib.version }}
275282
MULTISSL_DIR: ${{ github.workspace }}/multissl
276-
OPENSSL_DIR: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}
277-
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
283+
SSLLIB_DIR: ${{ github.workspace }}/multissl/${{ matrix.ssllib.name }}/${{ matrix.ssllib.version }}
284+
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/${{ matrix.ssllib.name }}/${{ matrix.ssllib.version }}/lib
278285
steps:
279286
- uses: actions/checkout@v6
280287
with:
@@ -285,95 +292,37 @@ jobs:
285292
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
286293
- name: Install dependencies
287294
run: sudo ./.github/workflows/posix-deps-apt.sh
288-
- name: Configure OpenSSL env vars
289-
run: |
290-
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
291-
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> "$GITHUB_ENV"
292-
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
293-
- name: 'Restore OpenSSL build'
294-
id: cache-openssl
295-
uses: actions/cache@v5
296-
with:
297-
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
298-
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
299-
- name: Install OpenSSL
300-
if: steps.cache-openssl.outputs.cache-hit != 'true'
301-
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
302-
- name: Add ccache to PATH
303-
run: |
304-
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
305-
- name: Configure CPython
306-
run: ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR"
307-
- name: Build CPython
308-
run: make -j4
309-
- name: Display build info
310-
run: make pythoninfo
311-
- name: SSL tests
312-
run: ./python Lib/test/ssltests.py
313-
314-
build-ubuntu-ssltests-awslc:
315-
name: 'Ubuntu SSL tests with AWS-LC'
316-
runs-on: ${{ matrix.os }}
317-
timeout-minutes: 60
318-
needs: build-context
319-
if: needs.build-context.outputs.run-ubuntu == 'true'
320-
strategy:
321-
fail-fast: false
322-
matrix:
323-
os: [ubuntu-24.04]
324-
awslc_ver: [1.55.0]
325-
env:
326-
AWSLC_VER: ${{ matrix.awslc_ver}}
327-
MULTISSL_DIR: ${{ github.workspace }}/multissl
328-
OPENSSL_DIR: ${{ github.workspace }}/multissl/aws-lc/${{ matrix.awslc_ver }}
329-
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/aws-lc/${{ matrix.awslc_ver }}/lib
330-
steps:
331-
- uses: actions/checkout@v6
332-
with:
333-
persist-credentials: false
334-
- name: Runner image version
335-
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
336-
- name: Register gcc problem matcher
337-
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
338-
- name: Install dependencies
339-
run: sudo ./.github/workflows/posix-deps-apt.sh
340-
- name: Configure SSL lib env vars
341-
run: |
342-
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
343-
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/aws-lc/${AWSLC_VER}" >> "$GITHUB_ENV"
344-
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/aws-lc/${AWSLC_VER}/lib" >> "$GITHUB_ENV"
345-
- name: 'Restore AWS-LC build'
346-
id: cache-aws-lc
295+
- name: 'Restore SSL library build'
296+
id: cache-ssl-lib
347297
uses: actions/cache@v5
348298
with:
349-
path: ./multissl/aws-lc/${{ matrix.awslc_ver }}
350-
key: ${{ matrix.os }}-multissl-aws-lc-${{ matrix.awslc_ver }}
351-
- name: Install AWS-LC
352-
if: steps.cache-aws-lc.outputs.cache-hit != 'true'
299+
path: ./multissl/${{ matrix.ssllib.name }}/${{ matrix.ssllib.version }}
300+
key: ${{ matrix.os }}-multissl-${{ matrix.ssllib.name }}-${{ matrix.ssllib.version }}
301+
- name: Install SSL Library
302+
if: steps.cache-ssl-lib.outputs.cache-hit != 'true'
353303
run: |
354304
python3 Tools/ssl/multissltests.py \
355305
--steps=library \
356306
--base-directory "$MULTISSL_DIR" \
357-
--awslc ${{ matrix.awslc_ver }} \
307+
'--${{ matrix.ssllib.name }}' '${{ matrix.ssllib.version }}' \
358308
--system Linux
359-
- name: Add ccache to PATH
360-
run: |
361-
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
362309
- name: Configure CPython
363310
run: |
364311
./configure CFLAGS="-fdiagnostics-format=json" \
365312
--config-cache \
366313
--enable-slower-safety \
367314
--with-pydebug \
368-
--with-openssl="$OPENSSL_DIR" \
315+
--with-openssl="$SSLLIB_DIR" \
369316
--with-builtin-hashlib-hashes=blake2 \
370317
--with-ssl-default-suites=openssl
371318
- name: Build CPython
372-
run: make -j
319+
run: make -j4
373320
- name: Display build info
374321
run: make pythoninfo
375-
- name: Verify python is linked to AWS-LC
376-
run: ./python -c 'import ssl; print(ssl.OPENSSL_VERSION)' | grep AWS-LC
322+
- name: Verify python is linked to the right lib
323+
run: |
324+
./python -c 'import ssl; print(ssl.OPENSSL_VERSION)' \
325+
| grep -iE '${{ matrix.ssllib.name }}.*${{ matrix.ssllib.version }}'
377326
- name: SSL tests
378327
run: ./python Lib/test/ssltests.py
379328

@@ -459,9 +408,6 @@ jobs:
459408
- name: Install OpenSSL
460409
if: steps.cache-openssl.outputs.cache-hit != 'true'
461410
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
462-
- name: Add ccache to PATH
463-
run: |
464-
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
465411
- name: Setup directory envs for out-of-tree builds
466412
run: |
467413
echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
@@ -577,9 +523,6 @@ jobs:
577523
- name: Install OpenSSL
578524
if: steps.cache-openssl.outputs.cache-hit != 'true'
579525
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
580-
- name: Add ccache to PATH
581-
run: |
582-
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
583526
- name: Configure CPython
584527
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc --with-openssl="$OPENSSL_DIR"
585528
- name: Build CPython
@@ -705,8 +648,7 @@ jobs:
705648
- build-windows-msi
706649
- build-macos
707650
- build-ubuntu
708-
- build-ubuntu-ssltests-awslc
709-
- build-ubuntu-ssltests-openssl
651+
- build-ubuntu-ssltests
710652
- build-ios
711653
- build-wasi
712654
- test-hypothesis
@@ -723,8 +665,7 @@ jobs:
723665
allowed-failures: >-
724666
build-android,
725667
build-windows-msi,
726-
build-ubuntu-ssltests-awslc,
727-
build-ubuntu-ssltests-openssl,
668+
build-ubuntu-ssltests,
728669
test-hypothesis,
729670
cifuzz,
730671
allowed-skips: >-
@@ -755,8 +696,7 @@ jobs:
755696
!fromJSON(needs.build-context.outputs.run-ubuntu)
756697
&& '
757698
build-ubuntu,
758-
build-ubuntu-ssltests-awslc,
759-
build-ubuntu-ssltests-openssl,
699+
build-ubuntu-ssltests,
760700
test-hypothesis,
761701
build-asan,
762702
build-san,

.github/workflows/posix-deps-apt.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#!/bin/sh
22
apt-get update
33

4-
apt-get -yq install \
4+
apt-get -yq --no-install-recommends install \
55
build-essential \
66
pkg-config \
7-
ccache \
87
cmake \
98
gdb \
109
lcov \
@@ -32,4 +31,4 @@ apt-get -yq install \
3231
# https://deb.sury.org/
3332
sudo add-apt-repository ppa:ondrej/php
3433
apt-get update
35-
apt-get -yq install libmpdec-dev
34+
apt-get -yq --no-install-recommends install libmpdec-dev

.github/workflows/regen-abidump.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ set -ex
22

33
export DEBIAN_FRONTEND=noninteractive
44
./.github/workflows/posix-deps-apt.sh
5-
apt-get install -yq abigail-tools python3
5+
apt-get install -yq --no-install-recommends abigail-tools python3
66
export CFLAGS="-g3 -O0"
77
./configure --enable-shared && make
88
make regen-abidump

.github/workflows/reusable-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
restore-keys: |
9393
ubuntu-doc-
9494
- name: 'Install Dependencies'
95-
run: sudo ./.github/workflows/posix-deps-apt.sh && sudo apt-get install wamerican
95+
run: sudo ./.github/workflows/posix-deps-apt.sh && sudo apt-get install --no-install-recommends wamerican
9696
- name: 'Configure CPython'
9797
run: ./configure --with-pydebug
9898
- name: 'Build CPython'

.github/workflows/reusable-san.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ jobs:
6666
env:
6767
SANITIZER: ${{ inputs.sanitizer }}
6868
SAN_LOG_OPTION: log_path=${{ github.workspace }}/san_log
69-
- name: Add ccache to PATH
70-
run: |
71-
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
7269
- name: Configure CPython
7370
run: >-
7471
./configure

.github/workflows/reusable-ubuntu.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
if: ${{ fromJSON(inputs.bolt-optimizations) }}
4848
run: |
4949
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh 19
50-
sudo apt-get install bolt-19
50+
sudo apt-get install --no-install-recommends bolt-19
5151
echo PATH="$(llvm-config-19 --bindir):$PATH" >> $GITHUB_ENV
5252
- name: Configure OpenSSL env vars
5353
run: |
@@ -63,9 +63,6 @@ jobs:
6363
- name: Install OpenSSL
6464
if: steps.cache-openssl.outputs.cache-hit != 'true'
6565
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
66-
- name: Add ccache to PATH
67-
run: |
68-
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
6966
- name: Setup directory envs for out-of-tree builds
7067
run: |
7168
echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"

.github/workflows/reusable-wasi.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ jobs:
3838
mkdir "${WASI_SDK_PATH}" && \
3939
curl -s -S --location "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-arm64-linux.tar.gz" | \
4040
tar --strip-components 1 --directory "${WASI_SDK_PATH}" --extract --gunzip
41-
- name: "Add ccache to PATH"
42-
run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
4341
- name: "Install Python"
4442
uses: actions/setup-python@v6
4543
with:

.github/workflows/verify-expat.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Verify bundled libexpat
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- 'Modules/expat/**'
8+
- '.github/workflows/verify-expat.yml'
9+
pull_request:
10+
paths:
11+
- 'Modules/expat/**'
12+
- '.github/workflows/verify-expat.yml'
13+
14+
permissions:
15+
contents: read
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
verify:
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 5
25+
steps:
26+
- uses: actions/checkout@v6
27+
with:
28+
persist-credentials: false
29+
- name: Download and verify bundled libexpat files
30+
run: |
31+
./Modules/expat/refresh.sh
32+
git diff --exit-code Modules/expat/

Android/android.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def make_build_python(context):
208208
def unpack_deps(host, prefix_dir):
209209
os.chdir(prefix_dir)
210210
deps_url = "https://github.com/beeware/cpython-android-source-deps/releases/download"
211-
for name_ver in ["bzip2-1.0.8-3", "libffi-3.4.4-3", "openssl-3.0.19-1",
211+
for name_ver in ["bzip2-1.0.8-3", "libffi-3.4.4-3", "openssl-3.5.5-0",
212212
"sqlite-3.50.4-0", "xz-5.4.6-1", "zstd-1.5.7-1"]:
213213
filename = f"{name_ver}-{host}.tar.gz"
214214
download(f"{deps_url}/{name_ver}/{filename}")

0 commit comments

Comments
 (0)