5353from zarr .core .metadata import ArrayV2Metadata , ArrayV3Metadata
5454from zarr .core .metadata .v3 import V3JsonEncoder , _replace_special_floats
5555from zarr .core .sync import SyncMixin , sync
56- from zarr .errors import ContainsArrayError , ContainsGroupError , MetadataValidationError
56+ from zarr .errors import (
57+ ContainsArrayError ,
58+ ContainsGroupError ,
59+ MetadataValidationError ,
60+ ZarrDeprecationWarning ,
61+ )
5762from zarr .storage import StoreLike , StorePath
5863from zarr .storage ._common import ensure_no_existing_node , make_store_path
5964from zarr .storage ._utils import _join_paths , _normalize_path_keys , normalize_path
@@ -1128,7 +1133,7 @@ async def create_array(
11281133 config = config ,
11291134 )
11301135
1131- @deprecated ("Use AsyncGroup.create_array instead." )
1136+ @deprecated ("Use AsyncGroup.create_array instead." , category = ZarrDeprecationWarning )
11321137 async def create_dataset (
11331138 self , name : str , * , shape : ShapeLike , ** kwargs : Any
11341139 ) -> AsyncArray [ArrayV2Metadata ] | AsyncArray [ArrayV3Metadata ]:
@@ -1162,7 +1167,7 @@ async def create_dataset(
11621167 await array .setitem (slice (None ), data )
11631168 return array
11641169
1165- @deprecated ("Use AsyncGroup.require_array instead." )
1170+ @deprecated ("Use AsyncGroup.require_array instead." , category = ZarrDeprecationWarning )
11661171 async def require_dataset (
11671172 self ,
11681173 name : str ,
@@ -2504,7 +2509,7 @@ def create_array(
25042509 )
25052510 )
25062511
2507- @deprecated ("Use Group.create_array instead." )
2512+ @deprecated ("Use Group.create_array instead." , category = ZarrDeprecationWarning )
25082513 def create_dataset (self , name : str , ** kwargs : Any ) -> Array :
25092514 """Create an array.
25102515
@@ -2528,7 +2533,7 @@ def create_dataset(self, name: str, **kwargs: Any) -> Array:
25282533 """
25292534 return Array (self ._sync (self ._async_group .create_dataset (name , ** kwargs )))
25302535
2531- @deprecated ("Use Group.require_array instead." )
2536+ @deprecated ("Use Group.require_array instead." , category = ZarrDeprecationWarning )
25322537 def require_dataset (self , name : str , * , shape : ShapeLike , ** kwargs : Any ) -> Array :
25332538 """Obtain an array, creating if it doesn't exist.
25342539
@@ -2758,7 +2763,7 @@ def move(self, source: str, dest: str) -> None:
27582763 """
27592764 return self ._sync (self ._async_group .move (source , dest ))
27602765
2761- @deprecated ("Use Group.create_array instead." )
2766+ @deprecated ("Use Group.create_array instead." , category = ZarrDeprecationWarning )
27622767 @_deprecate_positional_args
27632768 def array (
27642769 self ,
0 commit comments