Skip to content

fix: handle longlong arrays on Linux and macOS correctly - #4589

Merged
d-v-b merged 4 commits into
zarr-developers:mainfrom
radoering:fix-longlong
Nov 2, 2026
Merged

d-v-b merged 4 commits into
zarr-developers:mainfrom
radoering:fix-longlong

Conversation

@radoering

@radoering radoering commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Similar issue as #3151 and #3797 - this time, for a change, on Linux and not on Windows.

For reviewers

Picking up #3797 (comment), I tried a more general solution this time. If you do not like this solution, we can do the same as in #3151 and #3797 and override the method in the subclasses.

Author attestation

  • I am a human, these are my changes, and I have reviewed and understood every change and can explain why each is correct.

TODO

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/user-guide/*.md
  • Changes documented as a new file in changes/
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@github-actions github-actions Bot added the needs release notes Automatically applied to PRs which haven't added release notes label Nov 2, 2026
@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.84%. Comparing base (310075a) to head (27e2ef9).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4589      +/-   ##
==========================================
- Coverage   94.84%   94.84%   -0.01%     
==========================================
  Files          96       96              
  Lines       13998    13997       -1     
==========================================
- Hits        13276    13275       -1     
  Misses        722      722              
Files with missing lines Coverage Δ
src/zarr/core/dtype/npy/int.py 99.37% <100.00%> (-0.01%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot removed the needs release notes Automatically applied to PRs which haven't added release notes label Nov 2, 2026
@d-v-b

d-v-b commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

hi @radoering, thanks for this fix. do you mind if I push some additional changes on top of this? then we can get it in quickly

@radoering

Copy link
Copy Markdown
Contributor Author

@d-v-b I do not mind at all. I am only interested in a solution - no matter whose solution it is. 🙂

The `kind` and `itemsize` comparison raised `AttributeError` for inputs
without those attributes, and accepted any object that had them. Both
`from_native_dtype` and the registry's `match_dtype` then failed with the
wrong error, so check for a NumPy dtype first.

Also correct the docstring's class order, cover macOS in the docstring and
changelog entry, and describe the check accurately in the error message.

Assisted-by: ClaudeCode:claude-opus-5-5
@d-v-b d-v-b changed the title fix: handle longlong arrays on Linux correctly fix: handle longlong arrays on Linux and macOS correctly Nov 2, 2026
@d-v-b
d-v-b enabled auto-merge (squash) November 2, 2026 14:40
@d-v-b
d-v-b merged commit a981abf into zarr-developers:main Nov 2, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants