Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add watchfd keyword to InProcessKernel OutStream initialization #727

Merged
merged 1 commit into from
Jul 13, 2021

Conversation

rayosborn
Copy link
Contributor

@rayosborn rayosborn commented Jul 13, 2021

On some systems, the creation of OutStream instances to handle stdout and stderr triggers an exception when using the InProcessKernel. This is because the default keyword arguments creating the stream assume there is a file descriptor and calls fileno, which triggers an io.UnsupportedOperation("fileno") exception. The problem is new to v6. This PR adds watchfd=False to the default OutStreams for both stdout and stderr in the InProcessKernel. This fixes #724.

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 .
Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@blink1073 blink1073 added the bug label Jul 13, 2021
@blink1073 blink1073 added this to the 6.0.x milestone Jul 13, 2021
@blink1073 blink1073 merged commit 36d6a91 into ipython:master Jul 13, 2021
@rayosborn rayosborn deleted the fix-inprocess-stdout branch July 13, 2021 16:34
@rayosborn
Copy link
Contributor Author

rayosborn commented Jul 13, 2021

Thank you for the quick response. I will release a new version of NeXpy, which will depend on this update. Is it safe for me to assume that it will be included in the v6.0.2 release? It doesn't matter when that is - I will just adjust my dependencies to include future releases.

@blink1073
Copy link
Contributor

Yes, just waiting for review on the changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failure to initialize default stdout and stderr in the InProcessKernel
2 participants