Skip to content

Commit 1cfba80

Browse files
committed
Fix jedi 0.16.0 deprecation warnings
Also bump the dependency to >= 0.16.0
1 parent 5d25fa9 commit 1cfba80

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.travis.install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if [[ $RUN == nosetests ]]; then
1010
# filewatch specific dependencies
1111
pip install watchdog
1212
# jedi specific dependencies
13-
pip install jedi
13+
pip install 'jedi >= 0.16'
1414
# translation specific dependencies
1515
pip install babel
1616
# build and install

bpython/autocomplete.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,9 +520,9 @@ def matches(self, cursor_offset, line, **kwargs):
520520

521521
try:
522522
script = jedi.Script(
523-
history, len(history.splitlines()), cursor_offset, "fake.py"
523+
history, path="fake.py"
524524
)
525-
completions = script.completions()
525+
completions = script.complete(len(history.splitlines()), cursor_offset)
526526
except (jedi.NotFoundError, IndexError, KeyError):
527527
# IndexError for #483
528528
# KeyError for #544

bpython/test/test_autocomplete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def matches_from_completions(
367367
):
368368
with mock.patch("bpython.autocomplete.jedi.Script") as Script:
369369
script = Script.return_value
370-
script.completions.return_value = completions
370+
script.complete.return_value = completions
371371
com = autocomplete.MultilineJediCompletion()
372372
return com.matches(
373373
cursor, line, current_block=block, history=history

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def initialize_options(self):
241241
extras_require = {
242242
"urwid": ["urwid"],
243243
"watch": ["watchdog"],
244-
"jedi": ["jedi"],
244+
"jedi": ["jedi >=0.16"],
245245
}
246246

247247
packages = [

0 commit comments

Comments
 (0)