diff options
author | Chandan Singh <csingh43@bloomberg.net> | 2019-02-19 01:13:38 +0530 |
---|---|---|
committer | Chandan Singh <csingh43@bloomberg.net> | 2019-02-19 01:13:38 +0530 |
commit | d8a635aff7d2b3e130cefe52435fc59f5046304a (patch) | |
tree | 9abbe465eeeaf71b6c6c9554d1e8cbccdd778a89 | |
parent | de70f8c02769f9a63898126589fd0ef7b8f8ce7c (diff) | |
download | buildstream-chandan/fix-mapping-import.tar.gz |
buildstream/_yaml.py: Import Mapping from collections.abcchandan/fix-mapping-import
Instead of importing `Mapping` from `collections`, it must be imported
from `collections.abc`, as the old method will stop working from Python
3.8.
-rw-r--r-- | buildstream/_yaml.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/buildstream/_yaml.py b/buildstream/_yaml.py index 7e12183e3..230094c22 100644 --- a/buildstream/_yaml.py +++ b/buildstream/_yaml.py @@ -940,7 +940,7 @@ def node_sanitize(node): return [node_sanitize(elt) for elt in node] # Finally ChainMap and dict, and other Mappings need special handling - if node_type in (dict, ChainMap) or isinstance(node, collections.Mapping): + if node_type in (dict, ChainMap) or isinstance(node, collections.abc.Mapping): result = SanitizedDict() key_list = [key for key, _ in node_items(node)] |