# All → python → IPython → 6.5.0

Description:
Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.
Tracked by:
, , , , , , , , , , , , , , , , , , , , , , , , , ,
Moderated by:
Last update was:
5 hours, 56 minutes ago
Time to next update:
5 hours, 32 minutes
Versions:
• #### 6.2

##### Unreleased
###### Source: en/stable/whatsnew/version6.html

IPython 6.2 contains all the bugs fixes and features available in IPython 5.5, like built in progress bar support, and system-wide configuration

The following features are specific to IPython 6.2:

### Function signature in completions¶

Terminal IPython will now show the signature of the function while completing. Only the currently highlighted function will show its signature on the line below the completer by default. This functionality is recent, so it might be limited; we welcome bug reports and requests for enhancements. PR #10507

### Assignments return values¶

IPython can now trigger the display hook on the last assignment of cells. Up until 6.2 the following code wouldn’t show the value of the assigned variable:

In[1]: xyz = "something"
# nothing shown


You would have to actually make it the last statement:

In [2]: xyz = "something else"
...   : xyz
Out[2]: "something else"


With the option InteractiveShell.ast_node_interactivity='last_expr_or_assign' you can now do:

In [2]: xyz = "something else"
Out[2]: "something else"


This option can be toggled at runtime with the %config magic, and will trigger on assignment a = 1, augmented assignment +=, -=, |= … as well as type annotated assignments: a:int = 2.

See PR #10598

### Recursive Call of ipdb¶

Advanced users of the debugger can now correctly recursively enter ipdb. This is thanks to @segevfiner on PR #10721.

• #### 6.5.0

##### Discovered at July 30, 2018
###### Source: en/stable/whatsnew/version6.html

Miscellaneous bug fixes and compatibility with Python 3.7.

• Autocompletion fix for modules with out __init__.py PR #11227
• update the %pastebin magic to use dpaste.com instead of GitHub Gist which now requires authentication PR #11182
• Fix crash with multiprocessing PR #11185
• #### 6.4.0

##### Discovered at June 14, 2018
###### Source: en/stable/whatsnew/version6.html

Everything new in IPython 5.7

• #### 6.3.1

##### Discovered at June 14, 2018
###### Source: en/stable/whatsnew/version6.html

This is a bugfix release to switch the default completions back to IPython’s own completion machinery. We discovered some problems with the completions from Jedi, including completing column names on pandas data frames.

You can switch the completions source with the config option Completer.use_jedi.

• #### 6.3

##### Discovered at June 14, 2018
###### Source: en/stable/whatsnew/version6.html

IPython 6.3 contains all the bug fixes and features in IPython 5.6. In addition:

• A new display class IPython.display.Code can be used to display syntax highlighted code in a notebook (PR #10978).
• The html magic now takes a --isolated option to put the content in an iframe (PR #10962).
• The code to find completions using the Jedi library has had various adjustments. This is still a work in progress, but we hope this version has fewer annoyances (PR #10956, PR #10969, PR #10999, PR #11035, PR #11063, PR #11065).
• The post event callbacks are now always called, even when the execution failed (for example because of a SyntaxError).
• The execution info and result objects are now made available in the corresponding pre or post *_run_cell event callbacks in a backward compatible manner (#10774 and PR #10795).
• Performance with very long code cells (hundreds of lines) is greatly improved (PR #10898). Further improvements are planned for IPython 7.

You can see all pull requests for the 6.3 milestone.

• #### 6.2.1

##### Discovered at March 10, 2018
###### Source: en/stable/whatsnew/version6.html

IPython 6.2.1 ships with two minor fixes leading to no completions when using Jedi 0.11+ PR #10829, and crash on some linux system with virtualenv PR #10829

• #### 6.1

##### Discovered at March 10, 2018
###### Source: en/stable/whatsnew/version6.html
• Quotes in a filename are always escaped during tab-completion on non-Windows. PR #10069

• Variables now shadow magics in autocompletion. See #4877 and PR #10542.

In [2]: %alias_magic hist history --params "-l 2" --line
Created %hist as an alias for %history -l 2.

In [3]: hist
%alias_magic hist history --params "-l 30" --line
%alias_magic hist history --params "-l 2" --line


Previously it was only possible to have an alias attached to a single function, and you would have to pass in the given parameters every time:

In [4]: %alias_magic hist history --line
Created %hist as an alias for %history.

In [5]: hist -l 2
hist
%alias_magic hist history --line

• To suppress log state messages, you can now either use %logstart -q, pass --LoggingMagics.quiet=True on the command line, or set c.LoggingMagics.quiet=True in your configuration file.

• An additional flag --TerminalInteractiveShell.term_title_format is introduced to allow the user to control the format of the terminal title. It is specified as a python format string, and currently the only variable it will format is {cwd}.

• ??/%pinfo2 will now show object docstrings if the source can’t be retrieved. PR #10532

• IPython.display has gained a %markdown cell magic. PR #10563

• %config options can now be tab completed. PR #10555

• %config with no arguments are now unique and sorted. PR #10548

• Completion on keyword arguments does not duplicate = sign if already present. PR #10547

• %run -m <module> now <module> passes extra arguments to <module>. PR #10546

• completer now understand “snake case auto complete”: if foo_bar_kittens is a valid completion, I can type f_b<tab> will complete to it. PR #10537

• tracebacks are better standardized and will compress /path/to/home to ~. PR #10515

The following changes were also added to IPython 5.4, see what’s new in IPython 5.4 for more detail description:

• TerminalInteractiveShell is configurable and can be configured to (re)-use the readline interface.
• objects can now define a _repr_mimebundle_
• Execution heuristics improve for single line statements
• display() can now return a display id to update display areas.
• #### 6.0

##### Released at April 19, 2017
###### Source: en/stable/whatsnew/version6.html

Released April 19th, 2017

IPython 6 features a major improvement in the completion machinery which is now capable of completing non-executed code. It is also the first version of IPython to stop compatibility with Python 2, which is still supported on the bugfix only 5.x branch. Read below for a non-exhaustive list of new features.

Make sure you have pip > 9.0 before upgrading. You should be able to update by using:

pip install ipython --upgrade


Note

If your pip version is greater than or equal to pip 9.0.1 you will automatically get the most recent version of IPython compatible with your system: on Python 2 you will get the latest IPython 5.x bugfix, while in Python 3 you will get the latest 6.x stable version.

### New completion API and Interface¶

The completer Completion API has seen an overhaul, and the new completer has plenty of improvements both from the end users of terminal IPython and for consumers of the API.

This new API is capable of pulling completions from jedi, thus allowing type inference on non-executed code. If jedi is installed, completions like the following are now possible without code evaluation:

>>> data = ['Number of users', 123_456]
... data[0].<tab>


That is to say, IPython is now capable of inferring that data[0] is a string, and will suggest completions like .capitalize. The completion power of IPython will increase with new Jedi releases, and a number of bug-fixes and more completions are already available on the development version of jedi if you are curious.

With the help of prompt toolkit, types of completions can be shown in the completer interface:

The appearance of the completer is controlled by the c.TerminalInteractiveShell.display_completions option that will show the type differently depending on the value among 'column', 'multicolumn' and 'readlinelike'

The use of Jedi also fulfills a number of requests and fixes a number of bugs like case-insensitive completion and completion after division operator: See PR #10182.

Extra patches and updates will be needed to the ipykernel package for this feature to be available to other clients like Jupyter Notebook, Lab, Nteract, Hydrogen…

The use of Jedi should be barely noticeable on recent machines, but can be slower on older ones. To tweak the performance, the amount of time given to Jedi to compute type inference can be adjusted with c.IPCompleter.jedi_compute_type_timeout. The objects whose type were not inferred will be shown as <unknown>. Jedi can also be completely deactivated by using the c.Completer.use_jedi=False option.

The old Completer.complete() API is waiting deprecation and should be replaced replaced by Completer.completions() in the near future. Feedback on the current state of the API and suggestions are welcome.

### Python 3 only codebase¶

One of the large challenges in IPython 6.0 has been the adoption of a pure Python 3 codebase, which has led to upstream patches in pip, pypi and warehouse to make sure Python 2 systems still upgrade to the latest compatible Python version.

We remind our Python 2 users that IPython 5 is still compatible with Python 2.7, still maintained and will get regular releases. Using pip 9+, upgrading IPython will automatically upgrade to the latest version compatible with your system.

Warning

If you are on a system using an older version of pip on Python 2, pip may still install IPython 6.0 on your system, and IPython will refuse to start. You can fix this by upgrading pip, and reinstalling ipython, or forcing pip to install an earlier version: pip install 'ipython<6'

The ability to use only Python 3 on the code base of IPython brings a number of advantages. Most of the newly written code make use of optional function type annotation leading to clearer code and better documentation.

The total size of the repository has also decreased by about 1500 lines (for the first time excluding the big split for 4.0). The decrease is potentially a bit more for the sour as some documents like this one are append only and are about 300 lines long.

The removal of the Python2/Python3 shim layer has made the code quite a lot clearer and more idiomatic in a number of locations, and much friendlier to work with and understand. We hope to further embrace Python 3 capabilities in the next release cycle and introduce more of the Python 3 only idioms (yield from, kwarg only, general unpacking) in the IPython code base, and see if we can take advantage of these to improve user experience with better error messages and hints.

IPython gained a new c.TerminalIPythonApp.interactive_shell_class option that allows customizing the class used to start the terminal frontend. This should allow a user to use custom interfaces, like reviving the former readline interface which is now a separate package not actively maintained by the core team. See the project to bring back the readline interface: rlipython.

This change will be backported to the IPython 5.x series.

### Misc improvements¶

• The capture magic can now capture the result of a cell (from an expression on the last line), as well as printed and displayed output. PR #9851.
• Pressing Ctrl-Z in the terminal debugger now suspends IPython, as it already does in the main terminal prompt.
• Autoreload can now reload Enum. See #10232 and PR #10316
• IPython.display has gained a GeoJSON object. PR #10288 and PR #10253

#### Functions Deprecated in 6.x Development cycle¶

• Loading extensions from ipython_extension_dir prints a warning that this location is pending deprecation. This should only affect users still having extensions installed with %install_ext which has been deprecated since IPython 4.0, and removed in 5.0. Extensions still present in ipython_extension_dir may shadow more recently installed versions using pip. It is thus recommended to clean ipython_extension_dir of any extension now available as a package.
• IPython.utils.warn was deprecated in IPython 4.0, and has now been removed. instead of IPython.utils.warn inbuilt warnings module is used.
• The function IPython.core.oinspect.py:call_tip is unused, was marked as deprecated (raising a DeprecationWarning) and marked for later removal. PR #10104

### Backward incompatible changes¶

#### Functions Removed in 6.x Development cycle¶

The following functions have been removed in the development cycle marked for Milestone 6.0.

• IPython/utils/process.py - is_cmd_found
• IPython/utils/process.py - pycmd2argv
• The --deep-reload flag and the corresponding options to inject dreload or reload into the interactive namespace have been removed. You have to explicitly import reload from IPython.lib.deepreload to use it.
• The profile used to print the current IPython profile, and which was deprecated in IPython 2.0 does now raise a DeprecationWarning error when used. It is often confused with the prun and the deprecation removal should free up the profile name in future versions.
• #### 5.8.0

##### Discovered at July 30, 2018
###### Source: en/stable/whatsnew/version5.html
• Update inspecting function/methods for future-proofing. PR #11139
• #### 5.7

##### Discovered at June 14, 2018
###### Source: en/stable/whatsnew/version5.html
• Fix IPython trying to import non-existing matplotlib backends PR #11087
• fix for display hook not publishing object metadata PR #11101
• #### 5.6

##### Discovered at June 14, 2018
###### Source: en/stable/whatsnew/version5.html
• In Python 3.6 and above, dictionaries preserve the order items were added to them. On these versions, IPython will display dictionaries in their native order, rather than sorting by the keys (PR #10958).
• ProgressBar can now be used as an iterator (PR #10813).
• The shell object gains a check_complete() method, to allow a smoother transition to new input processing machinery planned for IPython 7 (PR #11044).
• IPython should start faster, as it no longer looks for all available pygments styles on startup (PR #10859).

You can see all the PR marked for the 5.6. milestone, and all the backport versions.

### System Wide config¶

• IPython now looks for config files in {sys.prefix}/etc/ipython for environment-specific configuration.
• Startup files can be found in /etc/ipython/startup or {sys.prefix}/etc/ipython/startup in addition to the profile directory, for system-wide or env-specific startup files.

See PR #10644

### ProgressBar¶

IPython now has built-in support for progressbars:

In[1]: from IPython.display import ProgressBar
...  : pb = ProgressBar(100)
...  : pb

In[2]: pb.progress = 50

# progress bar in cell 1 updates.


See PR #10755

### Misc¶

• Fix IPython.core.display:Pretty._repr_pretty_ had the wrong signature. (PR #10625)
• timeit now give a correct SyntaxError if naked return used. (PR #10637)
• Prepare the :ipython: directive to be compatible with Sphinx 1.7. (PR #10668)
• Make IPython work with OpenSSL in FIPS mode; change hash algorithm of input from md5 to sha1. (PR #10696)
• Clear breakpoints before running any script with debugger. (PR #10699)
• Document that profile is deprecated, not to be confused with prun. (PR #10707)
• Limit default number of returned completions to 500. (PR #10743)

You can see all the PR marked for the 5.5. milestone, and all the backport versions.

• #### 5.4

##### Discovered at March 10, 2018
###### Source: en/stable/whatsnew/version5.html

IPython 5.4-LTS is the first release of IPython after the release of the 6.x series which is Python 3 only. It backports most of the new exposed API additions made in IPython 6.0 and 6.1 and avoid having to write conditional logics depending of the version of IPython.

Please upgrade to pip 9 or greater before upgrading IPython. Failing to do so on Python 2 may lead to a broken IPython install.

### Configurable TerminalInteractiveShell¶

Backported from the 6.x branch as an exceptional new feature. See PR #10373 and #10364

IPython gained a new c.TerminalIPythonApp.interactive_shell_class option that allow to customize the class used to start the terminal frontend. This should allow user to use custom interfaces, like reviving the former readline interface which is now a separate package not maintained by the core team.

### Define _repr_mimebundle_¶

Object can now define _repr_mimebundle_ in place of multiple _repr_*_ methods and return a full mimebundle. This greatly simplify many implementation and allow to publish custom mimetypes (like geojson, plotly, dataframes….). See the Custom Display Logic example notebook for more information.

### Execution Heuristics¶

The heuristic for execution in the command line interface is now more biased toward executing for single statement. While in IPython 4.x and before a single line would be executed when enter is pressed, IPython 5.x would insert a new line. For single line statement this is not true anymore and if a single line is valid Python, IPython will execute it regardless of the cursor position. Use Ctrl-O to insert a new line. PR #10489

### Implement Display IDs¶

Implement display id and ability to update a given display. This should greatly simplify a lot of code by removing the need for widgets and allow other frontend to implement things like progress-bars. See PR #10048

### Display function¶

The display() function is now available by default in an IPython session, meaning users can call it on any object to see their rich representation. This should allow for better interactivity both at the REPL and in notebook environment.

Scripts and library that rely on display and may be run outside of IPython still need to import the display function using from IPython.display import display. See PR #10596

### Miscs¶

• _mp_main_ is not reloaded which fixes issues with multiprocessing. PR #10523
• Use user colorscheme in Pdb as well PR #10479
• Faster shutdown. PR #10408
• Fix a crash in reverse search. PR #10371
• added Completer.backslash_combining_completions boolean option to deactivate backslash-tab completion that may conflict with windows path.
• #### 5.3

##### Released at Feb. 24, 2017
###### Source: en/stable/whatsnew/version5.html

Released on February 24th, 2017. Remarkable changes and fixes:

• Fix a bug in set_next_input leading to a crash of terminal IPython. PR #10231, #10296, #10229
• Always wait for editor inputhook for terminal IPython PR #10239, PR #10240
• Disable _ipython_display_ in terminal PR #10249, PR #10274
• Update terminal colors to be more visible by default on windows PR #10260, PR #10238, #10281
• Add Ctrl-Z shortcut (suspend) in terminal debugger PR #10254, #10273
• Indent on new line by looking at the text before the cursor PR #10264, PR #10275, #9283
• Update QtEventloop integration to fix some matplotlib integration issues PR #10201, PR #10311, #10201
• Respect completions display style in terminal debugger PR #10305, PR #10313
• Add a config option TerminalInteractiveShell.extra_open_editor_shortcuts to enable extra shortcuts to open the input in an editor. These are v in vi mode, and C-X C-E in emacs mode (PR #10330). The F2 shortcut is always enabled.
• #### 5.2.2

##### Discovered at Feb. 3, 2017
###### Source: en/stable/whatsnew/version5.html
• Fix error when starting with IPCompleter.limit_to__all__ configured.
• #### 5.2.1

##### Discovered at Jan. 31, 2017
###### Source: en/stable/whatsnew/version5.html
• Fix tab completion in the debugger. PR #10223
• #### 5.2

##### Released at Jan. 29, 2017
###### Source: en/stable/whatsnew/version5.html

Released on January 29th, 2017. Remarkable changes and fixes:

• restore IPython’s debugger to raise on quit. PR #10009
• The configuration value c.TerminalInteractiveShell.highlighting_style can now directly take a class argument for custom color style. PR #9848
• Correctly handle matplotlib figures dpi PR #9868
• Deprecate -e flag for the %notebook magic that had no effects. PR #9872
• You can now press F2 while typing at a terminal prompt to edit the contents in your favourite terminal editor. Set the EDITOR environment variable to pick which editor is used. PR #9929
• sdists will now only be .tar.gz as per upstream PyPI requirements. PR #9925
• IPython.core.debugger have gained a set_trace() method for convenience. PR #9947
• The ‘smart command mode’ added to the debugger in 5.0 was removed, as more people preferred the previous behaviour. Therefore, debugger commands such as c will act as debugger commands even when c is defined as a variable. PR #10050
• Fixes OS X event loop issues at startup, PR #10150
• Deprecate the %autoindent magic. PR #10176
• Emit a DeprecationWarning when setting the deprecated limit_to_all option of the completer. PR #10198
• The capture magic can now capture the result of a cell (from an expression on the last line), as well as printed and displayed output. PR #9851.

Changes of behavior to InteractiveShellEmbed.

InteractiveShellEmbed interactive behavior have changed a bit in between 5.1 and 5.2. By default %kill_embedded magic will prevent further invocation of the current call location instead of preventing further invocation of the current instance creation location. For most use case this will not change much for you, though previous behavior was confusing and less consistent with previous IPython versions.

You can now deactivate instances by using %kill_embedded --instance flag, (or -i in short). The %kill_embedded magic also gained a --yes/-y option which skip confirmation step, and -x/--exit which also exit the current embedded call without asking for confirmation.

See PR #10207.

• #### 5.1

##### Discovered at Dec. 30, 2016
###### Source: en/stable/whatsnew/version5.html
• Broken %timeit on Python2 due to the use of __qualname__. PR #9804
• Restore %gui qt to create and return a QApplication if necessary. PR #9789
• Don’t set terminal title by default. PR #9801
• Preserve indentation when inserting newlines with Ctrl-O. PR #9770
• Restore completion in debugger. PR #9785
• Deprecate IPython.core.debugger.Tracer() in favor of simpler, newer, APIs. PR #9731
• Restore NoOpContext context manager removed by mistake, and add DeprecationWarning. PR #9765
• Add option allowing Prompt_toolkit to use 24bits colors. PR #9736
• Fix for closing interactive matplotlib windows on OS X. PR #9854
• An embedded interactive shell instance can be used more than once. PR #9843
• More robust check for whether IPython is in a terminal. PR #9833
• Better pretty-printing of dicts on PyPy. PR #9827
• Some coloured output now looks better on dark background command prompts in Windows. PR #9838
• Improved tab completion of paths on Windows . PR #9826
• Fix tkinter event loop integration on Python 2 with future installed. PR #9824
• Restore Ctrl-\ as a shortcut to quit IPython.
• Make get_ipython() accessible when modules are imported by startup files. PR #9818
• Add support for running directories containing a __main__.py file with the ipython command. PR #9813

### True Color feature¶

prompt_toolkit uses pygments styles for syntax highlighting. By default, the colors specified in the style are approximated using a standard 256-color palette. prompt_toolkit also supports 24bit, a.k.a. “true”, a.k.a. 16-million color escape sequences which enable compatible terminals to display the exact colors specified instead of an approximation. This true_color option exposes that capability in prompt_toolkit to the IPython shell.

Here is a good source for the current state of true color support in various terminal emulators and software projects: https://gist.github.com/XVilka/8346728

• #### 5.0

##### Released at July 7, 2016
###### Source: en/stable/whatsnew/version5.html

Released July 7, 2016

### New terminal interface¶

IPython 5 features a major upgrade to the terminal interface, bringing live syntax highlighting as you type, proper multiline editing and multiline paste, and tab completions that don’t clutter up your history.

These features are provided by the Python library prompt_toolkit, which replaces readline throughout our terminal interface.

Relying on this pure-Python, cross platform module also makes it simpler to install IPython. We have removed dependencies on pyreadline for Windows and gnureadline for Mac.

### Backwards incompatible changes¶

• The %install_ext magic function, deprecated since 4.0, has now been deleted. You can distribute and install extensions as packages on PyPI.
• Callbacks registered while an event is being handled will now only be called for subsequent events; previously they could be called for the current event. Similarly, callbacks removed while handling an event will always get that event. See #9447 and PR #9453.
• Integration with pydb has been removed since pydb development has been stopped since 2012, and pydb is not installable from PyPI.
• The autoedit_syntax option has apparently been broken for many years. It has been removed.

#### New terminal interface¶

The overhaul of the terminal interface will probably cause a range of minor issues for existing users. This is inevitable for such a significant change, and we’ve done our best to minimise these issues. Some changes that we’re aware of, with suggestions on how to handle them:

IPython no longer uses readline configuration (~/.inputrc). We hope that the functionality you want (e.g. vi input mode) will be available by configuring IPython directly (see Terminal IPython options). If something’s missing, please file an issue.

The PromptManager class has been removed, and the prompt machinery simplified. See Custom Prompts to customise prompts with the new machinery.

IPython.core.debugger now provides a plainer interface. IPython.terminal.debugger contains the terminal debugger using prompt_toolkit.

There are new options to configure the colours used in syntax highlighting. We have tried to integrate them with our classic --colors option and %colors magic, but there’s a mismatch in possibilities, so some configurations may produce unexpected results. See Terminal Colors for more information.

The new interface is not compatible with Emacs ‘inferior-shell’ feature. To continue using this, add the --simple-prompt flag to the command Emacs runs. This flag disables most IPython features, relying on Emacs to provide things like tab completion.

### Provisional Changes¶

Provisional changes are experimental functionality that may, or may not, make it into a future version of IPython, and which API may change without warnings. Activating these features and using these API are at your own risk, and may have security implication for your system, especially if used with the Jupyter notebook,

When running via the Jupyter notebook interfaces, or other compatible client, you can enable rich documentation experimental functionality:

When the docrepr package is installed setting the boolean flag InteractiveShell.sphinxify_docstring to True, will process the various object through sphinx before displaying them (see the docrepr package documentation for more information.

You need to also enable the IPython pager display rich HTML representation using the InteractiveShell.enable_html_pager boolean configuration option. As usual you can set these configuration options globally in your configuration files, alternatively you can turn them on dynamically using the following snippet:

ip = get_ipython()
ip.sphinxify_docstring = True
ip.enable_html_pager = True


You can test the effect of various combinations of the above configuration in the Jupyter notebook, with things example like :

import numpy as np
np.histogram?


This is part of an effort to make Documentation in Python richer and provide in the long term if possible dynamic examples that can contain math, images, widgets… As stated above this is nightly experimental feature with a lot of (fun) problem to solve. We would be happy to get your feedback and expertise on it.

### Deprecated Features¶

Some deprecated features are listed in this section. Don’t forget to enable DeprecationWarning as an error if you are using IPython in a Continuous Integration setup or in your testing in general:

import warnings
warnings.filterwarnings('error', '.*', DeprecationWarning, module='yourmodule.*')

• hooks.fix_error_editor seems unused and is pending deprecation.
• IPython/core/excolors.py:ExceptionColors is deprecated.
• IPython.core.InteractiveShell:write() is deprecated; use sys.stdout instead.
• IPython.core.InteractiveShell:write_err() is deprecated; use sys.stderr instead.
• The formatter keyword argument to Inspector.info in IPython.core.oinspec has no effect.
• The global_ns keyword argument of IPython Embed was deprecated, and has no effect. Use module keyword argument instead.

### Known Issues:¶

• <Esc> Key does not dismiss the completer and does not clear the current buffer. This is an on purpose modification due to current technical limitation. Cf PR #9572. Escape the control character which is used for other shortcut, and there is no practical way to distinguish. Use Ctr-G or Ctrl-C as an alternative.
• Cannot use Shift-Enter and Ctrl-Enter to submit code in terminal. cf #9587 and #9401. In terminal there is no practical way to distinguish these key sequences from a normal new line return.
• PageUp and pageDown do not move through completion menu.
• Color styles might not adapt to terminal emulator themes. This will need new version of Pygments to be released, and can be mitigated with custom themes.
• #### 4.2.1

##### Discovered at July 2, 2016
###### Source: en/stable/whatsnew/version4.html

IPython 4.2.1 (July, 2016) includes various bugfixes and improvements over 4.2.0

• Only requires backports package on Python 2.
• Bugfix(feature regression): Configuration options on CLI get precedence on configuration options.
• #### 4.2

##### Discovered at April 21, 2016
###### Source: en/stable/whatsnew/version4.html

IPython 4.2 (April, 2016) includes various bugfixes and improvements over 4.1.

• Fix ipython -i on errors, which was broken in 4.1.
• The delay meant to highlight deprecated commands that have moved to jupyter has been removed.
• Improve compatibility with future versions of traitlets and matplotlib.
• Use stdlib shutil.get_terminal_size() to measure terminal width when displaying tracebacks (provided by backports.shutil_get_terminal_size on Python 2).

You can see the rest on GitHub.

• #### 4.1

##### Discovered at Feb. 17, 2016
###### Source: en/stable/whatsnew/version4.html

IPython 4.1.2 (March, 2016) fixes installation issues with some versions of setuptools.

Released February, 2016. IPython 4.1 contains mostly bug fixes, though there are a few improvements.

• IPython debugger (IPdb) now supports the number of context lines for the where (and w) commands. The context keyword is also available in various APIs. See PR PR #9097
• YouTube video will now show thumbnail when exported to a media that do not support video. (PR #9086)
• Add warning when running ipython <subcommand> when subcommand is deprecated. jupyter should now be used.
• Code in %pinfo (also known as ??) are now highlighter (PR #8947)
• %aimport now support module completion. (PR #8884)
• ipdb output is now colored ! (PR #8842)
• Add ability to transpose columns for completion: (PR #8748)

Many many docs improvements and bug fixes, you can see the list of changes

• #### 4.0

##### Discovered at Aug. 12, 2015
###### Source: en/stable/whatsnew/version4.html

Released August, 2015

IPython 4.0 is the first major release after the Big Split. IPython no longer contains the notebook, qtconsole, etc. which have moved to jupyter. IPython subprojects, such as IPython.parallel and widgets have moved to their own repos as well.

The following subpackages are deprecated:

• IPython.kernel (now jupyter_client and ipykernel)
• IPython.consoleapp (now jupyter_client.consoleapp)
• IPython.nbformat (now nbformat)
• IPython.nbconvert (now nbconvert)
• IPython.html (now notebook)
• IPython.parallel (now ipyparallel)
• IPython.utils.traitlets (now traitlets)
• IPython.config (now traitlets.config)
• IPython.qt (now qtconsole)
• IPython.terminal.console (now jupyter_console)

and a few other utilities.

Shims for the deprecated subpackages have been added, so existing code should continue to work with a warning about the new home.

There are few changes to the code beyond the reorganization and some bugfixes.

IPython highlights:

• Public APIs for discovering IPython paths is moved from IPython.utils.path to IPython.paths. The old function locations continue to work with deprecation warnings.
• Code raising DeprecationWarning entered by the user in an interactive session will now display the warning by default. See PR #8480 an #8478.
• The --deep-reload flag and the corresponding options to inject dreload or reload into the interactive namespace have been deprecated, and will be removed in future versions. You should now explicitly import reload from IPython.lib.deepreload to use it.
• #### 3.2.3

##### Discovered at July 8, 2016
###### Source: en/stable/whatsnew/version3.html

Fixes compatibility with Python 3.4.4.

• #### 3.2.2

##### Discovered at July 8, 2016
###### Source: en/stable/whatsnew/version3.html

Address vulnerabilities when files have maliciously crafted filenames (CVE-2015-6938), or vulnerability when opening text files with malicious binary content (CVE pending).

Users are strongly encouraged to upgrade immediately. There are also a few small unicode and nbconvert-related fixes.

• #### 3.2.1

##### Discovered at July 8, 2016
###### Source: en/stable/whatsnew/version3.html

IPython 3.2.1 is a small bugfix release, primarily for cross-site security fixes in the notebook. Users are strongly encouraged to upgrade immediately. There are also a few small unicode and nbconvert-related fixes.

See Issues closed in the 3.x development cycle for details.

• #### 3.2

##### Discovered at July 8, 2016
###### Source: en/stable/whatsnew/version3.html

IPython 3.2 contains important security fixes. Users are strongly encouraged to upgrade immediately.

Highlights:

• Address cross-site scripting vulnerabilities CVE-2015-4706, CVE-2015-4707
• A security improvement that set the secure attribute to login cookie to prevent them to be sent over http
• Revert the face color of matplotlib axes in the inline backend to not be transparent.
• Enable mathjax safe mode by default
• Fix XSS vulnerability in JSON error messages
• Various widget-related fixes

See Issues closed in the 3.x development cycle for details.

• #### 3.1

##### Released at April 3, 2015
###### Source: en/stable/whatsnew/version3.html

Released April 3, 2015

The first 3.x bugfix release, with 33 contributors and 344 commits. This primarily includes bugfixes to notebook layout and focus problems.

Highlights:

• Various focus jumping and scrolling fixes in the notebook.
• Various message ordering and widget fixes in the notebook.
• Images in markdown and output are confined to the notebook width. An .unconfined CSS class is added to disable this behavior per-image. The resize handle on output images is removed.
• Improved ordering of tooltip content for Python functions, putting the signature at the top.
• Fix UnicodeErrors when displaying some objects with unicode reprs on Python 2.
• Set the kernel’s working directory to the notebook directory when running nbconvert --execute, so that behavior matches the live notebook.
• Allow setting custom SSL options for the tornado server with NotebookApp.ssl_options, and protect against POODLE with default settings by disabling SSLv3.
• Fix memory leak in the IPython.parallel Controller on Python 3.

See Issues closed in the 3.x development cycle for details.

• #### 3.0

##### Released at Feb. 27, 2015
###### Source: en/stable/whatsnew/version3.html

Released February 27, 2015

This is a really big release. Over 150 contributors, and almost 6000 commits in a bit under a year. Support for languages other than Python is greatly improved, notebook UI has been significantly redesigned, and a lot of improvement has happened in the experimental interactive widgets. The message protocol and document format have both been updated, while maintaining better compatibility with previous versions than prior updates. The notebook webapp now enables editing of any text file, and even a web-based terminal (on Unix platforms).

3.x will be the last monolithic release of IPython, as the next release cycle will see the growing project split into its Python-specific and language-agnostic components. Language-agnostic projects (notebook, qtconsole, etc.) will move under the umbrella of the new Project Jupyter name, while Python-specific projects (interactive Python shell, Python kernel, IPython.parallel) will remain under IPython, and be split into a few smaller packages. To reflect this, IPython is in a bit of a transition state. The logo on the notebook is now the Jupyter logo. When installing kernels system-wide, they go in a jupyter directory. We are going to do our best to ease this transition for users and developers.

### Using different kernels¶

You can now choose a kernel for a notebook within the user interface, rather than starting up a separate notebook server for each kernel you want to use. The syntax highlighting adapts to match the language you’re working in.

Information about the kernel is stored in the notebook file, so when you open a notebook, it will automatically start the correct kernel.

It is also easier to use the Qt console and the terminal console with other kernels, using the –kernel flag:

ipython qtconsole --kernel bash
ipython console --kernel bash

# To list available kernels
ipython kernelspec list


Kernel authors should see Kernel specs for how to register their kernels with IPython so that these mechanisms work.

### Typing unicode identifiers¶

Complex expressions can be much cleaner when written with a wider choice of characters. Python 3 allows unicode identifiers, and IPython 3 makes it easier to type those, using a feature from Julia. Type a backslash followed by a LaTeX style short name, such as \alpha. Press tab, and it will turn into α.

### Widget migration guide¶

The widget framework has a lot of backwards incompatible changes. For information about migrating widget notebooks and custom widgets to 3.0 refer to the widget migration guide.

### Other new features¶

• TextWidget and TextareaWidget objects now include a placeholder attribute, for displaying placeholder text before the user has typed anything.

• The load magic can now find the source for objects in the user namespace. To enable searching the namespace, use the -n option.

In [1]: %load -n my_module.some_function

• DirectView objects have a new use_cloudpickle() method, which works like view.use_dill(), but causes the cloudpickle module from PiCloud’s cloud library to be used rather than dill or the builtin pickle module.

• Added a .ipynb exporter to nbconvert. It can be used by passing --to notebook as a commandline argument to nbconvert.

• New nbconvert preprocessor called ClearOutputPreprocessor. This clears the output from IPython notebooks.

• New preprocessor for nbconvert that executes all the code cells in a notebook. To run a notebook and save its output in a new notebook:

ipython nbconvert InputNotebook --ExecutePreprocessor.enabled=True --to notebook --output Executed

• Consecutive stream (stdout/stderr) output is merged into a single output in the notebook document. Previously, all output messages were preserved as separate output fields in the JSON. Now, the same merge is applied to the stored output as the displayed output, improving document load time for notebooks with many small outputs.

• NotebookApp.webapp_settings is deprecated and replaced with the more informatively named NotebookApp.tornado_settings.

• Using timeit prints warnings if there is atleast a 4x difference in timings between the slowest and fastest runs, since this might meant that the multiple runs are not independent of one another.

• It’s now possible to provide mechanisms to integrate IPython with other event loops, in addition to the ones we already support. This lets you run GUI code in IPython with an interactive prompt, and to embed the IPython kernel in GUI applications. See Integrating with GUI event loops for details. As part of this, the direct enable_* and disable_* functions for various GUIs in IPython.lib.inputhook have been deprecated in favour of enable_gui() and disable_gui().

• A ScrollManager was added to the notebook. The ScrollManager controls how the notebook document is scrolled using keyboard. Users can inherit from the ScrollManager or TargetScrollManager to customize how their notebook scrolls. The default ScrollManager is the SlideScrollManager, which tries to scroll to the nearest slide or sub-slide cell.

• The function interact_manual() has been added which behaves similarly to interact(), but adds a button to explicitly run the interacted-with function, rather than doing it automatically for every change of the parameter widgets. This should be useful for long-running functions.

• The %cython magic is now part of the Cython module. Use %load_ext Cython with a version of Cython >= 0.21 to have access to the magic now.

• The Notebook application now offers integrated terminals on Unix platforms, intended for when it is used on a remote server. To enable these, install the terminado Python package.

• The Notebook application can now edit any plain text files, via a full-page CodeMirror instance.

• Setting the default highlighting language for nbconvert with the config option NbConvertBase.default_language is deprecated. Nbconvert now respects metadata stored in the kernel spec.

• IPython can now be configured systemwide, with files in /etc/ipython or /usr/local/etc/ipython on Unix systems, or %PROGRAMDATA%\ipython on Windows.

• Added support for configurable user-supplied Jinja HTML templates for the notebook. Paths to directories containing template files can be specified via NotebookApp.extra_template_paths. User-supplied template directories searched first by the notebook, making it possible to replace existing templates with your own files.

For example, to replace the notebook’s built-in error.html with your own, create a directory like /home/my_templates and put your override template at /home/my_templates/error.html. To start the notebook with your custom error page enabled, you would run:

ipython notebook '--extra_template_paths=["/home/my_templates/"]'


It’s also possible to override a template while also inheriting from that template, by prepending templates/ to the {% extends %} target of your child template. This is useful when you only want to override a specific block of a template. For example, to add additional CSS to the built-in error.html, you might create an override that looks like:

{% extends "templates/error.html" %}

{% block stylesheet %}
{{super()}}
<style type="text/css">
/* My Awesome CSS */
</style>
{% endblock %}

• Added a widget persistence API. This allows you to persist your notebooks interactive widgets. Two levels of control are provided: 1. Higher level- WidgetManager.set_state_callbacks allows you to register callbacks for loading and saving widget state. The callbacks you register are automatically called when necessary. 2. Lower level- the WidgetManager Javascript class now has get_state and set_state methods that allow you to get and set the state of the widget runtime.

Example code for persisting your widget state to session data:

%%javascript
require(['widgets/js/manager'], function(manager) {
return JSON.parse(sessionStorage.widgets_state || '{}');
}, function(state) { // Save
sessionStorage.widgets_state = JSON.stringify(state);
});
});

• Enhanced support for env magic. As before, env with no arguments displays all environment variables and values. Additionally, env can be used to get or set individual environment variables. To display an individual value, use the %env var syntax. To set a value, use env var val or env var=val. Python value expansion using $ works as usual. ### Backwards incompatible changes¶ • The message protocol has been updated from version 4 to version 5. Adapters are included, so IPython frontends can still talk to kernels that implement protocol version 4. • The notebook format has been updated from version 3 to version 4. Read-only support for v4 notebooks has been backported to IPython 2.4. Notable changes: • heading cells are removed in favor or markdown headings • notebook outputs and output messages are more consistent with each other • use IPython.nbformat.read() and write() to read and write notebook files instead of the deprecated IPython.nbformat.current APIs. You can downgrade a notebook to v3 via nbconvert: ipython nbconvert --to notebook --nbformat 3 <notebook>  which will create notebook.v3.ipynb, a copy of the notebook in v3 format. • IPython.core.oinspect.getsource() call specification has changed: • oname keyword argument has been added for property source formatting • is_binary keyword argument has been dropped, passing True had previously short-circuited the function to return None unconditionally • Removed the octavemagic extension: it is now available as oct2py.ipython. • Creating PDFs with LaTeX no longer uses a post processor. Use nbconvert --to pdf instead of nbconvert --to latex --post pdf. • Used https://github.com/jdfreder/bootstrap2to3 to migrate the Notebook to Bootstrap 3. Additional changes: • Set .tab-content .row 0px; left and right margin (bootstrap default is -15px;) • Removed height: @btn_mini_height; from .list_header>div, .list_item>div in tree.less • Set #header div margin-bottom: 0px; • Set #menus to float: left; • Set #maintoolbar .navbar-text to float: none; • Added no-padding convenience class. • Set border of #maintoolbar to 0px • Accessing the container DOM object when displaying javascript has been deprecated in IPython 2.0 in favor of accessing element. Starting with IPython 3.0 trying to access container will raise an error in browser javascript console. • IPython.utils.py3compat.open was removed: io.open() provides all the same functionality. • The NotebookManager and /api/notebooks service has been replaced by a more generic ContentsManager and /api/contents service, which supports all kinds of files. • The Dashboard now lists all files, not just notebooks and directories. • The --script hook for saving notebooks to Python scripts is removed, use ipython nbconvert --to python notebook instead. • The rmagic extension is deprecated, as it is now part of rpy2. See rpy2.ipython.rmagic. • start_kernel() and format_kernel_cmd() no longer accept a executable parameter. Use the kernelspec machinery instead. • The widget classes have been renamed from *Widget to *. The old names are still functional, but are deprecated. i.e. IntSliderWidget has been renamed to IntSlider. • The ContainerWidget was renamed to Box and no longer defaults as a flexible box in the web browser. A new FlexBox widget was added, which allows you to use the flexible box model. • The notebook now uses a single websocket at /kernels/<kernel-id>/channels instead of separate /kernels/<kernel-id>/{shell|iopub|stdin} channels. Messages on each channel are identified by a channel key in the message dict, for both send and recv. #### Content Security Policy¶ The Content Security Policy is a web standard for adding a layer of security to detect and mitigate certain classes of attacks, including Cross Site Scripting (XSS) and data injection attacks. This was introduced into the notebook to ensure that the IPython Notebook and its APIs (by default) can only be embedded in an iframe on the same origin. Override headers['Content-Security-Policy'] within your notebook configuration to extend for alternate domains and security settings.: c.NotebookApp.tornado_settings = { 'headers': { 'Content-Security-Policy': "frame-ancestors 'self'" } }  Example policies: Content-Security-Policy: default-src 'self' https://*.jupyter.org  Matches embeddings on any subdomain of jupyter.org, so long as they are served over SSL. There is a report-uri endpoint available for logging CSP violations, located at /api/security/csp-report. To use it, set report-uri as part of the CSP: c.NotebookApp.tornado_settings = { 'headers': { 'Content-Security-Policy': "frame-ancestors 'self'; report-uri /api/security/csp-report" } }  It simply provides the CSP report as a warning in IPython’s logs. The default CSP sets this report-uri relative to the base_url (not shown above). For a more thorough and accurate guide on Content Security Policies, check out MDN’s Using Content Security Policy for more examples. • #### 2.4 ##### Discovered at Jan. 30, 2015 ###### Source: en/stable/whatsnew/version2.0.html January, 2014 Note Some of the patches marked for 2.4 were left out of 2.4.0. Please use 2.4.1. • backport read support for nbformat v4 from IPython 3 • support for PyQt5 in the kernel (not QtConsole) • support for Pygments 2.0 For more information on what fixes have been backported to 2.4, see our detailed release info. • #### 2.3.1 ##### Discovered at Jan. 31, 2015 ###### Source: en/stable/whatsnew/version2.0.html November, 2014 • Fix CRCRLF line-ending bug in notebooks on Windows For more information on what fixes have been backported to 2.3.1, see our detailed release info. • #### 2.3.0 ##### Discovered at Jan. 31, 2015 ###### Source: en/stable/whatsnew/version2.0.html October, 2014 • improve qt5 support • prevent notebook data loss with atomic writes For more information on what fixes have been backported to 2.3, see our detailed release info. • #### 2.2.0 ##### Discovered at Jan. 31, 2015 ###### Source: en/stable/whatsnew/version2.0.html August, 2014 • Add CORS configuration For more information on what fixes have been backported to 2.2, see our detailed release info. • #### 2.1.0 ##### Discovered at Jan. 31, 2015 ###### Source: en/stable/whatsnew/version2.0.html 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. • #### 2.0.0 ##### Discovered at Jan. 31, 2015 ###### Source: en/stable/whatsnew/version2.0.html 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: • interactive widgets for the notebook • directory navigation in the notebook dashboard • persistent URLs for notebooks • a new modal user interface in the notebook • a security model for notebooks Contribution summary since IPython 1.0 in August, 2013: • ~8 months of work • ~650 pull requests merged • ~400 issues closed (non-pull requests) • contributions from ~100 authors • ~4000 commits 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. ### New stuff in the IPython notebook¶ #### Directory navigation¶ The IPython notebook dashboard allows navigation into subdirectories. URLs are persistent based on the notebook’s path and name, so no more random UUID URLs. Serving local files no longer needs the files/ prefix. Relative links across notebooks and other files should work just as if notebooks were regular HTML files. #### Interactive widgets¶ 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. #### Modal user interface¶ 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. #### Security¶ 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: • Trust is determined by signing notebooks. • Untrusted HTML output is sanitized. • Untrusted Javascript is never executed. • HTML and Javascript in Markdown are never trusted. #### Dashboard “Running” tab¶ The dashboard now has a “Running” tab which shows all of the running notebooks. ### Single codebase Python 3 support¶ 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. ### Selecting matplotlib figure formats¶ 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(). ### clear_output changes¶ • There is no longer a 500ms delay when calling clear_output. • The ability to clear stderr and stdout individually was removed. • A new wait flag that prevents clear_output from being executed until new output is available. This eliminates animation flickering by allowing the user to double buffer the output. • The output div height is remembered when the wait=True flag is used. ### Extending configurable containers¶ 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) })  ### Changes to hidden namespace on startup¶ Previously, all names declared in code run at startup (startup files, ipython -i script.py, etc.) were added to the hidden namespace, which hides the names from tools like %whos. There are two changes to this behavior: 1. Scripts run on the command-line ipython -i script.pynow behave the same as if they were passed to %run, so their variables are never hidden. 2. A boolean config flag InteractiveShellApp.hide_initial_ns has been added to optionally disable the hidden behavior altogether. The default behavior is unchanged. ### Using dill to expand serialization support¶ 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. ### New IPython console lexer¶ The IPython console lexer has been rewritten and now supports tracebacks and customized input/output prompts. See the new lexer docs for details. ### DisplayFormatter changes¶ There was no official way to query or remove callbacks in the Formatter API. To remedy this, the following methods are added to BaseFormatter: • lookup(instance) - return appropriate callback or a given object • lookup_by_type(type_or_str) - return appropriate callback for a given type or 'mod.name' type string • pop(type_or_str) - remove a type (by type or string). Pass a second argument to avoid KeyError (like dict). All of the above methods raise a KeyError if no match is found. And the following methods are changed: • for_type(type_or_str) - behaves the same as before, only adding support for 'mod.name' type strings in addition to plain types. This removes the need for for_type_by_name(), but it remains for backward compatibility. Formatters can now raise NotImplementedError in addition to returning None to indicate that they cannot format a given object. #### Exceptions and Warnings¶ 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’). ### Other changes¶ • %%capture cell magic now captures the rich display output, not just stdout/stderr • In notebook, Showing tooltip on tab has been disables to avoid conflict with completion, Shift-Tab could still be used to invoke tooltip when inside function signature and/or on selection. • object_info_request has been replaced by object_info for consistency in the javascript API. object_info is a simpler interface to register callback that is incompatible with object_info_request. • Previous versions of IPython on Linux would use the XDG config directory, creating ~/.config/ipython by default. We have decided to go back to ~/.ipython for consistency among systems. IPython will issue a warning if it finds the XDG location, and will move it to the new location if there isn’t already a directory there. • Equations, images and tables are now centered in Markdown cells. • Multiline equations are now centered in output areas; single line equations remain left justified. • IPython config objects can be loaded from and serialized to JSON. JSON config file have the same base name as their .py counterpart, and will be loaded with higher priority if found. • bash completion updated with support for all ipython subcommands and flags, including nbconvert • ipython history trim: added --keep=<N> as an alias for the more verbose --HistoryTrim.keep=<N> • New ipython history clear subcommand, which is the same as the newly supported ipython history trim --keep=0 • You can now run notebooks in an interactive session via %run notebook.ipynb. • Print preview is back in the notebook menus, along with options to download the open notebook in various formats. This is powered by nbconvert. • PandocMissing exceptions will be raised if Pandoc is unavailable, and warnings will be printed if the version found is too old. The recommended Pandoc version for use with nbconvert is 1.12.1. • The InlineBackend.figure_format now supports JPEG output if PIL/Pillow is available. • Input transformers (see Custom input transformation) may now raise SyntaxError if they determine that input is invalid. The input transformation machinery in IPython will handle displaying the exception to the user and resetting state. • Calling container.show() on javascript display is deprecated and will trigger errors on future IPython notebook versions. container now show itself as soon as non-empty • Added InlineBackend.print_figure_kwargs to allow passing keyword arguments to matplotlib’s Canvas.print_figure. This can be used to change the value of bbox_inches, which is ‘tight’ by default, or set the quality of JPEG figures. • A new callback system has been introduced. For details, see IPython Events. • jQuery and require.js are loaded from CDNs in the default HTML template, so javascript is available in static HTML export (e.g. nbviewer). ### Backwards incompatible changes¶ • 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 • base_project_url is renamed to base_url (base_project_url is kept as a deprecated alias, for now) • base_kernel_url configurable is removed (use base_url) • websocket_url configurable is removed (use base_url) • #### 2.0 ##### Discovered at April 2, 2014 ###### Source: docs/source/whatsnew/version2.0.rst # 2.x Series¶ ## Release 2.4¶ January, 2015 • backport read support for nbformat v4 from IPython 3 • support for PyQt5 • support for Pygments 2.0 For more information on what fixes have been backported to 2.4, see our detailed release info. ## Release 2.3.1¶ November, 2014 • Fix CRCRLF line-ending bug in notebooks on Windows For more information on what fixes have been backported to 2.3.1, see our detailed release info. ## Release 2.3.0¶ October, 2014 • improve qt5 support • prevent notebook data loss with atomic writes For more information on what fixes have been backported to 2.3, see our detailed release info. ## Release 2.2.0¶ August, 2014 • Add CORS configuration For more information on what fixes have been backported to 2.2, see our detailed release info. ## Release 2.1.0¶ 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. ## Release 2.0.0¶ 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: • interactive widgets for the notebook • directory navigation in the notebook dashboard • persistent URLs for notebooks • a new modal user interface in the notebook • a security model for notebooks Contribution summary since IPython 1.0 in August, 2013: • ~8 months of work • ~650 pull requests merged • ~400 issues closed (non-pull requests) • contributions from ~100 authors • ~4000 commits 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. ### New stuff in the IPython notebook¶ #### Directory navigation¶ The IPython notebook dashboard allows navigation into subdirectories. URLs are persistent based on the notebook’s path and name, so no more random UUID URLs. Serving local files no longer needs the files/ prefix. Relative links across notebooks and other files should work just as if notebooks were regular HTML files. #### Interactive widgets¶ 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. #### Modal user interface¶ 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. #### Security¶ 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: • Trust is determined by signing notebooks. • Untrusted HTML output is sanitized. • Untrusted Javascript is never executed. • HTML and Javascript in Markdown are never trusted. #### Dashboard “Running” tab¶ The dashboard now has a “Running” tab which shows all of the running notebooks. ### Single codebase Python 3 support¶ 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 /development/pycompat. ### Selecting matplotlib figure formats¶ 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(). ### clear_output changes¶ • There is no longer a 500ms delay when calling clear_output. • The ability to clear stderr and stdout individually was removed. • A new wait flag that prevents clear_output from being executed until new output is available. This eliminates animation flickering by allowing the user to double buffer the output. • The output div height is remembered when the wait=True flag is used. ### Extending configurable containers¶ 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) })  ### Changes to hidden namespace on startup¶ Previously, all names declared in code run at startup (startup files, ipython -i script.py, etc.) were added to the hidden namespace, which hides the names from tools like %whos. There are two changes to this behavior: 1. Scripts run on the command-line ipython -i script.pynow behave the same as if they were passed to %run, so their variables are never hidden. 2. A boolean config flag InteractiveShellApp.hide_initial_ns has been added to optionally disable the hidden behavior altogether. The default behavior is unchanged. ### Using dill to expand serialization support¶ 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. ### New IPython console lexer¶ The IPython console lexer has been rewritten and now supports tracebacks and customized input/output prompts. See the new lexer docs for details. ### DisplayFormatter changes¶ There was no official way to query or remove callbacks in the Formatter API. To remedy this, the following methods are added to BaseFormatter: • lookup(instance) - return appropriate callback or a given object • lookup_by_type(type_or_str) - return appropriate callback for a given type or 'mod.name' type string • pop(type_or_str) - remove a type (by type or string). Pass a second argument to avoid KeyError (like dict). All of the above methods raise a KeyError if no match is found. And the following methods are changed: • for_type(type_or_str) - behaves the same as before, only adding support for 'mod.name' type strings in addition to plain types. This removes the need for for_type_by_name(), but it remains for backward compatibility. Formatters can now raise NotImplementedError in addition to returning None to indicate that they cannot format a given object. #### Exceptions and Warnings¶ 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’). ### Other changes¶ • %%capture cell magic now captures the rich display output, not just stdout/stderr • In notebook, Showing tooltip on tab has been disables to avoid conflict with completion, Shift-Tab could still be used to invoke tooltip when inside function signature and/or on selection. • object_info_request has been replaced by object_info for consistency in the javascript API. object_info is a simpler interface to register callback that is incompatible with object_info_request. • Previous versions of IPython on Linux would use the XDG config directory, creating ~/.config/ipython by default. We have decided to go back to ~/.ipython for consistency among systems. IPython will issue a warning if it finds the XDG location, and will move it to the new location if there isn’t already a directory there. • Equations, images and tables are now centered in Markdown cells. • Multiline equations are now centered in output areas; single line equations remain left justified. • IPython config objects can be loaded from and serialized to JSON. JSON config file have the same base name as their .py counterpart, and will be loaded with higher priority if found. • bash completion updated with support for all ipython subcommands and flags, including nbconvert • ipython history trim: added --keep=<N> as an alias for the more verbose --HistoryTrim.keep=<N> • New ipython history clear subcommand, which is the same as the newly supported ipython history trim --keep=0 • You can now run notebooks in an interactive session via %run notebook.ipynb. • Print preview is back in the notebook menus, along with options to download the open notebook in various formats. This is powered by nbconvert. • PandocMissing exceptions will be raised if Pandoc is unavailable, and warnings will be printed if the version found is too old. The recommended Pandoc version for use with nbconvert is 1.12.1. • The InlineBackend.figure_format now supports JPEG output if PIL/Pillow is available. • Input transformers (see /config/inputtransforms) may now raise SyntaxError if they determine that input is invalid. The input transformation machinery in IPython will handle displaying the exception to the user and resetting state. • Calling container.show() on javascript display is deprecated and will trigger errors on future IPython notebook versions. container now show itself as soon as non-empty • Added InlineBackend.print_figure_kwargs to allow passing keyword arguments to matplotlib’s Canvas.print_figure. This can be used to change the value of bbox_inches, which is ‘tight’ by default, or set the quality of JPEG figures. • A new callback system has been introduced. For details, see /config/callbacks. • jQuery and require.js are loaded from CDNs in the default HTML template, so javascript is available in static HTML export (e.g. nbviewer). ### Backwards incompatible changes¶ • 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 /config/inputtransforms 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 • base_project_url is renamed to base_url (base_project_url is kept as a deprecated alias, for now) • base_kernel_url configurable is removed (use base_url) • websocket_url configurable is removed (use base_url) • #### 1.0 ##### Discovered at Jan. 31, 2015 ###### Source: docs/source/whatsnew/version1.0.rst ## Release 1.0.0: An Afternoon Hack¶ IPython 1.0 requires Python ≥ 2.6.5 or ≥ 3.2.1. It does not support Python 3.0, 3.1, or 2.5. This is a big release. The principal milestone is the addition of IPython.nbconvert, but there has been a great deal of work improving all parts of IPython as well. The previous version (0.13) was released on June 30, 2012, and in this development cycle we had: • ~12 months of work. • ~700 pull requests merged. • ~600 issues closed (non-pull requests). • contributions from ~150 authors. • ~4000 commits. 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. It includes ### Reorganization¶ There have been two major reorganizations in IPython 1.0: • Added IPython.kernel for all kernel-related code. This means that IPython.zmq has been removed, and much of it is now in IPython.kernel.zmq, some of it being in the top-level IPython.kernel. • We have removed the frontend subpackage, as it caused unnecessary depth. So what was IPython.frontend.qt is now IPython.qt, and so on. The one difference is that the notebook has been further flattened, so that IPython.frontend.html.notebook is now just IPython.html. There is a shim module, so IPython.frontend is still importable in 1.0, but there will be a warning. • The IPython sphinx directives are now installed in IPython.sphinx, so they can be imported by other projects. ### Public APIs¶ For the first time since 0.10 (sorry, everyone), there is an official public API for starting IPython: from IPython import start_ipython start_ipython()  This is what packages should use that start their own IPython session, but don’t actually want embedded IPython (most cases). IPython.embed() is used for embedding IPython into the calling namespace, similar to calling Pdb.set_trace(), whereas start_ipython() will start a plain IPython session, loading config and startup files as normal. We also have added: from IPython import get_ipython  Which is a library function for getting the current IPython instance, and will return None if no IPython instance is running. This is the official way to check whether your code is called from inside an IPython session. If you want to check for IPython without unnecessarily importing IPython, use this function: def get_ipython(): """return IPython instance if there is one, None otherwise""" import sys if "IPython" in sys.modules: import IPython return IPython.get_ipython()  ### Core¶ • The input transformation framework has been reworked. This fixes some corner cases, and adds more flexibility for projects which use IPython, like SymPy & SAGE. For more details, see /config/inputtransforms. • Exception types can now be displayed with a custom traceback, by defining a _render_traceback_() method which returns a list of strings, each containing one line of the traceback. • A new command, ipython history trim can be used to delete everything but the last 1000 entries in the history database. • __file__ is defined in both config files at load time, and .ipy files executed with %run. • %logstart and %logappend are no longer broken. • Add glob expansion for %run, e.g. %run -g script.py *.txt. • Expand variables ($foo) in Cell Magic argument line.
• By default, iptest will exclude various slow tests. All tests can be run with iptest –all.
• SQLite history can be disabled in the various cases that it does not behave well.
• %edit works on interactively defined variables.
• editor hooks have been restored from quarantine, enabling TextMate as editor, etc.
• The env variable PYTHONSTARTUP is respected by IPython.
• The %matplotlib magic was added, which is like the old %pylab magic, but it does not import anything to the interactive namespace. It is recommended that users switch to %matplotlib and explicit imports.
• The --matplotlib command line flag was also added. It invokes the new %matplotlib magic and can be used in the same way as the old --pylab flag. You can either use it by itself as a flag (--matplotlib), or you can also pass a backend explicitly (--matplotlib qt or --matplotlib=wx, etc).

#### Backwards incompatible changes¶

• Calling InteractiveShell.prefilter() will no longer perform static transformations - the processing of escaped commands such as %magic and !system, and stripping input prompts from code blocks. This functionality was duplicated in IPython.core.inputsplitter, and the latter version was already what IPython relied on. A new API to transform input will be ready before release.
• Functions from IPython.lib.inputhook to control integration with GUI event loops are no longer exposed in the top level of IPython.lib. Code calling these should make sure to import them from IPython.lib.inputhook.
• For all kernel managers, the sub_channel attribute has been renamed to iopub_channel.
• Users on Python versions before 2.6.6, 2.7.1 or 3.2 will now need to call IPython.utils.doctestreload.doctest_reload() to make doctests run correctly inside IPython. Python releases since those versions are unaffected. For details, see :ghpull:3068 and Python issue 8048.
• The InteractiveShell.cache_main_mod() method has been removed, and new_main_mod() has a different signature, expecting a filename where earlier versions expected a namespace. See :ghpull:3555 for details.
• The short-lived plugin system has been removed. Extensions are the way to go.

### NbConvert¶

The major milestone for IPython 1.0 is the addition of IPython.nbconvert - tools for converting IPython notebooks to various other formats.

Warning

nbconvert is α-level preview code in 1.0

To use nbconvert to convert various file formats:

ipython nbconvert --to html *.ipynb


See ipython nbconvert --help for more information. nbconvert depends on pandoc for many of the translations to and from various formats.

nbconvert

### Notebook¶

Major changes to the IPython Notebook in 1.0:

• The notebook is now autosaved, by default at an interval of two minutes. When you press ‘save’ or Ctrl-S, a checkpoint is made, in a hidden folder. This checkpoint can be restored, so that the autosave model is strictly safer than traditional save. If you change nothing about your save habits, you will always have a checkpoint that you have written, and an autosaved file that is kept up to date.
• The notebook supports raw_input() / input(), and thus also %debug, and many other Python calls that expect user input.
• You can load custom javascript and CSS in the notebook by editing the files $(ipython locate profile)/static/custom/custom.js,css. • Add %%html, %%svg, %%javascript, and %%latex cell magics for writing raw output in notebook cells. • add a redirect handler and anchors on heading cells, so you can link across notebooks, directly to heading cells in other notebooks. • Images support width and height metadata, and thereby 2x scaling (retina support). • _repr_foo_ methods can return a tuple of (data, metadata), where metadata is a dict containing metadata about the displayed object. This is used to set size, etc. for retina graphics. To enable retina matplotlib figures, simply set InlineBackend.figure_format = 'retina' for 2x PNG figures, in your IPython config file or via the %config magic. • Add display.FileLink and FileLinks for quickly displaying HTML links to local files. • Cells have metadata, which can be edited via cell toolbars. This metadata can be used by external code (e.g. reveal.js or exporters), when examining the notebook. • Fix an issue parsing LaTeX in markdown cells, which required users to type \\\, instead of \\. • Notebook templates are rendered with Jinja instead of Tornado. • %%file has been renamed %%writefile (%%file is deprecated). • ANSI (and VT100) color parsing has been improved in both performance and supported values. • The static files path can be found as IPython.html.DEFAULT_STATIC_FILES_PATH, which may be changed by package managers. • IPython’s CSS is installed in static/css/style.min.css (all style, including bootstrap), and static/css/ipython.min.css, which only has IPython’s own CSS. The latter file should be useful for embedding IPython notebooks in other pages, blogs, etc. • The Print View has been removed. Users are encouraged to test ipython nbconvert to generate a static view. #### Javascript Components¶ The javascript components used in the notebook have been updated significantly. • updates to jQuery (2.0) and jQueryUI (1.10) • Update CodeMirror to 3.14 • Twitter Bootstrap (2.3) for layout • Font-Awesome (3.1) for icons • highlight.js (7.3) for syntax highlighting • marked (0.2.8) for markdown rendering • require.js (2.1) for loading javascript Some relevant changes that are results of this: • Markdown cells now support GitHub-flavored Markdown (GFM), which includes python code blocks and tables. • Notebook UI behaves better on more screen sizes. • Various code cell input issues have been fixed. ### Kernel¶ The kernel code has been substantially reorganized. New features in the kernel: • Kernels support ZeroMQ IPC transport, not just TCP • The message protocol has added a top-level metadata field, used for information about messages. • Add a data_pub message that functions much like display_pub, but publishes raw (usually pickled) data, rather than representations. • Ensure that sys.stdout.encoding is defined in Kernels. • Stdout from forked subprocesses should be forwarded to frontends (instead of crashing). #### IPEP 13¶ The KernelManager has been split into a KernelManager and a KernelClient. The Manager owns a kernel and starts / signals / restarts it. There is always zero or one KernelManager per Kernel. Clients communicate with Kernels via zmq channels, and there can be zero-to-many Clients connected to a Kernel at any given time. The KernelManager now automatically restarts the kernel when it dies, rather than requiring user input at the notebook or QtConsole UI (which may or may not exist at restart time). #### In-process kernels¶ The Python-language frontends, particularly the Qt console, may now communicate with in-process kernels, in addition to the traditional out-of-process kernels. An in-process kernel permits direct access to the kernel namespace, which is necessary in some applications. It should be understood, however, that the in-process kernel is not robust to bad user input and will block the main (GUI) thread while executing. Developers must decide on a case-by-case basis whether this tradeoff is appropriate for their application. ### Parallel¶ IPython.parallel has had some refactoring as well. There are many improvements and fixes, but these are the major changes: • Connections have been simplified. All ports and the serialization in use are written to the connection file, rather than the initial two-stage system. • Serialization has been rewritten, fixing many bugs and dramatically improving performance serializing large containers. • Load-balancing scheduler performance with large numbers of tasks has been dramatically improved. • There should be fewer (hopefully zero) false-positives for engine failures. • Increased compatibility with various use cases that produced serialization / argument errors with map, etc. • The controller can attempt to resume operation if it has crashed, by passing ipcontroller --restore. • Engines can monitor the Hub heartbeat, and shutdown if the Hub disappears for too long. • add HTCondor support in launchers ### QtConsole¶ Various fixes, including improved performance with lots of text output, and better drag and drop support. The initial window size of the qtconsole is now configurable via IPythonWidget.width and IPythonWidget.height. • #### 1.0.0 ##### Discovered at June 30, 2012 ###### Source: en/stable/whatsnew/version1.0.html IPython 1.0 requires Python ≥ 2.6.5 or ≥ 3.2.1. It does not support Python 3.0, 3.1, or 2.5. This is a big release. The principal milestone is the addition of IPython.nbconvert, but there has been a great deal of work improving all parts of IPython as well. The previous version (0.13) was released on June 30, 2012, and in this development cycle we had: • ~12 months of work. • ~700 pull requests merged. • ~600 issues closed (non-pull requests). • contributions from ~150 authors. • ~4000 commits. 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. It includes ### Reorganization¶ There have been two major reorganizations in IPython 1.0: • Added IPython.kernel for all kernel-related code. This means that IPython.zmq has been removed, and much of it is now in IPython.kernel.zmq, some of it being in the top-level IPython.kernel. • We have removed the frontend subpackage, as it caused unnecessary depth. So what was IPython.frontend.qt is now IPython.qt, and so on. The one difference is that the notebook has been further flattened, so that IPython.frontend.html.notebook is now just IPython.html. There is a shim module, so IPython.frontend is still importable in 1.0, but there will be a warning. • The IPython sphinx directives are now installed in IPython.sphinx, so they can be imported by other projects. ### Public APIs¶ For the first time since 0.10 (sorry, everyone), there is an official public API for starting IPython: from IPython import start_ipython start_ipython()  This is what packages should use that start their own IPython session, but don’t actually want embedded IPython (most cases). IPython.embed() is used for embedding IPython into the calling namespace, similar to calling Pdb.set_trace(), whereas start_ipython() will start a plain IPython session, loading config and startup files as normal. We also have added: from IPython import get_ipython  Which is a library function for getting the current IPython instance, and will return None if no IPython instance is running. This is the official way to check whether your code is called from inside an IPython session. If you want to check for IPython without unnecessarily importing IPython, use this function: def get_ipython(): """return IPython instance if there is one, None otherwise""" import sys if "IPython" in sys.modules: import IPython return IPython.get_ipython()  ### Core¶ • The input transformation framework has been reworked. This fixes some corner cases, and adds more flexibility for projects which use IPython, like SymPy & SAGE. For more details, see Custom input transformation. • Exception types can now be displayed with a custom traceback, by defining a _render_traceback_() method which returns a list of strings, each containing one line of the traceback. • A new command, ipython history trim can be used to delete everything but the last 1000 entries in the history database. • __file__ is defined in both config files at load time, and .ipy files executed with %run. • %logstart and %logappend are no longer broken. • Add glob expansion for %run, e.g. %run -g script.py *.txt. • Expand variables ($foo) in Cell Magic argument line.
• By default, iptest will exclude various slow tests. All tests can be run with iptest --all.
• SQLite history can be disabled in the various cases that it does not behave well.
• %edit works on interactively defined variables.
• editor hooks have been restored from quarantine, enabling TextMate as editor, etc.
• The env variable PYTHONSTARTUP is respected by IPython.
• The %matplotlib magic was added, which is like the old %pylab magic, but it does not import anything to the interactive namespace. It is recommended that users switch to %matplotlib and explicit imports.
• The --matplotlib command line flag was also added. It invokes the new %matplotlib magic and can be used in the same way as the old --pylab flag. You can either use it by itself as a flag (--matplotlib), or you can also pass a backend explicitly (--matplotlib qt or --matplotlib=wx, etc).

#### Backwards incompatible changes¶

• Calling InteractiveShell.prefilter() will no longer perform static transformations - the processing of escaped commands such as %magic and !system, and stripping input prompts from code blocks. This functionality was duplicated in IPython.core.inputsplitter, and the latter version was already what IPython relied on. A new API to transform input will be ready before release.
• Functions from IPython.lib.inputhook to control integration with GUI event loops are no longer exposed in the top level of IPython.lib. Code calling these should make sure to import them from IPython.lib.inputhook.
• For all kernel managers, the sub_channel attribute has been renamed to iopub_channel.
• Users on Python versions before 2.6.6, 2.7.1 or 3.2 will now need to call IPython.utils.doctestreload.doctest_reload() to make doctests run correctly inside IPython. Python releases since those versions are unaffected. For details, see PR #3068 and Python issue 8048.
• The InteractiveShell.cache_main_mod() method has been removed, and new_main_mod() has a different signature, expecting a filename where earlier versions expected a namespace. See PR #3555 for details.
• The short-lived plugin system has been removed. Extensions are the way to go.

### NbConvert¶

The major milestone for IPython 1.0 is the addition of IPython.nbconvert - tools for converting IPython notebooks to various other formats.

Warning

nbconvert is α-level preview code in 1.0

To use nbconvert to convert various file formats:

ipython nbconvert --to html *.ipynb


See ipython nbconvert --help for more information. nbconvert depends on pandoc for many of the translations to and from various formats.

### Notebook¶

Major changes to the IPython Notebook in 1.0:

• The notebook is now autosaved, by default at an interval of two minutes. When you press ‘save’ or Ctrl-S, a checkpoint is made, in a hidden folder. This checkpoint can be restored, so that the autosave model is strictly safer than traditional save. If you change nothing about your save habits, you will always have a checkpoint that you have written, and an autosaved file that is kept up to date.
• The notebook supports raw_input() / input(), and thus also %debug, and many other Python calls that expect user input.
• You can load custom javascript and CSS in the notebook by editing the files $(ipython locate profile)/static/custom/custom.js,css. • Add %%html, %%svg, %%javascript, and %%latex cell magics for writing raw output in notebook cells. • add a redirect handler and anchors on heading cells, so you can link across notebooks, directly to heading cells in other notebooks. • Images support width and height metadata, and thereby 2x scaling (retina support). • _repr_foo_ methods can return a tuple of (data, metadata), where metadata is a dict containing metadata about the displayed object. This is used to set size, etc. for retina graphics. To enable retina matplotlib figures, simply set InlineBackend.figure_format = 'retina' for 2x PNG figures, in your IPython config file or via the %config magic. • Add display.FileLink and FileLinks for quickly displaying HTML links to local files. • Cells have metadata, which can be edited via cell toolbars. This metadata can be used by external code (e.g. reveal.js or exporters), when examining the notebook. • Fix an issue parsing LaTeX in markdown cells, which required users to type \\\, instead of \\. • Notebook templates are rendered with Jinja instead of Tornado. • %%file has been renamed %%writefile (%%file is deprecated). • ANSI (and VT100) color parsing has been improved in both performance and supported values. • The static files path can be found as IPython.html.DEFAULT_STATIC_FILES_PATH, which may be changed by package managers. • IPython’s CSS is installed in static/css/style.min.css (all style, including bootstrap), and static/css/ipython.min.css, which only has IPython’s own CSS. The latter file should be useful for embedding IPython notebooks in other pages, blogs, etc. • The Print View has been removed. Users are encouraged to test ipython nbconvert to generate a static view. #### Javascript Components¶ The javascript components used in the notebook have been updated significantly. • updates to jQuery (2.0) and jQueryUI (1.10) • Update CodeMirror to 3.14 • Twitter Bootstrap (2.3) for layout • Font-Awesome (3.1) for icons • highlight.js (7.3) for syntax highlighting • marked (0.2.8) for markdown rendering • require.js (2.1) for loading javascript Some relevant changes that are results of this: • Markdown cells now support GitHub-flavored Markdown (GFM), which includes python code blocks and tables. • Notebook UI behaves better on more screen sizes. • Various code cell input issues have been fixed. ### Kernel¶ The kernel code has been substantially reorganized. New features in the kernel: • Kernels support ZeroMQ IPC transport, not just TCP • The message protocol has added a top-level metadata field, used for information about messages. • Add a data_pub message that functions much like display_pub, but publishes raw (usually pickled) data, rather than representations. • Ensure that sys.stdout.encoding is defined in Kernels. • Stdout from forked subprocesses should be forwarded to frontends (instead of crashing). #### IPEP 13¶ The KernelManager has been split into a KernelManager and a KernelClient. The Manager owns a kernel and starts / signals / restarts it. There is always zero or one KernelManager per Kernel. Clients communicate with Kernels via zmq channels, and there can be zero-to-many Clients connected to a Kernel at any given time. The KernelManager now automatically restarts the kernel when it dies, rather than requiring user input at the notebook or QtConsole UI (which may or may not exist at restart time). #### In-process kernels¶ The Python-language frontends, particularly the Qt console, may now communicate with in-process kernels, in addition to the traditional out-of-process kernels. An in-process kernel permits direct access to the kernel namespace, which is necessary in some applications. It should be understood, however, that the in-process kernel is not robust to bad user input and will block the main (GUI) thread while executing. Developers must decide on a case-by-case basis whether this tradeoff is appropriate for their application. ### Parallel¶ IPython.parallel has had some refactoring as well. There are many improvements and fixes, but these are the major changes: • Connections have been simplified. All ports and the serialization in use are written to the connection file, rather than the initial two-stage system. • Serialization has been rewritten, fixing many bugs and dramatically improving performance serializing large containers. • Load-balancing scheduler performance with large numbers of tasks has been dramatically improved. • There should be fewer (hopefully zero) false-positives for engine failures. • Increased compatibility with various use cases that produced serialization / argument errors with map, etc. • The controller can attempt to resume operation if it has crashed, by passing ipcontroller --restore. • Engines can monitor the Hub heartbeat, and shutdown if the Hub disappears for too long. • add HTCondor support in launchers ### QtConsole¶ Various fixes, including improved performance with lots of text output, and better drag and drop support. The initial window size of the qtconsole is now configurable via IPythonWidget.width and IPythonWidget.height. • #### 0.13 ##### Discovered at Jan. 31, 2015 ###### Source: en/stable/whatsnew/version0.13.html IPython 0.13 contains several major new features, as well as a large amount of bug and regression fixes. The previous version (0.12) was released on December 19 2011, and in this development cycle we had: • ~6 months of work. • 373 pull requests merged. • 742 issues closed (non-pull requests). • contributions from 62 authors. • 1760 commits. • a diff of 114226 lines. 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. ### Major Notebook improvements: new user interface and more¶ The IPython Notebook, which has proven since its release to be wildly popular, has seen a massive amount of work in this release cycle, leading to a significantly improved user experience as well as many new features. The first user-visible change is a reorganization of the user interface; the left panel has been removed and was replaced by a real menu system and a toolbar with icons. Both the toolbar and the header above the menu can be collapsed to leave an unobstructed working area: The notebook handles very long outputs much better than before (this was a serious usability issue when running processes that generated massive amounts of output). Now, in the presence of outputs longer than ~100 lines, the notebook will automatically collapse to a scrollable area and the entire left part of this area controls the display: one click in this area will expand the output region completely, and a double-click will hide it completely. This figure shows both the scrolled and hidden modes: Note The auto-folding of long outputs is disabled in Firefox due to bugs in its scrolling behavior. See PR #2047 for details. Uploading notebooks to the dashboard is now easier: in addition to drag and drop (which can be finicky sometimes), you can now click on the upload text and use a regular file dialog box to select notebooks to upload. Furthermore, the notebook dashboard now auto-refreshes its contents and offers buttons to shut down any running kernels (PR #1739): #### Cluster management¶ The notebook dashboard can now also start and stop clusters, thanks to a new tab in the dashboard user interface: This interface allows, for each profile you have configured, to start and stop a cluster (and optionally override the default number of engines corresponding to that configuration). While this hides all error reporting, once you have a configuration that you know works smoothly, it is a very convenient interface for controlling your parallel resources. #### New notebook format¶ The notebooks saved now use version 3 of our format, which supports heading levels as well as the concept of ‘raw’ text cells that are not rendered as Markdown. These will be useful with converters we are developing, to pass raw markup (say LaTeX). That conversion code is still under heavy development and not quite ready for prime time, but we welcome help on this front so that we can merge it for full production use as soon as possible. Note v3 notebooks can not be read by older versions of IPython, but we provide a simple script that you can use in case you need to export a v3 notebook to share with a v2 user. #### JavaScript refactoring¶ All the client-side JavaScript has been decoupled to ease reuse of parts of the machinery without having to build a full-blown notebook. This will make it much easier to communicate with an IPython kernel from existing web pages and to integrate single cells into other sites, without loading the full notebook document-like UI. PR #1711. This refactoring also enables the possibility of writing dynamic javascript widgets that are returned from Python code and that present an interactive view to the user, with callbacks in Javascript executing calls to the Kernel. This will enable many interactive elements to be added by users in notebooks. An example of this capability has been provided as a proof of concept in examples/widgets that lets you directly communicate with one or more parallel engines, acting as a mini-console for parallel debugging and introspection. #### Improved tooltips¶ The object tooltips have gained some new functionality. By pressing tab several times, you can expand them to see more of a docstring, keep them visible as you fill in a function’s parameters, or transfer the information to the pager at the bottom of the screen. For the details, look at the example notebook 01_notebook_introduction.ipynb. The new notebook tooltips. ### Other improvements to the Notebook¶ These are some other notable small improvements to the notebook, in addition to many bug fixes and minor changes to add polish and robustness throughout: • The notebook pager (the area at the bottom) is now resizeable by dragging its divider handle, a feature that had been requested many times by just about anyone who had used the notebook system. PR #1705. • It is now possible to open notebooks directly from the command line; for example: ipython notebook path/ will automatically set path/ as the notebook directory, and ipython notebook path/foo.ipynb will further start with the foo.ipynb notebook opened. PR #1686. • If a notebook directory is specified with --notebook-dir (or with the corresponding configuration flag NotebookManager.notebook_dir), all kernels start in this directory. • Fix codemirror clearing of cells with Ctrl-Z; PR #1965. • Text (markdown) cells now line wrap correctly in the notebook, making them much easier to edit PR #1330. • PNG and JPEG figures returned from plots can be interactively resized in the notebook, by dragging them from their lower left corner. PR #1832. • Clear In [] prompt numbers on “Clear All Output”. For more version-control-friendly .ipynb files, we now strip all prompt numbers when doing a “Clear all output”. This reduces the amount of noise in commit-to-commit diffs that would otherwise show the (highly variable) prompt number changes. PR #1621. • The notebook server now requires two consecutive Ctrl-C within 5 seconds (or an interactive confirmation) to terminate operation. This makes it less likely that you will accidentally kill a long-running server by typing Ctrl-C in the wrong terminal. PR #1609. • Using Ctrl-S (or Cmd-S on a Mac) actually saves the notebook rather than providing the fairly useless browser html save dialog. PR #1334. • Allow accessing local files from the notebook (in urls), by serving any local file as the url files/<relativepath>. This makes it possible to, for example, embed local images in a notebook. PR #1211. ### Cell magics¶ We have completely refactored the magic system, finally moving the magic objects to standalone, independent objects instead of being the mixin class we’d had since the beginning of IPython (PR #1732). Now, a separate base class is provided in IPython.core.magic.Magics that users can subclass to create their own magics. Decorators are also provided to create magics from simple functions without the need for object orientation. Please see the Magic command system docs for further details. All builtin magics now exist in a few subclasses that group together related functionality, and the new IPython.core.magics package has been created to organize this into smaller files. This cleanup was the last major piece of deep refactoring needed from the original 2001 codebase. We have also introduced a new type of magic function, prefixed with %% instead of %, which operates at the whole-cell level. A cell magic receives two arguments: the line it is called on (like a line magic) and the body of the cell below it. Cell magics are most natural in the notebook, but they also work in the terminal and qt console, with the usual approach of using a blank line to signal cell termination. For example, to time the execution of several statements: %%timeit x = 0 # setup for i in range(100000): x += i**2  This is particularly useful to integrate code in another language, and cell magics already exist for shell scripts, Cython, R and Octave. Using %%script /usr/bin/foo, you can run a cell in any interpreter that accepts code via stdin. Another handy cell magic makes it easy to write short text files: %%file ~/save/to/here.txt. The following cell magics are now included by default; all those that use special interpreters (Perl, Ruby, bash, etc.) assume you have the requisite interpreter installed: • %%!: run cell body with the underlying OS shell; this is similar to prefixing every line in the cell with !. • %%bash: run cell body under bash. • %%capture: capture the output of the code in the cell (and stderr as well). Useful to run codes that produce too much output that you don’t even want scrolled. • %%file: save cell body as a file. • %%perl: run cell body using Perl. • %%prun: run cell body with profiler (cell extension of %prun). • %%python3: run cell body using Python 3. • %%ruby: run cell body using Ruby. • %%script: run cell body with the script specified in the first line. • %%sh: run cell body using sh. • %%sx: run cell with system shell and capture process output (cell extension of %sx). • %%system: run cell with system shell (%%! is an alias to this). • %%timeit: time the execution of the cell (extension of %timeit). This is what some of the script-related magics look like in action: In addition, we have also a number of extensions that provide specialized magics. These typically require additional software to run and must be manually loaded via %load_ext <extension name>, but are extremely useful. The following extensions are provided: Cython magics (extension cythonmagic) This extension provides magics to automatically build and compile Python extension modules using the Cython language. You must install Cython separately, as well as a C compiler, for this to work. The examples directory in the source distribution ships with a full notebook demonstrating these capabilities: Octave magics (extension octavemagic) This extension provides several magics that support calling code written in the Octave language for numerical computing. You can execute single-lines or whole blocks of Octave code, capture both output and figures inline (just like matplotlib plots), and have variables automatically converted between the two languages. To use this extension, you must have Octave installed as well as the oct2py package. The examples directory in the source distribution ships with a full notebook demonstrating these capabilities: R magics (extension rmagic) This extension provides several magics that support calling code written in the R language for statistical data analysis. You can execute single-lines or whole blocks of R code, capture both output and figures inline (just like matplotlib plots), and have variables automatically converted between the two languages. To use this extension, you must have R installed as well as the rpy2 package that bridges Python and R. The examples directory in the source distribution ships with a full notebook demonstrating these capabilities: ### Tab completer improvements¶ Useful tab-completion based on live inspection of objects is one of the most popular features of IPython. To make this process even more user-friendly, the completers of both the Qt console and the Notebook have been reworked. The Qt console comes with a new ncurses-like tab completer, activated by default, which lets you cycle through the available completions by pressing tab, or select a completion with the arrow keys (PR #1851). The new improved Qt console’s ncurses-like completer allows to easily navigate thought long list of completions. In the notebook, completions are now sourced both from object introspection and analysis of surrounding code, so limited completions can be offered for variables defined in the current cell, or while the kernel is busy (PR #1711). We have implemented a new configurable flag to control tab completion on modules that provide the __all__ attribute: IPCompleter.limit_to__all__= Boolean  This instructs the completer to honor __all__ for the completion. Specifically, when completing on object.<tab>, if True: only those names in obj.__all__ will be included. When False [default]: the __all__ attribute is ignored. PR #1529. ### Improvements to the Qt console¶ The Qt console continues to receive improvements and refinements, despite the fact that it is by now a fairly mature and robust component. Lots of small polish has gone into it, here are a few highlights: • A number of changes were made to the underlying code for easier integration into other projects such as Spyder (PR #2007, PR #2024). • Improved menus with a new Magic menu that is organized by magic groups (this was made possible by the reorganization of the magic system internals). PR #1782. • Allow for restarting kernels without clearing the qtconsole, while leaving a visible indication that the kernel has restarted. PR #1681. • Allow the native display of jpeg images in the qtconsole. PR #1643. ### Parallel¶ The parallel tools have been improved and fine-tuned on multiple fronts. Now, the creation of an IPython.parallel.Client object automatically activates a line and cell magic function px that sends its code to all the engines. Further magics can be easily created with the Client.activate() method, to conveniently execute code on any subset of engines. PR #1893. The %%px cell magic can also be given an optional targets argument, as well as a --out argument for storing its output. A new magic has also been added, %pxconfig, that lets you configure various defaults of the parallel magics. As usual, type %pxconfig? for details. The exception reporting in parallel contexts has been improved to be easier to read. Now, IPython directly reports the remote exceptions without showing any of the internal execution parts: The parallel tools now default to using NoDB as the storage backend for intermediate results. This means that the default usage case will have a significantly reduced memory footprint, though certain advanced features are not available with this backend. The parallel magics now display all output, so you can do parallel plotting or other actions with complex display. The px magic has now both line and cell modes, and in cell mode finer control has been added about how to collate output from multiple engines. PR #1768. There have also been incremental improvements to the SSH launchers: • add to_send/fetch steps for moving connection files around. • add SSHProxyEngineSetLauncher, for invoking to ipcluster engines on a remote host. This can be used to start a set of engines via PBS/SGE/MPI remotely. This makes the SSHLauncher usable on machines without shared filesystems. A number of ‘sugar’ methods/properties were added to AsyncResult that are quite useful (PR #1548) for everday work: • ar.wall_time = received - submitted • ar.serial_time = sum of serial computation time • ar.elapsed = time since submission (wall_time if done) • ar.progress = (int) number of sub-tasks that have completed • len(ar) = # of tasks • ar.wait_interactive(): prints progress Added Client.spin_thread() / stop_spin_thread() for running spin in a background thread, to keep zmq queue clear. This can be used to ensure that timing information is as accurate as possible (at the cost of having a background thread active). Set TaskScheduler.hwm default to 1 instead of 0. 1 has more predictable/intuitive behavior, if often slower, and thus a more logical default. Users whose workloads require maximum throughput and are largely homogeneous in time per task can make the optimization themselves, but now the behavior will be less surprising to new users. PR #1294. ### Kernel/Engine unification¶ This is mostly work ‘under the hood’, but it is actually a major achievement for the project that has deep implications in the long term: at last, we have unified the main object that executes as the user’s interactive shell (which we refer to as the IPython kernel) with the objects that run in all the worker nodes of the parallel computing facilities (the IPython engines). Ever since the first implementation of IPython’s parallel code back in 2006, we had wanted to have these two roles be played by the same machinery, but a number of technical reasons had prevented that from being true. In this release we have now merged them, and this has a number of important consequences: • It is now possible to connect any of our clients (qtconsole or terminal console) to any individual parallel engine, with the exact behavior of working at a ‘regular’ IPython console/qtconsole. This makes debugging, plotting, etc. in parallel scenarios vastly easier. • Parallel engines can always execute arbitrary ‘IPython code’, that is, code that has magics, shell extensions, etc. In combination with the %%px magics, it is thus extremely natural for example to send to all engines a block of Cython or R code to be executed via the new Cython and R magics. For example, this snippet would send the R block to all active engines in a cluster: %%px %%R ... R code goes here  • It is possible to embed not only an interactive shell with the IPython.embed() call as always, but now you can also embed a kernel with IPython.embed_kernel(). Embedding an IPython kernel in an application is useful when you want to use IPython.embed() but don’t have a terminal attached on stdin and stdout. • The new IPython.parallel.bind_kernel() allows you to promote Engines to listening Kernels, and connect QtConsoles to an Engine and debug it directly. In addition, having a single core object through our entire architecture also makes the project conceptually cleaner, easier to maintain and more robust. This took a lot of work to get in place, but we are thrilled to have this major piece of architecture finally where we’d always wanted it to be. ### Official Public API¶ We have begun organizing our API for easier public use, with an eye towards an official IPython 1.0 release which will firmly maintain this API compatible for its entire lifecycle. There is now an IPython.display module that aggregates all display routines, and the traitlets.config namespace has all public configuration tools. We will continue improving our public API layout so that users only need to import names one level deeper than the main IPython package to access all public namespaces. ### IPython notebook file icons¶ The directory docs/resources in the source distribution contains SVG and PNG versions of our file icons, as well as an Info.plist.example file with instructions to install them on Mac OSX. This is a first draft of our icons, and we encourage contributions from users with graphic talent to improve them in the future. ### New top-level locate command¶ Add locate entry points; these would be useful for quickly locating IPython directories and profiles from other (non-Python) applications. PR #1762. Examples: $> ipython locate
/Users/me/.ipython

$> ipython locate profile foo /Users/me/.ipython/profile_foo$> ipython locate profile
/Users/me/.ipython/profile_default

288019

git log $(git merge-base 0.10.2 HEAD)..HEAD --oneline | wc -l 2200  Since our move to github, 511 issues were closed, 226 of which were pull requests and 285 regular issues (a full list with links is available for those interested in the details). Github’s pull requests are a fantastic mechanism for reviewing code and building a shared ownership of the project, and we are making enthusiastic use of it. Note This undercounts the number of issues closed in this development cycle, since we only moved to github for issue tracking in May 2010, but we have no way of collecting statistics on the number of issues closed in the old Launchpad bug tracker prior to that. ### Qt Console¶ IPython now ships with a Qt application that feels very much like a terminal, but is in fact a rich GUI that runs an IPython client but supports inline figures, saving sessions to PDF and HTML, multiline editing with syntax highlighting, graphical calltips and much more: The Qt console for IPython, using inline matplotlib plots. We hope that many projects will embed this widget, which we’ve kept deliberately very lightweight, into their own environments. In the future we may also offer a slightly more featureful application (with menus and other GUI elements), but we remain committed to always shipping this easy to embed widget. See the Jupyter Qt Console site for a detailed description of the console’s features and use. ### High-level parallel computing with ZeroMQ¶ We have completely rewritten the Twisted-based code for high-level parallel computing to work atop our new ZeroMQ architecture. While we realize this will break compatibility for a number of users, we hope to make the transition as easy as possible with our docs, and we are convinced the change is worth it. ZeroMQ provides us with much tighter control over memory, higher performance, and its communications are impervious to the Python Global Interpreter Lock because they take place in a system-level C++ thread. The impact of the GIL in our previous code was something we could simply not work around, given that Twisted is itself a Python library. So while Twisted is a very capable framework, we think ZeroMQ fits our needs much better and we hope you will find the change to be a significant improvement in the long run. Our manual contains a full description of how to use IPython for parallel computing, and the tutorial presented by Min Ragan-Kelley at the SciPy 2011 conference provides a hands-on complement to the reference docs. ### Refactoring¶ As of this release, a signifiant portion of IPython has been refactored. This refactoring is founded on a number of new abstractions. The main new classes that implement these abstractions are: • traitlets.HasTraits. • traitlets.config.configurable.Configurable. • traitlets.config.application.Application. • traitlets.config.loader.ConfigLoader. • traitlets.config.loader.Config We are still in the process of writing developer focused documentation about these classes, but for now our configuration documentation contains a high level overview of the concepts that these classes express. The biggest user-visible change is likely the move to using the config system to determine the command-line arguments for IPython applications. The benefit of this is that all configurable values in IPython are exposed on the command-line, but the syntax for specifying values has changed. The gist is that assigning values is pure Python assignment. Simple flags exist for commonly used options, these are always prefixed with ‘–’. The IPython command-line help has the details of all the options (via ipython --help), but a simple example should clarify things; the pylab flag can be used to start in pylab mode with the qt4 backend: ipython --pylab=qt  which is equivalent to using the fully qualified form: ipython --TerminalIPythonApp.pylab=qt  The long-form options can be listed via ipython --help-all. ### ZeroMQ architecture¶ There is a new GUI framework for IPython, based on a client-server model in which multiple clients can communicate with one IPython kernel, using the ZeroMQ messaging framework. There is already a Qt console client, which can be started by calling ipython qtconsole. The protocol is documented. The parallel computing framework has also been rewritten using ZMQ. The protocol is described here, and the code is in the new IPython.parallel module. ### Python 3 support¶ A Python 3 version of IPython has been prepared. For the time being, this is maintained separately and updated from the main codebase. Its code can be found here. The parallel computing components are not perfect on Python3, but most functionality appears to be working. As this work is evolving quickly, the best place to find updated information about it is our Python 3 wiki page. ### Unicode¶ Entering non-ascii characters in unicode literals (u"€ø") now works properly on all platforms. However, entering these in byte/string literals ("€ø") will not work as expected on Windows (or any platform where the terminal encoding is not UTF-8, as it typically is for Linux & Mac OS X). You can use escape sequences ("\xe9\x82") to get bytes above 128, or use unicode literals and encode them. This is a limitation of Python 2 which we cannot easily work around. ### Integration with Microsoft Visual Studio¶ IPython can be used as the interactive shell in the Python plugin for Microsoft Visual Studio, as seen here: IPython console embedded in Microsoft Visual Studio. The Microsoft team developing this currently has a release candidate out using IPython 0.11. We will continue to collaborate with them to ensure that as they approach their final release date, the integration with IPython remains smooth. We’d like to thank Dino Viehland and Shahrokh Mortazavi for the work they have done towards this feature, as well as Wenming Ye for his support of our WinHPC capabilities. ### Additional new features¶ • Added Bytes traitlet, removing Str. All ‘string’ traitlets should either be Unicode if a real string, or Bytes if a C-string. This removes ambiguity and helps the Python 3 transition. • New magic %loadpy loads a python file from disk or web URL into the current input buffer. • New magic %pastebin for sharing code via the ‘Lodge it’ pastebin. • New magic %precision for controlling float and numpy pretty printing. • IPython applications initiate logging, so any object can gain access to a the logger of the currently running Application with: from traitlets.config.application import Application logger = Application.instance().log  • You can now get help on an object halfway through typing a command. For instance, typing a = zip? shows the details of zip(). It also leaves the command at the next prompt so you can carry on with it. • The input history is now written to an SQLite database. The API for retrieving items from the history has also been redesigned. • The IPython.extensions.pretty extension has been moved out of quarantine and fully updated to the new extension API. • New magics for loading/unloading/reloading extensions have been added: %load_ext, %unload_ext and %reload_ext. • The configuration system and configuration files are brand new. See the configuration system documentation for more details. • The InteractiveShell class is now a Configurable subclass and has traitlets that determine the defaults and runtime environment. The __init__ method has also been refactored so this class can be instantiated and run without the old ipmaker module. • The methods of InteractiveShell have been organized into sections to make it easier to turn more sections of functionality into components. • The embedded shell has been refactored into a truly standalone subclass of InteractiveShell called InteractiveShellEmbed. All embedding logic has been taken out of the base class and put into the embedded subclass. • Added methods of InteractiveShell to help it cleanup after itself. The cleanup() method controls this. We couldn’t do this in __del__() because we have cycles in our object graph that prevent it from being called. • Created a new module IPython.utils.importstring for resolving strings like foo.bar.Bar to the actual class. • Completely refactored the IPython.core.prefilter module into Configurable subclasses. Added a new layer into the prefilter system, called “transformations” that all new prefilter logic should use (rather than the older “checker/handler” approach). • Aliases are now components (IPython.core.alias). • New top level embed() function that can be called to embed IPython at any place in user’s code. On the first call it will create an InteractiveShellEmbed instance and call it. In later calls, it just calls the previously created InteractiveShellEmbed. • Created a configuration system (traitlets.config.configurable) that is based on traitlets. Configurables are arranged into a runtime containment tree (not inheritance) that i) automatically propagates configuration information and ii) allows singletons to discover each other in a loosely coupled manner. In the future all parts of IPython will be subclasses of Configurable. All IPython developers should become familiar with the config system. • Created a new Config for holding configuration information. This is a dict like class with a few extras: i) it supports attribute style access, ii) it has a merge function that merges two Config instances recursively and iii) it will automatically create sub-Config instances for attributes that start with an uppercase character. • Created new configuration loaders in traitlets.config.loader. These loaders provide a unified loading interface for all configuration information including command line arguments and configuration files. We have two default implementations based on argparse and plain python files. These are used to implement the new configuration system. • Created a top-level Application class in IPython.core.application that is designed to encapsulate the starting of any basic Python program. An application loads and merges all the configuration objects, constructs the main application, configures and initiates logging, and creates and configures any Configurable instances and then starts the application running. An extended BaseIPythonApplication class adds logic for handling the IPython directory as well as profiles, and all IPython entry points extend it. • The Type and Instance traitlets now handle classes given as strings, like foo.bar.Bar. This is needed for forward declarations. But, this was implemented in a careful way so that string to class resolution is done at a single point, when the parent HasTraitlets is instantiated. • IPython.utils.ipstruct has been refactored to be a subclass of dict. It also now has full docstrings and doctests. • Created a Traits like implementation in traitlets. This is a pure Python, lightweight version of a library that is similar to Enthought’s Traits project, but has no dependencies on Enthought’s code. We are using this for validation, defaults and notification in our new component system. Although it is not 100% API compatible with Enthought’s Traits, we plan on moving in this direction so that eventually our implementation could be replaced by a (yet to exist) pure Python version of Enthought Traits. • Added a new module IPython.lib.inputhook to manage the integration with GUI event loops using PyOS_InputHook. See the docstrings in this module or the main IPython docs for details. • For users, GUI event loop integration is now handled through the new %gui magic command. Type %gui? at an IPython prompt for documentation. • For developers IPython.lib.inputhook provides a simple interface for managing the event loops in their interactive GUI applications. Examples can be found in our examples/lib directory. ### Backwards incompatible changes¶ • The Twisted-based IPython.kernel has been removed, and completely rewritten as IPython.parallel, using ZeroMQ. • Profiles are now directories. Instead of a profile being a single config file, profiles are now self-contained directories. By default, profiles get their own IPython history, log files, and everything. To create a new profile, do ipython profile create <name>. • All IPython applications have been rewritten to use KeyValueConfigLoader. This means that command-line options have changed. Now, all configurable values are accessible from the command-line with the same syntax as in a configuration file. • The command line options -wthread, -qthread and -gthread have been removed. Use --gui=wx, --gui=qt, --gui=gtk instead. • The extension loading functions have been renamed to load_ipython_extension() and unload_ipython_extension(). • InteractiveShell no longer takes an embedded argument. Instead just use the InteractiveShellEmbed class. • __IPYTHON__ is no longer injected into __builtin__. • Struct.__init__() no longer takes None as its first argument. It must be a dict or Struct. • ipmagic() has been renamed () • The functions ipmagic() and ipalias() have been removed from __builtins__. • The references to the global InteractiveShell instance (_ip, and __IP) have been removed from the user’s namespace. They are replaced by a new function called get_ipython() that returns the current InteractiveShell instance. This function is injected into the user’s namespace and is now the main way of accessing the running IPython. • Old style configuration files ipythonrc and ipy_user_conf.py are no longer supported. Users should migrate there configuration files to the new format described here and here. • The old IPython extension API that relied on ipapi() has been completely removed. The new extension API is described here. • Support for qt3 has been dropped. Users who need this should use previous versions of IPython. • Removed shellglobals as it was obsolete. • Removed all the threaded shells in IPython.core.shell. These are no longer needed because of the new capabilities in IPython.lib.inputhook. • New top-level sub-packages have been created: IPython.core, IPython.lib, IPython.utils, IPython.deathrow, IPython.quarantine. All existing top-level modules have been moved to appropriate sub-packages. All internal import statements have been updated and tests have been added. The build system (setup.py and friends) have been updated. See The IPython API for details of these new sub-packages. • IPython.ipapi has been moved to IPython.core.ipapi. IPython.Shell and IPython.iplib have been split and removed as part of the refactor. • Extensions has been moved to extensions and all existing extensions have been moved to either IPython.quarantine or IPython.deathrow. IPython.quarantine contains modules that we plan on keeping but that need to be updated. IPython.deathrow contains modules that are either dead or that should be maintained as third party libraries. • Previous IPython GUIs in IPython.frontend and IPython.gui are likely broken, and have been removed to IPython.deathrow because of the refactoring in the core. With proper updates, these should still work. ### Known Regressions¶ We do our best to improve IPython, but there are some known regressions in 0.11 relative to 0.10.2. First of all, there are features that have yet to be ported to the new APIs, and in order to ensure that all of the installed code runs for our users, we have moved them to two separate directories in the source distribution, quarantine and deathrow. Finally, we have some other miscellaneous regressions that we hope to fix as soon as possible. We now describe all of these in more detail. #### Quarantine¶ These are tools and extensions that we consider relatively easy to update to the new classes and APIs, but that we simply haven’t had time for. Any user who is interested in one of these is encouraged to help us by porting it and submitting a pull request on our development site. Currently, the quarantine directory contains: clearcmd.py ipy_fsops.py ipy_signals.py envpersist.py ipy_gnuglobal.py ipy_synchronize_with.py ext_rescapture.py ipy_greedycompleter.py ipy_system_conf.py InterpreterExec.py ipy_jot.py ipy_which.py ipy_app_completers.py ipy_lookfor.py ipy_winpdb.py ipy_autoreload.py ipy_profile_doctest.py ipy_workdir.py ipy_completers.py ipy_pydb.py jobctrl.py ipy_editors.py ipy_rehashdir.py ledit.py ipy_exportdb.py ipy_render.py pspersistence.py ipy_extutil.py ipy_server.py win32clip.py  #### Deathrow¶ These packages may be harder to update or make most sense as third-party libraries. Some of them are completely obsolete and have been already replaced by better functionality (we simply haven’t had the time to carefully weed them out so they are kept here for now). Others simply require fixes to code that the current core team may not be familiar with. If a tool you were used to is included here, we encourage you to contact the dev list and we can discuss whether it makes sense to keep it in IPython (if it can be maintained). Currently, the deathrow directory contains: astyle.py ipy_defaults.py ipy_vimserver.py dtutils.py ipy_kitcfg.py numeric_formats.py Gnuplot2.py ipy_legacy.py numutils.py GnuplotInteractive.py ipy_p4.py outputtrap.py GnuplotRuntime.py ipy_profile_none.py PhysicalQInput.py ibrowse.py ipy_profile_numpy.py PhysicalQInteractive.py igrid.py ipy_profile_scipy.py quitter.py* ipipe.py ipy_profile_sh.py scitedirector.py iplib.py ipy_profile_zope.py Shell.py ipy_constants.py ipy_traits_completer.py twshell.py  #### Other regressions¶ • The machinery that adds functionality to the ‘sh’ profile for using IPython as your system shell has not been updated to use the new APIs. As a result, only the aesthetic (prompt) changes are still implemented. We intend to fix this by 0.12. Tracked as issue 547. • The installation of scripts on Windows was broken without setuptools, so we now depend on setuptools on Windows. We hope to fix setuptools-less installation, and then remove the setuptools dependency. Issue 539. • The directory history _dh is not saved between sessions. Issue 634. ### Removed Features¶ As part of the updating of IPython, we have removed a few features for the purposes of cleaning up the codebase and interfaces. These removals are permanent, but for any item listed below, equivalent functionality is available. • The magics Exit and Quit have been dropped as ways to exit IPython. Instead, the lowercase forms of both work either as a bare name (exit) or a function call (exit()). You can assign these to other names using exec_lines in the config file. ### Credits¶ Many users and developers contributed code, features, bug reports and ideas to this release. Please do not hesitate in contacting us if we’ve failed to acknowledge your contribution here. In particular, for this release we have contribution from the following people, a mix of new and regular names (in alphabetical order by first name): • Aenugu Sai Kiran Reddy <saikrn08-at-gmail.com> • andy wilson <wilson.andrew.j+github-at-gmail.com> • Antonio Cuni <antocuni> • Barry Wark <barrywark-at-gmail.com> • Beetoju Anuradha <anu.beethoju-at-gmail.com> • Benjamin Ragan-Kelley <minrk-at-Mercury.local> • Brad Reisfeld • Brian E. Granger <ellisonbg-at-gmail.com> • Christoph Gohlke <cgohlke-at-uci.edu> • Cody Precord • dan.milstein • Darren Dale <dsdale24-at-gmail.com> • Dav Clark <davclark-at-berkeley.edu> • David Warde-Farley <wardefar-at-iro.umontreal.ca> • epatters <ejpatters-at-gmail.com> • epatters <epatters-at-caltech.edu> • epatters <epatters-at-enthought.com> • Eric Firing <efiring-at-hawaii.edu> • Erik Tollerud <erik.tollerud-at-gmail.com> • Evan Patterson <epatters-at-enthought.com> • Fernando Perez <Fernando.Perez-at-berkeley.edu> • Gael Varoquaux <gael.varoquaux-at-normalesup.org> • Gerardo <muzgash-at-Muzpelheim> • Jason Grout <jason.grout-at-drake.edu> • John Hunter <jdh2358-at-gmail.com> • Jens Hedegaard Nielsen <jenshnielsen-at-gmail.com> • Johann Cohen-Tanugi <johann.cohentanugi-at-gmail.com> • Jörgen Stenarson <jorgen.stenarson-at-bostream.nu> • Justin Riley <justin.t.riley-at-gmail.com> • Kiorky • Laurent Dufrechou <laurent.dufrechou-at-gmail.com> • Luis Pedro Coelho <lpc-at-cmu.edu> • Mani chandra <mchandra-at-iitk.ac.in> • Mark E. Smith • Mark Voorhies <mark.voorhies-at-ucsf.edu> • Martin Spacek <git-at-mspacek.mm.st> • Michael Droettboom <mdroe-at-stsci.edu> • MinRK <benjaminrk-at-gmail.com> • muzuiget <muzuiget-at-gmail.com> • Nick Tarleton <nick-at-quixey.com> • Nicolas Rougier <Nicolas.rougier-at-inria.fr> • Omar Andres Zapata Mesa <andresete.chaos-at-gmail.com> • Paul Ivanov <pivanov314-at-gmail.com> • Pauli Virtanen <pauli.virtanen-at-iki.fi> • Prabhu Ramachandran • Ramana <sramana9-at-gmail.com> • Robert Kern <robert.kern-at-gmail.com> • Sathesh Chandra <satheshchandra88-at-gmail.com> • Satrajit Ghosh <satra-at-mit.edu> • Sebastian Busch • Skipper Seabold <jsseabold-at-gmail.com> • Stefan van der Walt <bzr-at-mentat.za.net> • Stephan Peijnik <debian-at-sp.or.at> • Steven Bethard • Thomas Kluyver <takowl-at-gmail.com> • Thomas Spura <tomspur-at-fedoraproject.org> • Tom Fetherston <tfetherston-at-aol.com> • Tom MacWright • tzanko • vankayala sowjanya <hai.sowjanya-at-gmail.com> • Vivian De Smedt <vds2212-at-VIVIAN> • Ville M. Vainio <vivainio-at-gmail.com> • Vishal Vatsa <vishal.vatsa-at-gmail.com> • Vishnu S G <sgvishnu777-at-gmail.com> • Walter Doerwald <walter-at-livinglogic.de> Note This list was generated with the output of git log dev-0.11 HEAD --format='* %aN <%aE>' | sed 's/@/\-at\-/' | sed 's/<>//' | sort -u after some cleanup. If you should be on this list, please add yourself. • #### 0.10.2 ##### Released at April 9, 2011 ###### Source: en/stable/whatsnew/version0.10.html IPython 0.10.2 was released April 9, 2011. This is a minor bugfix release that preserves backward compatibility. At this point, all IPython development resources are focused on the 0.11 series that includes a complete architectural restructuring of the project as well as many new capabilities, so this is likely to be the last release of the 0.10.x series. We have tried to fix all major bugs in this series so that it remains a viable platform for those not ready yet to transition to the 0.11 and newer codebase (since that will require some porting effort, as a number of APIs have changed). Thus, we are not opening a 0.10.3 active development branch yet, but if the user community requires new patches and is willing to maintain/release such a branch, we’ll be happy to host it on the IPython github repositories. Highlights of this release: • The main one is the closing of github ticket #185, a major regression we had in 0.10.1 where pylab mode with GTK (or gthread) was not working correctly, hence plots were blocking with GTK. Since this is the default matplotlib backend on Unix systems, this was a major annoyance for many users. Many thanks to Paul Ivanov for helping resolve this issue. • Fix IOError bug on Windows when used with -gthread. • Work robustly if$HOME is missing from environment.
• Better POSIX support in ssh scripts (remove bash-specific idioms).
• Improved support for non-ascii characters in log files.
• Work correctly in environments where GTK can be imported but not started (such as a linux text console without X11).

For this release we merged 24 commits, contributed by the following people (please let us know if we omitted your name and we’ll gladly fix this in the notes for the future):

• Fernando Perez
• MinRK
• Paul Ivanov
• Pieter Cristiaan de Groot
• TvrtkoM
• #### 0.10.1

##### Released at Oct. 11, 2010
###### Source: en/stable/whatsnew/version0.10.html

IPython 0.10.1 was released October 11, 2010, over a year after version 0.10. This is mostly a bugfix release, since after version 0.10 was released, the development team’s energy has been focused on the 0.11 series. We have nonetheless tried to backport what fixes we could into 0.10.1, as it remains the stable series that many users have in production systems they rely on.

Since the 0.11 series changes many APIs in backwards-incompatible ways, we are willing to continue maintaining the 0.10.x series. We don’t really have time to actively write new code for 0.10.x, but we are happy to accept patches and pull requests on the IPython github site. If sufficient contributions are made that improve 0.10.1, we will roll them into future releases. For this purpose, we will have a branch called 0.10.2 on github, on which you can base your contributions.

For this release, we applied approximately 60 commits totaling a diff of over 7000 lines:

(0.10.1)amirbar[dist]> git diff --oneline rel-0.10.. | wc -l
7296


Highlights of this release:

• The only significant new feature is that IPython’s parallel computing machinery now supports natively the Sun Grid Engine and LSF schedulers. This work was a joint contribution from Justin Riley, Satra Ghosh and Matthieu Brucher, who put a lot of work into it. We also improved traceback handling in remote tasks, as well as providing better control for remote task IDs.

• New IPython Sphinx directive contributed by John Hunter. You can use this directive to mark blocks in reSructuredText documents as containing IPython syntax (including figures) and the will be executed during the build:

In [2]: plt.figure()  # ensure a fresh figure

@savefig psimple.png width=4in
In [3]: plt.plot([1,2,3])
Out[3]: [<matplotlib.lines.Line2D object at 0x9b74d8c>]

• Various fixes to the standalone ipython-wx application.

• We now ship internally the excellent argparse library, graciously licensed under BSD terms by Steven Bethard. Now (2010) that argparse has become part of Python 2.7 this will be less of an issue, but Steven’s relicensing allowed us to start updating IPython to using argparse well before Python 2.7. Many thanks!

• Robustness improvements so that IPython doesn’t crash if the readline library is absent (though obviously a lot of functionality that requires readline will not be available).

• Improvements to tab completion in Emacs with Python 2.6.

• Logging now supports timestamps (see %logstart? for full details).

• A long-standing and quite annoying bug where parentheses would be added to print statements, under Python 2.5 and 2.6, was finally fixed.

• Improved handling of libreadline on Apple OSX.

• Fix reload method of IPython demos, which was broken.

• Fixes for the ipipe/ibrowse system on OSX.

• Fixes for Zope profile.

• Fix %timeit reporting when the time is longer than 1000s.

• Avoid lockups with ? or ?? in SunOS, due to a bug in termios.

• The usual assortment of miscellaneous bug fixes and small improvements.

The following people contributed to this release (please let us know if we omitted your name and we’ll gladly fix this in the notes for the future):

• Beni Cherniavsky
• Boyd Waters.
• David Warde-Farley
• Fernando Perez
• Gökhan Sever
• John Hunter
• Justin Riley
• Kiorky
• Laurent Dufrechou
• Mark E. Smith
• Matthieu Brucher
• Satrajit Ghosh
• Sebastian Busch
• Václav Šmilauer
• #### 0.10

##### Discovered at April 9, 2011
###### Source: en/stable/whatsnew/version0.10.html

This release brings months of slow but steady development, and will be the last before a major restructuring and cleanup of IPython’s internals that is already under way. For this reason, we hope that 0.10 will be a stable and robust release so that while users adapt to some of the API changes that will come with the refactoring that will become IPython 0.11, they can safely use 0.10 in all existing projects with minimal changes (if any).

IPython 0.10 is now a medium-sized project, with roughly (as reported by David Wheeler’s sloccount utility) 40750 lines of Python code, and a diff between 0.9.1 and this release that contains almost 28000 lines of code and documentation. Our documentation, in PDF format, is a 495-page long PDF document (also available in HTML format, both generated from the same sources).

Many users and developers contributed code, features, bug reports and ideas to this release. Please do not hesitate in contacting us if we’ve failed to acknowledge your contribution here. In particular, for this release we have contribution from the following people, a mix of new and regular names (in alphabetical order by first name):

• Alexander Clausen: fix #341726.
• Brian Granger: lots of work everywhere (features, bug fixes, etc).
• Daniel Ashbrook: bug report on MemoryError during compilation, now fixed.
• Darren Dale: improvements to documentation build system, feedback, design ideas.
• Fernando Perez: various places.
• Gaël Varoquaux: core code, ipythonx GUI, design discussions, etc. Lots…
• John Hunter: suggestions, bug fixes, feedback.
• Jorgen Stenarson: work on many fronts, tests, fixes, win32 support, etc.
• Laurent Dufréchou: many improvements to ipython-wx standalone app.
• Lukasz Pankowski: prefilter, %edit, demo improvements.
• Matt Foster: TextMate support in %edit.
• Nathaniel Smith: fix #237073.
• Pauli Virtanen: fixes and improvements to extensions, documentation.
• Prabhu Ramachandran: improvements to %timeit.
• Robert Kern: several extensions.
• Sameer D’Costa: help on critical bug #269966.
• Stephan Peijnik: feedback on Debian compliance and many man pages.
• Steven Bethard: we are now shipping his argparse module.
• Tom Fetherston: many improvements to IPython.demo module.
• Ville Vainio: lots of work everywhere (features, bug fixes, etc).
• Vishal Vasta: ssh support in ipcluster.
• Walter Doerwald: work on the IPython.ipipe system.

Below we give an overview of new features, bug fixes and backwards-incompatible changes. For a detailed account of every change made, feel free to view the project log with bzr log.

### New features¶

• New %paste magic automatically extracts current contents of clipboard and pastes it directly, while correctly handling code that is indented or prepended with >>> or ... python prompt markers. A very useful new feature contributed by Robert Kern.

• IPython ‘demos’, created with the IPython.demo module, can now be created from files on disk or strings in memory. Other fixes and improvements to the demo system, by Tom Fetherston.

• Added find_cmd() function to IPython.platutils module, to find commands in a cross-platform manner.

• Many improvements and fixes to Gaël Varoquaux’s ipythonx, a WX-based lightweight IPython instance that can be easily embedded in other WX applications. These improvements have made it possible to now have an embedded IPython in Mayavi and other tools.

• MultiengineClient objects now have a benchmark() method.

• The manual now includes a full set of auto-generated API documents from the code sources, using Sphinx and some of our own support code. We are now using the Numpy Documentation Standard for all docstrings, and we have tried to update as many existing ones as possible to this format.

• The new IPython.Extensions.ipy_pretty extension by Robert Kern provides configurable pretty-printing.

• Many improvements to the ipython-wx standalone WX-based IPython application by Laurent Dufréchou. It can optionally run in a thread, and this can be toggled at runtime (allowing the loading of Matplotlib in a running session without ill effects).

• IPython includes a copy of Steven Bethard’s argparse in the IPython.external package, so we can use it internally and it is also available to any IPython user. By installing it in this manner, we ensure zero conflicts with any system-wide installation you may already have while minimizing external dependencies for new users. In IPython 0.10, We ship argparse version 1.0.

• An improved and much more robust test suite, that runs groups of tests in separate subprocesses using either Nose or Twisted’s trial runner to ensure proper management of Twisted-using code. The test suite degrades gracefully if optional dependencies are not available, so that the iptest command can be run with only Nose installed and nothing else. We also have more and cleaner test decorators to better select tests depending on runtime conditions, do setup/teardown, etc.

• The new ipcluster now has a fully working ssh mode that should work on Linux, Unix and OS X. Thanks to Vishal Vatsa for implementing this!

• The wonderful TextMate editor can now be used with %edit on OS X. Thanks to Matt Foster for this patch.

• The documentation regarding parallel uses of IPython, including MPI and PBS, has been significantly updated and improved.

• The developer guidelines in the documentation have been updated to explain our workflow using bzr and Launchpad.

• Fully refactored ipcluster command line program for starting IPython clusters. This new version is a complete rewrite and 1) is fully cross platform (we now use Twisted’s process management), 2) has much improved performance, 3) uses subcommands for different types of clusters, 4) uses argparse for parsing command line options, 5) has better support for starting clusters using mpirun, 6) has experimental support for starting engines using PBS. It can also reuse FURL files, by appropriately passing options to its subcommands. However, this new version of ipcluster should be considered a technology preview. We plan on changing the API in significant ways before it is final.

• Full description of the security model added to the docs.

• cd completer: show bookmarks if no other completions are available.

• sh profile: easy way to give ‘title’ to prompt: assign to variable ‘_prompt_title’. It looks like this:

[~]|1> _prompt_title = 'sudo!'
sudo![~]|2>

• %edit: If you do ‘%edit pasted_block’, pasted_block variable gets updated with new data (so repeated editing makes sense)

### Bug fixes¶

• Fix #368719, removed top-level debian/ directory to make the job of Debian packagers easier.
• Fix #291143 by including man pages contributed by Stephan Peijnik from the Debian project.
• Fix #358202, effectively a race condition, by properly synchronizing file creation at cluster startup time.
• %timeit now handles correctly functions that take a long time to execute even the first time, by not repeating them.
• Fix #239054, releasing of references after exiting.
• Fix #341726, thanks to Alexander Clausen.
• Fix #269966. This long-standing and very difficult bug (which is actually a problem in Python itself) meant long-running sessions would inevitably grow in memory size, often with catastrophic consequences if users had large objects in their scripts. Now, using %run repeatedly should not cause any memory leaks. Special thanks to John Hunter and Sameer D’Costa for their help with this bug.
• Fix #295371, bug in %history.
• Improved support for py2exe.
• Fix #270856: IPython hangs with PyGTK
• Fix #270998: A magic with no docstring breaks the ‘%magic magic’
• fix #271684: -c startup commands screw up raw vs. native history
• Numerous bugs on Windows with the new ipcluster have been fixed.
• The ipengine and ipcontroller scripts now handle missing furl files more gracefully by giving better error messages.
• %rehashx: Aliases no longer contain dots. python3.0 binary will create alias python30. Fixes: #259716 “commands with dots in them don’t work”
• %cpaste: %cpaste -r repeats the last pasted block. The block is assigned to pasted_block even if code raises exception.
• Bug #274067 ‘The code in get_home_dir is broken for py2exe’ was fixed.
• Many other small bug fixes not listed here by number (see the bzr log for more info).

### Backwards incompatible changes¶

• ipykit and related files were unmaintained and have been removed.

• The IPython.genutils.doctest_reload() does not actually call reload(doctest) anymore, as this was causing many problems with the test suite. It still resets doctest.master to None.

• While we have not deliberately broken Python 2.4 compatibility, only minor testing was done with Python 2.4, while 2.5 and 2.6 were fully tested. But if you encounter problems with 2.4, please do report them as bugs.

• The ipcluster now requires a mode argument; for example to start a cluster on the local machine with 4 engines, you must now type:

\$ ipcluster local -n 4

• The controller now has a -r flag that needs to be used if you want to reuse existing furl files. Otherwise they are deleted (the default).

• Remove ipy_leo.py. You can use easy_install ipython-extension to get it. (done to decouple it from ipython release cycle)

• #### 0.9.1

##### Discovered at April 9, 2011
###### Source: en/stable/whatsnew/version0.9.html

This release was quickly made to restore compatibility with Python 2.4, which version 0.9 accidentally broke. No new features were introduced, other than some additional testing support for internal use.

### New features¶

• All furl files and security certificates are now put in a read-only directory named ~/.ipython/security.
• A single function get_ipython_dir(), in IPython.genutils that determines the user’s IPython directory in a robust manner.
• Laurent’s WX application has been given a top-level script called ipython-wx, and it has received numerous fixes. We expect this code to be architecturally better integrated with Gael’s WX ‘ipython widget’ over the next few releases.
• The Editor synchronization work by Vivian De Smedt has been merged in. This code adds a number of new editor hooks to synchronize with editors under Windows.
• A new, still experimental but highly functional, WX shell by Gael Varoquaux. This work was sponsored by Enthought, and while it’s still very new, it is based on a more cleanly organized arhictecture of the various IPython components. We will continue to develop this over the next few releases as a model for GUI components that use IPython.
• Another GUI frontend, Cocoa based (Cocoa is the OSX native GUI framework), authored by Barry Wark. Currently the WX and the Cocoa ones have slightly different internal organizations, but the whole team is working on finding what the right abstraction points are for a unified codebase.
• As part of the frontend work, Barry Wark also implemented an experimental event notification system that various ipython components can use. In the next release the implications and use patterns of this system regarding the various GUI options will be worked out.
• IPython finally has a full test system, that can test docstrings with IPython-specific functionality. There are still a few pieces missing for it to be widely accessible to all users (so they can run the test suite at any time and report problems), but it now works for the developers. We are working hard on continuing to improve it, as this was probably IPython’s major Achilles heel (the lack of proper test coverage made it effectively impossible to do large-scale refactoring). The full test suite can now be run using the iptest command line program.
• The notion of a task has been completely reworked. An ITask interface has been created. This interface defines the methods that tasks need to implement. These methods are now responsible for things like submitting tasks and processing results. There are two basic task types: IPython.kernel.task.StringTask (this is the old Task object, but renamed) and the new IPython.kernel.task.MapTask, which is based on a function.
• A new interface, IPython.kernel.mapper.IMapper has been defined to standardize the idea of a map method. This interface has a single map method that has the same syntax as the built-in map. We have also defined a mapper factory interface that creates objects that implement IPython.kernel.mapper.IMapper for different controllers. Both the multiengine and task controller now have mapping capabilties.
• The parallel function capabilities have been reworks. The major changes are that i) there is now an @parallel magic that creates parallel functions, ii) the syntax for multiple variable follows that of map, iii) both the multiengine and task controller now have a parallel function implementation.
• All of the parallel computing capabilities from ipython1-dev have been merged into IPython proper. This resulted in the following new subpackages: IPython.kernel, IPython.kernel.core, traitlets.config, IPython.tools and IPython.testing.
• As part of merging in the ipython1-dev stuff, the setup.py script and friends have been completely refactored. Now we are checking for dependencies using the approach that matplotlib uses.
• The documentation has been completely reorganized to accept the documentation from ipython1-dev.
• We have switched to using Foolscap for all of our network protocols in IPython.kernel. This gives us secure connections that are both encrypted and authenticated.
• We have a brand new COPYING.txt files that describes the IPython license and copyright. The biggest change is that we are putting “The IPython Development Team” as the copyright holder. We give more details about exactly what this means in this file. All developer should read this and use the new banner in all IPython source code files.
• sh profile: ./foo runs foo as system command, no need to do !./foo anymore
• String lists now support sort(field, nums = True) method (to easily sort system command output). Try it with a = !ls -l ; a.sort(1, nums=1).
• ‘%cpaste foo’ now assigns the pasted block as string list, instead of string
• The ipcluster script now run by default with no security. This is done because the main usage of the script is for starting things on localhost. Eventually when ipcluster is able to start things on other hosts, we will put security back.
• ‘cd –foo’ searches directory history for string foo, and jumps to that dir. Last part of dir name is checked first. If no matches for that are found, look at the whole path.

### Bug fixes¶

• The Windows installer has been fixed. Now all IPython scripts have .bat versions created. Also, the Start Menu shortcuts have been updated.
• The colors escapes in the multiengine client are now turned off on win32 as they don’t print correctly.
• The IPython.kernel.scripts.ipengine script was exec’ing mpi_import_statement incorrectly, which was leading the engine to crash when mpi was enabled.
• A few subpackages had missing __init__.py files.
• The documentation is only created if Sphinx is found. Previously, the setup.py script would fail if it was missing.
• Greedy cd completion has been disabled again (it was enabled in 0.8.4) as it caused problems on certain platforms.

### Backwards incompatible changes¶

• The clusterfile options of the ipcluster command has been removed as it was not working and it will be replaced soon by something much more robust.
• The IPython.kernel configuration now properly find the user’s IPython directory.
• In ipapi, the make_user_ns() function has been replaced with make_user_namespaces(), to support dict subclasses in namespace creation.
• IPython.kernel.client.Task has been renamed IPython.kernel.client.StringTask to make way for new task types.
• The keyword argument style has been renamed dist in scatter, gather and map.
• Renamed the values that the rename dist keyword argument can have from 'basic' to 'b'.
• IPython has a larger set of dependencies if you want all of its capabilities. See the setup.py script for details.
• The constructors for IPython.kernel.client.MultiEngineClient and IPython.kernel.client.TaskClient no longer take the (ip,port) tuple. Instead they take the filename of a file that contains the FURL for that client. If the FURL file is in your IPYTHONDIR, it will be found automatically and the constructor can be left empty.
• The asynchronous clients in IPython.kernel.asyncclient are now created using the factory functions get_multiengine_client() and get_task_client(). These return a Deferred to the actual client.
• The command line options to ipcontroller and ipengine have changed to reflect the new Foolscap network protocol and the FURL files. Please see the help for these scripts for details.
• The configuration files for the kernel have changed because of the Foolscap stuff. If you were using custom config files before, you should delete them and regenerate new ones.

### Changes merged in from IPython1¶

#### New features¶

• Much improved setup.py and setupegg.py scripts. Because Twisted and zope.interface are now easy installable, we can declare them as dependencies in our setupegg.py script.
• IPython is now compatible with Twisted 2.5.0 and 8.x.
• Added a new example of how to use ipython1.kernel.asynclient.
• Initial draft of a process daemon in ipython1.daemon. This has not been merged into IPython and is still in ipython1-dev.
• The TaskController now has methods for getting the queue status.
• The TaskResult objects not have information about how long the task took to run.
• We are attaching additional attributes to exceptions (_ipython_*) that we use to carry additional info around.
• New top-level module asyncclient that has asynchronous versions (that return deferreds) of the client classes. This is designed to users who want to run their own Twisted reactor.
• All the clients in client are now based on Twisted. This is done by running the Twisted reactor in a separate thread and using the blockingCallFromThread() function that is in recent versions of Twisted.
• Functions can now be pushed/pulled to/from engines using MultiEngineClient.push_function() and MultiEngineClient.pull_function().
• Gather/scatter are now implemented in the client to reduce the work load of the controller and improve performance.
• Complete rewrite of the IPython docuementation. All of the documentation from the IPython website has been moved into docs/source as restructured text documents. PDF and HTML documentation are being generated using Sphinx.
• New developer oriented documentation: development guidelines and roadmap.
• Traditional ChangeLog has been changed to a more useful changes.txt file that is organized by release and is meant to provide something more relevant for users.

#### Bug fixes¶

• Created a proper MANIFEST.in file to create source distributions.
• Fixed a bug in the MultiEngine interface. Previously, multi-engine actions were being collected with a DeferredList with fireononeerrback=1. This meant that methods were returning before all engines had given their results. This was causing extremely odd bugs in certain cases. To fix this problem, we have 1) set fireononeerrback=0 to make sure all results (or exceptions) are in before returning and 2) introduced a CompositeError exception that wraps all of the engine exceptions. This is a huge change as it means that users will have to catch CompositeError rather than the actual exception.

#### Backwards incompatible changes¶

• All names have been renamed to conform to the lowercase_with_underscore convention. This will require users to change references to all names like queueStatus to queue_status.
• Previously, methods like MultiEngineClient.push() and MultiEngineClient.push() used *args and **kwargs. This was becoming a problem as we weren’t able to introduce new keyword arguments into the API. Now these methods simple take a dict or sequence. This has also allowed us to get rid of the *All methods like pushAll() and pullAll(). These things are now handled with the targets keyword argument that defaults to 'all'.
• The MultiEngineClient.magicTargets has been renamed to MultiEngineClient.targets.
• All methods in the MultiEngine interface now accept the optional keyword argument block.
• Renamed RemoteController to MultiEngineClient and TaskController to TaskClient.
• Renamed the top-level module from api to client.
• Most methods in the multiengine interface now raise a CompositeError exception that wraps the user’s exceptions, rather than just raising the raw user’s exception.
• Changed the setupNS and resultNames in the Task class to push and pull.
• #### 0.8.4

##### Discovered at April 9, 2011
###### Source: en/stable/whatsnew/version0.8.html

This was a quick release to fix an unfortunate bug that slipped into the 0.8.3 release. The --twisted option was disabled, as it turned out to be broken across several platforms.

• #### 0.8.3

##### Discovered at April 9, 2011
###### Source: en/stable/whatsnew/version0.8.html
• pydb is now disabled by default (due to %run -d problems). You can enable it by passing -pydb command line argument to IPython. Note that setting it in config file won’t work.
• #### 0.8.2

##### Discovered at April 9, 2011
###### Source: en/stable/whatsnew/version0.8.html
• %pushd/%popd behave differently; now “pushd /foo” pushes CURRENT directory and jumps to /foo. The current behaviour is closer to the documented behaviour, and should not trip anyone.

## Release 0.8.4¶

This was a quick release to fix an unfortunate bug that slipped into the 0.8.3 release. The --twisted option was disabled, as it turned out to be broken across several platforms.

## Release 0.8.3¶

• pydb is now disabled by default (due to %run -d problems). You can enable it by passing -pydb command line argument to IPython. Note that setting it in config file won’t work.

## Release 0.8.2¶

• %pushd/%popd behave differently; now “pushd /foo” pushes CURRENT directory and jumps to /foo. The current behaviour is closer to the documented behaviour, and should not trip anyone.

## Older releases¶

Changes in earlier releases of IPython are described in the older file ChangeLog. Please refer to this document for details.