From 5f550f7bc46a6a0d0f4eb536495b6cc7fd25aeed 2014-07-26 15:44:20 From: sylvain.corlay Date: 2014-07-26 15:44:20 Subject: [PATCH] deleting a comm now unregisters the comm. unrehistering the comm does not close it anymore --- diff --git a/IPython/kernel/comm/comm.py b/IPython/kernel/comm/comm.py index d9c37af..fd4e1fb 100644 --- a/IPython/kernel/comm/comm.py +++ b/IPython/kernel/comm/comm.py @@ -70,6 +70,7 @@ class Comm(LoggingConfigurable): def __del__(self): """trigger close on gc""" self.close() + get_ipython().comm_manager.unregister_comm(self) # publishing messages diff --git a/IPython/kernel/comm/manager.py b/IPython/kernel/comm/manager.py index fdc7ba6..a4c5e5f 100644 --- a/IPython/kernel/comm/manager.py +++ b/IPython/kernel/comm/manager.py @@ -76,7 +76,6 @@ class CommManager(LoggingConfigurable): """Unregister a comm, and close its counterpart""" # unlike get_comm, this should raise a KeyError comm = self.comms.pop(comm_id) - comm.close() def get_comm(self, comm_id): """Get a comm with a particular id