From 6925e0cb9209a8a54c184eba996233efe809bf07 Mon Sep 17 00:00:00 2001 From: "William A. Stein" Date: Wed, 18 Jan 2017 02:50:05 +0000 Subject: [PATCH] fix https://github.com/sagemathinc/smc/issues/1537 and https://github.com/sagemathinc/smc/issues/1343 --- src/smc-webapp/editor_jupyter.coffee | 2 -- src/smc_pyutil/smc_pyutil/jupyter_notebook.py | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/smc-webapp/editor_jupyter.coffee b/src/smc-webapp/editor_jupyter.coffee index c4f7f6c60b..368443d61d 100644 --- a/src/smc-webapp/editor_jupyter.coffee +++ b/src/smc-webapp/editor_jupyter.coffee @@ -337,8 +337,6 @@ class JupyterWrapper extends EventEmitter Notebook.prototype.move_selection_up = () -> this.smc_move_selection_up() this.dirty = true - # See https://github.com/sagemathinc/smc/issues/1262 -- this is especially broken on Firefox. - @frame.require("notebook/js/outputarea").OutputArea.prototype._should_scroll = -> # no op font_size_set: (font_size) => # initialization, if necessary diff --git a/src/smc_pyutil/smc_pyutil/jupyter_notebook.py b/src/smc_pyutil/smc_pyutil/jupyter_notebook.py index 4cf237919a..080aee761e 100755 --- a/src/smc_pyutil/smc_pyutil/jupyter_notebook.py +++ b/src/smc_pyutil/smc_pyutil/jupyter_notebook.py @@ -78,10 +78,10 @@ def command(): else: mathjax_url = "/static/mathjax/MathJax.js" # fallback - if os.system('which sage') == 0: - ipython = "sage -ipython" - else: - ipython = "ipython" + # We always use the system-wide version on IPython, which is much easier to keep up to date. + # Sage's often lags behind with bugs. This also makes it easier for users to run their + # own custom IPython. See https://github.com/sagemathinc/smc/issues/1343 + ipython = "ipython" # --NotebookApp.iopub_data_rate_limit= # Default: 0 @@ -91,7 +91,7 @@ def command(): # (msg/sec) Maximum rate at which messages can be sent on iopub before they # are limited. - cmd = ipython+ " notebook --port-retries=0 --no-browser --NotebookApp.iopub_data_rate_limit=2000000 --NotebookApp.iopub_msg_rate_limit=50 --NotebookApp.mathjax_url=%s %s --ip=%s --port=%s"%(mathjax_url, base, ip, port) + cmd = ipython+ " notebook --port-retries=0 --no-browser --NotebookApp.iopub_data_rate_limit=2000000 --NotebookApp.iopub_msg_rate_limit=50 --NotebookApp.mathjax_url=%s %s --ip=%s --port=%s --NotebookApp.token='' --NotebookApp.password=''"%(mathjax_url, base, ip, port) cmd += " " + ' '.join(sys.argv[1:]) return cmd, base, port