|
3 | 3 | import warnings
|
4 | 4 | from numcodecs.compat import ensure_bytes
|
5 | 5 | from zarr.util import normalize_storage_path
|
6 |
| -from zarr._storage.store import _get_metadata_suffix, data_root, meta_root, Store, StoreV3 |
| 6 | +from zarr._storage.store import Store |
7 | 7 |
|
8 | 8 | __doctest_requires__ = {
|
9 | 9 | ("ABSStore", "ABSStore.*"): ["azure.storage.blob"],
|
@@ -222,56 +222,3 @@ def getsize(self, path=None):
|
222 | 222 |
|
223 | 223 | def clear(self):
|
224 | 224 | self.rmdir()
|
225 |
| - |
226 |
| - |
227 |
| -class ABSStoreV3(ABSStore, StoreV3): |
228 |
| - def list(self): |
229 |
| - return list(self.keys()) |
230 |
| - |
231 |
| - def __eq__(self, other): |
232 |
| - return ( |
233 |
| - isinstance(other, ABSStoreV3) |
234 |
| - and self.client == other.client |
235 |
| - and self.prefix == other.prefix |
236 |
| - ) |
237 |
| - |
238 |
| - def __setitem__(self, key, value): |
239 |
| - self._validate_key(key) |
240 |
| - super().__setitem__(key, value) |
241 |
| - |
242 |
| - def rmdir(self, path=None): |
243 |
| - if not path: |
244 |
| - # Currently allowing clear to delete everything as in v2 |
245 |
| - |
246 |
| - # If we disallow an empty path then we will need to modify |
247 |
| - # TestABSStoreV3 to have the create_store method use a prefix. |
248 |
| - ABSStore.rmdir(self, "") |
249 |
| - return |
250 |
| - |
251 |
| - meta_dir = meta_root + path |
252 |
| - meta_dir = meta_dir.rstrip("/") |
253 |
| - ABSStore.rmdir(self, meta_dir) |
254 |
| - |
255 |
| - # remove data folder |
256 |
| - data_dir = data_root + path |
257 |
| - data_dir = data_dir.rstrip("/") |
258 |
| - ABSStore.rmdir(self, data_dir) |
259 |
| - |
260 |
| - # remove metadata files |
261 |
| - sfx = _get_metadata_suffix(self) |
262 |
| - array_meta_file = meta_dir + ".array" + sfx |
263 |
| - if array_meta_file in self: |
264 |
| - del self[array_meta_file] |
265 |
| - group_meta_file = meta_dir + ".group" + sfx |
266 |
| - if group_meta_file in self: |
267 |
| - del self[group_meta_file] |
268 |
| - |
269 |
| - # TODO: adapt the v2 getsize method to work for v3 |
270 |
| - # For now, calling the generic keys-based _getsize |
271 |
| - def getsize(self, path=None): |
272 |
| - from zarr.storage import _getsize # avoid circular import |
273 |
| - |
274 |
| - return _getsize(self, path) |
275 |
| - |
276 |
| - |
277 |
| -ABSStoreV3.__doc__ = ABSStore.__doc__ |
0 commit comments