summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandan Singh <csingh43@bloomberg.net>2019-02-19 01:13:38 +0530
committerJürg Billeter <j@bitron.ch>2019-02-19 06:37:04 +0000
commitfca37d0d75fc7b9010d3f81add838d563f97afd8 (patch)
tree2013999d09e720cb9264865975b7c54f84abe40d
parent067a0c6bcc02559b13c9f090ffbb420f9b4023d0 (diff)
downloadbuildstream-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.py2
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)]