mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Make the widget warning easier to catch by specifying the module.
This commit is contained in:
parent
5c24d8dfb1
commit
c73933fe90
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user