test new AsyncResult properties
document new AsyncResult properties
Merge pull request #1588 from thomir/gtk3-support

Add Gtk3 event loop integration and example.
re-enter kernel.eventloop after catching SIGINT
unicode literals in notebook magic tests

per review by @takluyver
NBFormatTest is now a mixin, rather than a base class
add VERSIONHACK markers for never-released plaintext handling
py3compat._modify_str_or_docstring should check against basestring
Merge pull request #1480 from minrk/npmagic

Fix %notebook magic, etc. nbformat unicode tests and fixes.

* json.writes always gives unicode, so that `current.writes` can be trusted to give the same interface
* setup base TestCase for nbformat tests, to consolidate code, and better test both file formats
* add tests for reading/writing to files
* allow `name` as kwarg to new_notebook to avoid unnecessary breakage of previous API.
* remove fallback to xml, which would hide corrupt notebook files behind a nonsensical 'xml unsupported' message.

Closes #1545, #1487.
Merge pull request #1490 from minrk/raw

rename plaintext cell -> raw cell

Raw cells should be *untransformed* when writing various output formats, as the point of them is to let users pass through IPython to their rendered document format (rst, latex, etc.).  This is different from what is the logical meaning of 'plaintext', which would suggest that the contents should be preserved as unformatted plaintext (e.g. in a `<pre>` tag, or literal block).

In the UI, these cells will be displayed as 'Raw Text'.

WARNING: any existing v3 notebooks which use plaintext cells, when read in by versions after this merge, will silently rename those cells to 'raw'.  But if such a notebook is uploaded into a pre-merge IPython, cells labeled as 'raw' will simply *not be displayed*.
Merge pull request #1597 from minrk/while_eventloop

re-enter kernel.eventloop after catching SIGINT

This protects the kernel from exiting due to bugs failing to catch SIGINT properly in the eventloop integration functions, as described in #1228. It does not fix those bugs, only reduces the severity of their consequences.
Merge pull request #1399 from asmeurer/sympyprinting

Use LaTeX to display, on output, various built-in types with the SymPy printing extension.

SymPy's latex() function supports printing lists, tuples, and dicts using latex notation (it uses bmatrix, pmatrix, and Bmatrix, respectively). This provides a more unified experience with SymPy functions that return these types (such as solve()).

Also display ints, longs, and floats using LaTeX, to get a more unified printing experience (so that, e.g., x/x will print the same as just 1). The string form can always be obtained by manually calling the actual print function, or 2d unicode printing using pprint().

SymPy's latex() function doesn't treat set() or frosenset() correctly
presently (see http://code.google.com/p/sympy/issues /detail?id=3062), so for the present, we leave those alone.
Merge pull request #1535 from doerwalter/master

Fix pretty printing dispatch.

This patch fixes a problem mentioned here: http://mail.scipy.org/pipermail/ipython-dev/2012-March/008874.html

Search for the best method to use for pretty printing an object now no longer prefers any registered printer in `type_printers` for the class or any of the base classes over a `_repr_pretty_` method defined in the class or any of its base classes.

Instead the mro is walked, looking for both registered printers and `_repr_pretty_` methods, so that the inheritance hierarchy will be taken into account.
add Client.spin_thread()

runs Client.spin() in a background thread at a set interval
Merge pull request #1548 from minrk/ar_sugar

Add sugar methods/properties to AsyncResult that are generically useful:

* `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

These are simple methods derived from the metadata/timestamps already created.  But I've been persuaded by @wesm's practice of including simple methods that do useful (and/or cool) things.

This also required/revealed some minor fixes/cleanup to clear_output in some cases:

* dedent base `core.displaypub.clear_output`, so it's actually defined in the class
* clear_output publishes `'\r\b'`, so it will clear terminal-like frontends that don't understand full clear_output behavior.
* `core.display.clear_output()` still works, even outside an IPython session.

Added a new notebook that shows how to use these new methods and how to do simple animations/progress bars using `clear_output()`.

Added `Client.spin_thread(interval)` / `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).
Merge pull request #1529 from drtimcouper/master

Implement new configurable flag to control tab completion on modules that implement the __all__ attribute:

IPCompleter.limit_to__all__= Boolean.
Instruct the completer to use __all__ for the completion
Specifically, when completing on ``object.<tab>``.
When True: only those names in obj.__all__ will be included.
When False [default]: the __all__ attribute is ignored.
Fix for %run -d on Python 3

Closes gh-1421
Specify encoding for io.open in notebook_reformat tests.
Fix %env magic on Python 3.

Closes gh-1201
Remove unused python3 profile.