You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "rawwar (via GitHub)" <gi...@apache.org> on 2025/10/20 06:13:04 UTC

[PR] use sys.stdout for logging when debugpy is running [airflow]

rawwar opened a new pull request, #56871:
URL: https://github.com/apache/airflow/pull/56871

   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 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] use sys.stdout for logging when debugpy is running [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #56871: use sys.stdout for logging when debugpy is running
URL: https://github.com/apache/airflow/pull/56871


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] use sys.stdout for logging when debugpy is running [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #56871:
URL: https://github.com/apache/airflow/pull/56871#issuecomment-3421126354

   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](https://docs.python.org/3/library/io.html#io.TextIOBase.buffer) object. For example, to write bytes to [stdout](https://docs.python.org/3/library/sys.html#sys.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](https://docs.python.org/3/library/io.html#io.StringIO) which do not support the buffer attribute.
   
   Is it really that we have some binary non-encoded data sent there ? 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] use sys.stdout for logging when debugpy is running [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #56871:
URL: https://github.com/apache/airflow/pull/56871#issuecomment-3619020563

   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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org