Skip to content

Commit 69eb3c8

Browse files
authored
Merge branch 'main' into gh-125413-copy
2 parents c4bd4a8 + 9b7294c commit 69eb3c8

File tree

128 files changed

+3414
-725
lines changed

Some content is hidden

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

128 files changed

+3414
-725
lines changed

.github/workflows/jit.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ concurrency:
2828
jobs:
2929
interpreter:
3030
name: Interpreter (Debug)
31-
runs-on: ubuntu-latest
31+
runs-on: ubuntu-22.04
3232
timeout-minutes: 90
3333
steps:
3434
- uses: actions/checkout@v4
@@ -85,19 +85,19 @@ jobs:
8585
compiler: clang
8686
- target: x86_64-unknown-linux-gnu/gcc
8787
architecture: x86_64
88-
runner: ubuntu-latest
88+
runner: ubuntu-22.04
8989
compiler: gcc
9090
- target: x86_64-unknown-linux-gnu/clang
9191
architecture: x86_64
92-
runner: ubuntu-latest
92+
runner: ubuntu-22.04
9393
compiler: clang
9494
- target: aarch64-unknown-linux-gnu/gcc
9595
architecture: aarch64
96-
runner: ubuntu-latest
96+
runner: ubuntu-22.04
9797
compiler: gcc
9898
- target: aarch64-unknown-linux-gnu/clang
9999
architecture: aarch64
100-
runner: ubuntu-latest
100+
runner: ubuntu-22.04
101101
compiler: clang
102102
env:
103103
CC: ${{ matrix.compiler }}
@@ -169,7 +169,7 @@ jobs:
169169
jit-with-disabled-gil:
170170
name: Free-Threaded (Debug)
171171
needs: interpreter
172-
runs-on: ubuntu-latest
172+
runs-on: ubuntu-22.04
173173
strategy:
174174
matrix:
175175
llvm:

Doc/c-api/conversion.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ The following functions provide locale-independent string to number conversions.
105105
106106
If ``s`` represents a value that is too large to store in a float
107107
(for example, ``"1e500"`` is such a string on many platforms) then
108-
if ``overflow_exception`` is ``NULL`` return ``Py_HUGE_VAL`` (with
108+
if ``overflow_exception`` is ``NULL`` return ``Py_INFINITY`` (with
109109
an appropriate sign) and don't set any exception. Otherwise,
110110
``overflow_exception`` must point to a Python exception object;
111111
raise that exception and return ``-1.0``. In both cases, set

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,6 @@ Pending removal in Python 3.14
103103
if :ref:`named placeholders <sqlite3-placeholders>` are used and
104104
*parameters* is a sequence instead of a :class:`dict`.
105105

106-
* date and datetime adapter, date and timestamp converter:
107-
see the :mod:`sqlite3` documentation for suggested replacement recipes.
108-
109-
* :class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was
110-
deprecated in :pep:`626`
111-
since 3.10 and was planned to be removed in 3.12,
112-
but it only got a proper :exc:`DeprecationWarning` in 3.12.
113-
May be removed in 3.14.
114-
(Contributed by Nikita Sobolev in :gh:`101866`.)
115-
116106
* :mod:`typing`: :class:`!typing.ByteString`, deprecated since Python 3.9,
117107
now causes a :exc:`DeprecationWarning` to be emitted when it is used.
118108

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ Pending removal in Python 3.15
5959
but the C version allows any number of positional or keyword arguments,
6060
ignoring every argument.
6161

62+
* :mod:`types`:
63+
64+
* :class:`types.CodeType`: Accessing :attr:`~codeobject.co_lnotab` was
65+
deprecated in :pep:`626`
66+
since 3.10 and was planned to be removed in 3.12,
67+
but it only got a proper :exc:`DeprecationWarning` in 3.12.
68+
May be removed in 3.15.
69+
(Contributed by Nikita Sobolev in :gh:`101866`.)
70+
6271
* :mod:`typing`:
6372

6473
* The undocumented keyword argument syntax for creating

Doc/library/asyncio-eventloop.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ an event loop:
5959
instead of using these lower level functions to manually create and close an
6060
event loop.
6161

62-
.. deprecated:: 3.12
63-
Deprecation warning is emitted if there is no current event loop.
64-
In some future Python release this will become an error.
62+
.. versionchanged:: 3.14
63+
Raises a :exc:`RuntimeError` if there is no current event loop.
6564

6665
.. function:: set_event_loop(loop)
6766

Doc/library/asyncio-policy.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,9 @@ asyncio ships with the following built-in policies:
9797

9898
On Windows, :class:`ProactorEventLoop` is now used by default.
9999

100-
.. deprecated:: 3.12
101-
The :meth:`get_event_loop` method of the default asyncio policy now emits
102-
a :exc:`DeprecationWarning` if there is no current event loop set and it
103-
decides to create one.
104-
In some future Python release this will become an error.
100+
.. versionchanged:: 3.14
101+
The :meth:`get_event_loop` method of the default asyncio policy now
102+
raises a :exc:`RuntimeError` if there is no set event loop.
105103

106104

107105
.. class:: WindowsSelectorEventLoopPolicy

Doc/library/cmath.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,19 +221,21 @@ Classification functions
221221
``False`` otherwise.
222222

223223
Whether or not two values are considered close is determined according to
224-
given absolute and relative tolerances.
224+
given absolute and relative tolerances. If no errors occur, the result will
225+
be: ``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)``.
225226

226227
*rel_tol* is the relative tolerance -- it is the maximum allowed difference
227228
between *a* and *b*, relative to the larger absolute value of *a* or *b*.
228229
For example, to set a tolerance of 5%, pass ``rel_tol=0.05``. The default
229230
tolerance is ``1e-09``, which assures that the two values are the same
230-
within about 9 decimal digits. *rel_tol* must be greater than zero.
231-
232-
*abs_tol* is the minimum absolute tolerance -- useful for comparisons near
233-
zero. *abs_tol* must be at least zero.
234-
235-
If no errors occur, the result will be:
236-
``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)``.
231+
within about 9 decimal digits. *rel_tol* must be nonnegative and less
232+
than ``1.0``.
233+
234+
*abs_tol* is the absolute tolerance; it defaults to ``0.0`` and it must be
235+
nonnegative. When comparing ``x`` to ``0.0``, ``isclose(x, 0)`` is computed
236+
as ``abs(x) <= rel_tol * abs(x)``, which is ``False`` for any ``x`` and
237+
rel_tol less than ``1.0``. So add an appropriate positive abs_tol argument
238+
to the call.
237239

238240
The IEEE 754 special values of ``NaN``, ``inf``, and ``-inf`` will be
239241
handled according to IEEE rules. Specifically, ``NaN`` is not considered

Doc/library/dis.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,7 +1562,7 @@ iterations of the loop.
15621562

15631563
.. opcode:: MAKE_FUNCTION
15641564

1565-
Pushes a new function object on the stack built from the code object at ``STACK[1]``.
1565+
Pushes a new function object on the stack built from the code object at ``STACK[-1]``.
15661566

15671567
.. versionchanged:: 3.10
15681568
Flag value ``0x04`` is a tuple of strings instead of dictionary
@@ -1647,7 +1647,7 @@ iterations of the loop.
16471647

16481648
.. versionadded:: 3.13
16491649

1650-
.. opcode:: FORMAT_SPEC
1650+
.. opcode:: FORMAT_WITH_SPEC
16511651

16521652
Formats the given value with the given format spec::
16531653

Doc/library/enum.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ using function-call syntax::
4444
... BLUE = 3
4545

4646
>>> # functional syntax
47-
>>> Color = Enum('Color', ['RED', 'GREEN', 'BLUE'])
47+
>>> Color = Enum('Color', [('RED', 1), ('GREEN', 2), ('BLUE', 3)])
4848

4949
Even though we can use :keyword:`class` syntax to create Enums, Enums
5050
are not normal Python classes. See

Doc/library/functions.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,14 +1205,19 @@ are always available. They are listed here in alphabetical order.
12051205
unchanged from previous versions.
12061206

12071207

1208-
.. function:: map(function, iterable, *iterables)
1208+
.. function:: map(function, iterable, /, *iterables, strict=False)
12091209

12101210
Return an iterator that applies *function* to every item of *iterable*,
12111211
yielding the results. If additional *iterables* arguments are passed,
12121212
*function* must take that many arguments and is applied to the items from all
12131213
iterables in parallel. With multiple iterables, the iterator stops when the
1214-
shortest iterable is exhausted. For cases where the function inputs are
1215-
already arranged into argument tuples, see :func:`itertools.starmap`\.
1214+
shortest iterable is exhausted. If *strict* is ``True`` and one of the
1215+
iterables is exhausted before the others, a :exc:`ValueError` is raised. For
1216+
cases where the function inputs are already arranged into argument tuples,
1217+
see :func:`itertools.starmap`.
1218+
1219+
.. versionchanged:: 3.14
1220+
Added the *strict* parameter.
12161221

12171222

12181223
.. function:: max(iterable, *, key=None)

0 commit comments

Comments
 (0)