Skip to content

Commit

Permalink
Merge pull request #8337 from minrk/workaround-close-fds
Browse files Browse the repository at this point in the history
PR: Specify close_fds=False on Windows
  • Loading branch information
ccordoba12 authored Dec 1, 2018
2 parents cd6ba0c + 982707b commit 68aedbf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spyder/plugins/ipythonconsole/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1549,10 +1549,16 @@ def create_kernel_manager_and_kernel_client(self, connection_file,
return (error_msg, None)
kernel_manager._kernel_spec = kernel_spec

kwargs = {}
if os.name == 'nt':
# avoid closing fds on win+Python 3.7
# which prevents interrupts
# jupyter_client > 5.2.3 will do this by default
kwargs['close_fds'] = False
# Catch any error generated when trying to start the kernel
# See issue 7302
try:
kernel_manager.start_kernel(stderr=stderr_handle)
kernel_manager.start_kernel(stderr=stderr_handle, **kwargs)
except Exception:
error_msg = _("The error is:<br><br>"
"<tt>{}</tt>").format(traceback.format_exc())
Expand Down

0 comments on commit 68aedbf

Please sign in to comment.