chore(dataform): warn about future removal of MATLAB-compatible writes#142
Merged
KenyaOtsuka merged 1 commit intoJul 3, 2026
Conversation
Add a FutureWarning to the MATLAB-compatible v7.3 .mat write paths that are slated to become bdpy-native plain HDF5: save_array (dense), save_multiarrays, SparseArray.save, and save_feature. This is warning-only. The on-disk format, the hdf5storage dependency, and the _mat_v73 reader are all unchanged, and reading existing hdf5storage / MATLAB v7.3 files remains supported. The actual switch to plain HDF5 is implemented on the refactor/drop-hdf5storage-write branch.
Author
|
When reviewing this PR, I'd appreciate it if you could also check whether the approach taken in #141 is acceptable. |
HirokiYasuda03
approved these changes
Jul 2, 2026
Contributor
There was a problem hiding this comment.
@KenyaOtsuka
Thank you for your lot of works. I think it's OK to merge this PR.
I've also checked PR #142. I think the approach is fine (I'll review the code itself again and provide feedback once it's marked as “ready for review”).
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This is a warning-only PR. It adds a
FutureWarningto thebdpy.dataformwrite paths that currently produce MATLAB-compatible v7.3
.matfiles(via
hdf5storage.savemat(..., format='7.3', ...)), giving users advancenotice before the format changes.
No behavior changes here. The on-disk format, the
hdf5storagedependency,and the
_mat_v73reader are all left untouched, and round-trip behavior isidentical. The actual write-side breaking change — switching these writers to
bdpy-native plain HDF5 and dropping the
hdf5storagedependency — is done in#141. This PR is intended to land first so users get a release with the
deprecation warning before #141 changes the format.
What the warning says
Emitted as a
FutureWarning:In short:
.matwriting is going away in a future release (Drop the hdf5storage dependency (write-side breaking change) #141).load().Affected write paths
These are exactly the paths that #141 rewrites to plain HDF5:
bdpy/dataform/sparse.pysave_array(..., sparse=False)(dense branch)save_multiarrays(...)SparseArray.save(...)bdpy/dataform/features.pysave_feature(...)Note:
save_array(..., sparse=True)delegates toSparseArray.save, so thewarning fires there — exactly one
FutureWarningper call, no double-warn.Tests
assertWarns(FutureWarning)tests for each write path, each alsoasserting the save/load round-trip is unchanged
(
tests/dataform/test_sparse.py,tests/dataform/test_features.py).FutureWarning.pytest tests/dataform/test_sparse.py tests/dataform/test_features.py→ all pass (NumPy 2.x).