Import ABC from collections.abc (#2704)

Signed-off-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
This commit is contained in:
Karthikeyan Singaravelan 2020-07-22 14:21:58 +05:30 committed by GitHub
parent d9dfa98819
commit e86666b6b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ import os
import copy
import json
import logging
import collections
import collections.abc
from functools import lru_cache
from pkg_resources import iter_entry_points, ResolutionError
@ -52,7 +52,7 @@ def map_leafs(func, mapping):
path = []
for key, val in mapping.items():
if isinstance(val, collections.Mapping):
if isinstance(val, collections.abc.Mapping):
_inner(val, path + [key])
else:
mapping[key] = func(val, path=path+[key])
@ -80,7 +80,7 @@ def update(d, u):
mapping: An updated version of d (updated by u).
"""
for k, v in u.items():
if isinstance(v, collections.Mapping):
if isinstance(v, collections.abc.Mapping):
r = update(d.get(k, {}), v)
d[k] = r
else: