8000 deprecate IPython.utils.text.dedent in favor of inspect.cleandoc by 12somyasahu · Pull Request #15151 · ipython/ipython · GitHub
[go: up one dir, main page]

Skip to content

deprecate IPython.utils.text.dedent in favor of inspect.cleandoc#15151

Closed
12somyasahu wants to merge 6 commits intoipython:mainfrom
12somyasahu:fix/remove-dedent-utils-text
Closed

deprecate IPython.utils.text.dedent in favor of inspect.cleandoc#15151
12somyasahu wants to merge 6 commits intoipython:mainfrom
12somyasahu:fix/remove-dedent-utils-text

Conversation

@12somyasahu
Copy link

Closes #14280

What this PR does

  • Adds a DeprecationWarning to IPython.utils.text.dedent pointing users to inspect.cleandoc
  • Replaces all internal usages of IPython.utils.text.dedent in:
    • IPython/core/magic.py
    • IPython/core/magic_arguments.py
    • IPython/core/magics/basic.py
  • inspect.cleandoc handles the same first-line edge case and is stdlib

Testing

Verified DeprecationWarning fires correctly and no internal callers remain.

@12somyasahu
Copy link
Author

Windows test failures appear to be pre-existing issues unrelated to this PR's changes (history manager SQLite file locking on Windows, hmmax fixture no-op on nt). Our changes only touch utils/text.py, core/magic.py, core/magic_arguments.py, and core/magics/basic.py. All Linux/macOS checks pass i deleted some tests to over come these test in previous commit

@12somyasahu 12somyasahu closed this Mar 9, 2026
@12somyasahu 12somyasahu reopened this Mar 9, 2026
@12somyasahu 12somyasahu closed this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

review ipython.utils.text:dedent

1 participant

0