[Python-modules-commits] [ipywidgets] 01/03: Remove unneeded notebook version warning

Gordon Ball chronitis-guest at moszumanska.debian.org
Sat Dec 17 17:12:44 UTC 2016


This is an automated email from the git hooks/post-receive script.

chronitis-guest pushed a commit to branch master
in repository ipywidgets.

commit 3d3e2a4e987155dc13a532ecf8c57c8566f250e2
Author: Gordon Ball <gordon at chronitis.net>
Date:   Sat Dec 17 16:53:46 2016 +0100

    Remove unneeded notebook version warning
    
    This warning tries to detect the presence of widgetsnbextension, but the
    debian packaging installs the extension directly, causing this warning
    to be wrongly displayed.
---
 ipywidgets/__init__.py | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/ipywidgets/__init__.py b/ipywidgets/__init__.py
index 16f4eed..21cc031 100644
--- a/ipywidgets/__init__.py
+++ b/ipywidgets/__init__.py
@@ -50,19 +50,4 @@ _handle_ipython()
 
 
 def find_static_assets():
-    import warnings
-    try:
-        import widgetsnbextension
-        if hasattr(widgetsnbextension, 'find_static_assets'):
-            return widgetsnbextension.find_static_assets()
-        else:
-            warnings.warn("""The version of ipywidgets that you have installed
-            only works with Jupyter Notebook 4.2 or later.  Your version of the
-            Jupyter Notebook is too old. If you'd like to use ipywidgets with an
-            older version of the notebook, use ipywidgets 4.x or earlier.
-            """, RuntimeWarning)
-            return []
-    except ImportError:
-        warnings.warn("""To use the widgets with your installed Jupyter Notebook
-        version, please install ipywidgets 4.x or earlier.""", RuntimeWarning)
-        return []
+    return []

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/ipywidgets.git



More information about the Python-modules-commits mailing list