##// END OF EJS Templates
Remove unused IPython.utils.rlineimpl readline module...
Thomas Kluyver -
Show More
@@ -25,6 +25,7 b' import re'
25 import sys
25 import sys
26 import unicodedata
26 import unicodedata
27 import string
27 import string
28 import warnings
28
29
29 from traitlets.config.configurable import Configurable
30 from traitlets.config.configurable import Configurable
30 from IPython.core.error import TryNext
31 from IPython.core.error import TryNext
@@ -589,7 +590,7 b' class IPCompleter(Completer):'
589 ).tag(config=True)
590 ).tag(config=True)
590
591
591 def __init__(self, shell=None, namespace=None, global_namespace=None,
592 def __init__(self, shell=None, namespace=None, global_namespace=None,
592 use_readline=True, config=None, **kwargs):
593 use_readline=False, config=None, **kwargs):
593 """IPCompleter() -> completer
594 """IPCompleter() -> completer
594
595
595 Return a completer object suitable for use by the readline library
596 Return a completer object suitable for use by the readline library
@@ -608,20 +609,15 b' class IPCompleter(Completer):'
608 both Python scopes are visible.
609 both Python scopes are visible.
609
610
610 use_readline : bool, optional
611 use_readline : bool, optional
611 If true, use the readline library. This completer can still function
612 DEPRECATED, ignored.
612 without readline, though in that case callers must provide some extra
613 """
613 information on each call about the current line."""
614
614
615 self.magic_escape = ESC_MAGIC
615 self.magic_escape = ESC_MAGIC
616 self.splitter = CompletionSplitter()
616 self.splitter = CompletionSplitter()
617
617
618 # Readline configuration, only used by the rlcompleter method.
619 if use_readline:
618 if use_readline:
620 # We store the right version of readline so that later code
619 warnings.warn('The use_readline parameter is deprecated since IPython 6.0.',
621 import IPython.utils.rlineimpl as readline
620 DeprecationWarning, stacklevel=2)
622 self.readline = readline
623 else:
624 self.readline = None
625
621
626 # _greedy_changed() depends on splitter and readline being defined:
622 # _greedy_changed() depends on splitter and readline being defined:
627 Completer.__init__(self, namespace=namespace, global_namespace=global_namespace,
623 Completer.__init__(self, namespace=namespace, global_namespace=global_namespace,
@@ -1905,7 +1905,6 b' class InteractiveShell(SingletonConfigurable):'
1905 self.Completer = IPCompleter(shell=self,
1905 self.Completer = IPCompleter(shell=self,
1906 namespace=self.user_ns,
1906 namespace=self.user_ns,
1907 global_namespace=self.user_global_ns,
1907 global_namespace=self.user_global_ns,
1908 use_readline=False,
1909 parent=self,
1908 parent=self,
1910 )
1909 )
1911 self.configurables.append(self.Completer)
1910 self.configurables.append(self.Completer)
@@ -24,7 +24,6 b' class TerminalPdb(Pdb):'
24 compl = IPCompleter(shell=self.shell,
24 compl = IPCompleter(shell=self.shell,
25 namespace={},
25 namespace={},
26 global_namespace={},
26 global_namespace={},
27 use_readline=False,
28 parent=self.shell,
27 parent=self.shell,
29 )
28 )
30 self._ptcomp = IPythonPTCompleter(compl)
29 self._ptcomp = IPythonPTCompleter(compl)
@@ -12,9 +12,6 b' def test_import_ipstruct():'
12 def test_import_PyColorize():
12 def test_import_PyColorize():
13 from IPython.utils import PyColorize
13 from IPython.utils import PyColorize
14
14
15 def test_import_rlineimpl():
16 from IPython.utils import rlineimpl
17
18 def test_import_strdispatch():
15 def test_import_strdispatch():
19 from IPython.utils import strdispatch
16 from IPython.utils import strdispatch
20
17
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now