##// END OF EJS Templates
generate whatsnew for 0.13.2
MinRK -
Show More
@@ -1,761 +1,821 b''
1 1 =============
2 2 0.13 Series
3 3 =============
4 4
5 Release 0.13.2
6 ==============
7
8 0.13.2 is a bugfix release for 0.13.
9
10 Most notable fixes are related to compatibility with Qt and Wx GUIs.
11
12 The following 48 Pull Requests were backported to 0.13.2:
13
14 * :ghpull:`2399`: IndentationError display
15 * :ghpull:`2503`: Fix traceback handling of SyntaxErrors without line numbers.
16 * :ghpull:`2500`: Add `encoding` attribute to `OutStream` class.
17 * :ghpull:`2498`: Don't catch tab press when something selected
18 * :ghpull:`2490`: add ZMQInteractiveShell to IPEngineApp class list
19 * :ghpull:`2491`: color is supported in ironpython
20 * :ghpull:`2511`: trigger default remote_profile_dir when profile_dir is set
21 * :ghpull:`2294`: inputhook_qt4: Use QEventLoop instead of starting up the QCoreApplication
22 * :ghpull:`2554`: Avoid stopping in ipdb until we reach the main script.
23 * :ghpull:`2561`: Fix display of plain text containing multiple carriage returns before line feed
24 * :ghpull:`2546`: use 4 Pythons to build 4 Windows installers
25 * :ghpull:`2526`: Don't kill paramiko tunnels when receiving ^C
26 * :ghpull:`2591`: Fix for Issue #2584
27 * :ghpull:`2582`: Fix displaying history when output cache is disabled.
28 * :ghpull:`2574`: Fix #2244
29 * :ghpull:`2638`: Fix %paste in Python 3 on Mac
30 * :ghpull:`2656`: Fix irunner tests when $PYTHONSTARTUP is set
31 * :ghpull:`2663`: Fix issue #2660: parsing of help and version arguments
32 * :ghpull:`2668`: pylab_not_importable: Catch all exceptions, not just RuntimeErrors.
33 * :ghpull:`2662`: qtconsole: wrap argument list in tooltip to match width of text body
34 * :ghpull:`2686`: Fix tox.ini
35 * :ghpull:`2685`: Fix pretty print of types when ``__module__`` is not available.
36 * :ghpull:`2713`: Doc bugfix: user_ns is not an attribute of Magic objects.
37 * :ghpull:`2717`: One liner to fix debugger printing stack traces when lines of context are larger than source.
38 * :ghpull:`2544`: Infinite loop when multiple debuggers have been attached.
39 * :ghpull:`2749`: Tell Travis CI to test on Python 3.3 as well
40 * :ghpull:`2738`: Unicode content crashes the pager (console)
41 * :ghpull:`2769`: Allow shutdown when no engines are registered
42 * :ghpull:`2773`: Fixed minor typo causing AttributeError to be thrown.
43 * :ghpull:`2778`: P3K: fix DeprecationWarning under Python 3.x
44 * :ghpull:`2757`: check for complete pyside presence before trying to import
45 * :ghpull:`2783`: Prefilter shouldn't touch execution_count
46 * :ghpull:`2796`: P3K: fix cookie parsing under Python 3.x (+ duplicate import is removed)
47 * :ghpull:`2799`: Exit code
48 * :ghpull:`2816`: in %edit, don't save "last_call" unless last call succeeded
49 * :ghpull:`2830`: BUG: Opening parenthesis after non-callable raises ValueError
50 * :ghpull:`2849`: utils/data: Use list comprehension for uniq_stable()
51 * :ghpull:`2859`: Correct docstring of ipython.py
52 * :ghpull:`2863`: whatsnew/version0.9.txt: Fix '~./ipython' -> '~/.ipython' typo
53 * :ghpull:`2852`: future pyzmq compatibility
54 * :ghpull:`2864`: Fix %run -t -N<N> TypeError
55 * :ghpull:`2926`: Don't die if stderr/stdout do not support set_parent() #2925
56 * :ghpull:`2924`: safe_run_module: Silence SystemExit codes 0 and None.
57 * :ghpull:`2901`: Fix inputhook_wx on osx
58 * :ghpull:`2994`: expanduser on %%file targets
59 * :ghpull:`2831`: avoid string version comparisons in external.qt
60 * :ghpull:`3013`: py3 workaround for reload in cythonmagic
61 * :ghpull:`3008`: fix cython module so extension for multiarched python
62
63
64
5 65 Release 0.13.1
6 66 ==============
7 67
8 68 0.13.1 is a bugfix release for 0.13.
9 69
10 70 Notable fixes:
11 71
12 72 * ipcluster launchers were released with a few serious bugs in 0.13, preventing
13 73 the default configuration from working in just about any nontrivial environment
14 74 (SSH and PBS/SGE/LSF launchers all affected).
15 75 * Various installation / name fixes required for Python 3.3.
16 76 * Notebook frontend should no longer be vulnerable to errors in user javascript.
17 77 * Notebook download/save/print should get the right title instead of 'notebook'.
18 78 * Tab completion fixes when using ``IPython.embed_kernel()``.
19 79 * A few NameErrors/AttributeErrors in magics due to the reorganized magics system.
20 80
21 81 We closed a total of 62 issues (41 pull requests and 21 regular issues);
22 82 this is the full list (generated with the script :file:`tools/github_stats.py`):
23 83
24 84 Pull Requests (41):
25 85
26 86 * :ghpull:`2492`: add missing 'qtconsole' extras_require
27 87 * :ghpull:`2480`: Add deprecation warnings for sympyprinting
28 88 * :ghpull:`2384`: Adapt inline backend to changes in matplotlib
29 89 * :ghpull:`2479`: use new _winapi instead of removed _subprocess
30 90 * :ghpull:`2437`: don't let log cleanup prevent engine start
31 91 * :ghpull:`2405`: clarify TaskScheduler.hwm doc
32 92 * :ghpull:`2377`: Fix installation of man pages in Python 3
33 93 * :ghpull:`2373`: fix missing imports in core.interactiveshell
34 94 * :ghpull:`2365`: fix names of notebooks for download/save
35 95 * :ghpull:`2345`: Remove references to 'version' no longer in argparse. Github issue #2343.
36 96 * :ghpull:`2347`: adjust division error message checking to account for Python 3
37 97 * :ghpull:`2305`: RemoteError._render_traceback_ calls self.render_traceback
38 98 * :ghpull:`2280`: fix SSH passwordless check for OpenSSH
39 99 * :ghpull:`2270`: SSHLauncher tweaks
40 100 * :ghpull:`2261`: Fix: longest_substr([]) -> ''
41 101 * :ghpull:`2250`: fix html in notebook example
42 102 * :ghpull:`2235`: remove spurious print statement from setupbase.py
43 103 * :ghpull:`2223`: Custom tracebacks
44 104 * :ghpull:`2214`: use KernelApp.exec_lines/files in IPEngineApp
45 105 * :ghpull:`2212`: catch errors in markdown javascript
46 106 * :ghpull:`2194`: clean nan/inf in json_clean
47 107 * :ghpull:`2169`: ipdb: pdef, pdoc, pinfo magics all broken
48 108 * :ghpull:`2186`: removed references to h5py dependence in octave magic documentation
49 109 * :ghpull:`2185`: added test for %store, fixed storemagic
50 110 * :ghpull:`2177`: remove numpy install from travis/tox scripts
51 111 * :ghpull:`2170`: Fix tab completion with IPython.embed_kernel().
52 112 * :ghpull:`2163`: fix 'remote_profie_dir' typo in SSH launchers
53 113 * :ghpull:`2117`: use explicit url in notebook example
54 114 * :ghpull:`2126`: ipcluster broken with any batch launcher (PBS/LSF/SGE)
55 115 * :ghpull:`2128`: open notebook copy in different tabs
56 116 * :ghpull:`2073`: allows password and prefix for notebook
57 117 * :ghpull:`2086`: re-alias %ed to %edit in qtconsole
58 118 * :ghpull:`2101`: fix completer deleting newline
59 119 * :ghpull:`2102`: Fix logging on interactive shell.
60 120 * :ghpull:`2063`: Remove umlauts so py3 installations on LANG=C systems succeed.
61 121 * :ghpull:`2068`: record sysinfo in sdist
62 122 * :ghpull:`2067`: update tools/release_windows.py
63 123 * :ghpull:`2065`: Fix parentheses typo
64 124 * :ghpull:`2062`: Remove duplicates and auto-generated files from repo.
65 125 * :ghpull:`2061`: use explicit tuple in exception
66 126 * :ghpull:`2060`: change minus to \- or \(hy in manpages
67 127
68 128 Issues (21):
69 129
70 130 * :ghissue:`2471`: _subprocess module removed in Python 3.3
71 131 * :ghissue:`2374`: Issues with man pages
72 132 * :ghissue:`2435`: ipengines fail if clean_logs enabled
73 133 * :ghissue:`2372`: interactiveshell.py misses urllib and io_open imports
74 134 * :ghissue:`2227`: print name for IPython Notebooks has become uninformative
75 135 * :ghissue:`2343`: Installing in a python 3.3b2 or python 3.3rc1 virtual environment.
76 136 * :ghissue:`2303`: remote tracebacks broken since 952d0d6 (PR #2223)
77 137 * :ghissue:`2266`: SSH passwordless check with OpenSSH checks for the wrong thing
78 138 * :ghissue:`2252`: %paste throws an exception with empty clipboard
79 139 * :ghissue:`2221`: Avoid importing from IPython.parallel in core
80 140 * :ghissue:`2213`: Can't trigger startup code in Engines
81 141 * :ghissue:`2187`: NaN in object_info_reply JSON causes parse error
82 142 * :ghissue:`2173`: oct2py v >= 0.3.1 doesn't need h5py anymore
83 143 * :ghissue:`2099`: storemagic needs to use self.shell
84 144 * :ghissue:`2139`: 00_notebook_tour Image example broken on master
85 145 * :ghissue:`2085`: %ed magic fails in qtconsole
86 146 * :ghissue:`2082`: Qt Console output spacing
87 147 * :ghissue:`2057`: setup fails for python3 with LANG=C
88 148 * :ghissue:`2059`: duplicate and modified files in documentation
89 149 * :ghissue:`2056`: except-shadows-builtin osm.py:687
90 150 * :ghissue:`2058`: hyphen-used-as-minus-sign in manpages
91 151
92 152
93 153 Release 0.13
94 154 ============
95 155
96 156 IPython 0.13 contains several major new features, as well as a large amount of
97 157 bug and regression fixes. The previous version (0.12) was released on December
98 158 19 2011, and in this development cycle we had:
99 159
100 160 - ~6 months of work.
101 161 - 373 pull requests merged.
102 162 - 742 issues closed (non-pull requests).
103 163 - contributions from 62 authors.
104 164 - 1760 commits.
105 165 - a diff of 114226 lines.
106 166
107 167 The amount of work included in this release is so large, that we can only cover
108 168 here the main highlights; please see our :ref:`detailed release statistics
109 169 <issues_list_013>` for links to every issue and pull request closed on GitHub
110 170 as well as a full list of individual contributors.
111 171
112 172
113 173 Major Notebook improvements: new user interface and more
114 174 --------------------------------------------------------
115 175
116 176 The IPython Notebook, which has proven since its release to be wildly popular,
117 177 has seen a massive amount of work in this release cycle, leading to a
118 178 significantly improved user experience as well as many new features.
119 179
120 180 The first user-visible change is a reorganization of the user interface; the
121 181 left panel has been removed and was replaced by a real menu system and a
122 182 toolbar with icons. Both the toolbar and the header above the menu can be
123 183 collapsed to leave an unobstructed working area:
124 184
125 185 .. image:: ../_static/ipy_013_notebook_spectrogram.png
126 186 :width: 460px
127 187 :alt: New user interface for Notebook
128 188 :align: center
129 189 :target: ../_static/ipy_013_notebook_spectrogram.png
130 190
131 191 The notebook handles very long outputs much better than before (this was a
132 192 serious usability issue when running processes that generated massive amounts
133 193 of output). Now, in the presence of outputs longer than ~100 lines, the
134 194 notebook will automatically collapse to a scrollable area and the entire left
135 195 part of this area controls the display: one click in this area will expand the
136 196 output region completely, and a double-click will hide it completely. This
137 197 figure shows both the scrolled and hidden modes:
138 198
139 199 .. image:: ../_static/ipy_013_notebook_long_out.png
140 200 :width: 460px
141 201 :alt: Scrolling and hiding of long output in the notebook.
142 202 :align: center
143 203 :target: ../_static/ipy_013_notebook_long_out.png
144 204
145 205 .. note::
146 206
147 207 The auto-folding of long outputs is disabled in Firefox due to bugs in its
148 208 scrolling behavior. See :ghpull:`2047` for details.
149 209
150 210 Uploading notebooks to the dashboard is now easier: in addition to drag and
151 211 drop (which can be finicky sometimes), you can now click on the upload text and
152 212 use a regular file dialog box to select notebooks to upload. Furthermore, the
153 213 notebook dashboard now auto-refreshes its contents and offers buttons to shut
154 214 down any running kernels (:ghpull:`1739`):
155 215
156 216 .. image:: ../_static/ipy_013_dashboard.png
157 217 :width: 460px
158 218 :alt: Improved dashboard
159 219 :align: center
160 220 :target: ../_static/ipy_013_dashboard.png
161 221
162 222
163 223 Cluster management
164 224 ~~~~~~~~~~~~~~~~~~
165 225
166 226 The notebook dashboard can now also start and stop clusters, thansk to a new
167 227 tab in the dashboard user interface:
168 228
169 229 .. image:: ../_static/ipy_013_dashboard_cluster.png
170 230 :width: 460px
171 231 :alt: Cluster management from the notebook dashboard
172 232 :align: center
173 233 :target: ../_static/ipy_013_dashboard_cluster.png
174 234
175 235 This interface allows, for each profile you have configured, to start and stop
176 236 a cluster (and optionally override the default number of engines corresponding
177 237 to that configuration). While this hides all error reporting, once you have a
178 238 configuration that you know works smoothly, it is a very convenient interface
179 239 for controlling your parallel resources.
180 240
181 241
182 242 New notebook format
183 243 ~~~~~~~~~~~~~~~~~~~
184 244
185 245 The notebooks saved now use version 3 of our format, which supports heading
186 246 levels as well as the concept of 'raw' text cells that are not rendered as
187 247 Markdown. These will be useful with converters_ we are developing, to pass raw
188 248 markup (say LaTeX). That conversion code is still under heavy development and
189 249 not quite ready for prime time, but we welcome help on this front so that we
190 250 can merge it for full production use as soon as possible.
191 251
192 252 .. _converters: https://github.com/ipython/nbconvert
193 253
194 254 .. note::
195 255
196 256 v3 notebooks can *not* be read by older versions of IPython, but we provide
197 257 a `simple script`_ that you can use in case you need to export a v3
198 258 notebook to share with a v2 user.
199 259
200 260 .. _simple script: https://gist.github.com/1935808
201 261
202 262
203 263 JavaScript refactoring
204 264 ~~~~~~~~~~~~~~~~~~~~~~
205 265
206 266 All the client-side JavaScript has been decoupled to ease reuse of parts of the
207 267 machinery without having to build a full-blown notebook. This will make it much
208 268 easier to communicate with an IPython kernel from existing web pages and to
209 269 integrate single cells into other sites, without loading the full notebook
210 270 document-like UI. :ghpull:`1711`.
211 271
212 272 This refactoring also enables the possibility of writing dynamic javascript
213 273 widgets that are returned from Python code and that present an interactive view
214 274 to the user, with callbacks in Javascript executing calls to the Kernel. This
215 275 will enable many interactive elements to be added by users in notebooks.
216 276
217 277 An example of this capability has been provided as a proof of concept in
218 278 :file:`docs/examples/widgets` that lets you directly communicate with one or more
219 279 parallel engines, acting as a mini-console for parallel debugging and
220 280 introspection.
221 281
222 282
223 283 Improved tooltips
224 284 ~~~~~~~~~~~~~~~~~
225 285
226 286 The object tooltips have gained some new functionality. By pressing tab several
227 287 times, you can expand them to see more of a docstring, keep them visible as you
228 288 fill in a function's parameters, or transfer the information to the pager at the
229 289 bottom of the screen. For the details, look at the example notebook
230 290 :file:`01_notebook_introduction.ipynb`.
231 291
232 292 .. figure:: ../_static/ipy_013_notebook_tooltip.png
233 293 :width: 460px
234 294 :alt: Improved tooltips in the notebook.
235 295 :align: center
236 296 :target: ../_static/ipy_013_notebook_tooltip.png
237 297
238 298 The new notebook tooltips.
239 299
240 300 Other improvements to the Notebook
241 301 ----------------------------------
242 302
243 303 These are some other notable small improvements to the notebook, in addition to
244 304 many bug fixes and minor changes to add polish and robustness throughout:
245 305
246 306 * The notebook pager (the area at the bottom) is now resizeable by dragging its
247 307 divider handle, a feature that had been requested many times by just about
248 308 anyone who had used the notebook system. :ghpull:`1705`.
249 309
250 310 * It is now possible to open notebooks directly from the command line; for
251 311 example: ``ipython notebook path/`` will automatically set ``path/`` as the
252 312 notebook directory, and ``ipython notebook path/foo.ipynb`` will further
253 313 start with the ``foo.ipynb`` notebook opened. :ghpull:`1686`.
254 314
255 315 * If a notebook directory is specified with ``--notebook-dir`` (or with the
256 316 corresponding configuration flag ``NotebookManager.notebook_dir``), all
257 317 kernels start in this directory.
258 318
259 319 * Fix codemirror clearing of cells with ``Ctrl-Z``; :ghpull:`1965`.
260 320
261 321 * Text (markdown) cells now line wrap correctly in the notebook, making them
262 322 much easier to edit :ghpull:`1330`.
263 323
264 324 * PNG and JPEG figures returned from plots can be interactively resized in the
265 325 notebook, by dragging them from their lower left corner. :ghpull:`1832`.
266 326
267 327 * Clear ``In []`` prompt numbers on "Clear All Output". For more
268 328 version-control-friendly ``.ipynb`` files, we now strip all prompt numbers
269 329 when doing a "Clear all output". This reduces the amount of noise in
270 330 commit-to-commit diffs that would otherwise show the (highly variable) prompt
271 331 number changes. :ghpull:`1621`.
272 332
273 333 * The notebook server now requires *two* consecutive ``Ctrl-C`` within 5
274 334 seconds (or an interactive confirmation) to terminate operation. This makes
275 335 it less likely that you will accidentally kill a long-running server by
276 336 typing ``Ctrl-C`` in the wrong terminal. :ghpull:`1609`.
277 337
278 338 * Using ``Ctrl-S`` (or ``Cmd-S`` on a Mac) actually saves the notebook rather
279 339 than providing the fairly useless browser html save dialog. :ghpull:`1334`.
280 340
281 341 * Allow accessing local files from the notebook (in urls), by serving any local
282 342 file as the url ``files/<relativepath>``. This makes it possible to, for
283 343 example, embed local images in a notebook. :ghpull:`1211`.
284 344
285 345
286 346 Cell magics
287 347 -----------
288 348
289 349 We have completely refactored the magic system, finally moving the magic
290 350 objects to standalone, independent objects instead of being the mixin class
291 351 we'd had since the beginning of IPython (:ghpull:`1732`). Now, a separate base
292 352 class is provided in :class:`IPython.core.magic.Magics` that users can subclass
293 353 to create their own magics. Decorators are also provided to create magics from
294 354 simple functions without the need for object orientation. Please see the
295 355 :ref:`magic` docs for further details.
296 356
297 357 All builtin magics now exist in a few subclasses that group together related
298 358 functionality, and the new :mod:`IPython.core.magics` package has been created
299 359 to organize this into smaller files.
300 360
301 361 This cleanup was the last major piece of deep refactoring needed from the
302 362 original 2001 codebase.
303 363
304 364 We have also introduced a new type of magic function, prefixed with `%%`
305 365 instead of `%`, which operates at the whole-cell level. A cell magic receives
306 366 two arguments: the line it is called on (like a line magic) and the body of the
307 367 cell below it.
308 368
309 369 Cell magics are most natural in the notebook, but they also work in the
310 370 terminal and qt console, with the usual approach of using a blank line to
311 371 signal cell termination.
312 372
313 373 For example, to time the execution of several statements::
314 374
315 375 %%timeit x = 0 # setup
316 376 for i in range(100000):
317 377 x += i**2
318 378
319 379 This is particularly useful to integrate code in another language, and cell
320 380 magics already exist for shell scripts, Cython, R and Octave. Using ``%%script
321 381 /usr/bin/foo``, you can run a cell in any interpreter that accepts code via
322 382 stdin.
323 383
324 384 Another handy cell magic makes it easy to write short text files: ``%%file
325 385 ~/save/to/here.txt``.
326 386
327 387 The following cell magics are now included by default; all those that use
328 388 special interpreters (Perl, Ruby, bash, etc.) assume you have the requisite
329 389 interpreter installed:
330 390
331 391 * ``%%!``: run cell body with the underlying OS shell; this is similar to
332 392 prefixing every line in the cell with ``!``.
333 393
334 394 * ``%%bash``: run cell body under bash.
335 395
336 396 * ``%%capture``: capture the output of the code in the cell (and stderr as
337 397 well). Useful to run codes that produce too much output that you don't even
338 398 want scrolled.
339 399
340 400 * ``%%file``: save cell body as a file.
341 401
342 402 * ``%%perl``: run cell body using Perl.
343 403
344 404 * ``%%prun``: run cell body with profiler (cell extension of ``%prun``).
345 405
346 406 * ``%%python3``: run cell body using Python 3.
347 407
348 408 * ``%%ruby``: run cell body using Ruby.
349 409
350 410 * ``%%script``: run cell body with the script specified in the first line.
351 411
352 412 * ``%%sh``: run cell body using sh.
353 413
354 414 * ``%%sx``: run cell with system shell and capture process output (cell
355 415 extension of ``%sx``).
356 416
357 417 * ``%%system``: run cell with system shell (``%%!`` is an alias to this).
358 418
359 419 * ``%%timeit``: time the execution of the cell (extension of ``%timeit``).
360 420
361 421 This is what some of the script-related magics look like in action:
362 422
363 423 .. image:: ../_static/ipy_013_notebook_script_cells.png
364 424 :width: 460px
365 425 :alt: Cluster management from the notebook dashboard
366 426 :align: center
367 427 :target: ../_static/ipy_013_notebook_script_cells.png
368 428
369 429 In addition, we have also a number of :ref:`extensions <extensions_overview>`
370 430 that provide specialized magics. These typically require additional software
371 431 to run and must be manually loaded via ``%load_ext <extension name>``, but are
372 432 extremely useful. The following extensions are provided:
373 433
374 434 **Cython magics** (extension :ref:`cythonmagic <extensions_cythonmagic>`)
375 435 This extension provides magics to automatically build and compile Python
376 436 extension modules using the Cython_ language. You must install Cython
377 437 separately, as well as a C compiler, for this to work. The examples
378 438 directory in the source distribution ships with a full notebook
379 439 demonstrating these capabilities:
380 440
381 441 .. image:: ../_static/ipy_013_notebook_cythonmagic.png
382 442 :width: 460px
383 443 :alt: Cython magic
384 444 :align: center
385 445 :target: ../_static/ipy_013_notebook_cythonmagic.png
386 446
387 447 .. _cython: http://cython.org
388 448
389 449 **Octave magics** (extension :ref:`octavemagic <extensions_octavemagic>`)
390 450 This extension provides several magics that support calling code written in
391 451 the Octave_ language for numerical computing. You can execute single-lines
392 452 or whole blocks of Octave code, capture both output and figures inline
393 453 (just like matplotlib plots), and have variables automatically converted
394 454 between the two languages. To use this extension, you must have Octave
395 455 installed as well as the oct2py_ package. The examples
396 456 directory in the source distribution ships with a full notebook
397 457 demonstrating these capabilities:
398 458
399 459 .. image:: ../_static/ipy_013_notebook_octavemagic.png
400 460 :width: 460px
401 461 :alt: Octave magic
402 462 :align: center
403 463 :target: ../_static/ipy_013_notebook_octavemagic.png
404 464
405 465 .. _octave: http://www.gnu.org/software/octave
406 466 .. _oct2py: http://pypi.python.org/pypi/oct2py
407 467
408 468 **R magics** (extension :ref:`rmagic <extensions_rmagic>`)
409 469 This extension provides several magics that support calling code written in
410 470 the R_ language for statistical data analysis. You can execute
411 471 single-lines or whole blocks of R code, capture both output and figures
412 472 inline (just like matplotlib plots), and have variables automatically
413 473 converted between the two languages. To use this extension, you must have
414 474 R installed as well as the rpy2_ package that bridges Python and R. The
415 475 examples directory in the source distribution ships with a full notebook
416 476 demonstrating these capabilities:
417 477
418 478 .. image:: ../_static/ipy_013_notebook_rmagic.png
419 479 :width: 460px
420 480 :alt: R magic
421 481 :align: center
422 482 :target: ../_static/ipy_013_notebook_rmagic.png
423 483
424 484 .. _R: http://www.r-project.org
425 485 .. _rpy2: http://rpy.sourceforge.net/rpy2.html
426 486
427 487
428 488 Tab completer improvements
429 489 --------------------------
430 490
431 491 Useful tab-completion based on live inspection of objects is one of the most
432 492 popular features of IPython. To make this process even more user-friendly, the
433 493 completers of both the Qt console and the Notebook have been reworked.
434 494
435 495 The Qt console comes with a new ncurses-like tab completer, activated by
436 496 default, which lets you cycle through the available completions by pressing tab,
437 497 or select a completion with the arrow keys (:ghpull:`1851`).
438 498
439 499 .. figure:: ../_static/ipy_013_qtconsole_completer.png
440 500 :width: 460px
441 501 :alt: ncurses-like completer, with highlighted selection.
442 502 :align: center
443 503 :target: ../_static/ipy_013_qtconsole_completer.png
444 504
445 505 The new improved Qt console's ncurses-like completer allows to easily
446 506 navigate thought long list of completions.
447 507
448 508 In the notebook, completions are now sourced both from object introspection and
449 509 analysis of surrounding code, so limited completions can be offered for
450 510 variables defined in the current cell, or while the kernel is busy
451 511 (:ghpull:`1711`).
452 512
453 513
454 514 We have implemented a new configurable flag to control tab completion on
455 515 modules that provide the ``__all__`` attribute::
456 516
457 517 IPCompleter.limit_to__all__= Boolean
458 518
459 519 This instructs the completer to honor ``__all__`` for the completion.
460 520 Specifically, when completing on ``object.<tab>``, if True: only those names
461 521 in ``obj.__all__`` will be included. When False [default]: the ``__all__``
462 522 attribute is ignored. :ghpull:`1529`.
463 523
464 524
465 525 Improvements to the Qt console
466 526 ------------------------------
467 527
468 528 The Qt console continues to receive improvements and refinements, despite the
469 529 fact that it is by now a fairly mature and robust component. Lots of small
470 530 polish has gone into it, here are a few highlights:
471 531
472 532 * A number of changes were made to the underlying code for easier integration
473 533 into other projects such as Spyder_ (:ghpull:`2007`, :ghpull:`2024`).
474 534
475 535 * Improved menus with a new Magic menu that is organized by magic groups (this
476 536 was made possible by the reorganization of the magic system
477 537 internals). :ghpull:`1782`.
478 538
479 539 * Allow for restarting kernels without clearing the qtconsole, while leaving a
480 540 visible indication that the kernel has restarted. :ghpull:`1681`.
481 541
482 542 * Allow the native display of jpeg images in the qtconsole. :ghpull:`1643`.
483 543
484 544 .. _spyder: https://code.google.com/p/spyderlib
485 545
486 546
487 547
488 548 Parallel
489 549 --------
490 550
491 551 The parallel tools have been improved and fine-tuned on multiple fronts. Now,
492 552 the creation of an :class:`IPython.parallel.Client` object automatically
493 553 activates a line and cell magic function ``px`` that sends its code to all the
494 554 engines. Further magics can be easily created with the :meth:`.Client.activate`
495 555 method, to conveniently execute code on any subset of engines. :ghpull:`1893`.
496 556
497 557 The ``%%px`` cell magic can also be given an optional targets argument, as well
498 558 as a ``--out`` argument for storing its output.
499 559
500 560 A new magic has also been added, ``%pxconfig``, that lets you configure various
501 561 defaults of the parallel magics. As usual, type ``%pxconfig?`` for details.
502 562
503 563 The exception reporting in parallel contexts has been improved to be easier to
504 564 read. Now, IPython directly reports the remote exceptions without showing any
505 565 of the internal execution parts:
506 566
507 567 .. image:: ../_static/ipy_013_par_tb.png
508 568 :width: 460px
509 569 :alt: Improved parallel exceptions.
510 570 :align: center
511 571 :target: ../_static/ipy_013_par_tb.png
512 572
513 573 The parallel tools now default to using ``NoDB`` as the storage backend for
514 574 intermediate results. This means that the default usage case will have a
515 575 significantly reduced memory footprint, though certain advanced features are
516 576 not available with this backend. For more details, see :ref:`parallel_db`.
517 577
518 578 The parallel magics now display all output, so you can do parallel plotting or
519 579 other actions with complex display. The ``px`` magic has now both line and cell
520 580 modes, and in cell mode finer control has been added about how to collate
521 581 output from multiple engines. :ghpull:`1768`.
522 582
523 583 There have also been incremental improvements to the SSH launchers:
524 584
525 585 * add to_send/fetch steps for moving connection files around.
526 586
527 587 * add SSHProxyEngineSetLauncher, for invoking to `ipcluster engines` on a
528 588 remote host. This can be used to start a set of engines via PBS/SGE/MPI
529 589 *remotely*.
530 590
531 591 This makes the SSHLauncher usable on machines without shared filesystems.
532 592
533 593 A number of 'sugar' methods/properties were added to AsyncResult that are
534 594 quite useful (:ghpull:`1548`) for everday work:
535 595
536 596 * ``ar.wall_time`` = received - submitted
537 597 * ``ar.serial_time`` = sum of serial computation time
538 598 * ``ar.elapsed`` = time since submission (wall_time if done)
539 599 * ``ar.progress`` = (int) number of sub-tasks that have completed
540 600 * ``len(ar)`` = # of tasks
541 601 * ``ar.wait_interactive()``: prints progress
542 602
543 603 Added :meth:`.Client.spin_thread` / :meth:`~.Client.stop_spin_thread` for
544 604 running spin in a background thread, to keep zmq queue clear. This can be used
545 605 to ensure that timing information is as accurate as possible (at the cost of
546 606 having a background thread active).
547 607
548 608 Set TaskScheduler.hwm default to 1 instead of 0. 1 has more
549 609 predictable/intuitive behavior, if often slower, and thus a more logical
550 610 default. Users whose workloads require maximum throughput and are largely
551 611 homogeneous in time per task can make the optimization themselves, but now the
552 612 behavior will be less surprising to new users. :ghpull:`1294`.
553 613
554 614
555 615 Kernel/Engine unification
556 616 -------------------------
557 617
558 618 This is mostly work 'under the hood', but it is actually a *major* achievement
559 619 for the project that has deep implications in the long term: at last, we have
560 620 unified the main object that executes as the user's interactive shell (which we
561 621 refer to as the *IPython kernel*) with the objects that run in all the worker
562 622 nodes of the parallel computing facilities (the *IPython engines*). Ever since
563 623 the first implementation of IPython's parallel code back in 2006, we had wanted
564 624 to have these two roles be played by the same machinery, but a number of
565 625 technical reasons had prevented that from being true.
566 626
567 627 In this release we have now merged them, and this has a number of important
568 628 consequences:
569 629
570 630 * It is now possible to connect any of our clients (qtconsole or terminal
571 631 console) to any individual parallel engine, with the *exact* behavior of
572 632 working at a 'regular' IPython console/qtconsole. This makes debugging,
573 633 plotting, etc. in parallel scenarios vastly easier.
574 634
575 635 * Parallel engines can always execute arbitrary 'IPython code', that is, code
576 636 that has magics, shell extensions, etc. In combination with the ``%%px``
577 637 magics, it is thus extremely natural for example to send to all engines a
578 638 block of Cython or R code to be executed via the new Cython and R magics. For
579 639 example, this snippet would send the R block to all active engines in a
580 640 cluster::
581 641
582 642 %%px
583 643 %%R
584 644 ... R code goes here
585 645
586 646 * It is possible to embed not only an interactive shell with the
587 647 :func:`IPython.embed` call as always, but now you can also embed a *kernel*
588 648 with :func:`IPython.embed_kernel()`. Embedding an IPython kernel in an
589 649 application is useful when you want to use :func:`IPython.embed` but don't
590 650 have a terminal attached on stdin and stdout.
591 651
592 652 * The new :func:`IPython.parallel.bind_kernel` allows you to promote Engines to
593 653 listening Kernels, and connect QtConsoles to an Engine and debug it
594 654 directly.
595 655
596 656 In addition, having a single core object through our entire architecture also
597 657 makes the project conceptually cleaner, easier to maintain and more robust.
598 658 This took a lot of work to get in place, but we are thrilled to have this major
599 659 piece of architecture finally where we'd always wanted it to be.
600 660
601 661
602 662 Official Public API
603 663 -------------------
604 664
605 665 We have begun organizing our API for easier public use, with an eye towards an
606 666 official IPython 1.0 release which will firmly maintain this API compatible for
607 667 its entire lifecycle. There is now an :mod:`IPython.display` module that
608 668 aggregates all display routines, and the :mod:`IPython.config` namespace has
609 669 all public configuration tools. We will continue improving our public API
610 670 layout so that users only need to import names one level deeper than the main
611 671 ``IPython`` package to access all public namespaces.
612 672
613 673
614 674 IPython notebook file icons
615 675 ---------------------------
616 676
617 677 The directory ``docs/resources`` in the source distribution contains SVG and
618 678 PNG versions of our file icons, as well as an ``Info.plist.example`` file with
619 679 instructions to install them on Mac OSX. This is a first draft of our icons,
620 680 and we encourage contributions from users with graphic talent to improve them
621 681 in the future:
622 682
623 683 .. image:: ../../resources/ipynb_icon_128x128.png
624 684 :alt: IPython notebook file icon.
625 685
626 686
627 687 New top-level `locate` command
628 688 ------------------------------
629 689
630 690 Add `locate` entry points; these would be useful for quickly locating IPython
631 691 directories and profiles from other (non-Python) applications. :ghpull:`1762`.
632 692
633 693 Examples::
634 694
635 695 $> ipython locate
636 696 /Users/me/.ipython
637 697
638 698 $> ipython locate profile foo
639 699 /Users/me/.ipython/profile_foo
640 700
641 701 $> ipython locate profile
642 702 /Users/me/.ipython/profile_default
643 703
644 704 $> ipython locate profile dne
645 705 [ProfileLocate] Profile u'dne' not found.
646 706
647 707
648 708 Other new features and improvements
649 709 -----------------------------------
650 710
651 711 * **%install_ext**: A new magic function to install an IPython extension from
652 712 a URL. E.g. ``%install_ext
653 713 https://bitbucket.org/birkenfeld/ipython-physics/raw/default/physics.py``.
654 714
655 715 * The ``%loadpy`` magic is no longer restricted to Python files, and has been
656 716 renamed ``%load``. The old name remains as an alias.
657 717
658 718 * New command line arguments will help external programs find IPython folders:
659 719 ``ipython locate`` finds the user's IPython directory, and ``ipython locate
660 720 profile foo`` finds the folder for the 'foo' profile (if it exists).
661 721
662 722 * The :envvar:`IPYTHON_DIR` environment variable, introduced in the Great
663 723 Reorganization of 0.11 and existing only in versions 0.11-0.13, has been
664 724 deprecated. As described in :ghpull:`1167`, the complexity and confusion of
665 725 migrating to this variable is not worth the aesthetic improvement. Please use
666 726 the historical :envvar:`IPYTHONDIR` environment variable instead.
667 727
668 728 * The default value of *interactivity* passed from
669 729 :meth:`~IPython.core.interactiveshell.InteractiveShell.run_cell` to
670 730 :meth:`~IPython.core.interactiveshell.InteractiveShell.run_ast_nodes`
671 731 is now configurable.
672 732
673 733 * New ``%alias_magic`` function to conveniently create aliases of existing
674 734 magics, if you prefer to have shorter names for personal use.
675 735
676 736 * We ship unminified versions of the JavaScript libraries we use, to better
677 737 comply with Debian's packaging policies.
678 738
679 739 * Simplify the information presented by ``obj?/obj??`` to eliminate a few
680 740 redundant fields when possible. :ghpull:`2038`.
681 741
682 742 * Improved continuous integration for IPython. We now have automated test runs
683 743 on `Shining Panda <https://jenkins.shiningpanda.com/ipython>`_ and `Travis-CI
684 744 <http://travis-ci.org/#!/ipython/ipython>`_, as well as `Tox support
685 745 <http://tox.testrun.org>`_.
686 746
687 747 * The `vim-ipython`_ functionality (externally developed) has been updated to
688 748 the latest version.
689 749
690 750 .. _vim-ipython: https://github.com/ivanov/vim-ipython
691 751
692 752 * The ``%save`` magic now has a ``-f`` flag to force overwriting, which makes
693 753 it much more usable in the notebook where it is not possible to reply to
694 754 interactive questions from the kernel. :ghpull:`1937`.
695 755
696 756 * Use dvipng to format sympy.Matrix, enabling display of matrices in the Qt
697 757 console with the sympy printing extension. :ghpull:`1861`.
698 758
699 759 * Our messaging protocol now has a reasonable test suite, helping ensure that
700 760 we don't accidentally deviate from the spec and possibly break third-party
701 761 applications that may have been using it. We encourage users to contribute
702 762 more stringent tests to this part of the test suite. :ghpull:`1627`.
703 763
704 764 * Use LaTeX to display, on output, various built-in types with the SymPy
705 765 printing extension. :ghpull:`1399`.
706 766
707 767 * Add Gtk3 event loop integration and example. :ghpull:`1588`.
708 768
709 769 * ``clear_output`` improvements, which allow things like progress bars and other
710 770 simple animations to work well in the notebook (:ghpull:`1563`):
711 771
712 772 * `clear_output()` clears the line, even in terminal IPython, the QtConsole
713 773 and plain Python as well, by printing `\r` to streams.
714 774
715 775 * `clear_output()` avoids the flicker in the notebook by adding a delay,
716 776 and firing immediately upon the next actual display message.
717 777
718 778 * `display_javascript` hides its `output_area` element, so using display to
719 779 run a bunch of javascript doesn't result in ever-growing vertical space.
720 780
721 781 * Add simple support for running inside a virtualenv. While this doesn't
722 782 supplant proper installation (as users should do), it helps ad-hoc calling of
723 783 IPython from inside a virtualenv. :ghpull:`1388`.
724 784
725 785
726 786 Major Bugs fixed
727 787 ----------------
728 788
729 789 In this cycle, we have :ref:`closed over 740 issues <issues_list_013>`, but a
730 790 few major ones merit special mention:
731 791
732 792 * The ``%pastebin`` magic has been updated to point to gist.github.com, since
733 793 unfortunately http://paste.pocoo.org has closed down. We also added a -d flag
734 794 for the user to provide a gist description string. :ghpull:`1670`.
735 795
736 796 * Fix ``%paste`` that would reject certain valid inputs. :ghpull:`1258`.
737 797
738 798 * Fix sending and receiving of Numpy structured arrays (those with composite
739 799 dtypes, often used as recarrays). :ghpull:`2034`.
740 800
741 801 * Reconnect when the websocket connection closes unexpectedly. :ghpull:`1577`.
742 802
743 803 * Fix truncated representation of objects in the debugger by showing at least
744 804 80 characters' worth of information. :ghpull:`1793`.
745 805
746 806 * Fix logger to be Unicode-aware: logging could crash ipython if there was
747 807 unicode in the input. :ghpull:`1792`.
748 808
749 809 * Fix images missing from XML/SVG export in the Qt console. :ghpull:`1449`.
750 810
751 811 * Fix deepreload on Python 3. :ghpull:`1625`, as well as having a much cleaner
752 812 and more robust implementation of deepreload in general. :ghpull:`1457`.
753 813
754 814
755 815 Backwards incompatible changes
756 816 ------------------------------
757 817
758 818 * The exception :exc:`IPython.core.error.TryNext` previously accepted
759 819 arguments and keyword arguments to be passed to the next implementation
760 820 of the hook. This feature was removed as it made error message propagation
761 821 difficult and violated the principle of loose coupling.
General Comments 0
You need to be logged in to leave comments. Login now