|
1 | 1 | import logging
|
2 | 2 | import time
|
3 | 3 | import traceback
|
4 |
| -import warnings |
5 |
| -from collections.abc import Mapping |
6 | 4 |
|
7 | 5 | import numpy as np
|
8 | 6 |
|
@@ -74,18 +72,9 @@ def __array__(self, dtype=None):
|
74 | 72 | return np.asarray(self[key], dtype=dtype)
|
75 | 73 |
|
76 | 74 |
|
77 |
| -class AbstractDataStore(Mapping): |
| 75 | +class AbstractDataStore: |
78 | 76 | __slots__ = ()
|
79 | 77 |
|
80 |
| - def __iter__(self): |
81 |
| - return iter(self.variables) |
82 |
| - |
83 |
| - def __getitem__(self, key): |
84 |
| - return self.variables[key] |
85 |
| - |
86 |
| - def __len__(self): |
87 |
| - return len(self.variables) |
88 |
| - |
89 | 78 | def get_dimensions(self): # pragma: no cover
|
90 | 79 | raise NotImplementedError()
|
91 | 80 |
|
@@ -125,38 +114,6 @@ def load(self):
|
125 | 114 | attributes = FrozenDict(self.get_attrs())
|
126 | 115 | return variables, attributes
|
127 | 116 |
|
128 |
| - @property |
129 |
| - def variables(self): # pragma: no cover |
130 |
| - warnings.warn( |
131 |
| - "The ``variables`` property has been deprecated and " |
132 |
| - "will be removed in xarray v0.11.", |
133 |
| - FutureWarning, |
134 |
| - stacklevel=2, |
135 |
| - ) |
136 |
| - variables, _ = self.load() |
137 |
| - return variables |
138 |
| - |
139 |
| - @property |
140 |
| - def attrs(self): # pragma: no cover |
141 |
| - warnings.warn( |
142 |
| - "The ``attrs`` property has been deprecated and " |
143 |
| - "will be removed in xarray v0.11.", |
144 |
| - FutureWarning, |
145 |
| - stacklevel=2, |
146 |
| - ) |
147 |
| - _, attrs = self.load() |
148 |
| - return attrs |
149 |
| - |
150 |
| - @property |
151 |
| - def dimensions(self): # pragma: no cover |
152 |
| - warnings.warn( |
153 |
| - "The ``dimensions`` property has been deprecated and " |
154 |
| - "will be removed in xarray v0.11.", |
155 |
| - FutureWarning, |
156 |
| - stacklevel=2, |
157 |
| - ) |
158 |
| - return self.get_dimensions() |
159 |
| - |
160 | 117 | def close(self):
|
161 | 118 | pass
|
162 | 119 |
|
|
0 commit comments