Merge "Replace deprecated import of ABCs from collections"
This commit is contained in:
commit
82ea5d5680
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user