[Python-modules-commits] [jupyter-notebook] 01/03: Don't automatically import ipywidgets

Gordon Ball chronitis-guest at moszumanska.debian.org
Sat Dec 17 17:12:55 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 a79776cde676a6109f0c4e1d045d724285d298fb
Author: Gordon Ball <gordon at chronitis.net>
Date:   Sat Dec 17 16:46:56 2016 +0100

    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
---
 notebook/notebookapp.py | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py
index ab73020..bd801e9 100644
--- a/notebook/notebookapp.py
+++ b/notebook/notebookapp.py
@@ -234,23 +234,6 @@ class NotebookWebApplication(web.Application):
         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:
-            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
-        
         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