Skip to content

Commit eb06f94

Browse files
committed
Merge branch 'master' into use-_Float16/153740
2 parents 272c538 + 204feba commit eb06f94

67 files changed

Lines changed: 1163 additions & 476 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
@@ -335,7 +332,6 @@ Modules/_remote_debugging/ @pablogsal
335332

336333
# Sub-Interpreters
337334
**/*crossinterp* @ericsnowcurrently
338-
**/*interpreteridobject.* @ericsnowcurrently
339335
Doc/library/concurrent.interpreters.rst @ericsnowcurrently
340336
Lib/concurrent/futures/interpreter.py @ericsnowcurrently
341337
Lib/concurrent/interpreters/ @ericsnowcurrently
@@ -646,3 +642,6 @@ Modules/**/clinic/
646642
Objects/**/clinic/
647643
PC/**/clinic/
648644
Python/**/clinic/
645+
646+
# Exclude HTML IDs list
647+
Doc/tools/removed-ids.txt

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ jobs:
338338
with:
339339
persist-credentials: false
340340
- name: Build and test
341-
run: JAVA_HOME="${JAVA_HOME_21_X64:-$JAVA_HOME_21_arm64}" python3 Platforms/Android ci --fast-ci ${{ matrix.arch }}-linux-android
341+
run: python3 Platforms/Android ci --fast-ci ${{ matrix.arch }}-linux-android
342342

343343
build-ios:
344344
name: iOS

.github/workflows/reusable-san.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
SAN_LOG_OPTION: log_path=${{ github.workspace }}/san_log
5656
SUPPRESSIONS_SUFFIX: >-
5757
${{
58-
fromJSON(inputs.free-threading)
58+
inputs.free-threading
5959
&& '_free_threading'
6060
|| ''
6161
}}
@@ -101,7 +101,7 @@ jobs:
101101
}}
102102
--with-pydebug
103103
${{ inputs.sanitizer == 'TSan' && '--with-openssl="$OPENSSL_DIR" --with-openssl-rpath=auto' || '' }}
104-
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
104+
${{ inputs.free-threading && '--disable-gil' || '' }}
105105
- name: Build CPython
106106
run: make -j4
107107
- name: Display build info
@@ -114,7 +114,7 @@ jobs:
114114
- name: Parallel tests
115115
if: >-
116116
inputs.sanitizer == 'TSan'
117-
&& fromJSON(inputs.free-threading)
117+
&& inputs.free-threading
118118
run: ./python -m test --tsan-parallel --parallel-threads=4 -j4 -W --timeout=600 --slowest
119119
- name: Display logs
120120
if: always()
@@ -125,7 +125,7 @@ jobs:
125125
with:
126126
name: >-
127127
${{ inputs.sanitizer }}-logs-${{
128-
fromJSON(inputs.free-threading)
128+
inputs.free-threading
129129
&& 'free-threading'
130130
|| 'default'
131131
}}

.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/deprecations/pending-removal-in-3.17.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ Pending removal in Python 3.17
3737
is deprecated and scheduled for removal in Python 3.17.
3838
(Contributed by Stan Ulbrych in :gh:`136702`.)
3939

40+
* :mod:`profile`:
41+
42+
- The :mod:`!profile` module is deprecated and will be removed in
43+
Python 3.17. Use :mod:`profiling.tracing` instead, which provides a
44+
compatible API. See :pep:`799` for details.
45+
(Contributed by Pablo Galindo and László Kiss Kollár in :gh:`138122`.)
46+
4047
* :mod:`webbrowser`:
4148

4249
- :class:`!webbrowser.MacOSXOSAScript` is deprecated in favour of

Doc/library/collections.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,15 @@ For example::
268268
>>> c['sausage'] = 0 # counter entry with a zero count
269269
>>> del c['sausage'] # del actually removes the entry
270270

271+
Counters maintain insertion order internally but display from most common to
272+
least common when possible:
273+
274+
>>> c = Counter(a=1, b=2, c=3)
275+
>>> c # display most common to least
276+
Counter({'c': 3, 'b': 2, 'a': 1})
277+
>>> list(c.items()) # original insertion order
278+
[('a', 1), ('b', 2), ('c', 3)]
279+
271280
.. versionadded:: 3.1
272281

273282
.. versionchanged:: 3.7 As a :class:`dict` subclass, :class:`Counter`

Doc/library/decimal.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,14 @@ In addition to the three supplied contexts, new contexts can be created with the
11821182

11831183
Return a duplicate of the context.
11841184

1185+
:class:`!Context` objects also support :func:`copy.replace`,
1186+
which returns a duplicate with the specified fields replaced.
1187+
Fields which are not specified keep the values
1188+
they have in the original context.
1189+
1190+
.. versionchanged:: next
1191+
Added support for :func:`copy.replace`.
1192+
11851193
.. method:: copy_decimal(num, /)
11861194

11871195
Return a copy of the Decimal instance num.

Doc/library/functools.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,9 @@ The :mod:`!functools` module defines the following functions:
386386
only one positional argument is provided, but there are two placeholders
387387
that must be filled in.
388388

389-
If :func:`!partial` is applied to an existing :func:`!partial` object,
390-
:data:`!Placeholder` sentinels of the input object are filled in with
391-
new positional arguments.
389+
If :func:`!partial` is applied to an existing
390+
:ref:`partial object <partial-objects>`, :data:`!Placeholder` sentinels of the
391+
input object are filled in with new positional arguments.
392392
A placeholder can be retained by inserting a new
393393
:data:`!Placeholder` sentinel to the place held by a previous :data:`!Placeholder`:
394394

Doc/library/tempfile.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ The module defines the following user-callable items:
257257
The file descriptor is :ref:`not inherited by child processes <fd_inheritance>`.
258258

259259
Unlike :func:`TemporaryFile`, the user of :func:`mkstemp` is responsible
260-
for deleting the temporary file when done with it.
260+
for closing the file descriptor (for example, using :func:`os.close`) and
261+
deleting the temporary file (for example, using :func:`os.remove`).
261262

262263
If *suffix* is not ``None``, the file name will end with that suffix,
263264
otherwise there will be no suffix. :func:`mkstemp` does not put a dot

0 commit comments

Comments
 (0)