Skip to content

Commit 9d8e63d

Browse files
authored
Merge branch '3.15' into backport-150911
2 parents 5929014 + c19b4a6 commit 9d8e63d

103 files changed

Lines changed: 1126 additions & 388 deletions

File tree

Some content is hidden

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

.github/CODEOWNERS

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,6 @@ Mac/ @python/macos-team
171171
Lib/_osx_support.py @python/macos-team
172172
Lib/test/test__osx_support.py @python/macos-team
173173

174-
# WebAssembly
175-
Tools/wasm/README.md @brettcannon @freakboy3742 @emmatyping
176-
177174
# WebAssembly (Emscripten)
178175
Platforms/emscripten @freakboy3742 @emmatyping
179176
Tools/wasm/emscripten @freakboy3742 @emmatyping
@@ -339,7 +336,6 @@ Modules/_remote_debugging/ @pablogsal
339336

340337
# Sub-Interpreters
341338
**/*crossinterp* @ericsnowcurrently
342-
**/*interpreteridobject.* @ericsnowcurrently
343339
Doc/library/concurrent.interpreters.rst @ericsnowcurrently
344340
Lib/concurrent/futures/interpreter.py @ericsnowcurrently
345341
Lib/concurrent/interpreters/ @ericsnowcurrently
@@ -650,3 +646,6 @@ Modules/**/clinic/
650646
Objects/**/clinic/
651647
PC/**/clinic/
652648
Python/**/clinic/
649+
650+
# Exclude HTML IDs list
651+
Doc/tools/removed-ids.txt

.github/workflows/reusable-san.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
SAN_LOG_OPTION: log_path=${{ github.workspace }}/san_log
5454
SUPPRESSIONS_SUFFIX: >-
5555
${{
56-
fromJSON(inputs.free-threading)
56+
inputs.free-threading
5757
&& '_free_threading'
5858
|| ''
5959
}}
@@ -99,7 +99,7 @@ jobs:
9999
}}
100100
--with-pydebug
101101
${{ inputs.sanitizer == 'TSan' && '--with-openssl="$OPENSSL_DIR" --with-openssl-rpath=auto' || '' }}
102-
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
102+
${{ inputs.free-threading && '--disable-gil' || '' }}
103103
- name: Build CPython
104104
run: make -j4
105105
- name: Display build info
@@ -112,7 +112,7 @@ jobs:
112112
- name: Parallel tests
113113
if: >-
114114
inputs.sanitizer == 'TSan'
115-
&& fromJSON(inputs.free-threading)
115+
&& inputs.free-threading
116116
run: ./python -m test --tsan-parallel --parallel-threads=4 -j4 -W --timeout=600 --slowest
117117
- name: Display logs
118118
if: always()
@@ -123,7 +123,7 @@ jobs:
123123
with:
124124
name: >-
125125
${{ inputs.sanitizer }}-logs-${{
126-
fromJSON(inputs.free-threading)
126+
inputs.free-threading
127127
&& 'free-threading'
128128
|| 'default'
129129
}}

.github/workflows/reusable-ubuntu.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ on:
1414
type: boolean
1515
default: false
1616
os:
17-
description: OS to run the job
18-
required: true
19-
type: string
17+
description: OS to run the job
18+
required: true
19+
type: string
2020
test-opts:
21-
description: Extra options to pass to the test runner via TESTOPTS
22-
required: false
23-
type: string
24-
default: ''
21+
description: Extra options to pass to the test runner via TESTOPTS
22+
required: false
23+
type: string
24+
default: ''
2525

2626
permissions:
2727
contents: read
@@ -47,7 +47,7 @@ jobs:
4747
- name: Install dependencies
4848
run: sudo ./.github/workflows/posix-deps-apt.sh
4949
- name: Install Clang and BOLT
50-
if: ${{ fromJSON(inputs.bolt-optimizations) }}
50+
if: inputs.bolt-optimizations
5151
run: |
5252
# On ubuntu-26.04 image, LLVM is LLVM-21 by default
5353
sudo apt-get install --no-install-recommends bolt-21
@@ -88,10 +88,10 @@ jobs:
8888
--enable-slower-safety
8989
--enable-safety
9090
--with-openssl="$OPENSSL_DIR"
91-
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
92-
${{ fromJSON(inputs.bolt-optimizations) && '--enable-bolt' || '' }}
91+
${{ inputs.free-threading && '--disable-gil' || '' }}
92+
${{ inputs.bolt-optimizations && '--enable-bolt' || '' }}
9393
- name: Build CPython out-of-tree
94-
if: ${{ inputs.free-threading }}
94+
if: inputs.free-threading
9595
working-directory: ${{ env.CPYTHON_BUILDDIR }}
9696
run: make -j
9797
- name: Build CPython out-of-tree (for compiler warning check)

.github/workflows/reusable-windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
-e -v
4646
${{ inputs.interpreter == 'switch-case' && '-d' || '--tail-call-interp -c Release' }}
4747
-p "${ARCH}"
48-
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
48+
${{ inputs.free-threading && '--disable-gil' || '' }}
4949
shell: bash
5050
- name: Display build info
5151
run: .\\python.bat -m test.pythoninfo
@@ -55,5 +55,5 @@ jobs:
5555
-p "${ARCH}"
5656
-q --fast-ci
5757
${{ inputs.interpreter == 'switch-case' && '-d' || '' }}
58-
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
58+
${{ inputs.free-threading && '--disable-gil' || '' }}
5959
shell: bash

Doc/c-api/exceptions.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,21 @@ Printing and clearing
119119
.. versionadded:: 3.12
120120
121121
122+
.. c:function:: void PyErr_Display(PyObject *unused, PyObject *value, PyObject *tb)
123+
124+
Legacy variant of :c:func:`PyErr_DisplayException`.
125+
126+
Print the exception *value* with its traceback to :data:`sys.stderr`.
127+
If *value* has no traceback set, *tb* is used as its traceback.
128+
The first argument is ignored.
129+
130+
If :data:`sys.stderr` is ``None``, nothing is printed.
131+
If :data:`sys.stderr` is not set, the exception is dumped to the
132+
C ``stderr`` stream instead.
133+
134+
.. deprecated:: 3.12
135+
Use :c:func:`PyErr_DisplayException` instead.
136+
122137
Raising exceptions
123138
==================
124139
@@ -1041,7 +1056,7 @@ Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types requ
10411056
special recursion handling. In addition to protecting the stack,
10421057
:c:member:`~PyTypeObject.tp_repr` also needs to track objects to prevent cycles. The
10431058
following two functions facilitate this functionality. Effectively,
1044-
these are the C equivalent to :func:`reprlib.recursive_repr`.
1059+
these are the C equivalent to :deco:`reprlib.recursive_repr`.
10451060
10461061
.. c:function:: int Py_ReprEnter(PyObject *object)
10471062

Doc/c-api/init_config.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,9 +1235,9 @@ PyConfig
12351235
12361236
.. c:member:: wchar_t* base_executable
12371237
1238-
Python base executable: :data:`sys._base_executable`.
1238+
Python base executable: ``sys._base_executable``.
12391239
1240-
Set by the :envvar:`__PYVENV_LAUNCHER__` environment variable.
1240+
Set by the ``__PYVENV_LAUNCHER__`` environment variable.
12411241
12421242
Set from :c:member:`PyConfig.executable` if ``NULL``.
12431243
@@ -1748,7 +1748,7 @@ PyConfig
17481748
17491749
* On macOS, use :envvar:`PYTHONEXECUTABLE` environment variable if set.
17501750
* If the ``WITH_NEXT_FRAMEWORK`` macro is defined, use
1751-
:envvar:`__PYVENV_LAUNCHER__` environment variable if set.
1751+
``__PYVENV_LAUNCHER__`` environment variable if set.
17521752
* Use ``argv[0]`` of :c:member:`~PyConfig.argv` if available and
17531753
non-empty.
17541754
* Otherwise, use ``L"python"`` on Windows, or ``L"python3"`` on other
@@ -1984,8 +1984,7 @@ PyConfig
19841984
19851985
The :mod:`warnings` module adds :data:`sys.warnoptions` in the reverse
19861986
order: the last :c:member:`PyConfig.warnoptions` item becomes the first
1987-
item of :data:`warnings.filters` which is checked first (highest
1988-
priority).
1987+
item of ``warnings.filters`` which is checked first (highest priority).
19891988
19901989
The :option:`-W` command line options adds its value to
19911990
:c:member:`~PyConfig.warnoptions`, it can be used multiple times.

Doc/c-api/intro.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@ when defined by the compiler, will also implicitly enable :c:macro:`!Py_DEBUG`.
11631163
In addition to the reference count debugging described below, extra checks are
11641164
performed. See :ref:`Python Debug Build <debug-build>` for more details.
11651165

1166-
Defining :c:macro:`Py_TRACE_REFS` enables reference tracing
1166+
Defining ``Py_TRACE_REFS`` enables reference tracing
11671167
(see the :option:`configure --with-trace-refs option <--with-trace-refs>`).
11681168
When defined, a circular doubly linked list of active objects is maintained by adding two extra
11691169
fields to every :c:type:`PyObject`. Total allocations are tracked as well. Upon

Doc/c-api/structures.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,8 @@ method.
454454
455455
The method will be passed the type object as the first parameter rather
456456
than an instance of the type. This is used to create *class methods*,
457-
similar to what is created when using the :func:`classmethod` built-in
458-
function.
457+
similar to what is created when using the :deco:`classmethod` built-in
458+
decorator.
459459
460460
461461
.. c:macro:: METH_STATIC
@@ -464,7 +464,7 @@ method.
464464
465465
The method will be passed ``NULL`` as the first parameter rather than an
466466
instance of the type. This is used to create *static methods*, similar to
467-
what is created when using the :func:`staticmethod` built-in function.
467+
what is created when using the :deco:`staticmethod` built-in decorator.
468468
469469
One other constant controls whether a method is loaded in place of another
470470
definition with the same method name.

Doc/deprecations/pending-removal-in-3.15.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Pending removal in Python 3.15
8282
Use ``class TD(TypedDict): pass`` or ``TD = TypedDict("TD", {})``
8383
to create a TypedDict with zero field.
8484

85-
* The :func:`!typing.no_type_check_decorator` decorator function
85+
* The :deco:`!typing.no_type_check_decorator` decorator function
8686
has been deprecated since Python 3.13.
8787
After eight years in the :mod:`typing` module,
8888
it has yet to be supported by any major type checker.

Doc/deprecations/pending-removal-in-3.20.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,12 @@ Pending removal in Python 3.20
5353

5454
* Creating instances of abstract AST nodes (such as :class:`ast.AST`
5555
or :class:`!ast.expr`) is deprecated and will raise an error in Python 3.20.
56+
57+
* :mod:`typing`:
58+
59+
* It is deprecated to call :func:`isinstance` and :func:`issubclass` checks on
60+
protocol classes that were not explicitly decorated with :func:`!runtime_checkable`
61+
but that inherit from a runtime-checkable protocol class.
62+
This will raise a :exc:`TypeError` in Python 3.20.
63+
64+
(Contributed by Bartosz Sławecki in :gh:`132604`.)

0 commit comments

Comments
 (0)