Skip to content

Commit

Permalink
Silenced the unhelpful FutureWarning generated by IPython 3
Browse files Browse the repository at this point in the history
Silences the unhelpful warning "IPython widgets are experimental and may
change in the future." generated by IPython 3 each time the extension is
loaded.
  • Loading branch information
jlstevens committed Mar 24, 2015
1 parent 72ece4d commit aaa6861
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions holoviews/ipython/widgets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os, sys, math, time, uuid, json
import os, sys, math, time, uuid, json, warnings
from unittest import SkipTest

import numpy as np
Expand All @@ -11,8 +11,11 @@
raise SkipTest("IPython extension requires IPython >= 0.12")
from IPython.display import display
try:
from IPython.html import widgets
from IPython.html.widgets import FloatSliderWidget
# Silence the annoying FutureWarning in IPython 3.0
with warnings.catch_warnings():
warnings.simplefilter("ignore")
from IPython.html import widgets
from IPython.html.widgets import FloatSliderWidget
except:
widgets = None
FloatSliderWidget = object
Expand Down

0 comments on commit aaa6861

Please sign in to comment.