By covering our ears and ignoring as much as possible. Apparently SyntaxError is
not a subtype of Exception. Also need to send raw strings otherwise unicode
characters will cause fits.
Also added new command, `ein:pytools-reinject` to reinject ein's pytools code.
The name could probably use some work.
Renaming of functions with better understanding of reconnects. Under
the original logic, reconnecting blithely created a new session if
the original no longer existed. Now it will alert the user when this
happens.
Also hopefully fixes#381 as there was a bug of missing argument not
being caught by lisp's undisciplined typing.
Upon disconnection, the jupyter server apparently returns the same kernel for a given
notebook path input. So reconnect is a thing, and restart is very
distinct from that.
Fixes#377
Python running on a remote connection doesn't know how to find files on the
local machine, apparently, so we take the route instead of sending the contents
of a temporary buffer loaded with the pytools python code to the running kernel.
I am expecting that `ein:completions--prepare-oinfo' will error out depending on
the type of python object we are looking at, so no need to log an error every
time this happens as it will unnecessarily fill the ein log buffer and generate
lots of annoying notifications in the notebook buffer.
EIN tries to build a cached of pdef's for all potential completion symbols. This
is problematic because not all completion symbols have a pdef and can cause
python to throw exceptions in entertaining and hard to catch ways. We take a
liberal approach and ignore anything that throws an exception when we try to
inspect it.
Eldoc support should also be more robust because of these changes as well.
Coursera appears to kill websockets every minute or so, and I'm
observing firsthand the buggy behaviors described in #356. This PR
cleans up the websocket code and kernel restart logic. Removed
backwards compatibility for the v2 messaging api
as keeping it in the presence of the refactoring would make it more
broken that it already was.
One line change to fix header not updating after cell execution
(keeps saying "Kernel is busy").
The bug does not manifest when running with `ein:debug` true since
EMACS's display loop updates more frequently with debug messages.
In tracking this bug, noticed eldoc support isn't quite there.
`__import__('ein').print_object_info_for(%s)` appears in
`ein-completer` and `ein-pytools`, and is invalid python syntax
afaict. Took a few steps to make it whole, but incomplete.
As emacs users we prefer and have the luxury of fuzzy file navigation
via ido and projectile. From a notebook or notebooklist buffer, the commands
`C-c C-f` ein:file-open
`C-c C-o` ein:notebook-open
offer an ido alternative to point and click navigation.
To populate the ido lists, retrieving the content hierarchy is on by
default. Two custom variables determine how wide and deep the content query
probes (currently at 2 levels deep and 6 directories wide). Set both
to zero to turn off.
tkf half finished code to quickly go from local file buffers to notebook
mode via `C-c C-z` or `C-c C-o`. This is now possible. EIN will
start the server from a suitable parent directory of the visited file.
Enable ido completion for `notebooklist-login`.
Remove the albatross `ein-loaddefs.el` in favor of more standard
`ein-autoloads.el` that is not git tracked.
Convenience `make install` from git source (local alternative to
melpa).
If `notebook list` returns more than one entry for the same url:port the
resulting structure won't be a list of lists, but rather a list of multiple
paired elements.
ein:url normalization issue (fails the passworded server test).
"No servers running here" warning is unsettling for I think the
majority of users who do not run jupyter locally.
There appears to be a (hopefully very rare) possibility of `jupyter notebook
list --json` returning multiple tokens for the same url. This will result in
some perplexing behavior in ein, so these changes try to bring clarity when such
a situation occurs.
Merge the login and open commands (open aliased to login). Add login
tests described in #352.
Attempt to improve user experience by synchronously executing
`ein:jupyter-server-start`. `ein:dev-prefer-deferred` custom variable
allows easy switch to compare sychronous versus old asynchronous behavior.