From 63ea325d42466ca5e6dac7fe856c5a8f0b7264e0 2024-12-10 14:50:45 From: M Bussonnier Date: 2024-12-10 14:50:45 Subject: [PATCH] Remove show_linewise_tokens deprecated in 8.6 (#14571) --- diff --git a/IPython/core/inputtransformer2.py b/IPython/core/inputtransformer2.py index 15d3f06..1fd2626 100644 --- a/IPython/core/inputtransformer2.py +++ b/IPython/core/inputtransformer2.py @@ -571,22 +571,6 @@ def has_sunken_brackets(tokens: List[tokenize.TokenInfo]): return True return False - -def show_linewise_tokens(s: str): - """For investigation and debugging""" - warnings.warn( - "show_linewise_tokens is deprecated since IPython 8.6", - DeprecationWarning, - stacklevel=2, - ) - if not s.endswith("\n"): - s += "\n" - lines = s.splitlines(keepends=True) - for line in make_tokens_by_line(lines): - print("Line -------") - for tokinfo in line: - print(" ", tokinfo) - # Arbitrary limit to prevent getting stuck in infinite loops TRANSFORM_LOOP_LIMIT = 500