IPython 8 Improves Code Reformatting
Written by Kay Ewbank   
Tuesday, 18 January 2022

IPython has been updated with improvements including code reformatting, ghost suggestions, and better tracebacks which highlight the error node. IPython 8 comes three years after the release of version 7.0

IPython is a Python REPL that offers tab completion, better tracebacks, multiline editing, and several useful features on top of pure Python Scripts. It is also the library that powers the Jupyter Kernel via the IPykernel.

Until 2015 IPython used to refer to the open source shell for interactive and parallel computing that was renamed as Jupyter. From that point onwards, IPython is used to refer to the Python kernel for Jupyter and the interactive Python shell.

This release removes compatibility with older version of Python, providing an opportunity to incorporate performance improvements, in particular with respect to startup time.

More importantly, the code base has been substantially updated, ensuring that IPython is no longer reliant on Nose, which has been unmaintained for many years.IPython now uses pytest, and the reworkings have significantly increased IPython coverage. Many known bugs have also been removed.

The build process has also been heavily reworked. It now uses pyproject.tomlto have a declarative build. The developers say they still require setuptools and have setup.py files right now, but they are working towards removing/simplifying them soon.

In terms of actual improvements, the first change is to code reformat. If black is installed in the same environment as IPython, terminal IPython will now by default reformat the code in the CLI when possible.

Ghost autosuggestons have also been added. The developers point out that autosuggestion is a very useful feature available in fish, zsh, and prompt-toolkit, and it has now been added to IPython, meaning users will see autosuggestions and will be able to accept them with ctrl e, ctrl f, or right arrow.

Traceback improvements are one of the more useful areas to have been improved. In the earlier release, error tracebacks for errors happening in code cells showed as a hash. The error traceback is now correctly formatted, showing the cell number in which the error happened. Another traceback improvement comes through integration of the stack_data package; which provide smarter informations in traceback; in particular it will highlight the AST node where an error occurs to narrow down errors.

IPython 8 is available now.

More Information

IPython On GitHub

Related Articles

Jupyter Project Celebrates 20 Year Anniversary

Jupyter 4 Completed By Release Of IPython 4

IPython 5.0-LTS Released  

IPython 3.0 Released 

Python 3 Gains Support and Enthusiasm

Python 3 For Science - A Survey

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Raspberry Pi Beaten To It With Pico Plus 2
02/10/2024

RPi recently announced the Pico 2, but while we are all waiting for the more useful Pico 2W, with WiFi, the tiny Pimoroni outfit has produced something better - the Pico Plus 2 with WiFi. What is goin [ ... ]



Paul Allen's Living Computers Sold For Record Prices
04/10/2024

Auction house Christie's of New York broke existing records for sales of rare and iconic computers when it sold the collection that the late Paul Allen, co-founder of Microsoft, had assembled to  [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info