IPython 6 Released Supporting Python 3.3 and Above |
Written by Janet Swift | |||
Monday, 24 April 2017 | |||
IPython 6.0 has been released and, as expected, drops support for the Python 2.7 branch. While not everyone will necessarily agree, this is a welcome move that improves IPython. Until 2015 IPython used to refer to an open source shell for interactive and parallel computing widely used in scientific computing, the key component of which is a browser-based notebook, which could be used from many languages. To reflect its use with many languages this is now know as Jupyter and IPython refers only to Python kernel for Jupyter and the interactive Python shell. When IPython 5.0 was released a year ago it was as a long term release (LTS) with the express intention that IPython 6.0 and subsequent versions would support Python 3.3 and higher and the new features in Python 6.x will not be backported. In the announcement of the new release on the Juypiter blog, Matthias Bussonnier writes: The size of the IPython codebase has decreased by about 1500 lines of Python code relative to the last release. Of course, that’s not solely due to the removal of Python 2 support, but a non-negligible amount is. And this reduction is even more remarkable in light of completely new features that required adding hundreds of lines of code. A large number of conditionals are gone, making the code more straightforward, easier to read, and simpler to maintain. Across the codebase we saw improvements in code compactness just from removing utility functions that existed only to provide identical behavior across Python 2 and Python 3. Even then, parts of the codebase remain affected by “Python 2 code”, so the potential gains are even greater. We will continue our quest to remove things as we go, and, as usual, contributions are welcome. The What's new in I Python Release notes state: The removal as of Python2/Python3 shim layer has made the code clearer and more idiomatic in a number of location, and much friendlier to work with and understand. We hope to further embrace Python 3 capability in the next release cycle and introduce more of the Python 3 only idioms (yield from, kwarg only, general unpacking) in the code base of IPython, and see if we can take advantage of these as well to improve user experience with better error messages and hints. The new feature highlighted in the release announcement is integration with Jedi, a package which is described as: an awesome autocompletion/static analysis library for Python Its role in IPython is to provide completions using static analysis, and display completion types:
According to Bussonnier: This will provide a foundation for a richer tab completion experience (e.g., it allows extracting and displaying function signatures in the completer). As of now, these features are available only for command line users, but work is underway in IPykernel and in various frontends (like nteract) to make use of these features. If you are upgrading IPython - either on the Python 2.x branch or the Python 3.3+ branch - first ensure you have an up to date version of pip, specifically pip 9.0.1 or later. This will detect the version of Python you are using and install the latest compatible version of IPython - IPython 5.x if you are on Python 2, and IPython 6.x if you are on Python 3. Even though you can still use IPython on the Python 2.x branch, hopefully the new features and the improved performance of IPython 6 will help those clinging to old versions of Python to upgrade to the latest. More InformationRelated ArticlesJupyter 4.0 Completed By Release of IPython 4.0 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.
Comments
or email your comment to: comments@i-programmer.info |
|||
Last Updated ( Friday, 05 May 2017 ) |