Merge "Replace deprecated import of ABCs from collections"

This commit is contained in:
Zuul 2021-07-22 17:07:30 +00:00 committed by Gerrit Code Review
commit 82ea5d5680
2 changed files with 4 additions and 4 deletions
manila
share/drivers/netapp
tests/api/contrib

@ -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]

@ -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)