Skip to content

restart=True is never passed to provisioner.terminate #1061

@caenrigen

Description

@caenrigen

Hi, I am working on a provisioner for remote kernels via SSH (https://github.com/caenrigen/sshpyk/tree/provisioner).

I noticed that my provisioner's async def terminate(self, restart: bool = False) never receives a restart=True value even if I restart the kernel (in JupyterLab).

From inspecting jupyter_client this happens because async def _async_send_kernel_sigterm(self, restart: bool = False) is never being passed the restart argument at all (and it defaults always to False from default python args):

await self._async_send_kernel_sigterm()

Is this a bug or intended behaviour? Would you accept a PR if it is a bug? though I probably have to implement a workaround anyway for some backwards compatibility with previous version of jupyter_client, I think I should be able to by caching the restart argument passed to provisioner.shutdown_requested.


As a side note I also notice that _async_kill_kernel does not always receive the argument either, intended?

await self._async_kill_kernel()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions