Commit graph

24 commits

Author SHA1 Message Date
dickmao
db2856f445 Restart if kernel still alive needs to work 2018-11-01 20:08:10 -04:00
dickmao
d621944797 Clean up websocket callbacks
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.
2018-10-31 23:38:45 -04:00
John Miller
3fd5fd06ee ein-websocket: Don't dump entire websocket structure during error.
Dumping the whole structure to the log does more to obscure than help, so I have
shortened the amount of information shared.
2018-10-17 20:59:58 -05:00
John Miller
8adc38ae8f Code cleanup.
Get rid of some unused variable warnings, add some lexical-binding definitions
and update some documentation.
2018-09-18 21:46:35 -05:00
John Miller
045d9e9a89 Adjustments to debug logging.
Added some verbosity, removed some calls that were causing errors.
2018-02-14 18:24:20 -06:00
John Miller
4419818dde Merge branch 'back-to-eieio' 2017-07-29 23:08:35 -05:00
John Miller
4f5f29d351 ein-jupyterhub: Fix websocket connects.
Made sure to add the right cookies to the websocket request. Websockets
authenticate and everything is peachy now.
2017-07-25 16:57:32 -05:00
John Miller
c78711a7c4 Back to eieio
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...)
2017-07-12 14:38:04 -05:00
John Miller
06eb2eea2c Cleanup, better error handling, remove request cookie defadvice.
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.
2016-12-22 12:19:52 -06:00
John Miller
a96fd5d0bd Patch request to fix reading cookies with curl backend
Request, as of v0.2.0, does not properly read HttpOnly cookies as it thinks they
are comments. This change is to temporarily work around that issue.
2016-12-14 12:32:26 -06:00
John Miller
3fef68d053 Fix authentication with newer Jupyter notebook versions
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).
2016-12-13 17:47:23 -06:00
John Miller
c70dee7733 Taceback from cell edit buffer, more informative version
Jump to tracebacks from cell edit buffers.

Slightly more informative on version of jupyter we are working with.
2016-11-05 17:49:52 -05:00
John Miller
71ee42a803 Load secure cookies when using secure connection.
Secure connections (i.e. wss, https) store cookies in a secure jar,
websocket connections now take this into account when connecting
using wss protocol.
2016-04-08 21:22:14 -05:00
John Miller
efaba65cfe Fixing issue #70
Not sure if this completely address issue raised in #70; will need to confirm what expected behavior should be.
2015-08-26 20:45:09 -05:00
John Miller
f3a7c61df3 Cookies for websocket authentication
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.
2015-06-29 07:07:53 -05:00
John Miller
ec9eefb83c Need to pass security cookie with ws open request
To work with notebook security model in IPython the websocket open
request needs to include security cookie created during
ein:notebooklist-login.
2015-06-10 10:19:13 -05:00
John Miller
1c73f2b016 Support stdin input_request for password 2015-03-31 16:55:14 -05:00
John Miller
b1f4c017e7 Support single websocket with multiple channels
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).
2015-01-14 17:07:28 -06:00
John Miller
59072658aa IPython 3.0 Support
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.
2014-10-22 21:35:20 -05:00
John Miller
f39c57a633 Directory bugfix. First steps in IPython 3.0 support.
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.
2014-10-17 16:44:04 -05:00
John Miller
20a725012b Preliminary support for IPython 2.0
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.
2014-04-14 12:48:55 -05:00
Takafumi Arakaki
18dec8a1cb Cleanup FIXMEs 2012-09-11 01:47:50 +02:00
Takafumi Arakaki
ca8c1678fe (require 'ein-utils) -> (require 'ein-core) 2012-08-28 15:26:32 +02:00
Takafumi Arakaki
d1031fd61e mv *ein*.el ein.py lisp/
fixes #6
2012-07-02 16:47:20 +02:00
Renamed from ein-websocket.el (Browse further)