File tree 3 files changed +10
-1
lines changed
3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -212,6 +212,8 @@ Bug fixes
212
212
- Fixed silent overflow issue when decoding times encoded with 32-bit and below
213
213
unsigned integer data types (:issue: `6589 `, :pull: `6598 `).
214
214
By `Spencer Clark <https://github.com/spencerkclark >`_.
215
+ - Fixed ``.chunks `` loading lazy data (:issue: `6538 `).
216
+ By `Deepak Cherian <https://github.com/dcherian >`_.
215
217
216
218
Documentation
217
219
~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -1718,7 +1718,7 @@ def get_chunksizes(
1718
1718
1719
1719
chunks : dict [Any , tuple [int , ...]] = {}
1720
1720
for v in variables :
1721
- if hasattr (v .data , "chunks" ):
1721
+ if hasattr (v ._data , "chunks" ):
1722
1722
for dim , c in v .chunksizes .items ():
1723
1723
if dim in chunks and c != chunks [dim ]:
1724
1724
raise ValueError (
Original file line number Diff line number Diff line change @@ -992,6 +992,13 @@ def test_attrs(self) -> None:
992
992
assert data .attrs ["foobar" ], "baz"
993
993
assert isinstance (data .attrs , dict )
994
994
995
+ def test_chunks_does_not_load_data (self ) -> None :
996
+ # regression test for GH6538
997
+ store = InaccessibleVariableDataStore ()
998
+ create_test_data ().dump_to_store (store )
999
+ ds = open_dataset (store )
1000
+ assert ds .chunks == {}
1001
+
995
1002
@requires_dask
996
1003
def test_chunk (self ) -> None :
997
1004
data = create_test_data ()
You can’t perform that action at this time.
0 commit comments