Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DeprecationWarning on autocompletion with jedi 0.17.0 #12218

Closed
wants to merge 8 commits into from
5 changes: 2 additions & 3 deletions IPython/core/completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1371,8 +1371,7 @@ def _jedi_matches(self, cursor_column:int, cursor_line:int, text:str):
else:
raise ValueError("Don't understand self.omit__names == {}".format(self.omit__names))

interpreter = jedi.Interpreter(
text[:offset], namespaces, column=cursor_column, line=cursor_line + 1)
interpreter = jedi.Interpreter(text[:offset],namespaces)
try_jedi = True

try:
Expand All @@ -1399,7 +1398,7 @@ def _jedi_matches(self, cursor_column:int, cursor_line:int, text:str):
if not try_jedi:
return []
try:
return filter(completion_filter, interpreter.complete())
return filter(completion_filter, interpreter.complete(column=cursor_column, line=cursor_line + 1))
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