Show More
@@ -576,9 +576,9 b' class Completer(Configurable):' | |||
|
576 | 576 | """ |
|
577 | 577 | ).tag(config=True) |
|
578 | 578 | |
|
579 |
use_jedi = Bool(default_value= |
|
|
579 | use_jedi = Bool(default_value=False, | |
|
580 | 580 | help="Experimental: Use Jedi to generate autocompletions. " |
|
581 |
" |
|
|
581 | "Off by default.").tag(config=True) | |
|
582 | 582 | |
|
583 | 583 | jedi_compute_type_timeout = Int(default_value=400, |
|
584 | 584 | help="""Experimental: restrict time (in milliseconds) during which Jedi can compute types. |
@@ -316,13 +316,17 b' def test_jedi():' | |||
|
316 | 316 | start = start if start is not None else l |
|
317 | 317 | end = end if end is not None else l |
|
318 | 318 | with provisionalcompleter(): |
|
319 | ip.Completer.use_jedi = True | |
|
319 | 320 | completions = set(ip.Completer.completions(s, l)) |
|
321 | ip.Completer.use_jedi = False | |
|
320 | 322 | assert_in(Completion(start, end, comp), completions, reason) |
|
321 | 323 | |
|
322 | 324 | def _test_not_complete(reason, s, comp): |
|
323 | 325 | l = len(s) |
|
324 | 326 | with provisionalcompleter(): |
|
327 | ip.Completer.use_jedi = True | |
|
325 | 328 | completions = set(ip.Completer.completions(s, l)) |
|
329 | ip.Completer.use_jedi = False | |
|
326 | 330 | assert_not_in(Completion(l, l, comp), completions, reason) |
|
327 | 331 | |
|
328 | 332 | import jedi |
@@ -341,8 +345,10 b' def test_completion_have_signature():' | |||
|
341 | 345 | """ |
|
342 | 346 | ip = get_ipython() |
|
343 | 347 | with provisionalcompleter(): |
|
348 | ip.Completer.use_jedi = True | |
|
344 | 349 | completions = ip.Completer.completions('ope', 3) |
|
345 | 350 | c = next(completions) # should be `open` |
|
351 | ip.Completer.use_jedi = False | |
|
346 | 352 | assert 'file' in c.signature, "Signature of function was not found by completer" |
|
347 | 353 | assert 'encoding' in c.signature, "Signature of function was not found by completer" |
|
348 | 354 | |
@@ -357,7 +363,9 b' def test_deduplicate_completions():' | |||
|
357 | 363 | zoo = 1 |
|
358 | 364 | ''')) |
|
359 | 365 | with provisionalcompleter(): |
|
366 | ip.Completer.use_jedi = True | |
|
360 | 367 | l = list(_deduplicate_completions('Z.z', ip.Completer.completions('Z.z', 3))) |
|
368 | ip.Completer.use_jedi = False | |
|
361 | 369 | |
|
362 | 370 | assert len(l) == 1, 'Completions (Z.z<tab>) correctly deduplicate: %s ' % l |
|
363 | 371 | assert l[0].text == 'zoo' # and not `it.accumulate` |
@@ -3,6 +3,18 b'' | |||
|
3 | 3 | ============ |
|
4 | 4 | |
|
5 | 5 | |
|
6 | .. _whatsnew631: | |
|
7 | ||
|
8 | IPython 6.3.1 | |
|
9 | ============= | |
|
10 | ||
|
11 | This is a bugfix release to switch the default completions back to IPython's | |
|
12 | own completion machinery. We discovered some problems with the completions | |
|
13 | from Jedi, including completing column names on pandas data frames. | |
|
14 | ||
|
15 | You can switch the completions source with the config option | |
|
16 | :configtrait:`Completer.use_jedi`. | |
|
17 | ||
|
6 | 18 | .. _whatsnew630: |
|
7 | 19 | |
|
8 | 20 | IPython 6.3 |
General Comments 0
You need to be logged in to leave comments.
Login now