May, 2014
IPython 2.1 is the first bugfix release for 2.0. For more information on what fixes have been backported to 2.1, see our detailed release info.
April, 2014
IPython 2.0 requires Python ≥ 2.7.2 or ≥ 3.3.0. It does not support Python 3.0, 3.1, 3.2, 2.5, or 2.6.
The principal milestones of 2.0 are:
Contribution summary since IPython 1.0 in August, 2013:
The amount of work included in this release is so large that we can only cover here the main highlights; please see our detailed release statistics for links to every issue and pull request closed on GitHub as well as a full list of individual contributors.
IPython 2.0 adds IPython.html.widgets, for manipulating Python objects in the kernel with GUI controls in the notebook. IPython comes with a few built-in widgets for simple data types, and an API designed for developers to build more complex widgets. See the widget docs for more information.
The notebook has added separate Edit and Command modes, allowing easier keyboard commands and making keyboard shortcut customization possible. See the new User Interface notebook for more information.
You can familiarize yourself with the updated notebook user interface, including an explanation of Edit and Command modes, by going through the short guided tour which can be started from the Help menu.
2.0 introduces a security model for notebooks, to prevent untrusted code from executing on users’ behalf when notebooks open. A quick summary of the model:
The dashboard now has a “Running” tab which shows all of the running notebooks.
IPython previously supported Python 3 by running 2to3 during setup. We have now switched to a single codebase which runs natively on Python 2.7 and 3.3.
For notes on how to maintain this, see Writing code for Python 2 and 3.
Deprecate single-format InlineBackend.figure_format configurable in favor of InlineBackend.figure_formats, which is a set, supporting multiple simultaneous figure formats (e.g. png, pdf).
This is available at runtime with the new API function IPython.display.set_matplotlib_formats().
Some configurable traits are containers (list, dict, set) Config objects now support calling extend, update, insert, etc. on traits in config files, which will ultimately result in calling those methods on the original object.
The effect being that you can now add to containers without having to copy/paste the initial value:
c = get_config()
c.InlineBackend.rc.update({ 'figure.figsize' : (6, 4) })
The new function use_dill() allows dill to extend serialization support in IPython.parallel (closures, etc.). A DirectView.use_dill() convenience method was also added, to enable dill locally and on all engines with one call.
The IPython console lexer has been rewritten and now supports tracebacks and customized input/output prompts. See the new lexer docs for details.
There was no official way to query or remove callbacks in the Formatter API. To remedy this, the following methods are added to BaseFormatter:
All of the above methods raise a KeyError if no match is found.
And the following methods are changed:
Formatters can now raise NotImplementedError in addition to returning None to indicate that they cannot format a given object.
Exceptions are no longer silenced when formatters fail. Instead, these are turned into a FormatterWarning. A FormatterWarning will also be issued if a formatter returns data of an invalid type (e.g. an integer for ‘image/png’).
Python 2.6 and 3.2 are no longer supported: the minimum required Python versions are now 2.7 and 3.3.
The Transformer classes have been renamed to Preprocessor in nbconvert and their call methods have been renamed to preprocess.
The call methods of nbconvert post-processsors have been renamed to postprocess.
The module IPython.core.fakemodule has been removed.
The alias system has been reimplemented to use magic functions. There should be little visible difference while automagics are enabled, as they are by default, but parts of the AliasManager API have been removed.
We fixed an issue with switching between matplotlib inline and GUI backends, but the fix requires matplotlib 1.1 or newer. So from now on, we consider matplotlib 1.1 to be the minimally supported version for IPython. Older versions for the most part will work, but we make no guarantees about it.
The pycolor command has been removed. We recommend the much more capable pygmentize command from the Pygments project. If you need to keep the exact output of pycolor, you can still use python -m IPython.utils.PyColorize foo.py.
IPython.lib.irunner and its command-line entry point have been removed. It had fallen out of use long ago.
The input_prefilter hook has been removed, as it was never actually used by the code. The input transformer system offers much more powerful APIs to work with input code. See Custom input transformation for details.
IPython.core.inputsplitter.IPythonInputSplitter no longer has a method source_raw_reset(), but gains raw_reset() instead. Use of source_raw_reset can be replaced with:
raw = isp.source_raw
transformed = isp.source_reset()
The Azure notebook manager was removed as it was no longer compatible with the notebook storage scheme.
Simplifying configurable URLs