Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pybox/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2024-present Junlin Zhou <jameszhou2108@hotmail.com>
#
# SPDX-License-Identifier: Apache-2.0
__version__ = "0.0.8"
__version__ = "0.0.9"
7 changes: 5 additions & 2 deletions src/pybox/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from typing import TYPE_CHECKING
from uuid import uuid4

from jupyter_client.asynchronous import AsyncKernelClient

from pybox.base import BasePyBox, BasePyBoxManager
from pybox.schema import (
CodeExecutionError,
Expand All @@ -20,7 +22,6 @@
from jupyter_client.multikernelmanager import DuplicateKernelError

if TYPE_CHECKING:
from jupyter_client.asynchronous import AsyncKernelClient
from jupyter_client.blocking import BlockingKernelClient
except ImportError:
logger.warning(
Expand Down Expand Up @@ -236,7 +237,9 @@ async def astart(
# it's OK if the kernel already exists
kid = kernel_id
km = self.kernel_manager.get_kernel(kernel_id=kid)
return LocalPyBox(kernel_id=kid, client=km.client())
kernel_client = AsyncKernelClient()
kernel_client.load_connection_info(km.get_connection_info())
return LocalPyBox(kernel_id=kid, client=kernel_client)

def shutdown(
self,
Expand Down
Loading