Skip to content

Commit 9f402ae

Browse files
Merge branch 'main' into patch-1
2 parents 4aec582 + cffcee4 commit 9f402ae

114 files changed

Lines changed: 2388 additions & 635 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/build.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -361,23 +361,14 @@ jobs:
361361
needs: build-context
362362
if: needs.build-context.outputs.run-ios == 'true'
363363
timeout-minutes: 60
364-
runs-on: macos-14
364+
runs-on: macos-26
365365
steps:
366366
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
367367
with:
368368
persist-credentials: false
369369

370-
# GitHub recommends explicitly selecting the desired Xcode version:
371-
# https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140
372-
# This became a necessity as a result of
373-
# https://github.com/actions/runner-images/issues/12541 and
374-
# https://github.com/actions/runner-images/issues/12751.
375-
- name: Select Xcode version
376-
run: |
377-
sudo xcode-select --switch /Applications/Xcode_15.4.app
378-
379370
- name: Build and test
380-
run: python3 Platforms/Apple ci iOS --fast-ci --simulator 'iPhone SE (3rd generation),OS=17.5'
371+
run: python3 Platforms/Apple ci iOS --fast-ci
381372

382373
build-emscripten:
383374
name: 'Emscripten'

.github/workflows/reusable-emscripten.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,5 @@ jobs:
7777
run: python3 Platforms/emscripten pythoninfo-host
7878
- name: "Test"
7979
run: python3 Platforms/emscripten run --test
80+
- name: "Test Repl"
81+
run: Platforms/emscripten/browser_test/run_test.sh

.github/workflows/reusable-san.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ jobs:
3939
run: |
4040
sudo ./.github/workflows/posix-deps-apt.sh
4141
# On ubuntu-26.04 image, clang is clang-21 by default
42+
# NOTE: when bumping to a new version of clang,
43+
# please update the versions in `Tools/pixi-packages/variants.yaml` too.
4244
echo "CC=clang" >> "$GITHUB_ENV"
4345
echo "CXX=clang++" >> "$GITHUB_ENV"
4446
- name: TSan option setup

Doc/library/asyncio-eventloop.rst

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,9 @@ Working with pipes
12631263
*protocol_factory* must be a callable returning an
12641264
:ref:`asyncio protocol <asyncio-protocol>` implementation.
12651265

1266-
*pipe* is a :term:`file-like object <file object>`.
1266+
*pipe* is a :term:`file-like object <file object>`. See
1267+
:ref:`Supported pipe objects <asyncio-pipe-objects>` for the objects
1268+
supported as *pipe*.
12671269

12681270
Return pair ``(transport, protocol)``, where *transport* supports
12691271
the :class:`ReadTransport` interface and *protocol* is an object
@@ -1280,7 +1282,9 @@ Working with pipes
12801282
*protocol_factory* must be a callable returning an
12811283
:ref:`asyncio protocol <asyncio-protocol>` implementation.
12821284

1283-
*pipe* is :term:`file-like object <file object>`.
1285+
*pipe* is a :term:`file-like object <file object>`. See
1286+
:ref:`Supported pipe objects <asyncio-pipe-objects>` for the objects
1287+
supported as *pipe*.
12841288

12851289
Return pair ``(transport, protocol)``, where *transport* supports
12861290
:class:`WriteTransport` interface and *protocol* is an object
@@ -1289,6 +1293,33 @@ Working with pipes
12891293
With :class:`SelectorEventLoop` event loop, the *pipe* is set to
12901294
non-blocking mode.
12911295

1296+
.. _asyncio-pipe-objects:
1297+
1298+
.. rubric:: Supported pipe objects
1299+
1300+
These methods only work with objects the operating system can poll for
1301+
readiness or perform overlapped I/O on. Regular files on disk are **not**
1302+
supported on any platform. There is no asynchronous file I/O in asyncio;
1303+
use :meth:`loop.run_in_executor` to read and write regular files without
1304+
blocking the event loop.
1305+
1306+
On Unix, with :class:`SelectorEventLoop`, *pipe* must wrap one of the
1307+
following:
1308+
1309+
* a pipe, such as an end of an :func:`os.pipe` pair or a FIFO created with
1310+
:func:`os.mkfifo`;
1311+
* a socket;
1312+
* a character device, such as a terminal.
1313+
1314+
On Windows, where only :class:`ProactorEventLoop` implements these methods,
1315+
*pipe* must wrap a handle opened for overlapped I/O (that is, created with the
1316+
``FILE_FLAG_OVERLAPPED`` flag), since the handle has to be associated with an
1317+
I/O completion port. Handles that were not opened for overlapped I/O are
1318+
rejected. In particular, the standard streams (:data:`sys.stdin`,
1319+
:data:`sys.stdout` and :data:`sys.stderr`), console handles, and the pipes
1320+
created by :func:`os.pipe` are **not** opened for overlapped I/O and therefore
1321+
cannot be used with these methods.
1322+
12921323
.. note::
12931324

12941325
:class:`SelectorEventLoop` does not support the above methods on

Doc/library/asyncio-platforms.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ All Platforms
1919
* :meth:`loop.add_reader` and :meth:`loop.add_writer`
2020
cannot be used to monitor file I/O.
2121

22+
* :meth:`loop.connect_read_pipe` and :meth:`loop.connect_write_pipe`
23+
cannot be used with regular files. See :ref:`Supported pipe objects
24+
<asyncio-pipe-objects>` for the objects that are accepted on each
25+
platform.
26+
2227

2328
Windows
2429
=======
@@ -62,6 +67,10 @@ All event loops on Windows do not support the following methods:
6267
* The :meth:`loop.add_reader` and :meth:`loop.add_writer`
6368
methods are not supported.
6469

70+
* :meth:`loop.connect_read_pipe` and :meth:`loop.connect_write_pipe` only
71+
accept a handle opened for overlapped I/O.
72+
See :ref:`Supported pipe objects <asyncio-pipe-objects>` for which objects are supported.
73+
6574
The resolution of the monotonic clock on Windows is usually around 15.6
6675
milliseconds. The best resolution is 0.5 milliseconds. The resolution depends on the
6776
hardware (availability of `HPET

Doc/library/asyncio-task.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ and reliable way to wait for all tasks in the group to finish.
377377

378378
* call it from the task group body based on some condition or event
379379
* pass the task group instance to child tasks via :meth:`create_task`, allowing a child
380-
task to conditionally cancel the entire entire group
380+
task to conditionally cancel the entire group
381381
* pass the task group instance or bound :meth:`cancel` method to some other task *before*
382382
opening the task group, allowing remote cancellation
383383

Doc/library/calendar.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
365365

366366
For simple text calendars this module provides the following functions.
367367

368-
.. function:: setfirstweekday(weekday)
368+
.. function:: setfirstweekday(firstweekday)
369369

370370
Sets the weekday (``0`` is Monday, ``6`` is Sunday) to start each week. The
371371
values :const:`MONDAY`, :const:`TUESDAY`, :const:`WEDNESDAY`, :const:`THURSDAY`,

Doc/library/curses.ascii.rst

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,18 @@ C library:
176176

177177
Checks for a non-ASCII character (ordinal values 0x80 and above).
178178

179-
These functions accept either integers or single-character strings; when the argument is a
180-
string, it is first converted using the built-in function :func:`ord`.
179+
These functions accept an integer, a single-character string, or a
180+
:class:`curses.complexchar`.
181+
A string is converted using the built-in function :func:`ord`, and a
182+
complexchar by the code of its single character; a complexchar that holds
183+
combining characters is not a single character and matches no class.
181184

182185
Note that all these functions check ordinal bit values derived from the
183186
character of the string you pass in; they do not actually know anything about
184187
the host machine's character encoding.
185188

186-
The following two functions take either a single-character string or integer
187-
byte value; they return a value of the same type.
189+
The following three functions take either a single-character string or an
190+
integer byte value; they return a value of the same type.
188191

189192

190193
.. function:: ascii(c)
@@ -194,16 +197,22 @@ byte value; they return a value of the same type.
194197

195198
.. function:: ctrl(c)
196199

197-
Return the control character corresponding to the given character (the character
198-
bit value is bitwise-anded with 0x1f).
200+
Return the control character corresponding to the given ASCII character (the
201+
character bit value is bitwise-anded with 0x1f). A non-ASCII character has no
202+
control character and is returned unchanged.
203+
204+
.. versionchanged:: next
205+
A non-ASCII argument is now returned unchanged instead of masked to a
206+
control character.
199207

200208

201209
.. function:: alt(c)
202210

203211
Return the 8-bit character corresponding to the given ASCII character (the
204212
character bit value is bitwise-ored with 0x80).
205213

206-
The following function takes either a single-character string or integer value;
214+
The following function takes a single-character string, an integer value, or a
215+
:class:`curses.complexchar`;
207216
it returns a string.
208217

209218

0 commit comments

Comments
 (0)