Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0c8e7f7
WIP - backwards compat
TomAugspurger Aug 18, 2024
fa9e51d
fixup put
TomAugspurger Aug 19, 2024
8fdb605
rm consolidated
TomAugspurger Aug 19, 2024
0ac17cc
typing fixup
TomAugspurger Aug 19, 2024
be2b3cd
revert unneded change
TomAugspurger Aug 19, 2024
94933b3
fixup
TomAugspurger Aug 19, 2024
44ad6c7
deprecate positional args
TomAugspurger Aug 28, 2024
08e7f3c
attribute
TomAugspurger Aug 28, 2024
f937468
Fixup
TomAugspurger Aug 29, 2024
784cb28
Merge remote-tracking branch 'upstream/v3' into user/tom/fix/v2-compat
TomAugspurger Sep 3, 2024
b01e61c
Merge remote-tracking branch 'upstream/v3' into user/tom/fix/v2-compat
TomAugspurger Sep 6, 2024
c519fbe
fixup
TomAugspurger Sep 6, 2024
46c2c11
fixup
TomAugspurger Sep 6, 2024
1933f57
fixup
TomAugspurger Sep 6, 2024
36a2ceb
fixup
TomAugspurger Sep 6, 2024
1ae1cfd
fixup
TomAugspurger Sep 6, 2024
9f5429f
fixup
TomAugspurger Sep 6, 2024
a5ad0ca
fixup
TomAugspurger Sep 6, 2024
3d04845
Merge remote-tracking branch 'upstream/v3' into user/tom/fix/v2-compat
TomAugspurger Sep 16, 2024
b710c64
fixup
TomAugspurger Sep 16, 2024
0ab29d1
fixup
TomAugspurger Sep 16, 2024
aa1e3bc
fixup
TomAugspurger Sep 16, 2024
fb4bb85
fixup
TomAugspurger Sep 16, 2024
1cc84ab
fixup
TomAugspurger Sep 16, 2024
559399e
ci
TomAugspurger Sep 16, 2024
16bad38
Merge remote-tracking branch 'upstream/v3' into user/tom/fix/v2-compat
TomAugspurger Sep 19, 2024
f7f8457
Merge branch 'v3' into user/tom/fix/v2-compat
jhamman Sep 19, 2024
56431fe
Merge remote-tracking branch 'upstream/v3' into user/tom/fix/v2-compat
TomAugspurger Sep 19, 2024
b13dee3
fixup
TomAugspurger Sep 19, 2024
348aed8
Merge remote-tracking branch 'upstream/v3' into user/tom/fix/v2-compat
TomAugspurger Sep 20, 2024
2327141
fixup
TomAugspurger Sep 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/v3' into user/tom/fix/v2-compat
  • Loading branch information
TomAugspurger committed Sep 3, 2024
commit 784cb2869e8d551bf3331664e9788fa6588b5c14
1 change: 1 addition & 0 deletions src/zarr/codecs/crc32c_.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ async def _decode_single(
crc32_bytes = data[-4:]
inner_bytes = data[:-4]

# Need to do a manual cast until https://github.com/numpy/numpy/issues/26783 is resolved
computed_checksum = np.uint32(crc32c(cast(typing_extensions.Buffer, inner_bytes))).tobytes()
stored_checksum = bytes(crc32_bytes)
if computed_checksum != stored_checksum:
Expand Down
2 changes: 1 addition & 1 deletion src/zarr/codecs/sharding.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class _ShardIndex(NamedTuple):

@property
def chunks_per_shard(self) -> ChunkCoords:
result = tuple(self.offsets_and_lengths[:-1])
result = tuple(self.offsets_and_lengths.shape[0:-1])
# The cast is required until https://github.com/numpy/numpy/pull/27211 is merged
return cast(ChunkCoords, result)

Expand Down
2 changes: 1 addition & 1 deletion src/zarr/core/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ async def create_group(
) -> AsyncGroup:
attributes = attributes or {}
return await type(self).from_store(
self.store_path / path,
self.store_path / name,
attributes=attributes,
exists_ok=exists_ok,
zarr_format=self.metadata.zarr_format,
Expand Down
12 changes: 8 additions & 4 deletions src/zarr/core/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,10 +606,14 @@ def parse_fill_value_v3(fill_value: Any, dtype: COMPLEX_DTYPE) -> COMPLEX: ...


@overload
def parse_fill_value_v3(fill_value: Any, dtype: Any) -> Any:
# We'd like to remove this overload, but are currently unable to.
# `dtype` has gone through `parse_dtype`, which at the moment return
# np.dtype[Any].
def parse_fill_value_v3(fill_value: Any, dtype: np.dtype[Any]) -> Any:
# This dtype[Any] is unfortunately necessary right now.
# See https://github.com/zarr-developers/zarr-python/issues/2131#issuecomment-2318010899
# for more details, but `dtype` here (which comes from `parse_dtype`)
# is np.dtype[Any].
#
# If you want the specialized types rather than Any, you need to use `np.dtypes.<dtype>`
# rather than np.dtypes(<type>)
...


Expand Down
2 changes: 1 addition & 1 deletion tests/v3/test_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ async def test_asyncgroup_getitem(store: LocalStore | MemoryStore, zarr_format:

async def test_asyncgroup_delitem(store: LocalStore | MemoryStore, zarr_format: ZarrFormat) -> None:
agroup = await AsyncGroup.from_store(store=store, zarr_format=zarr_format)
sub_array_path = "sub_array"
array_name = "sub_array"
_ = await agroup.create_array(
name=array_name, shape=(10,), dtype="uint8", chunk_shape=(2,), attributes={"foo": 100}
)
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.