Registry Mirror
Skip to content

Conversation

@headtr1ck

@headtr1ck headtr1ck commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Fix the tests that fail on 32-bit platforms, where numpy's default integer is int32 and object arrays use 4-byte pointers.

  • Give test data an explicit int64 dtype where the tests assume it
  • Derive the expected repr sizes of object arrays from the pointer size
  • Make the expected fake_target_chunksize for cftime depend on the pointer size

Verified by running the test suite in an i386/debian:trixie container and comparing with debian:trixie (amd64) using the same packages: no failures left that only happen on 32-bit.

We will not add a 32-bit CI pipeline run since there are no pandas, scipy 32-bit packages anymore and there is also no conda-forge 32-bit platform. I guess if any remaining or future tests fail thats just a limitation we have to deal with.

Note: The Gentoo report also listed groupby keep_attrs, test_reduce_keepdims and test_strategies::TestReduction::test_mean. Those didn't fail in my 32-bit Debian run. Debian has different or older versions of numpy, bottleneck and dask than Gentoo, and no numbagg, so I couldn't check them.

Checklist

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.
      Tools: Claude Code

🤖 Generated with Claude Code

On 32-bit platforms numpy's default integer is int32 and object arrays
use 4-byte pointers. Give the test data explicit int64 dtypes and derive
the expected sizes of object arrays from the pointer size.

Co-authored-by: Claude <noreply@anthropic.com>

@dcherian dcherian left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would be great if we can generate a ruff lint rule for this.

IIRC there were some floating around for the numpy2 transition

@headtr1ck

Copy link
Copy Markdown
Collaborator Author

Would be great if we can generate a ruff lint rule for this.

IIRC there were some floating around for the numpy2 transition

I guess you meant the NPY201 rule. Unfortunately ruff does not have a plugin system so you cannot simply add custom rules.

@headtr1ck headtr1ck added the plan to merge Final call for comments label Oct 6, 2026
@headtr1ck
headtr1ck merged commit 7e938a6 into pydata:main Oct 7, 2026
72 checks passed
@headtr1ck
headtr1ck deleted the fix-32bit-tests branch October 7, 2026 05:58
@headtr1ck headtr1ck mentioned this pull request Oct 12, 2026
2 of 5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plan to merge Final call for comments topic-testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Variious tests fail on x86 (32-bit issues)?

2 participants