Open
Description
_async_is_alive
calls out to _async_is_alive
in the kernelmanager.
https://github.com/jupyter/jupyter_client/blob/main/jupyter_client/client.py#L415
async def _async_is_alive(self) -> bool:
"""Is the kernel process still running?"""
from .manager import KernelManager
if isinstance(self.parent, KernelManager):
# This KernelClient was created by a KernelManager,
# we can ask the parent KernelManager:
return await self.parent._async_is_alive()
if self._hb_channel is not None:
# We don't have access to the KernelManager,
# so we use the heartbeat.
return self._hb_channel.is_beating()
# no heartbeat and not local, we can't tell if it's running,
# so naively return True
return True
However when using the GatewayKernelManager
from jupyter_server this assertion fails https://github.com/jupyter/jupyter_client/blob/main/jupyter_client/manager.py#L696, while it has overridden the is_alive
method
So I think _async_is_alive should be made public and the GatewayKernelManager
should also be adapted to override this method.
What are your thoughts?
Metadata
Metadata
Assignees
Labels
No labels