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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

skirpichev
Copy link
Contributor

@skirpichev skirpichev commented Jul 31, 2025

@skirpichev skirpichev force-pushed the deprecate-cval/128813 branch from 7b72948 to 40fc415 Compare August 1, 2025 07:49
@skirpichev skirpichev marked this pull request as ready for review August 1, 2025 07:57
@skirpichev skirpichev requested a review from encukou August 1, 2025 07:57
@encukou
Copy link
Member

encukou commented Aug 1, 2025

Per PEP-387, the preferred deprecation period is 5 years (so the removal would be in 3.20). Is there a reason to accelerate that?

@skirpichev
Copy link
Contributor Author

Per PEP-387, the preferred deprecation period is 5 years (so the removal would be in 3.20). Is there a reason to accelerate that?

Hmm, probably not soo much. I would bet, that M$ compiler will not have complex types in 3.17 nor in 3.20. Though, maybe we could keep legacy code with _Py_c_*() functions just for M$ systems and use native language type for the rest.

Quick search on GH give me very few project (two), that use this undocumented field:
https://github.com/search?q=%2F-%3Ecval%2F+language%3AC&type=code&l=C&p=1
This is the only an excuse to use minimal lag in versions between announce and removal, as permitted by PEP 387.


The complex number value, using the C :c:type:`Py_complex` representation.

.. deprecated-removed:: next 3.17
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should recommend PyComplex_AsCComplex() here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy