GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-146238: add missing tests for 'e', 'Zf' and 'Zd' array type codes in test_buffer.py by skirpichev · Pull Request #149345 · python/cpython

Conversation

@skirpichev

@skirpichev skirpichev commented May 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This amends e79fd60.

  • Issue: Support half-floats in the array module #146238

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@skirpichev
pythongh-146238: add missing tests for 'e' type code in test_buffer.py
d00c981
This amends e79fd60.  I'll not fix this for 'F'/'D' complex types as
they might be removed.
@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label May 4, 2026
@bedevere-app bedevere-app Bot mentioned this pull request May 4, 2026
Support half-floats in the array module #146238
Closed
@bedevere-app bedevere-app Bot added the awaiting review label May 4, 2026
@skirpichev skirpichev added the skip news label May 4, 2026
@skirpichev skirpichev closed this May 4, 2026
@skirpichev
skirpichev deleted the amend-e-format branch May 4, 2026 15:25
@skirpichev
skirpichev restored the amend-e-format branch May 5, 2026 02:01
skirpichev added 2 commits May 5, 2026 05:03
@skirpichev
Merge branch 'master' into amend-e-format
6d1251c
@skirpichev
+ Zf/d
b4569cb
@skirpichev skirpichev reopened this May 5, 2026
@skirpichev skirpichev changed the title gh-146238: add missing tests for 'e' type code in test_buffer.py gh-146238: add missing tests for 'e', 'Zf' and 'Zd' array type codes in test_buffer.py May 5, 2026
@skirpichev
skirpichev requested a review from vstinner May 5, 2026 02:27
@skirpichev

skirpichev commented May 5, 2026

Copy link
Copy Markdown
Member Author

CC @vstinner

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@skirpichev

This comment was marked as resolved.

Sign in to view
@skirpichev
skip Zd in test_array_alignment()
2e1c01b
@read-the-docs-community

This comment was marked as spam.

Sign in to view
skirpichev added 2 commits May 5, 2026 10:27
@skirpichev
fix test
b97670b
@skirpichev
+1
71ab6d1
vstinner
vstinner reviewed May 5, 2026
View reviewed changes
Comment thread Lib/test/test_buffer.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_buffer.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_buffer.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

This comment was marked as resolved.

Sign in to view
@vstinner

vstinner commented May 5, 2026

Copy link
Copy Markdown
Member

On WASI, ALIGNOF_MAX_ALIGN_T is 16 bytes and struct.calcsize("Zd") is 16 bytes. WASI is a 32-bit platform (sys.maxsize is 2147483647). Maybe we should only test formats up to 4 bytes?

Would it make sense to use MAX_ALIGN = struct.calcsize('P')?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

skirpichev added 3 commits May 6, 2026 05:43
@skirpichev
address review
7317fa0
@skirpichev
Merge branch 'master' into amend-e-format
e8b47ab
@skirpichev
+1
7886246
@skirpichev

skirpichev commented May 6, 2026

Copy link
Copy Markdown
Member Author

Would it make sense to use MAX_ALIGN = struct.calcsize('P')?

As you see from the commit history, just removing the 'Zd' type - works. But I would like to use a more generic solution.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
vstinner merged commit ffa4d47 into python:main May 6, 2026
49 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting review label May 6, 2026
@vstinner

vstinner commented May 6, 2026

Copy link
Copy Markdown
Member

I prefer a small performance hit for readability.

I would prefer to not build list("bBhHiIlLefd") + ['Zf', 'Zd'] list at each NATIVE iteration, but it's not a big deal. I merged your PR. Thanks for additional tests.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@skirpichev
skirpichev deleted the amend-e-format branch May 6, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@skirpichev @vstinner
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.