88
88
DEFAULT_ZARR_VERSION ,
89
89
BaseStore ,
90
90
Store ,
91
+ V3_DEPRECATION_MESSAGE ,
91
92
)
92
93
93
94
__doctest_requires__ = {
@@ -1604,6 +1605,12 @@ class NestedDirectoryStore(DirectoryStore):
1604
1605
special handling for chunk keys so that chunk files for multidimensional
1605
1606
arrays are stored in a nested directory tree.
1606
1607
1608
+ .. deprecated:: 2.18.0
1609
+ NestedDirectoryStore will be removed in Zarr-Python 3.0 where controlling
1610
+ the chunk key encoding will be supported as part of the array metadata. See
1611
+ `GH1274 <https://github.com/zarr-developers/zarr-python/issues/1274>`_
1612
+ for more information.
1613
+
1607
1614
Parameters
1608
1615
----------
1609
1616
path : string
@@ -1675,6 +1682,13 @@ class NestedDirectoryStore(DirectoryStore):
1675
1682
def __init__ (
1676
1683
self , path , normalize_keys = False , dimension_separator : Optional [DIMENSION_SEPARATOR ] = "/"
1677
1684
):
1685
+
1686
+ warnings .warn (
1687
+ V3_DEPRECATION_MESSAGE .format (store = self .__class__ .__name__ ),
1688
+ FutureWarning ,
1689
+ stacklevel = 2 ,
1690
+ )
1691
+
1678
1692
super ().__init__ (path , normalize_keys = normalize_keys )
1679
1693
if dimension_separator is None :
1680
1694
dimension_separator = "/"
@@ -1995,6 +2009,11 @@ def migrate_1to2(store):
1995
2009
class DBMStore (Store ):
1996
2010
"""Storage class using a DBM-style database.
1997
2011
2012
+ .. deprecated:: 2.18.0
2013
+ DBMStore will be removed in Zarr-Python 3.0. See
2014
+ `GH1274 <https://github.com/zarr-developers/zarr-python/issues/1274>`_
2015
+ for more information.
2016
+
1998
2017
Parameters
1999
2018
----------
2000
2019
path : string
@@ -2083,6 +2102,12 @@ def __init__(
2083
2102
dimension_separator : Optional [DIMENSION_SEPARATOR ] = None ,
2084
2103
** open_kwargs ,
2085
2104
):
2105
+ warnings .warn (
2106
+ V3_DEPRECATION_MESSAGE .format (store = self .__class__ .__name__ ),
2107
+ FutureWarning ,
2108
+ stacklevel = 2 ,
2109
+ )
2110
+
2086
2111
if open is None :
2087
2112
import dbm
2088
2113
@@ -2200,6 +2225,10 @@ class LMDBStore(Store):
2200
2225
"""Storage class using LMDB. Requires the `lmdb <https://lmdb.readthedocs.io/>`_
2201
2226
package to be installed.
2202
2227
2228
+ .. deprecated:: 2.18.0
2229
+ LMDBStore will be removed in Zarr-Python 3.0. See
2230
+ `GH1274 <https://github.com/zarr-developers/zarr-python/issues/1274>`_
2231
+ for more information.
2203
2232
2204
2233
Parameters
2205
2234
----------
@@ -2261,6 +2290,12 @@ def __init__(
2261
2290
):
2262
2291
import lmdb
2263
2292
2293
+ warnings .warn (
2294
+ V3_DEPRECATION_MESSAGE .format (store = self .__class__ .__name__ ),
2295
+ FutureWarning ,
2296
+ stacklevel = 2 ,
2297
+ )
2298
+
2264
2299
# set default memory map size to something larger than the lmdb default, which is
2265
2300
# very likely to be too small for any moderate array (logic copied from zict)
2266
2301
map_size = 2 ** 40 if sys .maxsize >= 2 ** 32 else 2 ** 28
@@ -2580,6 +2615,11 @@ def __delitem__(self, key):
2580
2615
class SQLiteStore (Store ):
2581
2616
"""Storage class using SQLite.
2582
2617
2618
+ .. deprecated:: 2.18.0
2619
+ SQLiteStore will be removed in Zarr-Python 3.0. See
2620
+ `GH1274 <https://github.com/zarr-developers/zarr-python/issues/1274>`_
2621
+ for more information.
2622
+
2583
2623
Parameters
2584
2624
----------
2585
2625
path : string
@@ -2612,6 +2652,12 @@ class SQLiteStore(Store):
2612
2652
def __init__ (self , path , dimension_separator : Optional [DIMENSION_SEPARATOR ] = None , ** kwargs ):
2613
2653
import sqlite3
2614
2654
2655
+ warnings .warn (
2656
+ V3_DEPRECATION_MESSAGE .format (store = self .__class__ .__name__ ),
2657
+ FutureWarning ,
2658
+ stacklevel = 2 ,
2659
+ )
2660
+
2615
2661
self ._dimension_separator = dimension_separator
2616
2662
2617
2663
# normalize path
@@ -2778,6 +2824,11 @@ class MongoDBStore(Store):
2778
2824
2779
2825
.. note:: This is an experimental feature.
2780
2826
2827
+ .. deprecated:: 2.18.0
2828
+ MongoDBStore will be removed in Zarr-Python 3.0. See
2829
+ `GH1274 <https://github.com/zarr-developers/zarr-python/issues/1274>`_
2830
+ for more information.
2831
+
2781
2832
Requires the `pymongo <https://pymongo.readthedocs.io/en/stable/>`_
2782
2833
package to be installed.
2783
2834
@@ -2810,6 +2861,12 @@ def __init__(
2810
2861
):
2811
2862
import pymongo
2812
2863
2864
+ warnings .warn (
2865
+ V3_DEPRECATION_MESSAGE .format (store = self .__class__ .__name__ ),
2866
+ FutureWarning ,
2867
+ stacklevel = 2 ,
2868
+ )
2869
+
2813
2870
self ._database = database
2814
2871
self ._collection = collection
2815
2872
self ._dimension_separator = dimension_separator
@@ -2866,6 +2923,11 @@ class RedisStore(Store):
2866
2923
2867
2924
.. note:: This is an experimental feature.
2868
2925
2926
+ .. deprecated:: 2.18.0
2927
+ RedisStore will be removed in Zarr-Python 3.0. See
2928
+ `GH1274 <https://github.com/zarr-developers/zarr-python/issues/1274>`_
2929
+ for more information.
2930
+
2869
2931
Requires the `redis <https://redis-py.readthedocs.io/>`_
2870
2932
package to be installed.
2871
2933
@@ -2885,6 +2947,12 @@ def __init__(
2885
2947
):
2886
2948
import redis
2887
2949
2950
+ warnings .warn (
2951
+ V3_DEPRECATION_MESSAGE .format (store = self .__class__ .__name__ ),
2952
+ FutureWarning ,
2953
+ stacklevel = 2 ,
2954
+ )
2955
+
2888
2956
self ._prefix = prefix
2889
2957
self ._kwargs = kwargs
2890
2958
self ._dimension_separator = dimension_separator
0 commit comments