From df3c494e028999ea806213c16def21267ee4b550 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 21 Jun 2019 10:17:05 +0200 Subject: [PATCH] Try to use collections.abc.Mapping instead of collections.Mapping The latter is deprecated and will be removed in Python 3.9, fixes #76 --- parso/python/tree.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/parso/python/tree.py b/parso/python/tree.py index baf2226..7d4a490 100644 --- a/parso/python/tree.py +++ b/parso/python/tree.py @@ -43,7 +43,10 @@ Parser Tree Classes """ import re -from collections import Mapping +try: + from collections.abc import Mapping +except ImportError: + from collections import Mapping from parso._compatibility import utf8_repr, unicode from parso.tree import Node, BaseNode, Leaf, ErrorNode, ErrorLeaf, \