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.
It seems there are enough people out there still on Emacs 24 to warrant undoing
some of my recent moves away from eieio to cl-generic. For the near future I
will try to keep any changes that are incompatible with Emacs 24 to a
development branch. There is still probably plenty of opportunity to make the
code more future-proof for an eventual move away from eieio (I'm looking at you
oref and sref...)
tkf/emacs-request#60 was recently fixed, so no longer need to defadvice
`request--netscape-cookie-parse. Changed names of some obsolete variables. Also
trying to be a bit more clever in error handling by judicious use of
condition-case.
Jupyter notebook post v4.0 (4.1?) now stores cookies as HttpOnly. This fix
partially addresses, at least with curl request backend, however request still
needs to be updated to recognize these cookies (see issue #148).
Secure connections (i.e. wss, https) store cookies in a secure jar,
websocket connections now take this into account when connecting
using wss protocol.
Support recently added feature to websocket for including cookies in
connection header. This allows us to connect to secured IPython 3.x (and
2.x I hope) servers.
With IPython 3.0 we now support multiplexed communication over a single
websocket. At the moment iopub and shell are supported; stdin doesn't
seem to be working yet (not sure if it needs to be, though).
Maybe, just maybe ein now works under both IPython 2.x and IPython 3.0
(or what is the development version as of this commit). And by works I
mean open, closing, saving notebooks and communicating with the IPython
kernel. It is good.
Also fixed a bug in kernelinfo - os.uname is not implemented in Windows
(or mac, probably), but I think socket.gethostname() is available on all
three platforms.
Fixed bug in accessing directories a depths greater than 1 level.
Some initial support for IPython 3.0 and IPEP 27. Can open notebooklists
and notebooks, but having some issues connecting to websocket.
Basic, mostly untested support for the brave new world of IPython 2.0.
2.0 now supports the concepts of 'paths', letting notebooks be stored in
a directory hierarchy. This has resulted in a change in the web API -
most URL's are now prefixed with 'api/'.
EIN does not (yet) support hierarchical notebooks, but at least it now
plays better with the new URL scheme for iPython 2.0.
Oh, there also seems to have been a change in the format of the ipython
notebook. This has been fixed too, but is probably bakcwards
incompatible.