Skip to content

Commit 1f0322f

Browse files
committed
remove incorrect release note and add one for the changes here
1 parent 3299e07 commit 1f0322f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

changes/3638.feature.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

changes/3644.feature.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
The `Store.get` and `Store.get_partial_values` methods now accept `None` as the `prototype` argument. When `prototype` is `None`, stores will use their default buffer class (typically `zarr.core.buffer.cpu.Buffer`). This simplifies the API for common use cases where the default buffer is sufficient.
2+
3+
A new type alias `BufferClassLike` has been added, which accepts either a `Buffer` class or a `BufferPrototype` instance.
4+
5+
**Breaking change for third-party store implementations:** If you have implemented a custom `Store` subclass, you must update your `get` and `get_partial_values` methods to handle `prototype=None`. To do this, override the `_get_default_buffer_class` method to return an appropriate default `Buffer` class, and update your method signatures to accept `BufferClassLike | None` instead of `BufferPrototype`. When `prototype` is `None`, call `self._get_default_buffer_class()` to obtain the buffer class. If `prototype` is a `BufferPrototype` instance, extract the buffer class via `prototype.buffer`.

0 commit comments

Comments
 (0)