Skip to content

Commit

Permalink
Import collections abstract base classes from collections.abc (#15649)
Browse files Browse the repository at this point in the history
Accessing them directly through collections is deprecated since 3.7, and
will no longer work in 3.8.
  • Loading branch information
scop authored and balloob committed Jul 25, 2018
1 parent cbb5d34 commit 397f551
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/google_assistant/smart_home.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Support for Google Assistant Smart Home API."""
import collections
from collections.abc import Mapping
from itertools import product
import logging

Expand Down Expand Up @@ -50,7 +50,7 @@
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
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/notify/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
https://home-assistant.io/components/notify.group/
"""
import asyncio
import collections
from collections.abc import Mapping
from copy import deepcopy
import logging
import voluptuous as vol
Expand Down Expand Up @@ -33,7 +33,7 @@ def update(input_dict, update_source):
Async friendly.
"""
for key, val in update_source.items():
if isinstance(val, collections.Mapping):
if isinstance(val, Mapping):
recurse = update(input_dict.get(key, {}), val)
input_dict[key] = recurse
else:
Expand Down

0 comments on commit 397f551

Please sign in to comment.