Skip to content
Snippets Groups Projects
Commit fca37d0d authored by Chandan Singh's avatar Chandan Singh Committed by Jürg Billeter
Browse files

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.
parent 067a0c6b
No related branches found
No related tags found
1 merge request!1161buildstream/_yaml.py: Import Mapping from collections.abc
Pipeline #48128900 passed
......@@ -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)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment