Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d52b8c9

Browse filesBrowse files
committed
Merge in the main branch
2 parents d9d593c + 55f8bac commit d52b8c9
Copy full SHA for d52b8c9

File tree

Expand file treeCollapse file tree

515 files changed

+18198
-10969
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

515 files changed

+18198
-10969
lines changed

‎.github/CODEOWNERS

Copy file name to clipboardExpand all lines: .github/CODEOWNERS
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ Objects/exceptions.c @iritkatriel
106106

107107
# Hashing & cryptographic primitives
108108
**/*hashlib* @gpshead @tiran @picnixz
109+
**/*hashopenssl* @gpshead @tiran @picnixz
109110
**/*pyhash* @gpshead @tiran
110111
**/sha* @gpshead @tiran @picnixz
111112
Modules/md5* @gpshead @tiran @picnixz

‎.github/workflows/build.yml

Copy file name to clipboardExpand all lines: .github/workflows/build.yml
+25-19Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ jobs:
6262
with:
6363
fetch-depth: 1
6464
persist-credentials: false
65-
- name: Runner image version
66-
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
6765
- name: Check Autoconf and aclocal versions
6866
run: |
6967
grep "Generated by GNU Autoconf 2.72" configure
@@ -104,14 +102,14 @@ jobs:
104102
with:
105103
python-version: '3.x'
106104
- name: Runner image version
107-
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
105+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
108106
- name: Restore config.cache
109107
uses: actions/cache@v4
110108
with:
111109
path: config.cache
112110
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
113-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.build-context.outputs.config-hash }}-${{ env.pythonLocation }}
114-
- name: Install Dependencies
111+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}-${{ env.pythonLocation }}
112+
- name: Install dependencies
115113
run: sudo ./.github/workflows/posix-deps-apt.sh
116114
- name: Add ccache to PATH
117115
run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
@@ -154,7 +152,7 @@ jobs:
154152
Windows
155153
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
156154
needs: build-context
157-
if: fromJSON(needs.build-context.outputs.run-tests)
155+
if: fromJSON(needs.build-context.outputs.run-windows-tests)
158156
strategy:
159157
fail-fast: false
160158
matrix:
@@ -284,15 +282,15 @@ jobs:
284282
with:
285283
persist-credentials: false
286284
- name: Runner image version
287-
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
285+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
288286
- name: Restore config.cache
289287
uses: actions/cache@v4
290288
with:
291289
path: config.cache
292-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.build-context.outputs.config-hash }}
290+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
293291
- name: Register gcc problem matcher
294292
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
295-
- name: Install Dependencies
293+
- name: Install dependencies
296294
run: sudo ./.github/workflows/posix-deps-apt.sh
297295
- name: Configure OpenSSL env vars
298296
run: |
@@ -347,7 +345,7 @@ jobs:
347345
persist-credentials: false
348346
- name: Register gcc problem matcher
349347
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
350-
- name: Install Dependencies
348+
- name: Install dependencies
351349
run: sudo ./.github/workflows/posix-deps-apt.sh
352350
- name: Configure OpenSSL env vars
353351
run: |
@@ -379,12 +377,12 @@ jobs:
379377
- name: Bind mount sources read-only
380378
run: sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR"
381379
- name: Runner image version
382-
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
380+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
383381
- name: Restore config.cache
384382
uses: actions/cache@v4
385383
with:
386384
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
387-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.build-context.outputs.config-hash }}
385+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
388386
- name: Configure CPython out-of-tree
389387
working-directory: ${{ env.CPYTHON_BUILDDIR }}
390388
run: |
@@ -466,15 +464,15 @@ jobs:
466464
with:
467465
persist-credentials: false
468466
- name: Runner image version
469-
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
467+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
470468
- name: Restore config.cache
471469
uses: actions/cache@v4
472470
with:
473471
path: config.cache
474-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.build-context.outputs.config-hash }}
472+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
475473
- name: Register gcc problem matcher
476474
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
477-
- name: Install Dependencies
475+
- name: Install dependencies
478476
run: sudo ./.github/workflows/posix-deps-apt.sh
479477
- name: Set up GCC-10 for ASAN
480478
uses: egor-tensin/setup-gcc@v1
@@ -537,19 +535,19 @@ jobs:
537535
with:
538536
persist-credentials: false
539537
- name: Runner image version
540-
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
538+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
541539
- name: Restore config.cache
542540
uses: actions/cache@v4
543541
with:
544542
path: config.cache
545-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.build-context.outputs.config-hash }}
543+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
546544
- name: Register gcc problem matcher
547545
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
548546
- name: Set build dir
549547
run:
550548
# an absolute path outside of the working directoy
551549
echo "BUILD_DIR=$(realpath ${{ github.workspace }}/../build)" >> "$GITHUB_ENV"
552-
- name: Install Dependencies
550+
- name: Install dependencies
553551
run: sudo ./.github/workflows/posix-deps-apt.sh
554552
- name: Configure host build
555553
run: ./configure --prefix="$BUILD_DIR/host-python"
@@ -621,6 +619,7 @@ jobs:
621619
- build_wasi
622620
- build_windows
623621
- build_windows_msi
622+
- cross-build-linux
624623
- test_hypothesis
625624
- build_asan
626625
- build_tsan
@@ -654,10 +653,17 @@ jobs:
654653
build_ubuntu,
655654
build_ubuntu_ssltests,
656655
build_wasi,
657-
build_windows,
658656
build_asan,
659657
build_tsan,
660658
test_hypothesis,
659+
cross-build-linux,
660+
'
661+
|| ''
662+
}}
663+
${{
664+
!fromJSON(needs.build-context.outputs.run-windows-tests)
665+
&& '
666+
build_windows,
661667
'
662668
|| ''
663669
}}

‎.github/workflows/reusable-context.yml

Copy file name to clipboardExpand all lines: .github/workflows/reusable-context.yml
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ on: # yamllint disable-line rule:truthy
2626
run-tests:
2727
description: Whether to run the regular tests
2828
value: ${{ jobs.compute-changes.outputs.run-tests }} # bool
29+
run-windows-tests:
30+
description: Whether to run the Windows tests
31+
value: ${{ jobs.compute-changes.outputs.run-windows-tests }} # bool
2932
run-windows-msi:
3033
description: Whether to run the MSI installer smoke tests
3134
value: ${{ jobs.compute-changes.outputs.run-windows-msi }} # bool
@@ -44,6 +47,7 @@ jobs:
4447
run-docs: ${{ steps.changes.outputs.run-docs }}
4548
run-tests: ${{ steps.changes.outputs.run-tests }}
4649
run-windows-msi: ${{ steps.changes.outputs.run-windows-msi }}
50+
run-windows-tests: ${{ steps.changes.outputs.run-windows-tests }}
4751
steps:
4852
- name: Set up Python
4953
uses: actions/setup-python@v5

‎.github/workflows/reusable-macos.yml

Copy file name to clipboardExpand all lines: .github/workflows/reusable-macos.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ jobs:
3535
with:
3636
persist-credentials: false
3737
- name: Runner image version
38-
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
38+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
3939
- name: Restore config.cache
4040
uses: actions/cache@v4
4141
with:
4242
path: config.cache
43-
key: ${{ github.job }}-${{ inputs.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
43+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }}
4444
- name: Install Homebrew dependencies
4545
run: |
4646
brew install pkg-config openssl@3.0 xz gdbm tcl-tk@8 make

‎.github/workflows/reusable-tsan.yml

Copy file name to clipboardExpand all lines: .github/workflows/reusable-tsan.yml
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ jobs:
2525
with:
2626
persist-credentials: false
2727
- name: Runner image version
28-
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
28+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
2929
- name: Restore config.cache
3030
uses: actions/cache@v4
3131
with:
3232
path: config.cache
33-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
34-
- name: Install Dependencies
33+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }}
34+
- name: Install dependencies
3535
run: |
3636
sudo ./.github/workflows/posix-deps-apt.sh
3737
# Install clang-18
@@ -44,7 +44,7 @@ jobs:
4444
sudo update-alternatives --set clang++ /usr/bin/clang++-17
4545
# Reduce ASLR to avoid TSAN crashing
4646
sudo sysctl -w vm.mmap_rnd_bits=28
47-
- name: TSAN Option Setup
47+
- name: TSAN option setup
4848
run: |
4949
echo "TSAN_OPTIONS=log_path=${GITHUB_WORKSPACE}/tsan_log suppressions=${GITHUB_WORKSPACE}/Tools/tsan/suppressions${{
5050
fromJSON(inputs.free-threading)

‎.github/workflows/reusable-ubuntu.yml

Copy file name to clipboardExpand all lines: .github/workflows/reusable-ubuntu.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ jobs:
7878
- name: Bind mount sources read-only
7979
run: sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR"
8080
- name: Runner image version
81-
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
81+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
8282
- name: Restore config.cache
8383
uses: actions/cache@v4
8484
with:
8585
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
86-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
86+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }}
8787
- name: Configure CPython out-of-tree
8888
working-directory: ${{ env.CPYTHON_BUILDDIR }}
8989
# `test_unpickle_module_race` writes to the source directory, which is

‎.github/workflows/reusable-wasi.yml

Copy file name to clipboardExpand all lines: .github/workflows/reusable-wasi.yml
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,16 @@ jobs:
5353
uses: actions/setup-python@v5
5454
with:
5555
python-version: '3.x'
56+
- name: "Runner image version"
57+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
5658
- name: "Restore Python build config.cache"
5759
uses: actions/cache@v4
5860
with:
5961
path: ${{ env.CROSS_BUILD_PYTHON }}/config.cache
6062
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python.
6163
# Include the hash of `Tools/wasm/wasi.py` as it may change the environment variables.
6264
# (Make sure to keep the key in sync with the other config.cache step below.)
63-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi.py') }}-${{ env.pythonLocation }}
65+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi.py') }}-${{ env.pythonLocation }}
6466
- name: "Configure build Python"
6567
run: python3 Tools/wasm/wasi.py configure-build-python -- --config-cache --with-pydebug
6668
- name: "Make build Python"
@@ -70,7 +72,7 @@ jobs:
7072
with:
7173
path: ${{ env.CROSS_BUILD_WASI }}/config.cache
7274
# Should be kept in sync with the other config.cache step above.
73-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi.py') }}-${{ env.pythonLocation }}
75+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi.py') }}-${{ env.pythonLocation }}
7476
- name: "Configure host"
7577
# `--with-pydebug` inferred from configure-build-python
7678
run: python3 Tools/wasm/wasi.py configure-host -- --config-cache

‎.github/workflows/tail-call.yml

Copy file name to clipboardExpand all lines: .github/workflows/tail-call.yml
+16-1Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ on:
55
- 'Python/bytecodes.c'
66
- 'Python/ceval.c'
77
- 'Python/ceval_macros.h'
8+
- 'Python/generated_cases.c.h'
89
push:
910
paths:
1011
- 'Python/bytecodes.c'
1112
- 'Python/ceval.c'
1213
- 'Python/ceval_macros.h'
14+
- 'Python/generated_cases.c.h'
1315
workflow_dispatch:
1416

1517
permissions:
@@ -39,6 +41,7 @@ jobs:
3941
- aarch64-apple-darwin/clang
4042
- x86_64-unknown-linux-gnu/gcc
4143
- aarch64-unknown-linux-gnu/gcc
44+
- free-threading
4245
llvm:
4346
- 19
4447
include:
@@ -63,6 +66,9 @@ jobs:
6366
- target: aarch64-unknown-linux-gnu/gcc
6467
architecture: aarch64
6568
runner: ubuntu-24.04-arm
69+
- target: free-threading
70+
architecture: x86_64
71+
runner: ubuntu-24.04
6672
steps:
6773
- uses: actions/checkout@v4
6874
with:
@@ -103,11 +109,20 @@ jobs:
103109
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
104110
105111
- name: Native Linux (release)
106-
if: runner.os == 'Linux'
112+
if: runner.os == 'Linux' && matrix.target != 'free-threading'
107113
run: |
108114
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
109115
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
110116
CC=clang-19 ./configure --with-tail-call-interp
111117
make all --jobs 4
112118
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
113119
120+
- name: Native Linux with free-threading (release)
121+
if: matrix.target == 'free-threading'
122+
run: |
123+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
124+
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
125+
CC=clang-19 ./configure --with-tail-call-interp --disable-gil
126+
make all --jobs 4
127+
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
128+

‎Android/README.md

Copy file name to clipboardExpand all lines: Android/README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ stderr. Add the `-v` option to also show Gradle output, and non-Python logcat
119119
messages.
120120

121121
Any other arguments on the `android.py test` command line will be passed through
122-
to `python -m test` use `--` to separate them from android.py's own options.
122+
to `python -m test` use `--` to separate them from android.py's own options.
123123
See the [Python Developer's
124124
Guide](https://devguide.python.org/testing/run-write-tests/) for common options
125-
 most of them will work on Android, except for those that involve subprocesses,
125+
most of them will work on Android, except for those that involve subprocesses,
126126
such as `-j`.
127127

128128
Every time you run `android.py test`, changes in pure-Python files in the

‎Doc/c-api/arg.rst

Copy file name to clipboardExpand all lines: Doc/c-api/arg.rst
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,10 @@ Building values
645645
``n`` (:class:`int`) [:c:type:`Py_ssize_t`]
646646
Convert a C :c:type:`Py_ssize_t` to a Python integer.
647647
648+
``p`` (:class:`bool`) [int]
649+
Convert a C :c:expr:`int` to a Python :class:`bool` object.
650+
.. versionadded:: 3.14
651+
648652
``c`` (:class:`bytes` of length 1) [char]
649653
Convert a C :c:expr:`int` representing a byte to a Python :class:`bytes` object of
650654
length 1.

‎Doc/c-api/bytearray.rst

Copy file name to clipboardExpand all lines: Doc/c-api/bytearray.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Direct API functions
7676
Resize the internal buffer of *bytearray* to *len*.
7777
Failure is a ``-1`` return with an exception set.
7878
79-
.. versionchanged:: next
79+
.. versionchanged:: 3.14
8080
A negative *len* will now result in an exception being set and -1 returned.
8181
8282

‎Doc/c-api/exceptions.rst

Copy file name to clipboardExpand all lines: Doc/c-api/exceptions.rst
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -921,11 +921,7 @@ because the :ref:`call protocol <call>` takes care of recursion handling.
921921
922922
Marks a point where a recursive C-level call is about to be performed.
923923
924-
If :c:macro:`!USE_STACKCHECK` is defined, this function checks if the OS
925-
stack overflowed using :c:func:`PyOS_CheckStack`. If this is the case, it
926-
sets a :exc:`MemoryError` and returns a nonzero value.
927-
928-
The function then checks if the recursion limit is reached. If this is the
924+
The function then checks if the stack limit is reached. If this is the
929925
case, a :exc:`RecursionError` is set and a nonzero value is returned.
930926
Otherwise, zero is returned.
931927

‎Doc/c-api/function.rst

Copy file name to clipboardExpand all lines: Doc/c-api/function.rst
+7-6Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,13 @@ There are a few functions specific to Python functions.
145145
146146
.. c:type:: PyFunction_WatchEvent
147147
148-
Enumeration of possible function watcher events:
149-
- ``PyFunction_EVENT_CREATE``
150-
- ``PyFunction_EVENT_DESTROY``
151-
- ``PyFunction_EVENT_MODIFY_CODE``
152-
- ``PyFunction_EVENT_MODIFY_DEFAULTS``
153-
- ``PyFunction_EVENT_MODIFY_KWDEFAULTS``
148+
Enumeration of possible function watcher events:
149+
150+
- ``PyFunction_EVENT_CREATE``
151+
- ``PyFunction_EVENT_DESTROY``
152+
- ``PyFunction_EVENT_MODIFY_CODE``
153+
- ``PyFunction_EVENT_MODIFY_DEFAULTS``
154+
- ``PyFunction_EVENT_MODIFY_KWDEFAULTS``
154155
155156
.. versionadded:: 3.12
156157

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.