Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove bad pipe message log#1246

Open
deshanxiao wants to merge 1 commit intoipython:anyiofrom
deshanxiao:deshan/remove-log
Open

Remove bad pipe message log#1246
deshanxiao wants to merge 1 commit intoipython:anyiofrom
deshanxiao:deshan/remove-log

Conversation

Copy link

deshanxiao commented Jun 7, 2024 *
edited
Loading

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

minrk reviewed Oct 25, 2024
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__)
Copy link
Member

minrk Oct 25, 2024

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:

  1. when we capture the low-level __stderr__, we could replace sys.__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
  2. keep capturing __stderr__ and explicitly write to the "truly really actually only original stderr" FD for messages like these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

minrk minrk left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants