Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
559e527
Initial implementation of PEP 661 v2 (sentinels)
JelleZijlstra Apr 17, 2026
769cc83
gh-148464: Add missing ``__ctype_le/be__`` attributes for complex typ…
skirpichev Apr 17, 2026
afde756
gh-148484: Fix memory leak of iterator in array.array constructor (GH…
gleb-pp Apr 17, 2026
a86234e
gh-148683: Doc: fix misplaced pprint entries in What's New 3.15 (#148…
XiaoWan-zi Apr 17, 2026
446edda
gh-148651: Fix refcount leak in _zstd decompressor options (#148657)
mjbommar Apr 17, 2026
db3e990
gh-146393: Remove special character in optimizer_bytecodes.c (#148693)
eendebakpt Apr 17, 2026
634568d
gh-148222: Fix NULL dereference bugs in genericaliasobject.c (#148226)
prakashsellathurai Apr 18, 2026
ededfb7
Update Doc/library/functions.rst
JelleZijlstra Apr 18, 2026
39f364c
Update Doc/library/functions.rst
JelleZijlstra Apr 18, 2026
92164dc
gh-148639: Implement PEP 800 (typing.disjoint_base) (#148640)
JelleZijlstra Apr 18, 2026
0adf314
gc, name
JelleZijlstra Apr 17, 2026
e4a106a
C API
JelleZijlstra Apr 18, 2026
e5b8789
not needed
JelleZijlstra Apr 18, 2026
bdcb400
use it for NoExtraItems
JelleZijlstra Apr 18, 2026
cc4545c
tweaks
JelleZijlstra Apr 18, 2026
2e37d83
gh-148653: Fix some marshal errors related to recursive immutable obj…
serhiy-storchaka Apr 18, 2026
e9bbf86
Add a new Sphinx `soft-deprecated` directive (#148630)
hugovk Apr 18, 2026
d61fcf8
gh-148688: Fix _BlocksOutputBuffer_Finish() double free (#148689)
vstinner Apr 18, 2026
7ce737e
gh-148653: Fix reference leaks in test_marshal introduced in gh-14869…
serhiy-storchaka Apr 18, 2026
be58215
fix warning?
JelleZijlstra Apr 18, 2026
d81599e
gh-148659: Export a few more functions required for external JITs (#1…
DinoV Apr 18, 2026
28b8d5f
gh-133403: Add type annotations to generate_levenshtein_examples.py (…
sandole Apr 18, 2026
4b33308
gh-148406: Fix annotations of _colorize.FancyCompleter (#148408)
danielhollas Apr 18, 2026
9e23652
Prevent GitHub's web conflict editor from converting LF to CRLF (#148…
hugovk Apr 19, 2026
ad7d361
gh-121946: Use clang-20 for TSan build (#148570)
colesbury Apr 19, 2026
a8c9aa9
gh-133879: Copyedit "What's new in Python 3.15" (#148686)
hugovk Apr 19, 2026
8276778
gh-148779: Update Briefcase link in android.rst documentation (#148777)
partev Apr 19, 2026
e50acef
gh-148763: Fix paramter name in `multiprocessing.connection.send_byte…
mdavis-xyz Apr 20, 2026
a00b24e
gh-148788: Update Emscripten example post move to Platforms dir (#148…
StanFromIreland Apr 20, 2026
bfe6f9f
gh-123853: Update locale.windows_locale (GH-123901)
serhiy-storchaka Apr 20, 2026
22c8590
gh-148718: Fix Py_STACKREF_DEBUG build by defining macros (#148719)
corona10 Apr 20, 2026
513db72
GH-145278: also filter mmap2 in strace_helper.filter_memory (GH-148648)
FFY00 Apr 20, 2026
789120e
gh-148790: Eliminate redundant call to `_PyRuntime_Initialize` in `Py…
AraHaan Apr 20, 2026
5c5dae0
gh-148644: Propagate the PGO job exit code in PCbuild/build.bat (GH-1…
rdesgroppes Apr 20, 2026
983c746
Docs: Fix some typos in `calendar.rst` (GH-148756)
manoj-km24 Apr 20, 2026
3fd61b7
Use `soft-deprecated` in more places (#148769)
StanFromIreland Apr 20, 2026
5a3f479
gh-138451: Support custom LLVM installation path (#138452)
xhochy Apr 20, 2026
9a1c70c
Fix typos in asyncio, ctypes, and importlib documentation (#148747)
ByteFlowing1337 Apr 20, 2026
f6ed7c0
gh-108411: Make typing.IO/BinaryIO arguments positional-only (#142906)
SpecLad Apr 20, 2026
d206d42
gh-148814: Fix an issue in Emscripten README (#148752)
StanFromIreland Apr 20, 2026
91de05b
blurb
JelleZijlstra Apr 21, 2026
4a970a6
attribute
JelleZijlstra Apr 21, 2026
1274766
gh-148808: Add boundary check to asyncio.AbstractEventLoop.sock_recvf…
sethmlarson Apr 21, 2026
33e82be
gh-148801: Fix unbound C recursion in `Element.__deepcopy__()` (#148802)
StanFromIreland Apr 21, 2026
0b9146e
[Enum] Improve clarity of comparison sentence (GH-148753)
ZougaRida Apr 21, 2026
09233bd
gh-146578: _zstd: Fix printf format for pledged size errors (#146576)
cuiweixie Apr 21, 2026
858e69e
gh-142186: Allow all PEP-669 events to be per-code object and disable…
P403n1x87 Apr 22, 2026
f93834f
GH-146073: Add example script for dumping JIT traces (GH-148840)
markshannon Apr 22, 2026
04fd103
gh-148207: add additional keywords to `typing.TypeVarTuple` (#148212)
KotlinIsland Apr 22, 2026
9cfd101
refactors
JelleZijlstra Apr 22, 2026
b168865
Additional itertool recipes for running statistics (gh-148879)
rhettinger Apr 22, 2026
59b41c8
gh-148858: Remove duplicated recipe.yaml files in Tools/pixi-packages…
isuruf Apr 22, 2026
ad3c5b7
gh-148820: Fix _PyRawMutex use-after-free on spurious semaphore wakeu…
colesbury Apr 22, 2026
76b3923
gh-90309: Base64-encode cookie values embedded in JS
sethmlarson Apr 22, 2026
a851235
Update Objects/sentinelobject.c
JelleZijlstra Apr 22, 2026
79321fd
gh-148883: Docs: clarify grammar in Counter dictionary methods note (…
SanJJ1 Apr 22, 2026
be833e6
gh-146553: Fix infinite loop in typing.get_type_hints() on circular _…
ashm-dev Apr 23, 2026
8e43f3d
gh-145056: Add support for frozendict in dataclass asdict and astuple…
eendebakpt Apr 23, 2026
bd7352d
gh-145194: Fix typing in re tokenizer example (#145198)
Vikash-Kumar-23 Apr 23, 2026
75ff1af
gh-142965: Fix Concatenate documentation to reflect valid use cases (…
sandole Apr 23, 2026
8bf99ae
gh-119180: Document the `format` parameter in `typing.get_type_hints(…
Viicos Apr 23, 2026
fbc7676
Speed up counting in statistics.fmean() (gh-148875)
rhettinger Apr 23, 2026
2beb1c2
fix
JelleZijlstra Apr 23, 2026
3b93979
gh-148892: Drop mention of deprecated cibuildwheel option (#148893)
ngoldbaum Apr 23, 2026
ab41a34
gh-146636: Improve ABI/feature selection, add new header for it (GH-1…
encukou Apr 23, 2026
29917d5
gh-148907: fix performance regression in `PyType_GetModuleByDef` on f…
kumaraditya303 Apr 23, 2026
9633c52
GH-126910: Build/link the JIT shim in the Python interpreter (#148872)
diegorusso Apr 23, 2026
158dbbb
gh-148680: Replace internal names with type_reprs of objects in strin…
DavidCEllis Apr 23, 2026
0469e6d
gh-148735: Fix a UAF in `Element.findtext()` (#148738)
StanFromIreland Apr 23, 2026
435be06
gh-148663: Document that `calendar.IllegalMonthError` inherits from b…
EoinTrial Apr 23, 2026
42d645a
gh-132631: Fix "I/O operation on closed file" when parsing JSON Lines…
hugovk Apr 23, 2026
4629c22
gh-113956: Make intern_common thread-safe in free-threaded build (gh-…
colesbury Apr 23, 2026
448d7b9
gh-145239: Accept unary plus literal pattern (#148566)
johnslavik Apr 23, 2026
e2d92a1
Merge branch 'main' into pep661
JelleZijlstra Apr 24, 2026
618b726
gh-146073: Add fitness/exit quality mechanism for JIT trace frontend …
cocolato Apr 24, 2026
53a84b6
Update Doc/c-api/sentinel.rst
JelleZijlstra Apr 24, 2026
665b7df
Improve `hash()` builtin docstring with caveats. (GH-125229)
gpshead Apr 24, 2026
95559d2
gh-108951: add TaskGroup.cancel() (#127214)
belm0 Apr 24, 2026
396356e
Merge remote-tracking branch 'upstream/main' into pep661
JelleZijlstra Apr 25, 2026
bfa98a1
feedback
JelleZijlstra Apr 25, 2026
465061a
add assert
JelleZijlstra Apr 25, 2026
70c04a2
another one
JelleZijlstra Apr 25, 2026
7c276c5
more tweaks
JelleZijlstra Apr 25, 2026
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
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ Lib/test/xmltestdata/* noeol
Lib/venv/scripts/common/activate text eol=lf
Lib/venv/scripts/posix/* text eol=lf

# Prevent GitHub's web conflict editor from converting LF to CRLF
*.rst text eol=lf

# CRLF files
[attr]dos text eol=crlf

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:
- "Tools/build/consts_getter.py"
- "Tools/build/deepfreeze.py"
- "Tools/build/generate-build-details.py"
- "Tools/build/generate_levenshtein_examples.py"
- "Tools/build/generate_sbom.py"
- "Tools/build/generate_stdlib_module_names.py"
- "Tools/build/mypy.ini"
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/reusable-san.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,15 @@ jobs:
# Install clang
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 20
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-20 100
sudo update-alternatives --set clang /usr/bin/clang-20
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-20 100
sudo update-alternatives --set clang++ /usr/bin/clang++-20

if [ "${SANITIZER}" = "TSan" ]; then
sudo ./llvm.sh 17 # gh-121946: llvm-18 package is temporarily broken
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-17 100
sudo update-alternatives --set clang /usr/bin/clang-17
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 100
sudo update-alternatives --set clang++ /usr/bin/clang++-17
# Reduce ASLR to avoid TSan crashing
sudo sysctl -w vm.mmap_rnd_bits=28
else
sudo ./llvm.sh 20
fi

- name: Sanitizer option setup
Expand Down
12 changes: 7 additions & 5 deletions Doc/c-api/allocation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.. _allocating-objects:

Allocating Objects on the Heap
Allocating objects on the heap
==============================


Expand Down Expand Up @@ -153,18 +153,20 @@ Allocating Objects on the Heap
To allocate and create extension modules.


Deprecated aliases
^^^^^^^^^^^^^^^^^^
Soft-deprecated aliases
^^^^^^^^^^^^^^^^^^^^^^^

These are :term:`soft deprecated` aliases to existing functions and macros.
.. soft-deprecated:: 3.15

These are aliases to existing functions and macros.
They exist solely for backwards compatibility.


.. list-table::
:widths: auto
:header-rows: 1

* * Deprecated alias
* * Soft-deprecated alias
* Function
* * .. c:macro:: PyObject_NEW(type, typeobj)
* :c:macro:`PyObject_New`
Expand Down
4 changes: 3 additions & 1 deletion Doc/c-api/buffer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ readonly, format

.. c:macro:: PyBUF_WRITEABLE
This is a :term:`soft deprecated` alias to :c:macro:`PyBUF_WRITABLE`.
This is an alias to :c:macro:`PyBUF_WRITABLE`.

.. soft-deprecated:: 3.13

.. c:macro:: PyBUF_FORMAT
Expand Down
11 changes: 5 additions & 6 deletions Doc/c-api/bytes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ called with a non-bytes parameter.
*len* on success, and ``NULL`` on failure. If *v* is ``NULL``, the contents of
the bytes object are uninitialized.

.. deprecated:: 3.15
``PyBytes_FromStringAndSize(NULL, len)`` is :term:`soft deprecated`,
use the :c:type:`PyBytesWriter` API instead.
.. soft-deprecated:: 3.15
Use the :c:type:`PyBytesWriter` API instead of
``PyBytes_FromStringAndSize(NULL, len)``.


.. c:function:: PyObject* PyBytes_FromFormat(const char *format, ...)
Expand Down Expand Up @@ -238,9 +238,8 @@ called with a non-bytes parameter.
*\*bytes* is set to ``NULL``, :exc:`MemoryError` is set, and ``-1`` is
returned.

.. deprecated:: 3.15
The function is :term:`soft deprecated`,
use the :c:type:`PyBytesWriter` API instead.
.. soft-deprecated:: 3.15
Use the :c:type:`PyBytesWriter` API instead.


.. c:function:: PyObject *PyBytes_Repr(PyObject *bytes, int smartquotes)
Expand Down
4 changes: 3 additions & 1 deletion Doc/c-api/code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,16 @@ bound into a function.

.. c:function:: PyObject *PyCode_Optimize(PyObject *code, PyObject *consts, PyObject *names, PyObject *lnotab_obj)

This is a :term:`soft deprecated` function that does nothing.
This is a function that does nothing.

Prior to Python 3.10, this function would perform basic optimizations to a
code object.

.. versionchanged:: 3.10
This function now does nothing.

.. soft-deprecated:: 3.13


.. _c_codeobject_flags:

Expand Down
1 change: 1 addition & 0 deletions Doc/c-api/concrete.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ Other Objects
picklebuffer.rst
weakref.rst
capsule.rst
sentinel.rst
frame.rst
gen.rst
coro.rst
Expand Down
4 changes: 3 additions & 1 deletion Doc/c-api/descriptor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,16 @@ found in the dictionary of type objects.

.. c:macro:: PyDescr_COMMON

This is a :term:`soft deprecated` macro including the common fields for a
This is a macro including the common fields for a
descriptor object.

This was included in Python's C API by mistake; do not use it in extensions.
For creating custom descriptor objects, create a class implementing the
descriptor protocol (:c:member:`~PyTypeObject.tp_descr_get` and
:c:member:`~PyTypeObject.tp_descr_set`).

.. soft-deprecated:: 3.15


Built-in descriptors
^^^^^^^^^^^^^^^^^^^^
Expand Down
4 changes: 3 additions & 1 deletion Doc/c-api/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -818,14 +818,16 @@ Exception Classes

.. c:macro:: PyException_HEAD

This is a :term:`soft deprecated` macro including the base fields for an
This is a macro including the base fields for an
exception object.

This was included in Python's C API by mistake and is not designed for use
in extensions. For creating custom exception objects, use
:c:func:`PyErr_NewException` or otherwise create a class inheriting from
:c:data:`PyExc_BaseException`.

.. soft-deprecated:: 3.15


Exception Objects
=================
Expand Down
11 changes: 5 additions & 6 deletions Doc/c-api/extension-modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ the :c:data:`Py_mod_multiple_interpreters` slot.
``PyInit`` function
...................

.. deprecated:: 3.15
.. soft-deprecated:: 3.15

This functionality is :term:`soft deprecated`.
It will not get new features, but there are no plans to remove it.
This functionality will not get new features,
but there are no plans to remove it.

Instead of :c:func:`PyModExport_modulename`, an extension module can define
an older-style :dfn:`initialization function` with the signature:
Expand Down Expand Up @@ -272,10 +272,9 @@ For example, a module called ``spam`` would be defined like this::
Legacy single-phase initialization
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. deprecated:: 3.15
.. soft-deprecated:: 3.15

Single-phase initialization is :term:`soft deprecated`.
It is a legacy mechanism to initialize extension
Single-phase initialization is a legacy mechanism to initialize extension
modules, with known drawbacks and design flaws. Extension module authors
are encouraged to use multi-phase initialization instead.

Expand Down
9 changes: 5 additions & 4 deletions Doc/c-api/file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.. _fileobjects:

File Objects
File objects
------------

.. index:: pair: object; file
Expand Down Expand Up @@ -136,11 +136,12 @@ the :mod:`io` APIs instead.
failure; the appropriate exception will be set.


Deprecated API
^^^^^^^^^^^^^^
Soft-deprecated API
^^^^^^^^^^^^^^^^^^^

.. soft-deprecated:: 3.15

These are :term:`soft deprecated` APIs that were included in Python's C API
These are APIs that were included in Python's C API
by mistake. They are documented solely for completeness; use other
``PyFile*`` APIs instead.

Expand Down
18 changes: 8 additions & 10 deletions Doc/c-api/float.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ Floating-Point Objects
It is equivalent to the :c:macro:`!INFINITY` macro from the C11 standard
``<math.h>`` header.

.. deprecated:: 3.15
The macro is :term:`soft deprecated`.
.. soft-deprecated:: 3.15


.. c:macro:: Py_NAN
Expand All @@ -103,8 +102,7 @@ Floating-Point Objects

Equivalent to :c:macro:`!INFINITY`.

.. deprecated:: 3.14
The macro is :term:`soft deprecated`.
.. soft-deprecated:: 3.14


.. c:macro:: Py_MATH_E
Expand Down Expand Up @@ -161,26 +159,26 @@ Floating-Point Objects
that is, it is normal, subnormal or zero, but not infinite or NaN.
Return ``0`` otherwise.

.. deprecated:: 3.14
The macro is :term:`soft deprecated`. Use :c:macro:`!isfinite` instead.
.. soft-deprecated:: 3.14
Use :c:macro:`!isfinite` instead.


.. c:macro:: Py_IS_INFINITY(X)

Return ``1`` if the given floating-point number *X* is positive or negative
infinity. Return ``0`` otherwise.

.. deprecated:: 3.14
The macro is :term:`soft deprecated`. Use :c:macro:`!isinf` instead.
.. soft-deprecated:: 3.14
Use :c:macro:`!isinf` instead.


.. c:macro:: Py_IS_NAN(X)

Return ``1`` if the given floating-point number *X* is a not-a-number (NaN)
value. Return ``0`` otherwise.

.. deprecated:: 3.14
The macro is :term:`soft deprecated`. Use :c:macro:`!isnan` instead.
.. soft-deprecated:: 3.14
Use :c:macro:`!isnan` instead.


Pack and Unpack functions
Expand Down
22 changes: 7 additions & 15 deletions Doc/c-api/frame.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. highlight:: c

Frame Objects
Frame objects
-------------

.. c:type:: PyFrameObject
Expand Down Expand Up @@ -147,7 +147,7 @@ See also :ref:`Reflection <reflection>`.
Return the line number that *frame* is currently executing.


Frame Locals Proxies
Frame locals proxies
^^^^^^^^^^^^^^^^^^^^

.. versionadded:: 3.13
Expand All @@ -169,7 +169,7 @@ See :pep:`667` for more information.
Return non-zero if *obj* is a frame :func:`locals` proxy.


Legacy Local Variable APIs
Legacy local variable APIs
^^^^^^^^^^^^^^^^^^^^^^^^^^

These APIs are :term:`soft deprecated`. As of Python 3.13, they do nothing.
Expand All @@ -178,48 +178,42 @@ They exist solely for backwards compatibility.

.. c:function:: void PyFrame_LocalsToFast(PyFrameObject *f, int clear)

This function is :term:`soft deprecated` and does nothing.

Prior to Python 3.13, this function would copy the :attr:`~frame.f_locals`
attribute of *f* to the internal "fast" array of local variables, allowing
changes in frame objects to be visible to the interpreter. If *clear* was
true, this function would process variables that were unset in the locals
dictionary.

.. versionchanged:: 3.13
.. soft-deprecated:: 3.13
This function now does nothing.


.. c:function:: void PyFrame_FastToLocals(PyFrameObject *f)

This function is :term:`soft deprecated` and does nothing.

Prior to Python 3.13, this function would copy the internal "fast" array
of local variables (which is used by the interpreter) to the
:attr:`~frame.f_locals` attribute of *f*, allowing changes in local
variables to be visible to frame objects.

.. versionchanged:: 3.13
.. soft-deprecated:: 3.13
This function now does nothing.


.. c:function:: int PyFrame_FastToLocalsWithError(PyFrameObject *f)

This function is :term:`soft deprecated` and does nothing.

Prior to Python 3.13, this function was similar to
:c:func:`PyFrame_FastToLocals`, but would return ``0`` on success, and
``-1`` with an exception set on failure.

.. versionchanged:: 3.13
.. soft-deprecated:: 3.13
This function now does nothing.


.. seealso::
:pep:`667`


Internal Frames
Internal frames
^^^^^^^^^^^^^^^

Unless using :pep:`523`, you will not need this.
Expand Down Expand Up @@ -249,5 +243,3 @@ Unless using :pep:`523`, you will not need this.
Return the currently executing line number, or -1 if there is no line number.

.. versionadded:: 3.12


4 changes: 3 additions & 1 deletion Doc/c-api/gen.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ Deprecated API
.. c:macro:: PyAsyncGenASend_CheckExact(op)
This is a :term:`soft deprecated` API that was included in Python's C API
This is an API that was included in Python's C API
by mistake.
It is solely here for completeness; do not use this API.
.. soft-deprecated:: 3.14
Loading
Loading