summaryrefslogtreecommitdiff
path: root/trove/common/utils.py
diff options
context:
space:
mode:
authorTakashi Kajinami <tkajinam@redhat.com>2021-07-22 19:36:26 +0900
committerTakashi Kajinami <tkajinam@redhat.com>2021-08-02 07:42:32 +0000
commit0b0c35999b6678b650861fd409239a42b3718f6a (patch)
treec8051bd205e4cf4bc83f33aa07f73674672c1ebf /trove/common/utils.py
parent036948c516672e55c4a2c932c74bcdec80319108 (diff)
downloadtrove-0b0c35999b6678b650861fd409239a42b3718f6a.tar.gz
Replace deprecated import of ABCs from collections
ABCs in collections should be imported from collections.abc and direct import from collections is deprecated since Python 3.3. Change-Id: Ic4c1cb4d9ce7595d1e684c26229a5148b5f4befa
Diffstat (limited to 'trove/common/utils.py')
-rw-r--r--trove/common/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/trove/common/utils.py b/trove/common/utils.py
index 49823db5..bbddef87 100644
--- a/trove/common/utils.py
+++ b/trove/common/utils.py
@@ -14,7 +14,7 @@
# under the License.
"""I totally stole most of this from melange, thx guys!!!"""
-import collections
+from collections import abc
import inspect
import os
import shutil
@@ -331,7 +331,7 @@ def unpack_singleton(container):
def is_collection(item):
"""Return True is a given item is an iterable collection, but not a string.
"""
- return (isinstance(item, collections.Iterable) and
+ return (isinstance(item, abc.Iterable) and
not isinstance(item, (bytes, str)))