Repository navigation
gh-148675: Add Zd/Zf formats to array, ctypes, memoryview, struct #148676
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
Changes from 10 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
d50838d
gh-148675: Add Zd/Zf formats to array, ctypes, memoryview, struct
vstinner c54e5b4
Fix formatting of the NEWS entry
vstinner a13a47a
Fix compiler warning
vstinner 54d634f
struct: fix align()
vstinner af51fd9
ctypes: fix typo
vstinner fe496e9
ctypes: add tests on Zf, Zd, Zg formats
vstinner cf16b04
Change array.typecodes type to tuple
vstinner 69c7e1a
test_array: add tests on Zf/Zd typecodes
vstinner 0381b67
array: Fix byteswap for Zd/Zf
vstinner 374ddde
Fix typo in the doc
vstinner 869cd88
Fix more doc typos
vstinner 52846d1
Fix PyCSimpleType_init() for Zf/Zd/Zg formats
vstinner fab34a9
ctypes: replace F/D/G types with Zf/Zd/Zg
vstinner 6753bae
Merge branch 'main' into complex_formats
vstinner 5e1281d
Fix PyCSimpleType_init() format for Zf/Zd/Zg
vstinner 5cf4fcc
test_ctypes: test also array format
vstinner 88b64b9
test_buffer: test also Zf and Zd formats
vstinner 3de82a7
Update NEWS entry
vstinner f24e08a
Fix Sphinx references
vstinner 7cd717e
Fix yet another Sphinx reference
vstinner c7840fa
What's New: add Zf and Zd to the memoryview entry
vstinner 1a77688
Address Gregory's review
vstinner 35a4691
What's New: remove Sergey's name
vstinner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Misc/NEWS.d/next/Library/2026-04-17-13-56-44.gh-issue-148675.f1kG70.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| :mod:`array`, :mod:`ctypes`, :mod:`struct`: Add support for ``Zd`` and ``Zf`` | ||
| format for double complex and float complex. Add also support for ``Zg`` | ||
| format for long double complex to :mod:`ctypes`. Patch by Victor Stinner. |
3 changes: 3 additions & 0 deletions
3
Misc/NEWS.d/next/Library/2026-05-02-12-30-35.gh-issue-148675.cu2YFT.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| The :data:`array.typecodes` type changed from :class:`str` to :class:`tuple` | ||
| to support type codes longer than 1 character (``Zf`` and ``Zd``). Patch by | ||
| Victor Stinner. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I suggest leave one entry per data type with either one-letter or two-letters code. And mention an alternative in the note, perhaps with a deprecation. Technically, no new types here - just aliases.
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.
I would prefer this decision after Python 3.15 beta1, and don't put any preference for now in the beta1.