Skip to content

Commit ea86105

Browse files
Merge branch 'main' into fix-jit-make
2 parents 84b3cca + 406dc71 commit ea86105

Some content is hidden

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

68 files changed

+1176
-713
lines changed

Doc/c-api/complex.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,36 @@ pointers. This is consistent throughout the API.
4343
Return the sum of two complex numbers, using the C :c:type:`Py_complex`
4444
representation.
4545
46+
.. deprecated:: 3.15
47+
This function is :term:`soft deprecated`.
48+
4649
4750
.. c:function:: Py_complex _Py_c_diff(Py_complex left, Py_complex right)
4851
4952
Return the difference between two complex numbers, using the C
5053
:c:type:`Py_complex` representation.
5154
55+
.. deprecated:: 3.15
56+
This function is :term:`soft deprecated`.
57+
5258
5359
.. c:function:: Py_complex _Py_c_neg(Py_complex num)
5460
5561
Return the negation of the complex number *num*, using the C
5662
:c:type:`Py_complex` representation.
5763
64+
.. deprecated:: 3.15
65+
This function is :term:`soft deprecated`.
66+
5867
5968
.. c:function:: Py_complex _Py_c_prod(Py_complex left, Py_complex right)
6069
6170
Return the product of two complex numbers, using the C :c:type:`Py_complex`
6271
representation.
6372
73+
.. deprecated:: 3.15
74+
This function is :term:`soft deprecated`.
75+
6476
6577
.. c:function:: Py_complex _Py_c_quot(Py_complex dividend, Py_complex divisor)
6678
@@ -70,6 +82,9 @@ pointers. This is consistent throughout the API.
7082
If *divisor* is null, this method returns zero and sets
7183
:c:data:`errno` to :c:macro:`!EDOM`.
7284
85+
.. deprecated:: 3.15
86+
This function is :term:`soft deprecated`.
87+
7388
7489
.. c:function:: Py_complex _Py_c_pow(Py_complex num, Py_complex exp)
7590
@@ -81,6 +96,19 @@ pointers. This is consistent throughout the API.
8196
8297
Set :c:data:`errno` to :c:macro:`!ERANGE` on overflows.
8398
99+
.. deprecated:: 3.15
100+
This function is :term:`soft deprecated`.
101+
102+
103+
.. c:function:: double _Py_c_abs(Py_complex num)
104+
105+
Return the absolute value of the complex number *num*.
106+
107+
Set :c:data:`errno` to :c:macro:`!ERANGE` on overflows.
108+
109+
.. deprecated:: 3.15
110+
This function is :term:`soft deprecated`.
111+
84112
85113
Complex Numbers as Python Objects
86114
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Doc/c-api/object.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ Object Protocol
197197
in favour of using :c:func:`PyObject_DelAttr`, but there are currently no
198198
plans to remove it.
199199
200-
The function must not be called with ``NULL`` *v* and an an exception set.
200+
The function must not be called with a ``NULL`` *v* and an exception set.
201201
This case can arise from forgetting ``NULL`` checks and would delete the
202202
attribute.
203203
@@ -214,7 +214,7 @@ Object Protocol
214214
If *v* is ``NULL``, the attribute is deleted, but this feature is
215215
deprecated in favour of using :c:func:`PyObject_DelAttrString`.
216216
217-
The function must not be called with ``NULL`` *v* and an an exception set.
217+
The function must not be called with a ``NULL`` *v* and an exception set.
218218
This case can arise from forgetting ``NULL`` checks and would delete the
219219
attribute.
220220

Doc/library/tulip_coro.dia

-4.35 KB
Binary file not shown.

Doc/library/tulip_coro.png

-35.9 KB
Binary file not shown.

Doc/library/urllib.request.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ The following attribute and methods should only be used by classes derived from
837837
1. a :class:`Request` object,
838838
#. a file-like object with the HTTP error body,
839839
#. the three-digit code of the error, as a string,
840-
#. the user-visible explanation of the code, as as string, and
840+
#. the user-visible explanation of the code, as a string, and
841841
#. the headers of the error, as a mapping object.
842842

843843
Return values and exceptions raised should be the same as those of

Doc/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ sphinx~=8.2.0
1111

1212
blurb
1313

14-
sphinxext-opengraph~=0.10.0
14+
sphinxext-opengraph~=0.11.0
1515
sphinx-notfound-page~=1.0.0
1616

1717
# The theme used by the documentation is stored separately, so we need

Doc/whatsnew/3.15.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ Other language changes
183183
compatibility between versions of Python, ensure that an explicit ``encoding``
184184
argument is always provided. The :ref:`opt-in encoding warning <io-encoding-warning>`
185185
can be used to identify code that may be affected by this change.
186-
The special special ``encoding='locale'`` argument uses the current locale
186+
The special ``encoding='locale'`` argument uses the current locale
187187
encoding, and has been supported since Python 3.10.
188188

189189
To retain the previous behaviour, Python's UTF-8 mode may be disabled with
@@ -477,6 +477,15 @@ typing
477477
or ``TD = TypedDict("TD", {})`` instead.
478478
(Contributed by Bénédikt Tran in :gh:`133823`.)
479479

480+
* Code like ``class ExtraTypeVars(P1[S], Protocol[T, T2]): ...`` now raises
481+
a :exc:`TypeError`, because ``S`` is not listed in ``Protocol`` parameters.
482+
(Contributed by Nikita Sobolev in :gh:`137191`.)
483+
484+
* Code like ``class B2(A[T2], Protocol[T1, T2]): ...`` now correctly handles
485+
type parameters order: it is ``(T1, T2)``, not ``(T2, T1)``
486+
as it was incorrectly infered in runtime before.
487+
(Contributed by Nikita Sobolev in :gh:`137191`.)
488+
480489

481490
wave
482491
----
@@ -548,6 +557,11 @@ Deprecated C APIs
548557
signed integer type of the same size is now deprecated.
549558
(Contributed by Serhiy Storchaka in :gh:`132629`.)
550559

560+
* Functions :c:func:`_Py_c_sum`, :c:func:`_Py_c_diff`, :c:func:`_Py_c_neg`,
561+
:c:func:`_Py_c_prod`, :c:func:`_Py_c_quot`, :c:func:`_Py_c_pow` and
562+
:c:func:`_Py_c_abs` are :term:`soft deprecated`.
563+
(Contributed by Sergey B Kirpichev in :gh:`128813`.)
564+
551565
.. Add C API deprecations above alphabetically, not here at the end.
552566
553567
Removed C APIs

Include/cpython/complexobject.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ typedef struct {
77
double imag;
88
} Py_complex;
99

10-
// Operations on complex numbers.
10+
/* Operations on complex numbers (soft deprecated
11+
since Python 3.15). */
1112
PyAPI_FUNC(Py_complex) _Py_c_sum(Py_complex, Py_complex);
1213
PyAPI_FUNC(Py_complex) _Py_c_diff(Py_complex, Py_complex);
1314
PyAPI_FUNC(Py_complex) _Py_c_neg(Py_complex);

Include/cpython/pystate.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ struct _ts {
198198

199199
PyObject *current_executor;
200200

201+
/* Internal to the JIT */
202+
struct _PyExitData *jit_exit;
203+
201204
uint64_t dict_global_version;
202205

203206
/* Used to store/retrieve `threading.local` keys/values for this thread */

Include/internal/pycore_interp_structs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,7 @@ struct _is {
943943
bool jit;
944944
struct _PyExecutorObject *executor_list_head;
945945
struct _PyExecutorObject *executor_deletion_list_head;
946+
struct _PyExecutorObject *cold_executor;
946947
int executor_deletion_list_remaining_capacity;
947948
size_t trace_run_counter;
948949
_rare_events rare_events;

0 commit comments

Comments
 (0)