Skip to content

Commit b18b069

Browse files
committed
address comments
1 parent 617100c commit b18b069

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ipykernel/ipkernel.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
from .comm.comm import BaseComm
2424
from .comm.manager import CommManager
2525
from .compiler import XCachingCompiler
26-
from .debugger import Debugger, _is_debugpy_available
2726
from .eventloops import _use_appnope
2827
from .iostream import OutStream
2928
from .kernelbase import Kernel as KernelBase
@@ -72,7 +71,9 @@ class IPythonKernel(KernelBase):
7271
shell = Instance("IPython.core.interactiveshell.InteractiveShellABC", allow_none=True)
7372
shell_class = Type(ZMQInteractiveShell)
7473

75-
debugger_class = Type(Debugger)
74+
# use fully-qualified name to ensure lazy import and prevent the issue from
75+
# https://github.com/ipython/ipykernel/issues/1198
76+
debugger_class = Type("ipykernel.debugger.Debugger")
7677

7778
use_experimental_completions = Bool(
7879
True,
@@ -113,6 +114,8 @@ def __init__(self, **kwargs):
113114

114115
self.executing_blocking_code_in_main_shell = False
115116

117+
from .debugger import _is_debugpy_available
118+
116119
# Initialize the Debugger
117120
if _is_debugpy_available:
118121
self.debugger = self.debugger_class(

0 commit comments

Comments
 (0)