Skip to content

Commit 2b2d04e

Browse files
authored
Merge branch 'main' into feat/UNPACK_SEQUENCE2
2 parents c583aba + 6b9a6c6 commit 2b2d04e

File tree

232 files changed

+13943
-3444
lines changed

Some content is hidden

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

232 files changed

+13943
-3444
lines changed

.gitattributes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ Include/opcode.h generated
8383
Include/opcode_ids.h generated
8484
Include/token.h generated
8585
Lib/_opcode_metadata.py generated
86-
Lib/keyword.py generated
8786
Lib/idlelib/help.html generated
87+
Lib/keyword.py generated
88+
Lib/pydoc_data/topics.py generated
89+
Lib/pydoc_data/module_docs.py generated
8890
Lib/test/certdata/*.pem generated
8991
Lib/test/certdata/*.0 generated
9092
Lib/test/levenshtein_examples.json generated

.github/workflows/tail-call.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,26 +79,25 @@ jobs:
7979
with:
8080
python-version: '3.11'
8181

82-
- name: Native Windows (debug)
82+
- name: Native Windows MSVC (release)
8383
if: runner.os == 'Windows' && matrix.architecture != 'ARM64'
84-
shell: cmd
84+
shell: pwsh
8585
run: |
86-
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
87-
set PlatformToolset=clangcl
88-
set LLVMToolsVersion=${{ matrix.llvm }}.1.0
89-
set LLVMInstallDir=C:\Program Files\LLVM
90-
call ./PCbuild/build.bat --tail-call-interp -d -p ${{ matrix.architecture }}
91-
call ./PCbuild/rt.bat -d -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
86+
choco install visualstudio2026buildtools --no-progress -y --force --params "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --locale en-US --passive"
87+
$env:PATH = "C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\MSBuild\Current\bin;$env:PATH"
88+
$env:PlatformToolset = "v145"
89+
./PCbuild/build.bat --tail-call-interp -c Release -p ${{ matrix.architecture }}
90+
./PCbuild/rt.bat -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
9291
9392
# No tests (yet):
94-
- name: Emulated Windows (release)
93+
- name: Emulated Windows Clang (release)
9594
if: runner.os == 'Windows' && matrix.architecture == 'ARM64'
96-
shell: cmd
95+
shell: pwsh
9796
run: |
9897
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
99-
set PlatformToolset=clangcl
100-
set LLVMToolsVersion=${{ matrix.llvm }}.1.0
101-
set LLVMInstallDir=C:\Program Files\LLVM
98+
$env:PlatformToolset = "clangcl"
99+
$env:LLVMToolsVersion = "${{ matrix.llvm }}.1.0"
100+
$env:LLVMInstallDir = "C:\Program Files\LLVM"
102101
./PCbuild/build.bat --tail-call-interp -p ${{ matrix.architecture }}
103102
104103
- name: Native macOS (release)

.pre-commit-config.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.13.2
3+
rev: v0.14.10
44
hooks:
55
- id: ruff-check
66
name: Run Ruff (lint) on Apple/
@@ -40,19 +40,19 @@ repos:
4040
files: ^Apple
4141
- id: ruff-format
4242
name: Run Ruff (format) on Doc/
43-
args: [--check]
43+
args: [--exit-non-zero-on-fix]
4444
files: ^Doc/
4545
- id: ruff-format
4646
name: Run Ruff (format) on Tools/build/check_warnings.py
47-
args: [--check, --config=Tools/build/.ruff.toml]
47+
args: [--exit-non-zero-on-fix, --config=Tools/build/.ruff.toml]
4848
files: ^Tools/build/check_warnings.py
4949
- id: ruff-format
5050
name: Run Ruff (format) on Tools/wasm/
51-
args: [--check, --config=Tools/wasm/.ruff.toml]
51+
args: [--exit-non-zero-on-fix, --config=Tools/wasm/.ruff.toml]
5252
files: ^Tools/wasm/
5353

5454
- repo: https://github.com/psf/black-pre-commit-mirror
55-
rev: 25.9.0
55+
rev: 25.12.0
5656
hooks:
5757
- id: black
5858
name: Run Black on Tools/jit/
@@ -83,24 +83,24 @@ repos:
8383
files: '^\.github/CODEOWNERS|\.(gram)$'
8484

8585
- repo: https://github.com/python-jsonschema/check-jsonschema
86-
rev: 0.34.0
86+
rev: 0.36.0
8787
hooks:
8888
- id: check-dependabot
8989
- id: check-github-workflows
9090
- id: check-readthedocs
9191

9292
- repo: https://github.com/rhysd/actionlint
93-
rev: v1.7.7
93+
rev: v1.7.9
9494
hooks:
9595
- id: actionlint
9696

9797
- repo: https://github.com/woodruffw/zizmor-pre-commit
98-
rev: v1.14.1
98+
rev: v1.19.0
9999
hooks:
100100
- id: zizmor
101101

102102
- repo: https://github.com/sphinx-contrib/sphinx-lint
103-
rev: v1.0.0
103+
rev: v1.0.2
104104
hooks:
105105
- id: sphinx-lint
106106
args: [--enable=default-role]

Doc/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ doctest:
140140
pydoc-topics: BUILDER = pydoc-topics
141141
pydoc-topics: build
142142
@echo "Building finished; now run this:" \
143-
"cp build/pydoc-topics/topics.py ../Lib/pydoc_data/topics.py"
143+
"cp build/pydoc-topics/topics.py ../Lib/pydoc_data/topics.py" \
144+
"&& cp build/pydoc-topics/module_docs.py ../Lib/pydoc_data/module_docs.py"
144145

145146
.PHONY: gettext
146147
gettext: BUILDER = gettext

Doc/c-api/module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ A module's token -- and the *your_token* value to use in the above code -- is:
571571
of that slot;
572572
- For modules created from an ``PyModExport_*``
573573
:ref:`export hook <extension-export-hook>`: the slots array that the export
574-
hook returned (unless overriden with :c:macro:`Py_mod_token`).
574+
hook returned (unless overridden with :c:macro:`Py_mod_token`).
575575
576576
.. c:macro:: Py_mod_token
577577

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,6 @@ Pending removal in Python 3.15
3333

3434
* ``load_module()`` method: use ``exec_module()`` instead.
3535

36-
* :class:`locale`:
37-
38-
* The :func:`~locale.getdefaultlocale` function
39-
has been deprecated since Python 3.11.
40-
Its removal was originally planned for Python 3.13 (:gh:`90817`),
41-
but has been postponed to Python 3.15.
42-
Use :func:`~locale.getlocale`, :func:`~locale.setlocale`,
43-
and :func:`~locale.getencoding` instead.
44-
(Contributed by Hugo van Kemenade in :gh:`111187`.)
45-
4636
* :mod:`pathlib`:
4737

4838
* :meth:`!.PurePath.is_reserved`

Doc/library/base64.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,14 +267,20 @@ Refer to the documentation of the individual functions for more information.
267267
.. versionadded:: 3.4
268268

269269

270-
.. function:: z85encode(s)
270+
.. function:: z85encode(s, pad=False)
271271

272272
Encode the :term:`bytes-like object` *s* using Z85 (as used in ZeroMQ)
273273
and return the encoded :class:`bytes`. See `Z85 specification
274274
<https://rfc.zeromq.org/spec/32/>`_ for more information.
275275

276+
If *pad* is true, the input is padded with ``b'\0'`` so its length is a
277+
multiple of 4 bytes before encoding.
278+
276279
.. versionadded:: 3.13
277280

281+
.. versionchanged:: next
282+
The *pad* parameter was added.
283+
278284

279285
.. function:: z85decode(s)
280286

Doc/library/concurrent.futures.rst

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ the bytes over a shared :mod:`socket <socket>` or
308308

309309
.. note::
310310
The executor may replace uncaught exceptions from *initializer*
311-
with :class:`~concurrent.futures.interpreter.ExecutionFailed`.
311+
with :class:`~concurrent.interpreters.ExecutionFailed`.
312312

313313
Other caveats from parent :class:`ThreadPoolExecutor` apply here.
314314

@@ -320,11 +320,11 @@ likewise serializes the return value when sending it back.
320320
When a worker's current task raises an uncaught exception, the worker
321321
always tries to preserve the exception as-is. If that is successful
322322
then it also sets the ``__cause__`` to a corresponding
323-
:class:`~concurrent.futures.interpreter.ExecutionFailed`
323+
:class:`~concurrent.interpreters.ExecutionFailed`
324324
instance, which contains a summary of the original exception.
325325
In the uncommon case that the worker is not able to preserve the
326326
original as-is then it directly preserves the corresponding
327-
:class:`~concurrent.futures.interpreter.ExecutionFailed`
327+
:class:`~concurrent.interpreters.ExecutionFailed`
328328
instance instead.
329329

330330

@@ -379,6 +379,11 @@ in a REPL or a lambda should not be expected to work.
379379
default in absence of a *mp_context* parameter. This feature is incompatible
380380
with the "fork" start method.
381381

382+
.. note::
383+
Bugs have been reported when using the *max_tasks_per_child* feature that
384+
can result in the :class:`ProcessPoolExecutor` hanging in some
385+
circumstances. Follow its eventual resolution in :gh:`115634`.
386+
382387
.. versionchanged:: 3.3
383388
When one of the worker processes terminates abruptly, a
384389
:exc:`~concurrent.futures.process.BrokenProcessPool` error is now raised.
@@ -715,15 +720,6 @@ Exception classes
715720

716721
.. versionadded:: 3.14
717722

718-
.. exception:: ExecutionFailed
719-
720-
Raised from :class:`~concurrent.futures.InterpreterPoolExecutor` when
721-
the given initializer fails or from
722-
:meth:`~concurrent.futures.Executor.submit` when there's an uncaught
723-
exception from the submitted task.
724-
725-
.. versionadded:: 3.14
726-
727723
.. currentmodule:: concurrent.futures.process
728724

729725
.. exception:: BrokenProcessPool

Doc/library/inspect.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
273273
+-----------------+-------------------+---------------------------+
274274
| | ag_running | is the generator running? |
275275
+-----------------+-------------------+---------------------------+
276+
| | ag_suspended | is the generator |
277+
| | | suspended? |
278+
+-----------------+-------------------+---------------------------+
276279
| | ag_code | code |
277280
+-----------------+-------------------+---------------------------+
278281
| coroutine | __name__ | name |
@@ -286,6 +289,9 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
286289
+-----------------+-------------------+---------------------------+
287290
| | cr_running | is the coroutine running? |
288291
+-----------------+-------------------+---------------------------+
292+
| | cr_suspended | is the coroutine |
293+
| | | suspended? |
294+
+-----------------+-------------------+---------------------------+
289295
| | cr_code | code |
290296
+-----------------+-------------------+---------------------------+
291297
| | cr_origin | where coroutine was |
@@ -319,6 +325,18 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
319325

320326
Add ``__builtins__`` attribute to functions.
321327

328+
.. versionchanged:: 3.11
329+
330+
Add ``gi_suspended`` attribute to generators.
331+
332+
.. versionchanged:: 3.11
333+
334+
Add ``cr_suspended`` attribute to coroutines.
335+
336+
.. versionchanged:: 3.12
337+
338+
Add ``ag_suspended`` attribute to async generators.
339+
322340
.. versionchanged:: 3.14
323341

324342
Add ``f_generator`` attribute to frames.

Doc/library/linecache.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The :mod:`linecache` module defines the following functions:
3131
.. index:: triple: module; search; path
3232

3333
If *filename* indicates a frozen module (starting with ``'<frozen '``), the function
34-
will attepmt to get the real file name from ``module_globals['__file__']`` if
34+
will attempt to get the real file name from ``module_globals['__file__']`` if
3535
*module_globals* is not ``None``.
3636

3737
If a file named *filename* is not found, the function first checks

0 commit comments

Comments
 (0)