Skip to content

Commit a6a98b4

Browse files
committed
Add watchfd keyword to InProcessKernel OutStream initialization
Setting `watchfd`to False when creating OutStream instances for `stdout` prevents an exception caused by the lack of a file descriptor in the stream used by the InProcessKernel .
1 parent 25991b9 commit a6a98b4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ipykernel/inprocess/ipkernel.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,13 @@ def _default_shell_class(self):
152152

153153
@default('stdout')
154154
def _default_stdout(self):
155-
return OutStream(self.session, self.iopub_thread, 'stdout')
155+
return OutStream(self.session, self.iopub_thread, 'stdout',
156+
watchfd=False)
156157

157158
@default('stderr')
158159
def _default_stderr(self):
159-
return OutStream(self.session, self.iopub_thread, 'stderr')
160+
return OutStream(self.session, self.iopub_thread, 'stderr',
161+
watchfd=False)
160162

161163
#-----------------------------------------------------------------------------
162164
# Interactive shell subclass

0 commit comments

Comments
 (0)