diff options
author | Chandan Singh <csingh43@bloomberg.net> | 2019-02-19 01:13:38 +0530 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-02-19 06:37:04 +0000 |
commit | fca37d0d75fc7b9010d3f81add838d563f97afd8 (patch) | |
tree | 2013999d09e720cb9264865975b7c54f84abe40d | |
parent | 067a0c6bcc02559b13c9f090ffbb420f9b4023d0 (diff) | |
download | buildstream-fca37d0d75fc7b9010d3f81add838d563f97afd8.tar.gz |
buildstream/_yaml.py: Import Mapping from collections.abc
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)] |