[Python-modules-commits] [jupyter-notebook] 02/02: merge patched into master
Gordon Ball
chronitis-guest at moszumanska.debian.org
Mon Dec 19 14:44:43 UTC 2016
This is an automated email from the git hooks/post-receive script.
chronitis-guest pushed a commit to branch master
in repository jupyter-notebook.
commit c6898f90cde50bc25ba8d0bb3af785a772cb6cca
Merge: f8c1bb7 34dce50
Author: Gordon Ball <gordon at chronitis.net>
Date: Mon Dec 19 15:24:43 2016 +0100
merge patched into master
debian/.git-dpm | 4 +--
...008-Don-t-automatically-import-ipywidgets.patch | 37 ++++++++++++++++------
notebook/notebookapp.py | 18 ++++++++++-
3 files changed, 47 insertions(+), 12 deletions(-)
diff --cc debian/.git-dpm
index 91954b9,0000000..15f9d04
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
+# see git-dpm(1) from git-dpm package
- a79776cde676a6109f0c4e1d045d724285d298fb
- a79776cde676a6109f0c4e1d045d724285d298fb
++34dce50bd79f3210b5ff81c3de3158dff27eb0de
++34dce50bd79f3210b5ff81c3de3158dff27eb0de
+1b789b6b3bfdc79fa5ba90dd5aa3dadd3ce542eb
+1b789b6b3bfdc79fa5ba90dd5aa3dadd3ce542eb
+jupyter-notebook_4.2.3.orig.tar.gz
+cd42c2013047d2722d3990db4787820cff51cbc8
+4456566
+debianTag="debian/%e%v"
+patchedTag="patched/%e%v"
+upstreamTag="upstream/%e%u"
diff --cc debian/patches/0008-Don-t-automatically-import-ipywidgets.patch
index 7a06e60,0000000..ce178c1
mode 100644,000000..100644
--- a/debian/patches/0008-Don-t-automatically-import-ipywidgets.patch
+++ b/debian/patches/0008-Don-t-automatically-import-ipywidgets.patch
@@@ -1,40 -1,0 +1,59 @@@
- From a79776cde676a6109f0c4e1d045d724285d298fb Mon Sep 17 00:00:00 2001
++From 34dce50bd79f3210b5ff81c3de3158dff27eb0de Mon Sep 17 00:00:00 2001
+From: Gordon Ball <gordon at chronitis.net>
+Date: Sat, 17 Dec 2016 16:46:56 +0100
+Subject: Don't automatically import ipywidgets
+
+ipywidgets.find_static_assets() is a no-op for ipywidgets > 4, which instead
+use the nbextensions mechanism, but causes a warning to be shown if the
+(redundant) widgetsnbextension package is not installed
++
++Instead, a check is made whether the extensions.js file for the widgets is
++available, and if not, a warning is shown advising the user of the deb
++package to install
+---
- notebook/notebookapp.py | 17 -----------------
- 1 file changed, 17 deletions(-)
++ notebook/notebookapp.py | 29 ++++++++++++++---------------
++ 1 file changed, 14 insertions(+), 15 deletions(-)
+
+diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py
- index ab73020..bd801e9 100644
++index ab73020..7cef60f 100644
+--- a/notebook/notebookapp.py
++++ b/notebook/notebookapp.py
- @@ -234,23 +234,6 @@ class NotebookWebApplication(web.Application):
++@@ -233,24 +233,23 @@ class NotebookWebApplication(web.Application):
++ handlers.extend(load_handlers('services.nbconvert.handlers'))
+ handlers.extend(load_handlers('services.kernelspecs.handlers'))
+ handlers.extend(load_handlers('services.security.handlers'))
-
++-
+- # BEGIN HARDCODED WIDGETS HACK
+- # TODO: Remove on notebook 5.0
- - try:
- - import widgetsnbextension
- - except:
+++
+++ # debian-specific
+++ # check for installation of the ipywidgets server support, and advise how
+++ # to install it if it's unavailable
+++ # replaces a previous hardcoded attempt to import ipywidgets
+++
+++ deb_widgets_js = "/usr/share/jupyter/nbextensions/jupyter-js-widgets/extension.js"
+++ has_widgetsnbextension = False
++ try:
++ import widgetsnbextension
+++ has_widgetsnbextension = True
++ except:
+- try:
+- import ipywidgets as widgets
+- handlers.append(
+- (r"/nbextensions/widgets/(.*)", FileFindHandler, {
+- 'path': widgets.find_static_assets(),
+- 'no_cache_paths': ['/'], # don't cache anything in nbextensions
+- }),
+- )
+- except:
+- app_log.warning('Widgets are unavailable. Please install widgetsnbextension or ipywidgets 4.0')
+- # END HARDCODED WIDGETS HACK
+-
+++ pass
+++
+++ if not (os.path.exists(deb_widgets_js) or has_widgetsnbextension):
+++ app_log.warning("Widgets are unavailable. On Debian, notebook support for widgets is provided by the package jupyter-nbextension-jupyter-js-widgets")
+++
+ handlers.append(
+ (r"/nbextensions/(.*)", FileFindHandler, {
+ 'path': settings['nbextensions_path'],
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/jupyter-notebook.git
More information about the Python-modules-commits
mailing list