Skip to content

Conversation

@rawwar
Copy link
Contributor

@rawwar rawwar commented Oct 20, 2025

closes #56865

Using sys.stdout instead of sys.stdout.buffer caused failures to go away. But, I am not sure if this is the right way to do

@potiuk
Copy link
Member

potiuk commented Oct 20, 2025

That's a good question:

@ashb -> is there a particular reason why "buffer" was used in this case? It is supposed to take bytes not strings and the documentation indeed warns that if you have no control over stdout it can be replaced with file-like interface (which is exactly what Pydevd does).

See https://docs.python.org/3/library/sys.html#sys.stdout

Note To write or read binary data from/to the standard streams, use the underlying binary buffer object. For example, to write bytes to stdout, use sys.stdout.buffer.write(b'abc').
However, if you are writing a library (and do not control in which context its code will be executed), be aware that the standard streams may be replaced with file-like objects like io.StringIO which do not support the buffer attribute.

Is it really that we have some binary non-encoded data sent there ?

@github-actions
Copy link

github-actions bot commented Dec 6, 2025

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Dec 6, 2025
@github-actions github-actions bot closed this Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers area:task-sdk provider:celery stale Stale PRs per the .github/workflows/stale.yml policy file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

logging issue when running celery worker in debug mode via breeze

2 participants