Skip to content

Commit 6832e03

Browse files
Merge branch 'main' into gh-152107
2 parents a6cf8a4 + 0a21a24 commit 6832e03

189 files changed

Lines changed: 7737 additions & 3087 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/workflows/reusable-emscripten.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,17 @@ jobs:
6363
run: python3 Platforms/emscripten configure-build-python -- --config-cache --with-pydebug
6464
- name: "Make build Python"
6565
run: python3 Platforms/emscripten make-build-python
66+
- name: "Display build info of the build Python"
67+
run: python3 Platforms/emscripten pythoninfo-build
6668
- name: "Make dependencies"
6769
run: >-
6870
python3 Platforms/emscripten make-dependencies
6971
${{ steps.emsdk-cache.outputs.cache-hit == 'true' && '--check-up-to-date' || '' }}
70-
- name: "Configure host Python"
72+
- name: "Configure host/Emscripten Python"
7173
run: python3 Platforms/emscripten configure-host --host-runner node -- --config-cache
72-
- name: "Make host Python"
74+
- name: "Make host/Emscripten Python"
7375
run: python3 Platforms/emscripten make-host
74-
- name: "Display build info"
75-
run: python3 Platforms/emscripten run --pythoninfo
76+
- name: "Display build info of the host/Emscripten Python"
77+
run: python3 Platforms/emscripten pythoninfo-host
7678
- name: "Test"
7779
run: python3 Platforms/emscripten run --test

.github/workflows/reusable-wasi.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
timeout-minutes: 60
1717
env:
1818
WASMTIME_VERSION: 38.0.3
19-
CROSS_BUILD_PYTHON: cross-build/build
2019
CROSS_BUILD_WASI: cross-build/wasm32-wasip1
2120
steps:
2221
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -54,14 +53,16 @@ jobs:
5453
run: python3 Platforms/WASI configure-build-python -- --config-cache --with-pydebug
5554
- name: "Make build Python"
5655
run: python3 Platforms/WASI make-build-python
57-
- name: "Configure host"
56+
- name: "Display build info of the build Python"
57+
run: python3 Platforms/WASI pythoninfo-build
58+
- name: "Configure host/WASI Python"
5859
# `--with-pydebug` inferred from configure-build-python
5960
run: python3 Platforms/WASI configure-host -- --config-cache
6061
env:
6162
WASI_SDK_PATH: ${{ steps.install-wasi-sdk.outputs.wasi-sdk-path }}
62-
- name: "Make host"
63+
- name: "Make host/WASI Python"
6364
run: python3 Platforms/WASI make-host
64-
- name: "Display build info"
65-
run: make --directory "${CROSS_BUILD_WASI}" pythoninfo
65+
- name: "Display build info of the host/WASI Python"
66+
run: python3 Platforms/WASI pythoninfo-host
6667
- name: "Test"
6768
run: make --directory "${CROSS_BUILD_WASI}" test

Doc/c-api/type.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ but need extra remarks for use as slots:
639639
in the following situations:
640640
641641
- The base is not variable-sized (its
642-
:c:member:`~PyTypeObject.tp_itemsize`).
642+
:c:member:`~PyTypeObject.tp_itemsize` is zero).
643643
- The requested :c:member:`PyType_Spec.basicsize` is positive,
644644
suggesting that the memory layout of the base class is known.
645645
- The requested :c:member:`PyType_Spec.basicsize` is zero,

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ Pending removal in Python 3.16
3333
* :mod:`asyncio` policy system is deprecated and will be removed in Python 3.16.
3434
In particular, the following classes and functions are deprecated:
3535

36-
* :class:`asyncio.AbstractEventLoopPolicy`
37-
* :class:`asyncio.DefaultEventLoopPolicy`
38-
* :class:`asyncio.WindowsSelectorEventLoopPolicy`
39-
* :class:`asyncio.WindowsProactorEventLoopPolicy`
40-
* :func:`asyncio.get_event_loop_policy`
41-
* :func:`asyncio.set_event_loop_policy`
36+
* :class:`!asyncio.AbstractEventLoopPolicy`
37+
* :class:`!asyncio.DefaultEventLoopPolicy`
38+
* :class:`!asyncio.WindowsSelectorEventLoopPolicy`
39+
* :class:`!asyncio.WindowsProactorEventLoopPolicy`
40+
* :func:`!asyncio.get_event_loop_policy`
41+
* :func:`!asyncio.set_event_loop_policy`
4242

4343
Users should use :func:`asyncio.run` or :class:`asyncio.Runner` with
4444
*loop_factory* to use the desired event loop implementation.

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,13 @@ Pending removal in Python 3.17
6868

6969
See :pep:`PEP 688 <688#current-options>` for more details.
7070
(Contributed by Shantanu Jain in :gh:`91896`.)
71+
72+
* :mod:`tkinter`:
73+
74+
- The :class:`!tkinter.Variable` methods :meth:`!trace_variable`,
75+
:meth:`!trace` (an alias of :meth:`!trace_variable`),
76+
:meth:`!trace_vdelete` and :meth:`!trace_vinfo`, deprecated since
77+
Python 3.14, are scheduled for removal in Python 3.17.
78+
Use :meth:`!trace_add`, :meth:`!trace_remove` and :meth:`!trace_info`
79+
instead.
80+
(Contributed by Serhiy Storchaka in :gh:`120220`.)

Doc/deprecations/soft-deprecations.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ There are no plans to remove :term:`soft deprecated` APIs.
1919

2020
(Contributed by Gregory P. Smith in :gh:`86519` and
2121
Hugo van Kemenade in :gh:`148100`.)
22+
23+
* Using ``'F'`` and ``'D'`` format type codes of the :mod:`struct` module
24+
now are :term:`soft deprecated` in favor of two-letter forms ``'Zf'``
25+
and ``'Zd'``.
26+
(Contributed by Sergey B Kirpichev in :gh:`121249`.)

Doc/library/asyncio-eventloop.rst

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ an event loop:
4848
running event loop.
4949

5050
If there is no running event loop set, the function will return
51-
the result of the ``get_event_loop_policy().get_event_loop()`` call.
51+
the loop set by :func:`set_event_loop`, or raise a :exc:`RuntimeError`
52+
if no loop has been set.
5253

53-
Because this function has rather complex behavior (especially
54-
when custom event loop policies are in use), using the
54+
Because this function has rather complex behavior, using the
5555
:func:`get_running_loop` function is preferred to :func:`get_event_loop`
5656
in coroutines and callbacks.
5757

@@ -62,13 +62,6 @@ an event loop:
6262
.. versionchanged:: 3.14
6363
Raises a :exc:`RuntimeError` if there is no current event loop.
6464

65-
.. note::
66-
67-
The :mod:`!asyncio` policy system is deprecated and will be removed
68-
in Python 3.16; from there on, this function will return the current
69-
running event loop if present else it will return the
70-
loop set by :func:`set_event_loop`.
71-
7265
.. function:: set_event_loop(loop)
7366

7467
Set *loop* as the current event loop for the current OS thread.
@@ -77,10 +70,6 @@ an event loop:
7770

7871
Create and return a new event loop object.
7972

80-
Note that the behaviour of :func:`get_event_loop`, :func:`set_event_loop`,
81-
and :func:`new_event_loop` functions can be altered by
82-
:ref:`setting a custom event loop policy <asyncio-policies>`.
83-
8473

8574
.. rubric:: Contents
8675

Doc/library/asyncio-llapi-index.rst

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ Obtaining the Event Loop
1919
- The **preferred** function to get the running event loop.
2020

2121
* - :func:`asyncio.get_event_loop`
22-
- Get an event loop instance (running or current via the current policy).
22+
- Get the running event loop or the event loop set for the current thread.
2323

2424
* - :func:`asyncio.set_event_loop`
25-
- Set the event loop as current via the current policy.
25+
- Set the event loop for the current thread.
2626

2727
* - :func:`asyncio.new_event_loop`
2828
- Create a new event loop.
@@ -497,27 +497,3 @@ Protocol classes can implement the following **callback methods**:
497497
- Called when the child process has exited. It can be called before
498498
:meth:`~SubprocessProtocol.pipe_data_received` and
499499
:meth:`~SubprocessProtocol.pipe_connection_lost` methods.
500-
501-
502-
Event Loop Policies
503-
===================
504-
505-
Policies is a low-level mechanism to alter the behavior of
506-
functions like :func:`asyncio.get_event_loop`. See also
507-
the main :ref:`policies section <asyncio-policies>` for more
508-
details.
509-
510-
511-
.. rubric:: Accessing Policies
512-
.. list-table::
513-
:widths: 50 50
514-
:class: full-width-table
515-
516-
* - :meth:`asyncio.get_event_loop_policy`
517-
- Return the current process-wide policy.
518-
519-
* - :meth:`asyncio.set_event_loop_policy`
520-
- Set a new process-wide policy.
521-
522-
* - :class:`AbstractEventLoopPolicy`
523-
- Base class for policy objects.

Doc/library/asyncio-policy.rst

Lines changed: 0 additions & 173 deletions
This file was deleted.

Doc/library/asyncio-runner.rst

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ Running an asyncio Program
4343
otherwise :func:`asyncio.new_event_loop` is used. The loop is closed at the end.
4444
This function should be used as a main entry point for asyncio programs,
4545
and should ideally only be called once. It is recommended to use
46-
*loop_factory* to configure the event loop instead of policies.
47-
Passing :class:`asyncio.EventLoop` allows running asyncio without the
48-
policy system.
46+
*loop_factory* to configure the event loop.
4947

5048
The executor is given a timeout duration of 5 minutes to shutdown.
5149
If the executor hasn't finished within that duration, a warning is
@@ -76,12 +74,6 @@ Running an asyncio Program
7674

7775
*coro* can be any awaitable object.
7876

79-
.. note::
80-
81-
The :mod:`!asyncio` policy system is deprecated and will be removed
82-
in Python 3.16; from there on, an explicit *loop_factory* is needed
83-
to configure the event loop.
84-
8577

8678
Runner context manager
8779
======================

0 commit comments

Comments
 (0)