@@ -277,7 +277,7 @@ def __init__(self, **kwargs):
277277 """Initialize the kernel."""
278278 super ().__init__ (** kwargs )
279279
280- #self._iant_lock = threading.Lock()
280+ # self._iant_lock = threading.Lock()
281281
282282 # Kernel application may swap stdout and stderr to OutStream,
283283 # which is the case in `IPKernelApp.init_io`, hence `sys.stdout`
@@ -682,7 +682,7 @@ def _publish_execute_input(self, code, parent, execution_count):
682682 """Publish the code request on the iopub stream."""
683683 if not self .session :
684684 return
685- #with self._iant_lock:
685+ # with self._iant_lock:
686686 with open ("debug.txt" , "a" ) as f :
687687 f .write (f"{ threading .current_thread ().ident } iopub_socket execute_input\n " )
688688
@@ -698,7 +698,7 @@ def _publish_status(self, status, channel, parent=None):
698698 """send status (busy/idle) on IOPub"""
699699 if not self .session :
700700 return
701- #with self._iant_lock:
701+ # with self._iant_lock:
702702 with open ("debug.txt" , "a" ) as f :
703703 f .write (f"{ threading .current_thread ().ident } iopub_socket status { status } \n " )
704704
@@ -719,7 +719,7 @@ def _publish_status_and_flush(self, status, channel, stream, parent=None):
719719 def _publish_debug_event (self , event ):
720720 if not self .session :
721721 return
722- #with self._iant_lock:
722+ # with self._iant_lock:
723723 with open ("debug.txt" , "a" ) as f :
724724 f .write (f"{ threading .current_thread ().ident } iopub_socket debug_event\n " )
725725
@@ -1234,11 +1234,9 @@ async def create_subshell_request(self, socket, ident, parent) -> None:
12341234 self .log .error ("Subshells are not supported by this kernel" )
12351235 return
12361236
1237-
12381237 with open ("debug.txt" , "a" ) as f :
12391238 f .write (f"{ threading .current_thread ().ident } ? create_subshell_request\n " )
12401239
1241-
12421240 assert threading .current_thread ().name == CONTROL_THREAD_NAME
12431241
12441242 # This should only be called in the control thread if it exists.
@@ -1646,7 +1644,7 @@ async def _at_shutdown(self):
16461644
16471645 finally :
16481646 if self ._shutdown_message is not None and self .session :
1649- #with self._iant_lock:
1647+ # with self._iant_lock:
16501648 with open ("debug.txt" , "a" ) as f :
16511649 f .write (f"{ threading .current_thread ().ident } ? _shutdown\n " )
16521650
0 commit comments