Closes gh-7941
I've left a backwards compatibility module in
IPython.nbconvert.utils.lexers - I don't know if anyone is importing it
directly, but since we put it in entry points, we should probably
consider it public API.
A problem can happen when two messages come in for different
comms, where the second depends on the first (for example, the
first might be a message setting the state of a widget, and the
second triggering a view creation for the widget). Since comm
message queues are independent of each other, the second message
could be executed before the first message.
This exposes a more fundamental assumption users are likely to
have that messages from python are processed synchronously.
Thanks to @dmadeka for reporting an error that led to discovering this issue.
Running Widget Events.ipynb in http://try.jupyter.org/ raises the following errors:
In [11]: AttributeError: 'module' object has no attribute 'link'
In [12]: AttributeError: 'module' object has no attribute 'dlink'
In [13]: widgets.<Tab> shows 'jsdlink' and 'jslink', which generate the expected linked sliders.
The test actually passes on my VM (Win 7),
but not on Jenkins (Server 2012).
I haven't figured out how to identify the subset of Windows systems where it won't work,
but since the problem appears to be in the test,
not the tested code, skipping on Windows seems the right way to go.
> Adapting to protocol vX for kernel Y
instead of
> Kernel Y speaks protocol version X
some have interpreted the "Kernel speaks" statement was an error message;
this should be clearer about what's happening,
and that there is no error.
in kernel channel handlers
we were accidentally relying on loading Session.key from config set via the default_secure decorator,
which forced the key to be the same for every kernel.
The function in charge of actually converting cursor offset to
CodeMirror line number and character number was actually crashing when
the cursor was at the last character (loop until undefined, then access
length of variable, which is undefined).
This was hiding a bug in which when you would completer to a single
completion pressing tab after as-you-type filtering, the completion
would be completed twice.
The logic that was supposed to detect whether or not all completions had
a common prefix was actually faulty as the common prefix used to be a
string but was then changed to an object. Hence the logic to check
whether or not there was actually a common prefix was always true, even
for empty string, leading to the deletion of the line (replace by '') in
some cases.