Make the widget warning easier to catch by specifying the module.

This commit is contained in:
Jason Grout 2014-12-13 00:09:43 +00:00
parent 5c24d8dfb1
commit c73933fe90

View File

@ -24,9 +24,15 @@ from .widget_selection import RadioButtonsWidget, ToggleButtonsWidget, DropdownW
from .widget_selectioncontainer import TabWidget, AccordionWidget
from .widget_string import HTMLWidget, LatexWidget, TextWidget, TextareaWidget
# we use warn_explicit so we have very brief messages without file or line numbers
# the concern is that file or line numbers will confuse the interactive user
# We use warn_explicit so we have very brief messages without file or line numbers.
# The concern is that file or line numbers will confuse the interactive user.
# To ignore this warning, do:
#
# from warnings import filterwarnings
# filterwarnings('ignore', module='IPython.html.widgets')
from warnings import warn_explicit
__warningregistry__ = {}
warn_explicit("IPython widgets are experimental and may change in the future.",
FutureWarning, '', 0, registry=__warningregistry__)
FutureWarning, '', 0, module = 'IPython.html.widgets',
registry = __warningregistry__, module_globals = globals)