1=============
2 0.12 Series
3=============
4
5Release 0.12.1
6==============
7
8IPython 0.12.1 is a bugfix release of 0.12, pulling only bugfixes and minor
9cleanup from 0.13, timed for the Ubuntu 12.04 LTS release.
10
11See the :ref:`list of fixed issues <issues_list_012>` for specific backported issues.
12
13
14Release 0.12
15============
16
17IPython 0.12 contains several major new features, as well as a large amount of
18bug and regression fixes.  The 0.11 release brought with it a lot of new
19functionality and major refactorings of the codebase; by and large this has
20proven to be a success as the number of contributions to the project has
21increased dramatically, proving that the code is now much more approachable.
22But in the refactoring inevitably some bugs were introduced, and we have also
23squashed many of those as well as recovered some functionality that had been
24temporarily disabled due to the API changes.
25
26The following major new features appear in this version.
27
28
29An interactive browser-based Notebook with rich media support
30~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31
32A powerful new interface puts IPython in your browser. You can start it with
33the command ``ipython notebook``:
34
35.. figure:: ../_images/notebook_specgram.png
36    :width: 400px
37    :alt: The IPython notebook with embedded text, code, math and figures.
38    :align: center
39    :target: ../_images/notebook_specgram.png
40
41    The new IPython notebook showing text, mathematical expressions in LaTeX,
42    code, results and embedded figures created with Matplotlib.
43
44This new interface maintains all the features of IPython you are used to, as it
45is a new client that communicates with the same IPython kernels used by the
46terminal and Qt console.  But the web notebook provides for a different
47workflow where you can integrate, along with code execution, also text,
48mathematical expressions, graphics, video, and virtually any content that a
49modern browser is capable of displaying.
50
51You can save your work sessions as documents that retain all these elements and
52which can be version controlled, emailed to colleagues or saved as HTML or PDF
53files for printing or publishing statically on the web.  The internal storage
54format is a JSON file that can be easily manipulated for manual exporting to
55other formats.
56
57This Notebook is a major milestone for IPython, as for years we have tried to
58build this kind of system.  We were inspired originally by the excellent
59implementation in Mathematica, we made a number of attempts using older
60technologies in earlier Summer of Code projects in 2005 (both students and
61Robert Kern developed early prototypes), and in recent years we have seen the
62excellent implementation offered by the `Sage <http://sagemath.org>` system.
63But we continued to work on something that would be consistent with the rest of
64IPython's design, and it is clear now that the effort was worth it: based on
65the ZeroMQ communications architecture introduced in version 0.11, the notebook
66can now retain 100% of the features of the real IPython.  But it can also
67provide the rich media support and high quality Javascript libraries that were
68not available in browsers even one or two years ago (such as high-quality
69mathematical rendering or built-in video).
70
71The notebook has too many useful and important features to describe in these
72release notes; our documentation now contains a directory called
73``examples/notebooks`` with several notebooks that illustrate various aspects
74of the system.  You should start by reading those named
75``00_notebook_tour.ipynb`` and ``01_notebook_introduction.ipynb`` first, and
76then can proceed to read the others in any order you want.
77
78To start the notebook server, go to a directory containing the notebooks you
79want to open (or where you want to create new ones) and type::
80
81  ipython notebook
82
83You can see all the relevant options with::
84
85  ipython notebook --help
86  ipython notebook --help-all  # even more
87
88and just like the Qt console, you can start the notebook server with pylab
89support by using::
90
91  ipython notebook --pylab
92
93for floating matplotlib windows or::
94
95  ipython notebook --pylab inline
96
97for plotting support with automatically inlined figures.  Note that it is now
98possible also to activate pylab support at runtime via ``%pylab``, so you do
99not need to make this decision when starting the server.
100
101
102.. _two_process_console:
103
104Two-process terminal console
105~~~~~~~~~~~~~~~~~~~~~~~~~~~~
106
107Based on the same architecture as the notebook and the Qt console, we also have
108now a terminal-based console that can connect to an external IPython kernel
109(the same kernels used by the Qt console or the notebook, in fact).  While this
110client behaves almost identically to the usual IPython terminal application,
111this capability can be very useful to attach an interactive console to an
112existing kernel that was started externally.  It lets you use the interactive
113``%debug`` facilities in a notebook, for example (the web browser can't
114interact directly with the debugger) or debug a third-party code where you may
115have embedded an IPython kernel.
116
117This is also something that we have wanted for a long time, and which is a
118culmination (as a team effort) of the work started last year during the 2010
119Google Summer of Code project.
120
121Tabbed QtConsole
122~~~~~~~~~~~~~~~~
123
124The QtConsole now supports starting multiple kernels in tabs, and has a
125menubar, so it looks and behaves more like a real application.  Keyboard
126enthusiasts can disable the menubar with ctrl-shift-M (:ghpull:`887`).
127
128.. figure:: ../_images/qtconsole_tabbed.png
129    :width: 400px
130    :alt: Tabbed IPython Qt console with embedded plots and menus.
131    :align: center
132    :target: ../_images/qtconsole_tabbed.png
133
134    The improved Qt console for IPython, now with tabs to control multiple
135    kernels and full menu support.
136
137
138Full Python 3 compatibility
139~~~~~~~~~~~~~~~~~~~~~~~~~~~
140
141IPython can now be installed from a single codebase on Python 2 and
142Python 3. The installation process for Python 3 automatically runs 2to3. The
143same 'default' profile is now used for Python 2 and 3 (the previous version had
144a separate 'python3' profile).
145
146Standalone Kernel
147~~~~~~~~~~~~~~~~~
148
149The ``ipython kernel`` subcommand has been added, to allow starting a
150standalone kernel, that can be used with various frontends.  You can then later
151connect a Qt console or a terminal console to this kernel by typing e.g.::
152
153  ipython qtconsole --existing
154
155if it's the only one running, or by passing explicitly the connection
156parameters (printed by the kernel at startup).
157
158
159PyPy support
160~~~~~~~~~~~~
161
162The terminal interface to IPython now runs under `PyPy <http://pypy.org/>`_.
163We will continue to monitor PyPy's progress, and hopefully before long at least
164we'll be able to also run the notebook.  The Qt console may take longer, as Qt
165is a very complex set of bindings to a huge C++ library, and that is currently
166the area where PyPy still lags most behind.  But for everyday interactive use
167at the terminal, with this release and PyPy 1.7, things seem to work quite well
168from our admittedly limited testing.
169
170
171Other important new features
172----------------------------
173
174* **SSH Tunnels**: In 0.11, the :mod:`IPython.parallel` Client could tunnel its
175  connections to the Controller via ssh. Now, the QtConsole supports ssh tunneling,
176  as do parallel engines.
177
178* **relaxed command-line parsing**: 0.11 was released with overly-strict
179  command-line parsing, preventing the ability to specify arguments with spaces,
180  e.g. ``ipython --pylab qt`` or ``ipython -c "print 'hi'"``. This has
181  been fixed, by using argparse. The new parsing is a strict superset of 0.11, so
182  any commands in 0.11 should still work in 0.12.
183
184* **HistoryAccessor**: The :class:`~IPython.core.history.HistoryManager` class
185  for interacting with your IPython SQLite history database has been split,
186  adding a parent :class:`~IPython.core.history.HistoryAccessor` class, so that
187  users can write code to access and search their IPython history without being
188  in an IPython session (:ghpull:`824`).
189
190* **kernel %gui and %pylab**: The ``%gui`` and ``%pylab`` magics have been
191  restored to the IPython kernel (e.g. in the qtconsole or notebook). This
192  allows activation of pylab-mode, or eventloop integration after starting the
193  kernel, which was unavailable in 0.11.  Unlike in the terminal, this can be
194  set only once, and cannot be changed.
195
196* **%config**: A new ``%config`` magic has been added, giving easy access to the
197  IPython configuration system at runtime (:ghpull:`923`).
198
199* **Multiline History**: Multiline readline history has been restored to the
200  Terminal frontend by default (:ghpull:`838`).
201
202* **%store**: The ``%store`` magic from earlier versions has been updated and
203  re-enabled (:ref:`extensions_storemagic`; :ghpull:`1029`). To autorestore
204  stored variables on startup, specify ``c.StoreMagic.autorestore = True`` in
205  :file:`ipython_config.py`.
206
207
208Major Bugs fixed
209----------------
210
211In this cycle, we have :ref:`closed over 500 issues <issues_list_012>`, but a
212few major ones merit special mention:
213
214* Simple configuration errors should no longer crash IPython. In 0.11, errors
215  in config files, as well as invalid trait values, could crash IPython. Now,
216  such errors are reported, and help is displayed.
217
218* Certain SyntaxErrors no longer crash IPython (e.g. just typing keywords, such
219  as ``return``, ``break``, etc.). See :ghissue:`704`.
220
221* IPython path utils, such as :func:`~IPython.utils.path.get_ipython_dir` now
222  check for write permissions, so IPython should function on systems where the
223  default path resolution might point to a read-only location, such as
224  ``HOMESHARE`` on Windows (:ghissue:`669`).
225
226* :func:`raw_input` now works in the kernel when multiple frontends are in
227  use. The request will be sent to the frontend that made the request, and an
228  exception is raised if that frontend does not support stdin requests
229  (e.g. the notebook) (:ghissue:`673`).
230
231* :mod:`zmq` version detection no longer uses simple lexicographical comparison
232  to check minimum version, which prevents 0.11 from working with pyzmq-2.1.10
233  (:ghpull:`758`).
234
235* A bug in PySide < 1.0.7 caused crashes on OSX when tooltips were shown
236  (:ghissue:`711`). these tooltips are now disabled on old PySide
237  (:ghpull:`963`).
238
239* IPython no longer crashes when started on recent versions of Python 3 in
240  Windows (:ghissue:`737`).
241
242* Instances of classes defined interactively can now be pickled (:ghissue:`29`;
243  :ghpull:`648`). Note that pickling saves a reference to the class definition,
244  so unpickling the instances will only work where the class has been defined.
245
246
247Backwards incompatible changes
248------------------------------
249
250* IPython connection information is no longer specified via ip/port directly,
251  rather via json connection files.  These files are stored in the security
252  directory, and enable us to turn on HMAC message authentication by default,
253  significantly improving the security of kernels.  Various utility functions
254  have been added to :mod:`IPython.lib.kernel`, for easier connecting to existing
255  kernels.
256
257* :class:`~IPython.zmq.kernelmanager.KernelManager` now has one ip, and several
258  port traits, rather than several ip/port pair ``_addr`` traits. This better
259  matches the rest of the code, where the ip cannot not be set separately for
260  each channel.
261
262* Custom prompts are now configured using a new class,
263  :class:`~IPython.core.prompts.PromptManager`, which has traits for
264  :attr:`in_template`, :attr:`in2_template` (the ``...:`` continuation prompt),
265  :attr:`out_template` and :attr:`rewrite_template`. This uses Python's string
266  formatting system, so you can use ``{time}`` and ``{cwd}``, although we have
267  preserved the abbreviations from previous versions, e.g. ``\#`` (prompt number)
268  and ``\w`` (working directory). For the list of available fields, refer to the
269  source of :file:`IPython/core/prompts.py`.
270
271* The class inheritance of the Launchers in
272  :mod:`IPython.parallel.apps.launcher` used by ipcluster has changed, so that
273  trait names are more consistent across batch systems. This may require a few
274  renames in your config files, if you customized the command-line args for
275  launching controllers and engines. The configurable names have also been
276  changed to be clearer that they point to class names, and can now be
277  specified by name only, rather than requiring the full import path of each
278  class, e.g.::
279
280    IPClusterEngines.engine_launcher = 'IPython.parallel.apps.launcher.MPIExecEngineSetLauncher'
281    IPClusterStart.controller_launcher = 'IPython.parallel.apps.launcher.SSHControllerLauncher'
282
283  would now be specified as::
284
285    IPClusterEngines.engine_launcher_class = 'MPI'
286    IPClusterStart.controller_launcher_class = 'SSH'
287
288  The full path will still work, and is necessary for using custom launchers
289  not in IPython's launcher module.
290
291  Further, MPIExec launcher names are now prefixed with just MPI, to better match
292  other batch launchers, and be generally more intuitive.  The MPIExec names are
293  deprecated, but continue to work.
294
295* For embedding a shell, note that the parameters ``user_global_ns`` and
296  ``global_ns`` have been deprectated in favour of ``user_module`` and
297  ``module`` respsectively.  The new parameters expect a module-like object,
298  rather than a namespace dict.  The old parameters remain for backwards
299  compatibility, although ``user_global_ns`` is now ignored. The ``user_ns``
300  parameter works the same way as before, and calling
301  :func:`~IPython.frontend.terminal.embed.embed` with no arguments still works
302  as before.
303
304
305Development summary and credits
306-------------------------------
307
308The previous version (IPython 0.11) was released on July 31 2011, so this
309release cycle was roughly 4 1/2 months long, we closed a total of 515 issues,
310257 pull requests and 258 regular issues (a :ref:`detailed list
311<issues_list_012>` is available).
312
313Many users and developers contributed code, features, bug reports and ideas to
314this release.  Please do not hesitate in contacting us if we've failed to
315acknowledge your contribution here.  In particular, for this release we have
316had commits from the following 45 contributors, a mix of new and regular names
317(in alphabetical order by first name):
318
319* Alcides <alcides-at-do-not-span-me.com>
320* Ben Edwards <bedwards-at-cs.unm.edu>
321* Benjamin Ragan-Kelley <benjaminrk-at-gmail.com>
322* Benjamin Thyreau <benjamin.thyreau-at-gmail.com>
323* Bernardo B. Marques <bernardo.fire-at-gmail.com>
324* Bernard Paulus <bprecyclebin-at-gmail.com>
325* Bradley M. Froehle <brad.froehle-at-gmail.com>
326* Brian E. Granger <ellisonbg-at-gmail.com>
327* Christian Boos <cboos-at-bct-technology.com>
328* Daniel Velkov <danielv-at-mylife.com>
329* Erik Tollerud <erik.tollerud-at-gmail.com>
330* Evan Patterson <epatters-at-enthought.com>
331* Felix Werner <Felix.Werner-at-kit.edu>
332* Fernando Perez <Fernando.Perez-at-berkeley.edu>
333* Gabriel <g2p.code-at-gmail.com>
334* Grahame Bowland <grahame-at-angrygoats.net>
335* Hannes Schulz <schulz-at-ais.uni-bonn.de>
336* Jens Hedegaard Nielsen <jenshnielsen-at-gmail.com>
337* Jonathan March <jmarch-at-enthought.com>
338* Jörgen Stenarson <jorgen.stenarson-at-bostream.nu>
339* Julian Taylor <jtaylor.debian-at-googlemail.com>
340* Kefu Chai <tchaikov-at-gmail.com>
341* macgyver <neil.rabinowitz-at-merton.ox.ac.uk>
342* Matt Cottingham <matt.cottingham-at-gmail.com>
343* Matthew Brett <matthew.brett-at-gmail.com>
344* Matthias BUSSONNIER <bussonniermatthias-at-gmail.com>
345* Michael Droettboom <mdboom-at-gmail.com>
346* Nicolas Rougier <Nicolas.Rougier-at-inria.fr>
347* Olivier Verdier <olivier.verdier-at-gmail.com>
348* Omar Andres Zapata Mesa <andresete.chaos-at-gmail.com>
349* Pablo Winant <pablo.winant-at-gmail.com>
350* Paul Ivanov <pivanov314-at-gmail.com>
351* Pauli Virtanen <pav-at-iki.fi>
352* Pete Aykroyd <aykroyd-at-gmail.com>
353* Prabhu Ramachandran <prabhu-at-enthought.com>
354* Puneeth Chaganti <punchagan-at-gmail.com>
355* Robert Kern <robert.kern-at-gmail.com>
356* Satrajit Ghosh <satra-at-mit.edu>
357* Stefan van der Walt <stefan-at-sun.ac.za>
358* Szabolcs Horvát <szhorvat-at-gmail.com>
359* Thomas Kluyver <takowl-at-gmail.com>
360* Thomas Spura <thomas.spura-at-gmail.com>
361* Timo Paulssen <timonator-at-perpetuum-immobile.de>
362* Valentin Haenel <valentin.haenel-at-gmx.de>
363* Yaroslav Halchenko <debian-at-onerussian.com>
364
365.. note::
366
367    This list was generated with the output of
368    ``git log rel-0.11..HEAD --format='* %aN <%aE>' | sed 's/@/\-at\-/' | sed 's/<>//' | sort -u``
369    after some cleanup.  If you should be on this list, please add yourself.
370