##// END OF EJS Templates
add docstring, and emit deprecation warnings
Matthias Bussonnier -
Show More
@@ -16,6 +16,11 b' and stores the results.'
16 For more details, see the class docstrings below.
16 For more details, see the class docstrings below.
17 """
17 """
18
18
19 from warnings import warn
20
21 warn('IPython.core.inputsplitter is deprecated since IPython 7 in favor of `IPython.core.inputtransformer2`',
22 DeprecationWarning)
23
19 # Copyright (c) IPython Development Team.
24 # Copyright (c) IPython Development Team.
20 # Distributed under the terms of the Modified BSD License.
25 # Distributed under the terms of the Modified BSD License.
21 import ast
26 import ast
@@ -349,10 +349,15 b' class InteractiveShell(SingletonConfigurable):'
349
349
350 @property
350 @property
351 def input_splitter(self):
351 def input_splitter(self):
352 """Make this available for compatibility
352 """Make this available for backward compatibility (pre-7.0 release) with existing code.
353
353
354 ipykernel currently uses shell.input_splitter.check_complete
354 For example, ipykernel ipykernel currently uses
355 `shell.input_splitter.check_complete`
355 """
356 """
357 from warnings import warn
358 warn("`input_splitter` is deprecated since IPython 7.0, prefer `input_transformer_manager`.",
359 DeprecationWarning, stacklevel=2
360 )
356 return self.input_transformer_manager
361 return self.input_transformer_manager
357
362
358 logstart = Bool(False, help=
363 logstart = Bool(False, help=
@@ -1,3 +1,9 b''
1 """Tests for the token-based transformers in IPython.core.inputtransformer2
2
3 Line-based transformers are the simpler ones; token-based transformers are
4 more complex.
5 """
6
1 import nose.tools as nt
7 import nose.tools as nt
2
8
3 from IPython.core import inputtransformer2 as ipt2
9 from IPython.core import inputtransformer2 as ipt2
General Comments 0
You need to be logged in to leave comments. Login now