use PySys_WriteStderr instead of eprintln - #6261
Open
Person-93 wants to merge 7 commits into
Open
Conversation
Person-93
force-pushed
the
no_std_err_output
branch
from
July 29, 2026 23:06
5a61e71 to
ef75e64
Compare
Person-93
force-pushed
the
no_std_err_output
branch
from
July 29, 2026 23:31
ef75e64 to
3e3cbc2
Compare
Tpt
reviewed
Jul 30, 2026
Tpt
left a comment
Contributor
There was a problem hiding this comment.
Maintainers, please let me know if this needs a news fragment and if it does, if it should be a fix or a change.
Yes, would be great! A "change" looks like the most appropriate to me but I do not have a strong opinion
Icxolu
reviewed
Jul 30, 2026
PySys_WriteStderr instead of eprintlnPySys_WriteStderr instead of eprintln
Contributor
Author
|
After reviewing Icxolu's comment, I don't think calling python API to write to stderr is valid during GC traversal, so I changed it to use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is part of the WIP
no_stdsupport.There are two places that were using the
eprintlnmacro, this replaces them with a safe wrapper aroundPySys_WriteStderr.This is arguably not a purely internal change. If this PR is merged, those error messages will be redirected (along with all other error output) if the user redirects Python's
stderr. Maintainers, please let me know if this needs a news fragment and if it does, if it should be a fix or a change.