diff --git a/IPython/core/inputsplitter.py b/IPython/core/inputsplitter.py index 8df17cd..4e60cae 100644 --- a/IPython/core/inputsplitter.py +++ b/IPython/core/inputsplitter.py @@ -16,6 +16,11 @@ and stores the results. For more details, see the class docstrings below. """ +from warnings import warn + +warn('IPython.core.inputsplitter is deprecated since IPython 7 in favor of `IPython.core.inputtransformer2`', + DeprecationWarning) + # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import ast diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index 55e5e1a..14de263 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -349,10 +349,15 @@ class InteractiveShell(SingletonConfigurable): @property def input_splitter(self): - """Make this available for compatibility + """Make this available for backward compatibility (pre-7.0 release) with existing code. - ipykernel currently uses shell.input_splitter.check_complete + For example, ipykernel ipykernel currently uses + `shell.input_splitter.check_complete` """ + from warnings import warn + warn("`input_splitter` is deprecated since IPython 7.0, prefer `input_transformer_manager`.", + DeprecationWarning, stacklevel=2 + ) return self.input_transformer_manager logstart = Bool(False, help= diff --git a/IPython/core/tests/test_inputtransformer2.py b/IPython/core/tests/test_inputtransformer2.py index 0970f16..ebe3a1e 100644 --- a/IPython/core/tests/test_inputtransformer2.py +++ b/IPython/core/tests/test_inputtransformer2.py @@ -1,3 +1,9 @@ +"""Tests for the token-based transformers in IPython.core.inputtransformer2 + +Line-based transformers are the simpler ones; token-based transformers are +more complex. +""" + import nose.tools as nt from IPython.core import inputtransformer2 as ipt2