Import collections abstract base classes from collections.abc (#15649)

Accessing them directly through collections is deprecated since 3.7, and
will no longer work in 3.8.
This commit is contained in:
Ville Skyttä 2018-07-25 12:35:22 +03:00 committed by Paulus Schoutsen
parent cbb5d34167
commit 397f551e6d
2 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,5 @@
"""Support for Google Assistant Smart Home API."""
import collections
from collections.abc import Mapping
from itertools import product
import logging
@ -50,7 +50,7 @@ DOMAIN_TO_GOOGLE_TYPES = {
def deep_update(target, source):
"""Update a nested dictionary with another nested dictionary."""
for key, value in source.items():
if isinstance(value, collections.Mapping):
if isinstance(value, Mapping):
target[key] = deep_update(target.get(key, {}), value)
else:
target[key] = value