From 1bcd59262611a573234ec5aeddbeba99ed82a2b5 2017-11-05 16:01:58 From: Rastislav Barlik Date: 2017-11-05 16:01:58 Subject: [PATCH] Support older versions of jedi library --- diff --git a/IPython/core/completer.py b/IPython/core/completer.py index 4a0dc69..7d6cf27 100644 --- a/IPython/core/completer.py +++ b/IPython/core/completer.py @@ -1350,7 +1350,13 @@ class IPCompleter(Completer): try: # should we check the type of the node is Error ? - from parso.tree import ErrorLeaf + try: + # jedi >= 0.11 + from parso.tree import ErrorLeaf + except ImportError: + # jedi < 0.11 + from jedi.parser.tree import ErrorLeaf + next_to_last_tree = interpreter._get_module().tree_node.children[-2] completing_string = False if isinstance(next_to_last_tree, ErrorLeaf): diff --git a/setup.py b/setup.py index 49d0d7b..2276c2a 100755 --- a/setup.py +++ b/setup.py @@ -185,7 +185,7 @@ extras_require = dict( install_requires = [ 'setuptools>=18.5', - 'jedi>=0.11', + 'jedi>=0.10', 'decorator', 'pickleshare', 'simplegeneric>0.8',