Skip to content

Commit df077cb

Browse files
authored
Merge branch 'main' into math-ValueError/133895
2 parents c1eb063 + e5f03b9 commit df077cb

File tree

429 files changed

+15822
-7351
lines changed

Some content is hidden

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

429 files changed

+15822
-7351
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"image": "ghcr.io/python/devcontainer:2025.05.25.15232270922",
2+
"image": "ghcr.io/python/devcontainer:2025.05.29.15334414373",
33
"onCreateCommand": [
44
// Install common tooling.
55
"dnf",

.github/CODEOWNERS

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Objects/type* @markshannon
3535
Objects/codeobject.c @markshannon
3636
Objects/frameobject.c @markshannon
3737
Objects/call.c @markshannon
38+
Objects/object.c @ZeroIntensity
3839
Python/ceval*.c @markshannon
3940
Python/ceval*.h @markshannon
4041
Python/codegen.c @markshannon @iritkatriel
@@ -44,8 +45,9 @@ Python/flowgraph.c @markshannon @iritkatriel
4445
Python/instruction_sequence.c @iritkatriel
4546
Python/bytecodes.c @markshannon
4647
Python/optimizer*.c @markshannon
47-
Python/optimizer_analysis.c @Fidget-Spinner
48-
Python/optimizer_bytecodes.c @Fidget-Spinner
48+
Python/optimizer_analysis.c @Fidget-Spinner @tomasr8
49+
Python/optimizer_bytecodes.c @Fidget-Spinner @tomasr8
50+
Python/optimizer_symbols.c @tomasr8
4951
Python/symtable.c @JelleZijlstra @carljm
5052
Lib/_pyrepl/* @pablogsal @lysnikolaou @ambv
5153
Lib/test/test_patma.py @brandtbucher
@@ -66,8 +68,8 @@ Doc/_static/** @AA-Turner @hugovk
6668
Doc/tools/** @AA-Turner @hugovk
6769

6870
# runtime state/lifecycle
69-
**/*pylifecycle* @ericsnowcurrently
70-
**/*pystate* @ericsnowcurrently
71+
**/*pylifecycle* @ericsnowcurrently @ZeroIntensity
72+
**/*pystate* @ericsnowcurrently @ZeroIntensity
7173
**/*preconfig* @ericsnowcurrently
7274
**/*initconfig* @ericsnowcurrently
7375
**/*pathconfig* @ericsnowcurrently
@@ -187,13 +189,13 @@ Include/internal/pycore_time.h @pganssle @abalkin
187189
/Tools/cases_generator/ @markshannon
188190

189191
# AST
190-
Python/ast.c @isidentical @JelleZijlstra @eclips4
191-
Python/ast_preprocess.c @isidentical @eclips4
192-
Parser/asdl.py @isidentical @JelleZijlstra @eclips4
193-
Parser/asdl_c.py @isidentical @JelleZijlstra @eclips4
194-
Lib/ast.py @isidentical @JelleZijlstra @eclips4
195-
Lib/_ast_unparse.py @isidentical @JelleZijlstra @eclips4
196-
Lib/test/test_ast/ @eclips4
192+
Python/ast.c @isidentical @JelleZijlstra @eclips4 @tomasr8
193+
Python/ast_preprocess.c @isidentical @eclips4 @tomasr8
194+
Parser/asdl.py @isidentical @JelleZijlstra @eclips4 @tomasr8
195+
Parser/asdl_c.py @isidentical @JelleZijlstra @eclips4 @tomasr8
196+
Lib/ast.py @isidentical @JelleZijlstra @eclips4 @tomasr8
197+
Lib/_ast_unparse.py @isidentical @JelleZijlstra @eclips4 @tomasr8
198+
Lib/test/test_ast/ @eclips4 @tomasr8
197199

198200
# Mock
199201
/Lib/unittest/mock.py @cjw296
@@ -281,9 +283,13 @@ Doc/howto/clinic.rst @erlend-aasland
281283
# Subinterpreters
282284
**/*interpreteridobject.* @ericsnowcurrently
283285
**/*crossinterp* @ericsnowcurrently
284-
Lib/test/support/interpreters/ @ericsnowcurrently
285286
Modules/_interp*module.c @ericsnowcurrently
287+
Lib/test/test__interp*.py @ericsnowcurrently
288+
Lib/concurrent/interpreters/ @ericsnowcurrently
289+
Lib/test/support/channels.py @ericsnowcurrently
290+
Doc/library/concurrent.interpreters.rst @ericsnowcurrently
286291
Lib/test/test_interpreters/ @ericsnowcurrently
292+
Lib/concurrent/futures/interpreter.py @ericsnowcurrently
287293

288294
# Android
289295
**/*Android* @mhsmith @freakboy3742
@@ -336,3 +342,6 @@ Modules/_xxtestfuzz/ @ammaraskar
336342
Python/remote_debug.h @pablogsal
337343
Python/remote_debugging.c @pablogsal
338344
Modules/_remote_debugging_module.c @pablogsal @ambv @1st1
345+
346+
# gettext
347+
**/*gettext* @tomasr8

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,14 @@ jobs:
527527
config_hash: ${{ needs.build-context.outputs.config-hash }}
528528
free-threading: ${{ matrix.free-threading }}
529529

530+
build-ubsan:
531+
name: Undefined behavior sanitizer
532+
needs: build-context
533+
if: needs.build-context.outputs.run-tests == 'true'
534+
uses: ./.github/workflows/reusable-ubsan.yml
535+
with:
536+
config_hash: ${{ needs.build-context.outputs.config-hash }}
537+
530538
cross-build-linux:
531539
name: Cross build Linux
532540
runs-on: ubuntu-latest

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ apt-get -yq install \
1717
libreadline6-dev \
1818
libsqlite3-dev \
1919
libssl-dev \
20+
libzstd-dev \
2021
lzma \
2122
lzma-dev \
2223
strace \
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Reusable Undefined Behavior Sanitizer
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
config_hash:
7+
required: true
8+
type: string
9+
10+
env:
11+
FORCE_COLOR: 1
12+
13+
jobs:
14+
build-ubsan-reusable:
15+
name: 'Undefined behavior sanitizer'
16+
runs-on: ubuntu-24.04
17+
timeout-minutes: 60
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
persist-credentials: false
22+
- name: Runner image version
23+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
24+
- name: Restore config.cache
25+
uses: actions/cache@v4
26+
with:
27+
path: config.cache
28+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }}
29+
- name: Install dependencies
30+
run: |
31+
sudo ./.github/workflows/posix-deps-apt.sh
32+
# Install clang-20
33+
wget https://apt.llvm.org/llvm.sh
34+
chmod +x llvm.sh
35+
sudo ./llvm.sh 20
36+
- name: UBSAN option setup
37+
run: |
38+
echo "UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1" >> "$GITHUB_ENV"
39+
echo "CC=clang" >> "$GITHUB_ENV"
40+
echo "CXX=clang++" >> "$GITHUB_ENV"
41+
- name: Add ccache to PATH
42+
run: |
43+
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
44+
- name: Configure ccache action
45+
uses: hendrikmuhs/[email protected]
46+
with:
47+
save: ${{ github.event_name == 'push' }}
48+
max-size: "200M"
49+
- name: Configure CPython
50+
run: >-
51+
./configure
52+
--config-cache
53+
--with-undefined-behavior-sanitizer
54+
--with-pydebug
55+
- name: Set up UBSAN log after configuration
56+
run: |
57+
echo "UBSAN_OPTIONS=${UBSAN_OPTIONS}:log_path=${GITHUB_WORKSPACE}/ubsan_log" >> "$GITHUB_ENV"
58+
- name: Build CPython
59+
run: make -j4
60+
- name: Display build info
61+
run: make pythoninfo
62+
- name: Tests
63+
run: ./python -m test -j4
64+
- name: Display UBSAN logs
65+
if: always()
66+
run: find "${GITHUB_WORKSPACE}" -name 'ubsan_log.*' | xargs head -n 1000
67+
- name: Archive UBSAN logs
68+
if: always()
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: >-
72+
ubsan-logs
73+
path: ubsan_log.*
74+
if-no-files-found: ignore

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ Tools/unicode/data/
131131
/autom4te.cache
132132
/build/
133133
/builddir/
134+
/compile_commands.json
134135
/config.cache
135136
/config.log
136137
/config.status

Android/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ repository's `Lib` directory will be picked up immediately. Changes in C files,
156156
and architecture-specific files such as sysconfigdata, will not take effect
157157
until you re-run `android.py make-host` or `build`.
158158

159+
The testbed app can also be used to test third-party packages. For more details,
160+
run `android.py test --help`, paying attention to the options `--site-packages`,
161+
`--cwd`, `-c` and `-m`.
162+
159163

160164
## Using in your own app
161165

Android/android-env.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
: "${HOST:?}" # GNU target triplet
44

55
# You may also override the following:
6-
: "${api_level:=24}" # Minimum Android API level the build will run on
6+
: "${ANDROID_API_LEVEL:=24}" # Minimum Android API level the build will run on
77
: "${PREFIX:-}" # Path in which to find required libraries
88

99

@@ -24,7 +24,7 @@ fail() {
2424
# * https://android.googlesource.com/platform/ndk/+/ndk-rXX-release/docs/BuildSystemMaintainers.md
2525
# where XX is the NDK version. Do a diff against the version you're upgrading from, e.g.:
2626
# https://android.googlesource.com/platform/ndk/+/ndk-r25-release..ndk-r26-release/docs/BuildSystemMaintainers.md
27-
ndk_version=27.1.12297006
27+
ndk_version=27.2.12479018
2828

2929
ndk=$ANDROID_HOME/ndk/$ndk_version
3030
if ! [ -e "$ndk" ]; then
@@ -43,7 +43,7 @@ fi
4343
toolchain=$(echo "$ndk"/toolchains/llvm/prebuilt/*)
4444
export AR="$toolchain/bin/llvm-ar"
4545
export AS="$toolchain/bin/llvm-as"
46-
export CC="$toolchain/bin/${clang_triplet}${api_level}-clang"
46+
export CC="$toolchain/bin/${clang_triplet}${ANDROID_API_LEVEL}-clang"
4747
export CXX="${CC}++"
4848
export LD="$toolchain/bin/ld"
4949
export NM="$toolchain/bin/llvm-nm"

0 commit comments

Comments
 (0)