Skip to content

Commit

Permalink
(cherry picked from 7.20) from Backport PR ipython#12207 on 7.x
Browse files Browse the repository at this point in the history
Full sha of original commit: 5e979ec

This should make jedi 0.18 compatible with 7.x.

Pinning is not an option as the resolver is free to pick older IPython
with jedi 0.18

  --

Bump jedi to at least 0.16.0 and fix deprecated function usage
  • Loading branch information
aiguofer authored and MrMino committed Aug 31, 2021
1 parent 2486838 commit d4084b0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions IPython/core/completer.py
Expand Up @@ -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"""
Expand Down Expand Up @@ -1398,7 +1399,7 @@ def _jedi_matches(self, cursor_column:int, cursor_line:int, text:str):
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))]
Expand Down
16 changes: 8 additions & 8 deletions setup.py
Expand Up @@ -185,14 +185,14 @@
)

install_requires = [
'setuptools>=18.5',
'jedi>=0.10',
'decorator',
'pickleshare',
'traitlets>=4.2',
'prompt_toolkit>=2.0.0,<3.1.0,!=3.0.0,!=3.0.1',
'pygments',
'backcall',
"setuptools>=18.5",
"jedi>=0.16",
"decorator",
"pickleshare",
"traitlets>=4.2",
"prompt_toolkit>=2.0.0,<3.1.0,!=3.0.0,!=3.0.1",
"pygments",
"backcall",
]

# Platform-specific dependencies:
Expand Down

0 comments on commit d4084b0

Please sign in to comment.