diff --git a/manila/share/drivers/netapp/utils.py b/manila/share/drivers/netapp/utils.py index 68428913ca..1fad8d2e1c 100644 --- a/manila/share/drivers/netapp/utils.py +++ b/manila/share/drivers/netapp/utils.py @@ -15,7 +15,7 @@ # under the License. """Utilities for NetApp drivers.""" -import collections +from collections import abc import decimal import platform import re @@ -107,7 +107,7 @@ def convert_to_list(value): return [] elif isinstance(value, six.string_types): return [value] - elif isinstance(value, collections.Iterable): + elif isinstance(value, abc.Iterable): return list(value) else: return [value] diff --git a/manila/tests/api/contrib/stubs.py b/manila/tests/api/contrib/stubs.py index d375e67498..9b03e0f541 100644 --- a/manila/tests/api/contrib/stubs.py +++ b/manila/tests/api/contrib/stubs.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -import collections +from collections import abc import datetime from manila.common import constants @@ -68,7 +68,7 @@ def stub_share(id, **kwargs): # NOTE(ameade): We must wrap the dictionary in an class in order to stub # object attributes. - class wrapper(collections.Mapping): + class wrapper(abc.Mapping): def __getitem__(self, name): if hasattr(self, name): return getattr(self, name)