diff --git a/IPython/html/tests/widgets/manager.js b/IPython/html/tests/widgets/manager.js index 4281946..ea98dff 100644 --- a/IPython/html/tests/widgets/manager.js +++ b/IPython/html/tests/widgets/manager.js @@ -27,7 +27,7 @@ casper.notebook_test(function () { index = this.append_cell( 'from IPython.html.widgets import Widget\n' + - 'widget = Widget.widgets.values()[0]\n' + + 'widget = list(Widget.widgets.values())[0]\n' + 'print(widget.model_id)'); this.execute_cell_then(index, function(index) { var output = this.get_output_cell(index).text.trim(); diff --git a/IPython/html/widgets/widget.py b/IPython/html/widgets/widget.py index f16b94d..1551b18 100644 --- a/IPython/html/widgets/widget.py +++ b/IPython/html/widgets/widget.py @@ -101,8 +101,7 @@ class Widget(LoggingConfigurable): """Static method, called when a widget is constructed.""" target_name = msg['content']['data']['target_name'] widget_class = import_item(target_name) - widget = widget_class(open_comm=False) - widget.comm = comm + widget = widget_class(comm=comm) #------------------------------------------------------------------------- @@ -141,8 +140,7 @@ class Widget(LoggingConfigurable): super(Widget, self).__init__(**kwargs) Widget._call_widget_constructed(self) - if open_comm: - self.open() + self.open() def __del__(self): """Object disposal"""