Skip to content

gh-128813: deprecate cval field of the PyComplexObject struct #137271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Aug 8, 2025
Merged
Prev Previous commit
Apply suggestions from code review
  • Loading branch information
vstinner authored Aug 8, 2025
commit 7e491dc88988002530cb0d1dd2a7c5c6c0e0a315
2 changes: 1 addition & 1 deletion Doc/deprecations/c-api-pending-removal-in-3.20.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pending removal in Python 3.20
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* The ``cval`` field in :c:type:`PyComplexObject` (:gh:`128813`):
* The ``cval`` field in :c:type:`PyComplexObject` (:gh:`128813`).
Use :c:func:`PyComplex_AsCComplex` and :c:func:`PyComplex_FromCComplex`
to convert a Python complex number to/from the C :c:type:`Py_complex`
representation.
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ Deprecated C APIs
(Contributed by Serhiy Storchaka in :gh:`132629`.)

* Deprecate :c:member:`~PyComplexObject.cval` field of the the
:c:type:`PyComplexObject` type:
:c:type:`PyComplexObject` type.
Use :c:func:`PyComplex_AsCComplex` and :c:func:`PyComplex_FromCComplex`
to convert a Python complex number to/from the C :c:type:`Py_complex`
representation.
Expand Down
Loading