Skip to content

prune old string dtype class#3973

Merged
d-v-b merged 14 commits into
zarr-developers:mainfrom
d-v-b:prune-old-string-dtype
May 22, 2026
Merged

prune old string dtype class#3973
d-v-b merged 14 commits into
zarr-developers:mainfrom
d-v-b:prune-old-string-dtype

Conversation

@d-v-b
Copy link
Copy Markdown
Contributor

@d-v-b d-v-b commented May 14, 2026

When we supported NumPy versions < 2, we had to implement the variable-length string dtype on top of the numpy "object" dtype. For NumPy versions > 2, we use the StringDType.

Since we no longer support numpy < 2, we can remove the variable-length dtype class that used the "object" dtype. that's this PR.

@d-v-b d-v-b changed the title prune old string dtype prune old string dtype class May 14, 2026
@github-actions github-actions Bot added the needs release notes Automatically applied to PRs which haven't added release notes label May 14, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.49%. Comparing base (093a153) to head (9e96595).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3973      +/-   ##
==========================================
+ Coverage   93.43%   93.49%   +0.05%     
==========================================
  Files          88       88              
  Lines       11874    11861      -13     
==========================================
- Hits        11095    11089       -6     
+ Misses        779      772       -7     
Files with missing lines Coverage Δ
src/zarr/core/dtype/npy/string.py 97.67% <100.00%> (+5.42%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions Bot removed the needs release notes Automatically applied to PRs which haven't added release notes label May 14, 2026
@d-v-b d-v-b requested a review from ilan-gold May 18, 2026 08:46
@d-v-b d-v-b requested a review from maxrjones May 22, 2026 11:02
Comment thread tests/test_array.py
def to_native_dtype(self) -> np.dtypes.ObjectDType:
"""
Create a NumPy object dtype from this VariableLengthUTF8 ZDType.
class UnknownObjectCodecDtype(VariableLengthUTF8):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this test didn't actually depend on the codec using the "object" codec. it just depends on having an unknown object codec id

Comment thread changes/3973.removal.md Outdated
d-v-b and others added 2 commits May 22, 2026 14:49
Co-authored-by: Max Jones <14077947+maxrjones@users.noreply.github.com>
@d-v-b d-v-b enabled auto-merge (squash) May 22, 2026 13:02
@d-v-b d-v-b merged commit 1907ad6 into zarr-developers:main May 22, 2026
30 checks passed
@d-v-b d-v-b deleted the prune-old-string-dtype branch May 22, 2026 13:53
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