fix depricated collections calls
This commit is contained in:
parent
d6d3a6bc0f
commit
089d5589f1
|
@ -216,12 +216,12 @@ def _merge(d, u):
|
||||||
"""
|
"""
|
||||||
for k, v in u.items():
|
for k, v in u.items():
|
||||||
# if we have a mapping, recursively merge the values
|
# if we have a mapping, recursively merge the values
|
||||||
if isinstance(v, collections.Mapping):
|
if isinstance(v, collections.abc.Mapping):
|
||||||
d[k] = _merge(d.get(k, {}), v)
|
d[k] = _merge(d.get(k, {}), v)
|
||||||
|
|
||||||
# if d (the dict to merge into) is a dict, just add the
|
# if d (the dict to merge into) is a dict, just add the
|
||||||
# value to the dict.
|
# value to the dict.
|
||||||
elif isinstance(d, collections.MutableMapping):
|
elif isinstance(d, collections.abc.MutableMapping):
|
||||||
d[k] = v
|
d[k] = v
|
||||||
|
|
||||||
# otherwise if d (the dict to merge into) is not a dict (e.g. when
|
# otherwise if d (the dict to merge into) is not a dict (e.g. when
|
||||||
|
|
Loading…
Reference in New Issue