From d8a635aff7d2b3e130cefe52435fc59f5046304a Mon Sep 17 00:00:00 2001 From: Chandan Singh Date: Tue, 19 Feb 2019 01:13:38 +0530 Subject: 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. --- buildstream/_yaml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)] -- cgit v1.2.1