From fe0ab8b1ef943b4b1148031c8d0bfa49b4682293 2020-03-27 18:19:07 From: Matthias Bussonnier Date: 2020-03-27 18:19:07 Subject: [PATCH] Merge pull request #12207 from aiguofer/fix_jedi_deprecations Bump jedi to at least 0.16.0 and fix deprecated function usage --- diff --git a/IPython/core/completer.py b/IPython/core/completer.py index 985ac5a..fd3939f 100644 --- a/IPython/core/completer.py +++ b/IPython/core/completer.py @@ -988,7 +988,8 @@ def _make_signature(completion)-> str: """ - return '(%s)'% ', '.join([f for f in (_formatparamchildren(p) for p in completion.params) if f]) + return '(%s)'% ', '.join([f for f in (_formatparamchildren(p) for signature in completion.get_signatures() + for p in signature.defined_names()) if f]) class IPCompleter(Completer): """Extension of the completer class with IPython-specific features""" @@ -1398,7 +1399,7 @@ class IPCompleter(Completer): if not try_jedi: return [] try: - return filter(completion_filter, interpreter.completions()) + return filter(completion_filter, interpreter.complete()) except Exception as e: if self.debug: return [_FakeJediCompletion('Oops Jedi has crashed, please report a bug with the following:\n"""\n%s\ns"""' % (e))] diff --git a/setup.py b/setup.py index 252fe11..9ec67cb 100755 --- a/setup.py +++ b/setup.py @@ -184,7 +184,7 @@ extras_require = dict( install_requires = [ 'setuptools>=18.5', - 'jedi>=0.10', + 'jedi>=0.16', 'decorator', 'pickleshare', 'traitlets>=4.2',