Skip to content

Commit 09e382d

Browse files
Merge branch 'main' into tkinter-photoimage-copy
2 parents 2ce8164 + d3c7821 commit 09e382d

File tree

635 files changed

+26987
-8910
lines changed

Some content is hidden

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

635 files changed

+26987
-8910
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.io/library/fedora:37
1+
FROM docker.io/library/fedora:40
22

33
ENV CC=clang
44

.github/CODEOWNERS

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,18 @@ Lib/test/support/interpreters/ @ericsnowcurrently
243243
Modules/_xx*interp*module.c @ericsnowcurrently
244244
Lib/test/test_interpreters/ @ericsnowcurrently
245245

246+
# Android
247+
**/*Android* @mhsmith
248+
**/*android* @mhsmith
249+
250+
# iOS (but not termios)
251+
**/iOS* @freakboy3742
252+
**/ios* @freakboy3742
253+
**/*_iOS* @freakboy3742
254+
**/*_ios* @freakboy3742
255+
**/*-iOS* @freakboy3742
256+
**/*-ios* @freakboy3742
257+
246258
# WebAssembly
247259
/Tools/wasm/ @brettcannon
248260

.github/workflows/build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ jobs:
137137
uses: actions/cache@v4
138138
with:
139139
path: config.cache
140+
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
140141
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source.outputs.config_hash }}-${{ env.pythonLocation }}
141142
- name: Install Dependencies
142143
run: sudo ./.github/workflows/posix-deps-apt.sh
@@ -249,7 +250,7 @@ jobs:
249250
250251
build_ubuntu_ssltests:
251252
name: 'Ubuntu SSL tests with OpenSSL'
252-
runs-on: ubuntu-20.04
253+
runs-on: ubuntu-22.04
253254
timeout-minutes: 60
254255
needs: check_source
255256
if: needs.check_source.outputs.run_tests == 'true'
@@ -315,7 +316,7 @@ jobs:
315316

316317
test_hypothesis:
317318
name: "Hypothesis tests on Ubuntu"
318-
runs-on: ubuntu-20.04
319+
runs-on: ubuntu-22.04
319320
timeout-minutes: 60
320321
needs: check_source
321322
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
@@ -428,7 +429,7 @@ jobs:
428429

429430
build_asan:
430431
name: 'Address sanitizer'
431-
runs-on: ubuntu-20.04
432+
runs-on: ubuntu-22.04
432433
timeout-minutes: 60
433434
needs: check_source
434435
if: needs.check_source.outputs.run_tests == 'true'

.github/workflows/jit.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- true
4242
- false
4343
llvm:
44-
- 16
44+
- 18
4545
include:
4646
- target: i686-pc-windows-msvc/msvc
4747
architecture: Win32
@@ -75,14 +75,10 @@ jobs:
7575
architecture: aarch64
7676
runner: ubuntu-latest
7777
compiler: gcc
78-
# These fail because of emulation, not because of the JIT:
79-
exclude: test_unix_events test_init test_process_pool test_shutdown test_multiprocessing_fork test_cmd_line test_faulthandler test_os test_perf_profiler test_posix test_signal test_socket test_subprocess test_threading test_venv test_external_inspection
8078
- target: aarch64-unknown-linux-gnu/clang
8179
architecture: aarch64
8280
runner: ubuntu-latest
8381
compiler: clang
84-
# These fail because of emulation, not because of the JIT:
85-
exclude: test_unix_events test_init test_process_pool test_shutdown test_multiprocessing_fork test_cmd_line test_faulthandler test_os test_perf_profiler test_posix test_signal test_socket test_subprocess test_threading test_venv test_external_inspection
8682
env:
8783
CC: ${{ matrix.compiler }}
8884
steps:
@@ -94,37 +90,43 @@ jobs:
9490
- name: Native Windows
9591
if: runner.os == 'Windows' && matrix.architecture != 'ARM64'
9692
run: |
93+
choco upgrade llvm -y
9794
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}
9895
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '--pgo' }} -p ${{ matrix.architecture }}
99-
./PCbuild/rt.bat ${{ matrix.debug && '-d' }} -p ${{ matrix.architecture }} -q --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 4500 --verbose2 --verbose3
96+
./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
10097
10198
# No PGO or tests (yet):
10299
- name: Emulated Windows
103100
if: runner.os == 'Windows' && matrix.architecture == 'ARM64'
104101
run: |
102+
choco upgrade llvm -y
105103
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}
106104
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
107105
108106
- name: Native macOS
109107
if: runner.os == 'macOS'
110108
run: |
109+
brew update
111110
brew install llvm@${{ matrix.llvm }}
112111
SDKROOT="$(xcrun --show-sdk-path)" \
113112
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
114113
make all --jobs 4
115-
./python.exe -m test --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 4500 --verbose2 --verbose3
114+
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
116115
116+
# --with-lto has been removed temporarily as a result of an open issue in LLVM 18 (see https://github.com/llvm/llvm-project/issues/87553)
117117
- name: Native Linux
118118
if: runner.os == 'Linux' && matrix.architecture == 'x86_64'
119119
run: |
120120
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
121121
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
122-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
122+
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations' }}
123123
make all --jobs 4
124-
./python -m test --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 4500 --verbose2 --verbose3
124+
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
125125
126+
# --with-lto has been removed temporarily as a result of an open issue in LLVM 18 (see https://github.com/llvm/llvm-project/issues/87553)
126127
- name: Emulated Linux
127128
if: runner.os == 'Linux' && matrix.architecture != 'x86_64'
129+
# The --ignorefile on ./python -m test is used to exclude tests known to fail when running on an emulated Linux.
128130
run: |
129131
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
130132
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
@@ -139,6 +141,6 @@ jobs:
139141
CC="${{ matrix.compiler == 'clang' && 'clang --target=$HOST' || '$HOST-gcc' }}" \
140142
CPP="$CC --preprocess" \
141143
HOSTRUNNER=qemu-${{ matrix.architecture }} \
142-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }} --build=x86_64-linux-gnu --host="$HOST" --with-build-python=../build/bin/python3 --with-pkg-config=no ac_cv_buggy_getaddrinfo=no ac_cv_file__dev_ptc=no ac_cv_file__dev_ptmx=yes
144+
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations ' }} --build=x86_64-linux-gnu --host="$HOST" --with-build-python=../build/bin/python3 --with-pkg-config=no ac_cv_buggy_getaddrinfo=no ac_cv_file__dev_ptc=no ac_cv_file__dev_ptmx=yes
143145
make all --jobs 4
144-
./python -m test --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 4500 --verbose2 --verbose3
146+
./python -m test --ignorefile=Tools/jit/ignore-tests-emulated-linux.txt --multiprocess 0 --timeout 4500 --verbose2 --verbose3

.github/workflows/mypy.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
pull_request:
99
paths:
1010
- ".github/workflows/mypy.yml"
11+
- "Lib/_pyrepl/**"
1112
- "Lib/test/libregrtest/**"
1213
- "Tools/build/generate_sbom.py"
1314
- "Tools/cases_generator/**"
@@ -35,8 +36,9 @@ jobs:
3536
strategy:
3637
matrix:
3738
target: [
39+
"Lib/_pyrepl",
3840
"Lib/test/libregrtest",
39-
"Tools/build/",
41+
"Tools/build",
4042
"Tools/cases_generator",
4143
"Tools/clinic",
4244
"Tools/jit",

.github/workflows/reusable-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
- name: 'Set up Python'
7575
uses: actions/setup-python@v5
7676
with:
77-
python-version: '3.11' # known to work with Sphinx 4.2
77+
python-version: '3.12' # known to work with Sphinx 6.2.1
7878
cache: 'pip'
7979
cache-dependency-path: 'Doc/requirements-oldest-sphinx.txt'
8080
- name: 'Install build dependencies'

.github/workflows/reusable-macos.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
HOMEBREW_NO_INSTALL_CLEANUP: 1
2323
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
2424
PYTHONSTRICTEXTENSIONBUILD: 1
25+
TERM: linux
2526
strategy:
2627
fail-fast: false
2728
matrix:

.github/workflows/reusable-ubuntu.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ jobs:
1212
build_ubuntu_reusable:
1313
name: 'build and test'
1414
timeout-minutes: 60
15-
runs-on: ubuntu-20.04
15+
runs-on: ubuntu-22.04
1616
env:
17+
FORCE_COLOR: 1
1718
OPENSSL_VER: 3.0.13
1819
PYTHONSTRICTEXTENSIONBUILD: 1
20+
TERM: linux
1921
steps:
2022
- uses: actions/checkout@v4
2123
- name: Register gcc problem matcher

.github/workflows/reusable-wasi.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
build_wasi_reusable:
1010
name: 'build and test'
1111
timeout-minutes: 60
12-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-22.04
1313
env:
1414
WASMTIME_VERSION: 18.0.3
1515
WASI_SDK_VERSION: 21
@@ -50,7 +50,8 @@ jobs:
5050
uses: actions/cache@v4
5151
with:
5252
path: ${{ env.CROSS_BUILD_PYTHON }}/config.cache
53-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
53+
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
54+
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}-${{ env.pythonLocation }}
5455
- name: "Configure build Python"
5556
run: python3 Tools/wasm/wasi.py configure-build-python -- --config-cache --with-pydebug
5657
- name: "Make build Python"
@@ -59,7 +60,8 @@ jobs:
5960
uses: actions/cache@v4
6061
with:
6162
path: ${{ env.CROSS_BUILD_WASI }}/config.cache
62-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-wasi-sdk-${{ env.WASI_SDK_VERSION }}-${{ inputs.config_hash }}
63+
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
64+
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-wasi-sdk-${{ env.WASI_SDK_VERSION }}-${{ inputs.config_hash }}-${{ env.pythonLocation }}
6365
- name: "Configure host"
6466
# `--with-pydebug` inferred from configure-build-python
6567
run: python3 Tools/wasm/wasi.py configure-host -- --config-cache

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ repos:
1111
args: [--exit-non-zero-on-fix, --config=Tools/clinic/.ruff.toml]
1212
files: ^Tools/clinic/|Lib/test/test_clinic.py
1313

14+
- repo: https://github.com/psf/black-pre-commit-mirror
15+
rev: 24.4.2
16+
hooks:
17+
- id: black
18+
name: Run Black on Tools/jit/
19+
files: ^Tools/jit/
20+
language_version: python3.12
21+
1422
- repo: https://github.com/pre-commit/pre-commit-hooks
1523
rev: v4.5.0
1624
hooks:

0 commit comments

Comments
 (0)