Skip to content

Commit 7b72948

Browse files
committed
gh-128813: deprecate cval field of the PyComplexObject struct
1 parent 09e0caf commit 7b72948

File tree

5 files changed

+18
-0
lines changed

5 files changed

+18
-0
lines changed

Doc/c-api/complex.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ Complex Numbers as Python Objects
118118
119119
This subtype of :c:type:`PyObject` represents a Python complex number object.
120120
121+
.. c:member:: Py_complex cval
122+
123+
The complex number value, using the C :c:type:`Py_complex` representation.
124+
125+
.. deprecated:: 3.15
126+
121127
122128
.. c:var:: PyTypeObject PyComplex_Type
123129
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Pending removal in Python 3.17
2+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3+
4+
* The ``cval`` field in :c:type:`PyComplexObject` (:gh:`128813`).

Doc/deprecations/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ C API deprecations
1616

1717
.. include:: c-api-pending-removal-in-3.15.rst
1818

19+
.. include:: c-api-pending-removal-in-3.17.rst
20+
1921
.. include:: c-api-pending-removal-in-3.18.rst
2022

2123
.. include:: c-api-pending-removal-in-future.rst

Doc/whatsnew/3.15.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,10 @@ Deprecated C APIs
548548
signed integer type of the same size is now deprecated.
549549
(Contributed by Serhiy Storchaka in :gh:`132629`.)
550550

551+
* Deprecate :c:member:`~PyComplexObject.cval` field of the the
552+
:c:type:`PyComplexObject` type.
553+
(Contributed by Sergey B Kirpichev in :gh:`128813`.)
554+
551555
* Functions :c:func:`_Py_c_sum`, :c:func:`_Py_c_diff`, :c:func:`_Py_c_neg`,
552556
:c:func:`_Py_c_prod`, :c:func:`_Py_c_quot`, :c:func:`_Py_c_pow` and
553557
:c:func:`_Py_c_abs` are :term:`soft deprecated`.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Document and deprecate :c:member:`~PyComplexObject.cval` field of
2+
the :c:type:`PyComplexObject` type. Patch by Sergey B Kirpichev.

0 commit comments

Comments
 (0)