Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
799326b
gh-141169: Re-raise exception from findfuncptr (GH-141349)
encukou Nov 11, 2025
7211a34
gh-132657: optimize `PySet_Contains` for `frozenset` (#141183)
kumaraditya303 Nov 11, 2025
d890aba
gh-140942: Add MIME type for .cjs extension (#140937)
johnfraney Nov 11, 2025
759a048
gh-141004: Document `PyType_Unwatch` (GH-141414)
ZeroIntensity Nov 11, 2025
713edbc
gh-141415: Remove unused variables and comment in `_pyrepl.windows_co…
tanloong Nov 11, 2025
0f09bda
gh-140193: Forward port test_exec_set_nomemory_hang from 3.13 (GH-140…
yihong0618 Nov 11, 2025
c903d76
gh-139533: fix refs to code without proper markups on turtledemo doc …
aureliobarbosa Nov 11, 2025
336154f
Add documentation for Python install manager's install_dir, global_di…
zooba Nov 11, 2025
2fb2b82
gh-141367: Use actual SPECIALIZATION_THRESHOLD value in specializatio…
efimov-mikhail Nov 11, 2025
b5196fa
gh-137339: Clarify host and port parameter behavior in smtplib.SMTP{_…
Aniketsy Nov 11, 2025
298e907
gh-140476: optimize `PySet_Add` for `frozenset` in free-threading (#1…
yoney Nov 11, 2025
2befce8
gh-141004: Document `PyFile_OpenCode` and `PyFile_OpenCodeObject` (GH…
ZeroIntensity Nov 11, 2025
c13b592
gh-116738: use `PyMutex` in `lzma` module (#140711)
yoney Nov 11, 2025
37e2762
gh-141004: Document `PyBytes_Repr` and `PyBytes_DecodeEscape` (GH-141…
ZeroIntensity Nov 11, 2025
af80fac
gh-141314: Fix TextIOWrapper.tell() assertion failure with standalone…
mohsinm-dev Nov 11, 2025
c744ccb
GH-139596: Cease caching config.cache & ccache in GH Actions (GH-139623)
AA-Turner Nov 11, 2025
7906f4d
gh-132686: Add parameters inherit_class_doc and fallback_to_class_doc…
serhiy-storchaka Nov 11, 2025
9e7340c
gh-139462: Make the ProcessPoolExecutor BrokenProcessPool exception r…
jberg5 Nov 11, 2025
4359706
gh-120950: Fix overflow in math.log() with large int-like argument (G…
serhiy-storchaka Nov 11, 2025
f5c2a41
gh-138775: fix handle `python -m base64` stdin correct with EOF signa…
yihong0618 Nov 11, 2025
0d7b48a
gh-137952: update `csv.Sniffer().has_header()` docs to describe the a…
maurycy Nov 12, 2025
0e88be6
gh-138621: Increase test coverage for csv.DictReader and csv.Sniffer …
JanEricNitschke Nov 12, 2025
df66765
gh-137928: remove redundant size validation in multiprocessing.heap (…
acabelloj Nov 12, 2025
9ce99c6
GH-137618: Require Python 3.10 to Python 3.15 for PYTHON_FOR_REGEN (G…
AA-Turner Nov 12, 2025
fbebca2
GH-116946: eliminate the need for the GC in the `_thread.lock` and `_…
sergey-miryanov Nov 12, 2025
ef474cf
gh-103847: fix cancellation safety of `asyncio.create_subprocess_exec…
kumaraditya303 Nov 12, 2025
f1b7961
GH-116946: revert eliminate the need for the GC in the `_thread.lock`…
kumaraditya303 Nov 12, 2025
3590826
gh-75593: Add support of bytes and path-like paths in wave.open() (GH…
mbyrnepr2 Nov 12, 2025
909f76d
gh-141376: Rename _AsyncioDebug to _Py_AsyncioDebug (GH-141391)
encukou Nov 12, 2025
6f988b0
gh-85524: Raise "UnsupportedOperation" on FileIO.readall (#141214)
cmaloney Nov 12, 2025
20f53df
gh-141370: document undefined behavior of Py_ABS() (GH-141439)
skirpichev Nov 12, 2025
7d54374
gh-141311: Avoid assertion in BytesIO.readinto() (GH-141333)
cmaloney Nov 12, 2025
23d85a2
gh-141042: fix sNaN's packing for mixed floating-point formats (#141107)
skirpichev Nov 12, 2025
70748bd
gh-131116: Fix inspect.getdoc() to work with cached_property objects …
lincolnj1 Nov 12, 2025
c6f3dd6
gh-98896: resource_tracker: use json&base64 to allow arbitrary shared…
rani-pinchuk Nov 12, 2025
e202673
gh-141004: soft-deprecate Py_INFINITY macro (#141033)
skirpichev Nov 12, 2025
f963864
gh-141464: a typo in profiling sampling when can not run warning in l…
yihong0618 Nov 12, 2025
88aeff8
gh-87710: Update mime type for ``.ai`` (#141239)
StanFromIreland Nov 12, 2025
2ac738d
gh-132657: add regression test for `PySet_Contains` with unhashable t…
Carreau Nov 12, 2025
f1330b3
gh-141004: Document `Py_MATH_{E, PI, TAU}` constants (#141373)
StanFromIreland Nov 12, 2025
9cd5427
gh-141004: Document `PyType_SUPPORTS_WEAKREFS` (GH-141408)
ZeroIntensity Nov 12, 2025
d162c42
GH-140479: Update JIT builds to use LLVM 21 (#140973)
savannahostrowski Nov 12, 2025
fbcac79
gh-141412: Use reliable target URL for urllib example (GH-141428)
bkline Nov 12, 2025
1f381a5
Add details about JIT build infrastructure and updating dependencies …
savannahostrowski Nov 12, 2025
35ed3e4
gh-140936: Fix JIT assertion crash at finalization if some generator …
efimov-mikhail Nov 12, 2025
558936b
gh-141442: Add escaping to iOS testbed arguments (#141443)
freakboy3742 Nov 12, 2025
dc09870
gh-124111: Fix TCL 9 thread detection (GH-128103)
cho-m Nov 12, 2025
26b7df2
gh-141004: Document `PyRun_InteractiveOneObject` (GH-141405)
ZeroIntensity Nov 12, 2025
781cc68
gh-137109: refactor warning about threads when forking (#141438)
gpshead Nov 13, 2025
63548b3
gh-140260: fix data race in `_struct` module initialization with subi…
ashm-dev Nov 13, 2025
d8e6bdc
gh-135801: Add the module parameter to compile() etc (GH-139652)
serhiy-storchaka Nov 13, 2025
2fbd396
gh-140601: Refactor ElementTree.iterparse() tests (GH-141499)
serhiy-storchaka Nov 13, 2025
1637c04
[WIP] PEP 814: Add built-in frozendict type
vstinner Nov 2, 2025
49aca48
Update Tools/build/generate_token.py for token.py
vstinner Nov 13, 2025
3299299
Try to fix build on Ubuntu and macOS
vstinner Nov 13, 2025
18ce520
Fix make check-c-globals
vstinner Nov 13, 2025
1a72eec
Add PyFrozenDict_Type to static_types
vstinner Nov 13, 2025
9d6ca58
Update Doc/library/stdtypes.rst
vstinner Nov 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,20 +109,10 @@ jobs:
python-version: '3.x'
- name: Runner image version
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
- name: Restore config.cache
uses: actions/cache@v4
with:
path: config.cache
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}-${{ env.pythonLocation }}
- name: Install dependencies
run: sudo ./.github/workflows/posix-deps-apt.sh
- name: Add ccache to PATH
run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
- name: Configure ccache action
uses: hendrikmuhs/ccache-action@v1.2
with:
save: false
- name: Configure CPython
run: |
# Build Python with the libpython dynamic library
Expand Down Expand Up @@ -278,11 +268,6 @@ jobs:
persist-credentials: false
- name: Runner image version
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
- name: Restore config.cache
uses: actions/cache@v4
with:
path: config.cache
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
- name: Register gcc problem matcher
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
- name: Install dependencies
Expand All @@ -304,10 +289,6 @@ jobs:
- name: Add ccache to PATH
run: |
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
- name: Configure ccache action
uses: hendrikmuhs/ccache-action@v1.2
with:
save: false
- name: Configure CPython
run: ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR"
- name: Build CPython
Expand Down Expand Up @@ -339,11 +320,6 @@ jobs:
persist-credentials: false
- name: Runner image version
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
- name: Restore config.cache
uses: actions/cache@v4
with:
path: config.cache
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
- name: Register gcc problem matcher
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
- name: Install dependencies
Expand All @@ -370,10 +346,6 @@ jobs:
- name: Add ccache to PATH
run: |
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
- name: Configure ccache action
uses: hendrikmuhs/ccache-action@v1.2
with:
save: false
- name: Configure CPython
run: |
./configure CFLAGS="-fdiagnostics-format=json" \
Expand Down Expand Up @@ -479,10 +451,6 @@ jobs:
- name: Add ccache to PATH
run: |
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
- name: Configure ccache action
uses: hendrikmuhs/ccache-action@v1.2
with:
save: false
- name: Setup directory envs for out-of-tree builds
run: |
echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
Expand All @@ -493,11 +461,6 @@ jobs:
run: sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR"
- name: Runner image version
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
- name: Restore config.cache
uses: actions/cache@v4
with:
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
- name: Configure CPython out-of-tree
working-directory: ${{ env.CPYTHON_BUILDDIR }}
run: |
Expand Down Expand Up @@ -581,11 +544,6 @@ jobs:
persist-credentials: false
- name: Runner image version
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
- name: Restore config.cache
uses: actions/cache@v4
with:
path: config.cache
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
- name: Register gcc problem matcher
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
- name: Install dependencies
Expand All @@ -611,11 +569,6 @@ jobs:
- name: Add ccache to PATH
run: |
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
- name: Configure ccache action
uses: hendrikmuhs/ccache-action@v1.2
with:
save: ${{ github.event_name == 'push' }}
max-size: "200M"
- name: Configure CPython
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc
- name: Build CPython
Expand Down Expand Up @@ -662,11 +615,6 @@ jobs:
persist-credentials: false
- name: Runner image version
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
- name: Restore config.cache
uses: actions/cache@v4
with:
path: config.cache
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
- name: Register gcc problem matcher
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
- name: Set build dir
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/jit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- true
- false
llvm:
- 20
- 21
include:
- target: i686-pc-windows-msvc/msvc
architecture: Win32
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
fail-fast: false
matrix:
llvm:
- 20
- 21
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
fail-fast: false
matrix:
llvm:
- 20
- 21
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -193,7 +193,7 @@ jobs:
fail-fast: false
matrix:
llvm:
- 20
- 21
steps:
- uses: actions/checkout@v4
with:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/reusable-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ jobs:
persist-credentials: false
- name: Runner image version
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
- name: Restore config.cache
uses: actions/cache@v4
with:
path: config.cache
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }}
- name: Install Homebrew dependencies
run: |
brew install pkg-config openssl@3.0 xz gdbm tcl-tk@9 make
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/reusable-san.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ jobs:
persist-credentials: false
- name: Runner image version
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
- name: Restore config.cache
uses: actions/cache@v4
with:
path: config.cache
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.sanitizer }}-${{ inputs.config_hash }}
- name: Install dependencies
run: |
sudo ./.github/workflows/posix-deps-apt.sh
Expand Down Expand Up @@ -77,11 +72,6 @@ jobs:
- name: Add ccache to PATH
run: |
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
- name: Configure ccache action
uses: hendrikmuhs/ccache-action@v1.2
with:
save: ${{ github.event_name == 'push' }}
max-size: "200M"
- name: Configure CPython
run: >-
./configure
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/reusable-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ jobs:
- name: Add ccache to PATH
run: |
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
- name: Configure ccache action
uses: hendrikmuhs/ccache-action@v1.2
with:
save: ${{ github.event_name == 'push' }}
max-size: "200M"
- name: Setup directory envs for out-of-tree builds
run: |
echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
Expand All @@ -79,11 +74,6 @@ jobs:
run: sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR"
- name: Runner image version
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
- name: Restore config.cache
uses: actions/cache@v4
with:
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }}
- name: Configure CPython out-of-tree
working-directory: ${{ env.CPYTHON_BUILDDIR }}
# `test_unpickle_module_race` writes to the source directory, which is
Expand Down
21 changes: 1 addition & 20 deletions .github/workflows/reusable-wasi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ jobs:
mkdir "${WASI_SDK_PATH}" && \
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" | \
tar --strip-components 1 --directory "${WASI_SDK_PATH}" --extract --gunzip
- name: "Configure ccache action"
uses: hendrikmuhs/ccache-action@v1.2
with:
save: ${{ github.event_name == 'push' }}
max-size: "200M"
- name: "Add ccache to PATH"
run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
- name: "Install Python"
Expand All @@ -55,24 +50,10 @@ jobs:
python-version: '3.x'
- name: "Runner image version"
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
- name: "Restore Python build config.cache"
uses: actions/cache@v4
with:
path: ${{ env.CROSS_BUILD_PYTHON }}/config.cache
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python.
# Include the hash of `Tools/wasm/wasi/__main__.py` as it may change the environment variables.
# (Make sure to keep the key in sync with the other config.cache step below.)
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi/__main__.py') }}-${{ env.pythonLocation }}
- name: "Configure build Python"
run: python3 Tools/wasm/wasi configure-build-python -- --config-cache --with-pydebug
- name: "Make build Python"
run: python3 Tools/wasm/wasi make-build-python
- name: "Restore host config.cache"
uses: actions/cache@v4
with:
path: ${{ env.CROSS_BUILD_WASI }}/config.cache
# Should be kept in sync with the other config.cache step above.
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi/__main__.py') }}-${{ env.pythonLocation }}
run: python3 Tools/wasm/wasi.py make-build-python
- name: "Configure host"
# `--with-pydebug` inferred from configure-build-python
run: python3 Tools/wasm/wasi configure-host -- --config-cache
Expand Down
3 changes: 2 additions & 1 deletion Apple/testbed/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import os
import re
import shlex
import shutil
import subprocess
import sys
Expand Down Expand Up @@ -252,7 +253,7 @@ def update_test_plan(testbed_path, platform, args):
test_plan = json.load(f)

test_plan["defaultOptions"]["commandLineArgumentEntries"] = [
{"argument": arg} for arg in args
{"argument": shlex.quote(arg)} for arg in args
]

with test_plan_path.open("w", encoding="utf-8") as f:
Expand Down
36 changes: 36 additions & 0 deletions Doc/c-api/bytes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,42 @@ called with a non-bytes parameter.
The function is :term:`soft deprecated`,
use the :c:type:`PyBytesWriter` API instead.


.. c:function:: PyObject *PyBytes_Repr(PyObject *bytes, int smartquotes)

Get the string representation of *bytes*. This function is currently used to
implement :meth:`!bytes.__repr__` in Python.

This function does not do type checking; it is undefined behavior to pass
*bytes* as a non-bytes object or ``NULL``.

If *smartquotes* is true, the representation will use a double-quoted string
instead of single-quoted string when single-quotes are present in *bytes*.
For example, the byte string ``'Python'`` would be represented as
``b"'Python'"`` when *smartquotes* is true, or ``b'\'Python\''`` when it is
false.

On success, this function returns a :term:`strong reference` to a
:class:`str` object containing the representation. On failure, this
returns ``NULL`` with an exception set.


.. c:function:: PyObject *PyBytes_DecodeEscape(const char *s, Py_ssize_t len, const char *errors, Py_ssize_t unicode, const char *recode_encoding)

Unescape a backslash-escaped string *s*. *s* must not be ``NULL``.
*len* must be the size of *s*.

*errors* must be one of ``"strict"``, ``"replace"``, or ``"ignore"``. If
*errors* is ``NULL``, then ``"strict"`` is used by default.

On success, this function returns a :term:`strong reference` to a Python
:class:`bytes` object containing the unescaped string. On failure, this
function returns ``NULL`` with an exception set.

.. versionchanged:: 3.9
*unicode* and *recode_encoding* are now unused.


.. _pybyteswriter:

PyBytesWriter
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/conversion.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ The following functions provide locale-independent string to number conversions.

If ``s`` represents a value that is too large to store in a float
(for example, ``"1e500"`` is such a string on many platforms) then
if ``overflow_exception`` is ``NULL`` return ``Py_INFINITY`` (with
if ``overflow_exception`` is ``NULL`` return :c:macro:`!INFINITY` (with
an appropriate sign) and don't set any exception. Otherwise,
``overflow_exception`` must point to a Python exception object;
raise that exception and return ``-1.0``. In both cases, set
Expand Down
23 changes: 23 additions & 0 deletions Doc/c-api/file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,29 @@ the :mod:`io` APIs instead.
.. versionadded:: 3.8
.. c:function:: PyObject *PyFile_OpenCodeObject(PyObject *path)
Open *path* with the mode ``'rb'``. *path* must be a Python :class:`str`
object. The behavior of this function may be overridden by
:c:func:`PyFile_SetOpenCodeHook` to allow for some preprocessing of the
text.
This is analogous to :func:`io.open_code` in Python.
On success, this function returns a :term:`strong reference` to a Python
file object. On failure, this function returns ``NULL`` with an exception
set.
.. versionadded:: 3.8
.. c:function:: PyObject *PyFile_OpenCode(const char *path)
Similar to :c:func:`PyFile_OpenCodeObject`, but *path* is a
UTF-8 encoded :c:expr:`const char*`.
.. versionadded:: 3.8
.. c:function:: int PyFile_WriteObject(PyObject *obj, PyObject *p, int flags)
Expand Down
Loading
Loading