Skip to content

Commit 4604f31

Browse files
authored
Merge branch '3.15' into backport-9232c21-3.15
2 parents c73527f + 1de261a commit 4604f31

176 files changed

Lines changed: 4460 additions & 1054 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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,12 @@ Lib/test/test_unittest/testmock/ @cjw296
624624
# Weakref
625625
**/*weakref* @kumaraditya303
626626

627+
# Zlib
628+
Doc/library/zlib.rst @StanFromIreland
629+
Lib/compression/zlib.py @StanFromIreland
630+
Lib/test/test_zlib.py @StanFromIreland
631+
Modules/_zlibmodule.c @StanFromIreland
632+
627633
# Zipfile.Path
628634
Lib/test/test_zipfile/_path/ @jaraco
629635
Lib/zipfile/_path/ @jaraco

‎Doc/Makefile‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,13 @@ venv:
189189
.PHONY: lock
190190
lock:
191191
# Dependencies have a 14 day cooldown period to mitigate supply chain attacks,
192-
# except for sphinx_linklint and python-docs-theme, which are maintained by
192+
# except for blurb, python-docs-theme and sphinx_linklint, which are maintained by
193193
# core team members.
194194
$(UV) pip compile requirements.txt \
195195
--upgrade --exclude-newer P14D \
196-
--exclude-newer-package sphinx_linklint=PT0S \
196+
--exclude-newer-package blurb=PT0S \
197197
--exclude-newer-package python-docs-theme=PT0S \
198+
--exclude-newer-package sphinx_linklint=PT0S \
198199
--no-cache --output-file $(REQUIREMENTS) \
199200
--python-version 3.12 --universal \
200201
--custom-compile-command="make lock"

‎Doc/_static/tachyon-example-flamegraph.html‎

Lines changed: 732 additions & 281 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Doc/_static/tachyon-example-heatmap.html‎

Lines changed: 313 additions & 97 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Doc/c-api/slice.rst‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Slice Objects
5353
length *length*, and store the length of the slice in *slicelength*. Out
5454
of bounds indices are clipped in a manner consistent with the handling of
5555
normal slices.
56+
*length* must not be negative.
5657
5758
Return ``0`` on success and ``-1`` on error with an exception set.
5859
@@ -108,6 +109,10 @@ Slice Objects
108109
Out of bounds indices are clipped in a manner consistent with the handling
109110
of normal slices.
110111
112+
*length* must not be negative.
113+
*step* must not be zero and must not be less than ``-PY_SSIZE_T_MAX``,
114+
as guaranteed by :c:func:`PySlice_Unpack`.
115+
111116
Return the length of the slice. Always successful. Doesn't call Python
112117
code.
113118

‎Doc/howto/abi3t-migration.rst‎

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,22 @@ or :c:member:`PyTypeObject.tp_itemsize`), it cannot be ported to
169169
``abi3t`` 3.15.
170170

171171

172+
.. _abi3t-migration-build:
173+
172174
Setting up the build
173175
====================
174176

175-
If you use a build tool (such as setuptools, meson-python, scikit-build-core),
176-
search its documentation for a way to select ``abi3t``.
177-
At the time of writing, not all of them have this; but if your tool does,
178-
use it.
179-
You may want to verify that it set the right flag by temporarily adding the
177+
If you use a build tool, search its documentation for "``abi3t``", and follow
178+
any instructions to select the ABI.
179+
For reference, here are direct links for several popular build tools:
180+
181+
- `meson-python
182+
<https://mesonbuild.com/meson-python/how-to-guides/limited-api.html#the-abi3t-stable-abi>`__
183+
- `scikit-build-core
184+
<https://scikit-build-core.readthedocs.io/en/stable/configuration/#customizing-the-output-wheel>`__
185+
- `Maturin <https://www.maturin.rs/bindings#py_limited_apiabi3>`__
186+
187+
You may want to verify that the tool set the right flag by temporarily adding the
180188
following just after ``#include <Python.h>``::
181189

182190
#if Py_TARGET_ABI3T+0 <= 0x30f0000
@@ -185,6 +193,13 @@ following just after ``#include <Python.h>``::
185193

186194
This should result in a different error than "``abi3t`` define is not set".
187195

196+
.. seealso::
197+
198+
`Building and distributing abi3t extensions
199+
<https://py-free-threading.github.io/abi3t/>`__:
200+
Build configuration and wheel testing examples in the community-maintained
201+
Python Free-Threading Guide.
202+
188203
.. note::
189204

190205
If your build tool doesn't support ``abi3t`` yet, set the following macro

‎Doc/library/os.rst‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4553,16 +4553,17 @@ Naturally, they are all only available on Linux.
45534553
- :const:`time.CLOCK_BOOTTIME` (Since Linux 3.15 for timerfd_create)
45544554

45554555
If *clockid* is :const:`time.CLOCK_REALTIME`, a settable system-wide
4556-
real-time clock is used. If system clock is changed, timer setting need
4557-
to be updated. To cancel timer when system clock is changed, see
4556+
real-time clock is used. If the system clock is changed, the timer setting
4557+
needs to be updated. To cancel the timer when the system clock is changed, see
45584558
:const:`TFD_TIMER_CANCEL_ON_SET`.
45594559

45604560
If *clockid* is :const:`time.CLOCK_MONOTONIC`, a non-settable monotonically
45614561
increasing clock is used. Even if the system clock is changed, the timer
45624562
setting will not be affected.
45634563

4564-
If *clockid* is :const:`time.CLOCK_BOOTTIME`, same as :const:`time.CLOCK_MONOTONIC`
4565-
except it includes any time that the system is suspended.
4564+
If *clockid* is :const:`time.CLOCK_BOOTTIME`, it is the same as
4565+
:const:`time.CLOCK_MONOTONIC` except it includes any time that the system
4566+
is suspended.
45664567

45674568
The file descriptor's behaviour can be modified by specifying a *flags* value.
45684569
Any of the following variables may be used, combined using bitwise OR
@@ -4573,8 +4574,8 @@ Naturally, they are all only available on Linux.
45734574

45744575
If :const:`TFD_NONBLOCK` is not set as a flag, :func:`read` blocks until
45754576
the timer expires. If it is set as a flag, :func:`read` doesn't block, but
4576-
If there hasn't been an expiration since the last call to read,
4577-
:func:`read` raises :class:`OSError` with ``errno`` is set to
4577+
if there hasn't been an expiration since the last call to read,
4578+
:func:`read` raises :class:`OSError` with ``errno`` set to
45784579
:const:`errno.EAGAIN`.
45794580

45804581
:const:`TFD_CLOEXEC` is always set by Python automatically.
@@ -4589,7 +4590,7 @@ Naturally, they are all only available on Linux.
45894590
.. versionadded:: 3.13
45904591

45914592

4592-
.. function:: timerfd_settime(fd, /, *, flags=flags, initial=0.0, interval=0.0)
4593+
.. function:: timerfd_settime(fd, /, *, flags=0, initial=0.0, interval=0.0)
45934594

45944595
Alter a timer file descriptor's internal timer.
45954596
This function operates the same interval timer as :func:`timerfd_settime_ns`.
@@ -4604,12 +4605,11 @@ Naturally, they are all only available on Linux.
46044605
- :const:`TFD_TIMER_CANCEL_ON_SET`
46054606

46064607
The timer is disabled by setting *initial* to zero (``0``).
4607-
If *initial* is equal to or greater than zero, the timer is enabled.
4608+
If *initial* is greater than zero, the timer is enabled.
46084609
If *initial* is less than zero, it raises an :class:`OSError` exception
4609-
with ``errno`` set to :const:`errno.EINVAL`
4610+
with ``errno`` set to :const:`errno.EINVAL`.
46104611

46114612
By default the timer will fire when *initial* seconds have elapsed.
4612-
(If *initial* is zero, timer will fire immediately.)
46134613

46144614
However, if the :const:`TFD_TIMER_ABSTIME` flag is set,
46154615
the timer will fire when the timer's clock
@@ -4620,13 +4620,13 @@ Naturally, they are all only available on Linux.
46204620
If *interval* is greater than zero, the timer fires every time *interval*
46214621
seconds have elapsed since the previous expiration.
46224622
If *interval* is less than zero, it raises :class:`OSError` with ``errno``
4623-
set to :const:`errno.EINVAL`
4623+
set to :const:`errno.EINVAL`.
46244624

46254625
If the :const:`TFD_TIMER_CANCEL_ON_SET` flag is set along with
46264626
:const:`TFD_TIMER_ABSTIME` and the clock for this timer is
46274627
:const:`time.CLOCK_REALTIME`, the timer is marked as cancelable if the
46284628
real-time clock is changed discontinuously. Reading the descriptor is
4629-
aborted with the error ECANCELED.
4629+
aborted with the error :const:`errno.ECANCELED`.
46304630

46314631
Linux manages system clock as UTC. A daylight-savings time transition is
46324632
done by changing time offset only and doesn't cause discontinuous system

0 commit comments

Comments
 (0)