Skip to content

Commit cedc2c3

Browse files
authored
Merge branch 'main' into json_ft
2 parents b95c07f + 96b7a2e commit cedc2c3

File tree

250 files changed

+10863
-3865
lines changed

Some content is hidden

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

250 files changed

+10863
-3865
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,10 @@ jobs:
270270
fail-fast: false
271271
matrix:
272272
os: [ubuntu-24.04]
273-
openssl_ver: [3.0.17, 3.2.5, 3.3.4, 3.4.2, 3.5.2]
273+
# Keep 1.1.1w in our list despite it being upstream EOL and otherwise
274+
# unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
275+
# supported by important vendors such as AWS-LC.
276+
openssl_ver: [1.1.1w, 3.0.17, 3.2.5, 3.3.4, 3.4.2, 3.5.2]
274277
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
275278
env:
276279
OPENSSL_VER: ${{ matrix.openssl_ver }}

.github/workflows/tail-call.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ jobs:
114114
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
115115
brew install llvm@${{ matrix.llvm }}
116116
export SDKROOT="$(xcrun --show-sdk-path)"
117-
export PATH="/usr/local/opt/llvm/bin:$PATH"
118-
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
117+
export PATH="/usr/local/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
118+
export PATH="/opt/homebrew/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
119119
CC=clang-20 ./configure --with-tail-call-interp
120120
make all --jobs 4
121121
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ iOS/testbed/Python.xcframework/ios-*/lib
8080
iOS/testbed/Python.xcframework/ios-*/Python.framework
8181
iOS/testbed/iOSTestbed.xcodeproj/project.xcworkspace
8282
iOS/testbed/iOSTestbed.xcodeproj/xcuserdata
83-
iOS/testbed/iOSTestbed.xcodeproj/xcshareddata
8483
Mac/Makefile
8584
Mac/PythonLauncher/Info.plist
8685
Mac/PythonLauncher/Makefile

Doc/c-api/init_config.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,6 +2258,7 @@ If a ``._pth`` file is present:
22582258
* Set :c:member:`~PyConfig.isolated` to ``1``.
22592259
* Set :c:member:`~PyConfig.use_environment` to ``0``.
22602260
* Set :c:member:`~PyConfig.site_import` to ``0``.
2261+
* Set :c:member:`~PyConfig.user_site_directory` to ``0`` (since 3.15).
22612262
* Set :c:member:`~PyConfig.safe_path` to ``1``.
22622263
22632264
If :c:member:`~PyConfig.home` is not set and a ``pyvenv.cfg`` file is present in
@@ -2278,6 +2279,12 @@ The ``__PYVENV_LAUNCHER__`` environment variable is used to set
22782279
therefore affected by :option:`-S`.
22792280
22802281
2282+
.. versionchanged:: 3.15
2283+
2284+
:c:member:`~PyConfig.user_site_directory` is now set to ``0`` when a
2285+
``._pth`` file is present.
2286+
2287+
22812288
Py_GetArgcArgv()
22822289
================
22832290

Doc/extending/extending.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,14 @@ references to all its items, so when item 1 is replaced, it has to dispose of
10841084
the original item 1. Now let's suppose the original item 1 was an instance of a
10851085
user-defined class, and let's further suppose that the class defined a
10861086
:meth:`!__del__` method. If this class instance has a reference count of 1,
1087-
disposing of it will call its :meth:`!__del__` method.
1087+
disposing of it will call its :meth:`!__del__` method. Internally,
1088+
:c:func:`PyList_SetItem` calls :c:func:`Py_DECREF` on the replaced item,
1089+
which invokes replaced item's corresponding
1090+
:c:member:`~PyTypeObject.tp_dealloc` function. During
1091+
deallocation, :c:member:`~PyTypeObject.tp_dealloc` calls
1092+
:c:member:`~PyTypeObject.tp_finalize`, which is mapped to the
1093+
:meth:`!__del__` method for class instances (see :pep:`442`). This entire
1094+
sequence happens synchronously within the :c:func:`PyList_SetItem` call.
10881095

10891096
Since it is written in Python, the :meth:`!__del__` method can execute arbitrary
10901097
Python code. Could it perhaps do something to invalidate the reference to

Doc/howto/remote_debugging.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -374,13 +374,13 @@ To locate a thread:
374374
reliable thread to target.
375375

376376
3. Optionally, use the offset ``interpreter_state.threads_head`` to iterate
377-
through the linked list of all thread states. Each ``PyThreadState`` structure
378-
contains a ``native_thread_id`` field, which may be compared to a target thread
379-
ID to find a specific thread.
377+
through the linked list of all thread states. Each ``PyThreadState``
378+
structure contains a ``native_thread_id`` field, which may be compared to
379+
a target thread ID to find a specific thread.
380380

381-
1. Once a valid ``PyThreadState`` has been found, its address can be used in
382-
later steps of the protocol, such as writing debugger control fields and
383-
scheduling execution.
381+
4. Once a valid ``PyThreadState`` has been found, its address can be used in
382+
later steps of the protocol, such as writing debugger control fields and
383+
scheduling execution.
384384

385385
The following is an example implementation that locates the main thread state::
386386

@@ -454,15 +454,15 @@ its fields are defined by the ``_Py_DebugOffsets`` structure and include the
454454
following:
455455

456456
- ``debugger_script_path``: A fixed-size buffer that holds the full path to a
457-
Python source file (``.py``). This file must be accessible and readable by
458-
the target process when execution is triggered.
457+
Python source file (``.py``). This file must be accessible and readable by
458+
the target process when execution is triggered.
459459

460460
- ``debugger_pending_call``: An integer flag. Setting this to ``1`` tells the
461-
interpreter that a script is ready to be executed.
461+
interpreter that a script is ready to be executed.
462462

463463
- ``eval_breaker``: A field checked by the interpreter during execution.
464-
Setting bit 5 (``_PY_EVAL_PLEASE_STOP_BIT``, value ``1U << 5``) in this
465-
field causes the interpreter to pause and check for debugger activity.
464+
Setting bit 5 (``_PY_EVAL_PLEASE_STOP_BIT``, value ``1U << 5``) in this
465+
field causes the interpreter to pause and check for debugger activity.
466466

467467
To complete the injection, the debugger must perform the following steps:
468468

Doc/library/_thread.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,16 @@ This module defines the following constants and functions:
120120
Its value may be used to uniquely identify this particular thread system-wide
121121
(until the thread terminates, after which the value may be recycled by the OS).
122122

123-
.. availability:: Windows, FreeBSD, Linux, macOS, OpenBSD, NetBSD, AIX, DragonFlyBSD, GNU/kFreeBSD.
123+
.. availability:: Windows, FreeBSD, Linux, macOS, OpenBSD, NetBSD, AIX, DragonFlyBSD, GNU/kFreeBSD, Solaris.
124124

125125
.. versionadded:: 3.8
126126

127127
.. versionchanged:: 3.13
128128
Added support for GNU/kFreeBSD.
129129

130+
.. versionchanged:: next
131+
Added support for Solaris.
132+
130133

131134
.. function:: stack_size([size])
132135

Doc/library/asyncio-eventloop.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,12 @@ clocks to track time.
304304
custom :class:`contextvars.Context` for the *callback* to run in.
305305
The current context is used when no *context* is provided.
306306

307+
.. note::
308+
309+
For performance, callbacks scheduled with :meth:`loop.call_later`
310+
may run up to one clock-resolution early (see
311+
``time.get_clock_info('monotonic').resolution``).
312+
307313
.. versionchanged:: 3.7
308314
The *context* keyword-only parameter was added. See :pep:`567`
309315
for more details.
@@ -324,6 +330,12 @@ clocks to track time.
324330
An instance of :class:`asyncio.TimerHandle` is returned which can
325331
be used to cancel the callback.
326332

333+
.. note::
334+
335+
For performance, callbacks scheduled with :meth:`loop.call_at`
336+
may run up to one clock-resolution early (see
337+
``time.get_clock_info('monotonic').resolution``).
338+
327339
.. versionchanged:: 3.7
328340
The *context* keyword-only parameter was added. See :pep:`567`
329341
for more details.

Doc/library/asyncio-protocol.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,11 +390,11 @@ Subprocess Transports
390390
Return the transport for the communication pipe corresponding to the
391391
integer file descriptor *fd*:
392392

393-
* ``0``: readable streaming transport of the standard input (*stdin*),
393+
* ``0``: writable streaming transport of the standard input (*stdin*),
394394
or :const:`None` if the subprocess was not created with ``stdin=PIPE``
395-
* ``1``: writable streaming transport of the standard output (*stdout*),
395+
* ``1``: readable streaming transport of the standard output (*stdout*),
396396
or :const:`None` if the subprocess was not created with ``stdout=PIPE``
397-
* ``2``: writable streaming transport of the standard error (*stderr*),
397+
* ``2``: readable streaming transport of the standard error (*stderr*),
398398
or :const:`None` if the subprocess was not created with ``stderr=PIPE``
399399
* other *fd*: :const:`None`
400400

Doc/library/asyncio-stream.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,9 @@ StreamWriter
321321
stream.write(data)
322322
await stream.drain()
323323

324+
.. note::
325+
The *data* buffer should be a C contiguous one-dimensional :term:`bytes-like object <bytes-like object>`.
326+
324327
.. method:: writelines(data)
325328

326329
The method writes a list (or any iterable) of bytes to the underlying socket

0 commit comments

Comments
 (0)