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. Closes-Bug: #1936667 Change-Id: Ia6316894a67cc0ea7ee0d2110565b45546c813e7
This commit is contained in:
parent
9e3ba872d0
commit
05bdafd3a4
|
@ -15,7 +15,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import collections
|
||||
import collections.abc
|
||||
import contextlib
|
||||
import datetime
|
||||
import inspect
|
||||
|
@ -525,7 +525,7 @@ def is_iterable(obj):
|
|||
:return: True if object is iterable and is not a string
|
||||
"""
|
||||
return (not isinstance(obj, six.string_types) and
|
||||
isinstance(obj, collections.Iterable))
|
||||
isinstance(obj, collections.abc.Iterable))
|
||||
|
||||
|
||||
def safe_copy_dict(obj):
|
||||
|
|
Loading…
Reference in New Issue