use PySys_WriteStderr instead of eprintln - #6261
Conversation
ef75e64 to
3e3cbc2
Compare
Tpt
left a comment
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
PySys_WriteStderr instead of eprintlnPySys_WriteStderr instead of eprintln
|
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 |
Merging this PR will not alter performance
Comparing Footnotes
|
18dc8a7 to
df3c3d9
Compare
|
Is there anything blocking this? Is using |
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.