add patch_pyzmq() for backporting a few changes from newer pyzmq
* fixes missing constants in super-old pyzmq
* define ioloop.install if not defined
* never allow jsonlib to be used by zmq.utils.jsonapi (#1520).
Closes#1520.
clear In[] prompt numbers on "Clear All Output"
For more version-control-friendly `.ipynb` files, this strips the `In[]` 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.
Test the Message Spec and add our zmq subpackage to the test suite.
It uses Traitlets to perform validation of keys.
Checks right now are not very strict, as (almost) any key is allowed to be None, as long as it is defined. This is because I simply do not know which keys are allowed to be None, and this is not discussed in the specification. If no keys are allowed to be None, we violate that all over the place.
Parametric tests are used, so every key validation counts as a test (147!).
Message spec doc was found to misrepresent code in a few points, and some changes were made:
* spec had error keys as `exc_name/value`, but we are actually using `ename/value` (docs updated to match code)
* payloads were inaccurate - list of dicts, rather than single dict, and transformed_output is a payload, not top-level in exec-reply (docs update to match code).
* in oinfo_request, detail_level was in message spec, but not actually implemented (code updated to match docs).
History messages are not yet tested, but I think I get at least elementary coverage of everything else in the doc.
Two distinct but related fixes for byte-compilation on Python 3.
* A slight hack so setuptools refrains from trying to byte-compile everything - issue #1470. The actual modules are still compiled by another step when I do `python3 setup.py install`, but that step is smart enough not to try to compile the examples as well.
* A workaround for a bug in Python 3.1 - py_compile had only partly implemented PEP 263, so it recognises `coding:`, but not `encoding:` to specify a file encoding. This was causing build failures since my `nonascii.py` test sample was merged.
Closes#1470.
exit notebook cleanly on SIGINT, SIGTERM, and add a safety (text) dialog to ask for exit confirmation. This prevents an accidental Ctrl-C in the wrong window from destroying a user's potentially large set of notebooks that could have taken a long time to create.
Closes#1601
* 2.1.7 (earliest dep) will simply not work, so skip it
* 2.1.9-10 log the interrupts, so add a short delay to ensure the log
messages don't come after the prompt.
Exclude IPython.quarantine from installation. The code is still in the source tree so we can gradually revive what's useful, but there's no point in installing it for regular users since by definition it's broken.
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*.
small changes in response to pyflakes pass
Only significant change: removes incomplete kernelstarter file, which shouldn't have been in the repo at all.
closes#1499
Unicode literals (u'foo') aren't valid in Python 3.{1,2} (they will be
again in 3.3, and I failed to notice this. This is a quick fix, will
discuss further on-list. But I want master to remain working for py3
users.
Don't build sphinx docs for sdists, it makes our source distributions unnecessarily large (and their generation much slower). Online access to docs is pervasive these days, and our docs are also much easier to build now, reducing the justification for keeping built docs in the source download.
store git commit hash in utils._sysinfo instead of hidden data file
Behavior is essentially unchanged, but the hash is stored in a generated Python file instead of hidden data file.
Closes#1484.
clear_output improvements, which allow things like progress bars and other simple animations to work well in the notebook.
* `clear_output()` clears the line, even in terminal IPython, the QtConsole and plain Python as well, by printing `\r` to streams.
* `clear_output()` avoids the flicker in the notebook by adding a delay, and firing immediately upon the next actual display message.
* `display_javascript` hides its `output_area` element, so using display to run a bunch of javascript doesn't result in ever-growing vertical space.
This reduces flicker during common loops like:
for step in stuff:
clear_output()
print something
the timeout is flushed *immediately* on any subsequent output.
fix sorting profiles in clustermanager
dicts aren't orderable on Python3. In any case, these should be sorted by name, not by the ordering of the dicts themselves.
closes#1507
ensures that config loading matches what would happen in ipcluster.
The only change needed in IPClusterStart itself was moving the on_stop registration from init_launchers to start_controller, where it should have been anyway.