Skip to content

Commit

Permalink
Remove show_linewise_tokens deprecated in 8.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Dec 10, 2024
1 parent 09a23c4 commit b499144
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions IPython/core/inputtransformer2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b499144

Please sign in to comment.