-
-
Notifications
You must be signed in to change notification settings - Fork 398
Conversation
This PR is aimed to remove a log when IOPubThread received a mismatch uuid message.
These mismatch messages appear to originate from some firewall and network related components. Jupyter users don't seem to need this information, however it is displayed on the UX.
I search "Bad pipe message" in whole github repos and there are many ipynb files contains this error.
Some similar issue:
spyder-ide/spyder#20591
#1107
| return | ||
| if msg[0] != self._pipe_uuid: | ||
| print("Bad pipe message: %s", msg, file=sys.__stderr__) | ||
| # print("Bad pipe message: %s", msg, file=sys.__stderr__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These messages do indicate a problem, and should still be logged, not entirely suppressed. The problem comes from the change that sys.__stderr__ is now duplicated and forwarded to users, when this message is meant to only. What we really want to write to is sys.stderr._original_stdstream_copy.
I see two options:
- when we capture the low-level
__stderr__, we could replacesys.__stderr__with the new captured fd, so statements like this do what we originally meant them to (only write to stderr, not captured and forwarded), or - keep capturing
__stderr__and explicitly write to the "truly really actually only original stderr" FD for messages like these.