From cfb070166076ffb2d2a331d7f95014a45e4b83cb 2015-04-28 23:32:08
From: Min RK <benjaminrk@gmail.com>
Date: 2015-04-28 23:32:08
Subject: [PATCH] assign widgets shim as attribute on html shim

needed to keep both `from IPython.html import widgets`
and `from IPython.html.widgets import Widget`
working
---

diff --git a/IPython/html.py b/IPython/html.py
index 7054483..895c535 100644
--- a/IPython/html.py
+++ b/IPython/html.py
@@ -13,12 +13,16 @@ warn("The `IPython.html` package has been deprecated. "
 
 from IPython.utils.shimmodule import ShimModule
 
-sys.modules['IPython.html.widgets'] = ShimModule(
+_widgets = sys.modules['IPython.html.widgets'] = ShimModule(
     src='IPython.html.widgets', mirror='ipython_widgets')
 
-sys.modules['IPython.html'] = ShimModule(
+_html = ShimModule(
     src='IPython.html', mirror='jupyter_notebook')
 
+# hook up widgets
+_html.widgets = _widgets
+sys.modules['IPython.html'] = _html
+
 if __name__ == '__main__':
     from jupyter_notebook import notebookapp as app
     app.launch_new_instance()