Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 1 addition & 44 deletions xarray/backends/common.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import logging
import time
import traceback
import warnings
from collections.abc import Mapping

import numpy as np

Expand Down Expand Up @@ -74,18 +72,9 @@ def __array__(self, dtype=None):
return np.asarray(self[key], dtype=dtype)


class AbstractDataStore(Mapping):
class AbstractDataStore:
__slots__ = ()

def __iter__(self):
return iter(self.variables)

def __getitem__(self, key):
return self.variables[key]

def __len__(self):
return len(self.variables)

def get_dimensions(self): # pragma: no cover
raise NotImplementedError()

Expand Down Expand Up @@ -125,38 +114,6 @@ def load(self):
attributes = FrozenDict(self.get_attrs())
return variables, attributes

@property
def variables(self): # pragma: no cover
warnings.warn(
"The ``variables`` property has been deprecated and "
"will be removed in xarray v0.11.",
FutureWarning,
stacklevel=2,
)
variables, _ = self.load()
return variables

@property
def attrs(self): # pragma: no cover
warnings.warn(
"The ``attrs`` property has been deprecated and "
"will be removed in xarray v0.11.",
FutureWarning,
stacklevel=2,
)
_, attrs = self.load()
return attrs

@property
def dimensions(self): # pragma: no cover
warnings.warn(
"The ``dimensions`` property has been deprecated and "
"will be removed in xarray v0.11.",
FutureWarning,
stacklevel=2,
)
return self.get_dimensions()

def close(self):
pass

Expand Down