Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-61103: don't use native complex types in ctypes#133237
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
skirpichev commented May 1, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
…struct module Each complex type interpreted as an array type containing exactly two elements of the corresponding real type (real and imaginary parts, respectively).
skirpichev commented May 1, 2025
…ctypes * drop _complex.h header * use appropriate real arrays to replace complex types
efbe0bb to 6a20fafCompareUh oh!
There was an error while loading. Please reload this page.
dalcinl commented May 1, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@skirpichev Thanks, it looks great. IMHO, and despite your doubts about worthiness, this should be merged. Things are simpler now, you removed lots of code, and a private header.
|
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Lisandro Dalcin <dalcinl@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Misc/NEWS.d/next/Library/2025-04-25-16-20-49.gh-issue-121249.uue2nK.rst Outdated Show resolvedHide resolved
Uh oh!
There was an error while loading. Please reload this page.
…ue2nK.rst Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
bedevere-bot commented May 2, 2025
🤖 New build scheduled with the buildbot fleet by @encukou for commit 071d57e 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F133237%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
encukou left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, merge if the buildbots don't complain.
skirpichev commented May 2, 2025
encukou commented May 2, 2025
Ah, I missed that note, sorry! |
skirpichev commented May 2, 2025
Done. See also minor docs correction in #133249 |
skirpichev commented May 2, 2025
Failure in test_frame.py on s390x seems unrelated. |
skirpichev commented May 4, 2025
All failures are related to test_frame.py. @encukou, I left here only one change, related to the struct module (cosmetic change in |
skirpichev commented May 4, 2025
@dalcinl, let us know if you think that linked issue should stay open after merging this. |
dalcinl commented May 4, 2025
@skirpichev I think you can close it. AFAICT, all concerns have been addressed. Many thanks for your hard work in implementing all these changes. |
encukou left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
8d0e07e into python:mainUh oh!
There was an error while loading. Please reload this page.
…es (pythonGH-133237) According to the C standard, the memory representation of _Complex types is equivalent to 2-element arrays. Unlike _Complex, arrays are always available. - drop _complex.h header - use appropriate real arrays to replace complex types Co-authored-by: Lisandro Dalcin <dalcinl@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
📚 Documentation preview 📚: https://cpython-previews--133237.org.readthedocs.build/
Note, that
Py_FFI_SUPPORT_C_COMPLEXcheck configure check imply support for complex types. So,Py_HAVE_C_COMPLEXcheck is redundant. Though, I'm not sure if it worth removing.