What’s New in IPython 8.0: Enhanced Error Tracing, Auto‑Completion, and Black Formatting
IPython 8.0, released after three years of development, brings improved error tracebacks with stack‑data integration, richer auto‑completion suggestions, automatic Black code formatting in the CLI, and refined %history handling, while requiring Python 3.8 or newer.
Optimized Error Tracebacks
Earlier IPython versions displayed a hash value in error tracebacks; version 8.0 now formats tracebacks correctly, showing the exact cell number where the bug occurs and appending file:line information, allowing editors and terminals to jump directly to the source.
The release also bundles the stack_data package, which highlights the AST node that caused the error, making debugging faster and more precise.
Auto‑Completion Suggestions
IPython 8.0 re‑introduces Ptpython‑style auto‑completion suggestions. Users can accept suggestions with Ctrl‑F , Ctrl‑E , or the right‑arrow key, and Alt‑F accepts only the first word of the suggestion. These suggestions are currently available only in Emacs or Vi editing modes.
Object Inspection with “?” and “??”
Both the IPDB debugger and the IPython prompt now support the familiar ? and ?? syntax to display object information.
Black Auto‑Formatting in the CLI
If the black formatter is installed in the same environment as IPython, the CLI will automatically reformat entered code by default; this behavior can be disabled with c.TerminalInteractiveShell.autoformatter = None .
Enhanced History Range and Glob Modes
The %history magic now correctly handles simultaneous use of explicit range specifications and global (glob) patterns, applying the glob mode to the selected range instead of ignoring it as in previous versions.
Additional Notes
To use IPython 8.0, Python 3.8 or newer is required. For more details, see the official release notes at IPython documentation and the referenced articles.
Python Programming Learning Circle
A global community of Chinese Python developers offering technical articles, columns, original video tutorials, and problem sets. Topics include web full‑stack development, web scraping, data analysis, natural language processing, image processing, machine learning, automated testing, DevOps automation, and big data.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.