Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode #118

Closed
hishamanver opened this issue Dec 18, 2020 · 1 comment

Comments

@hishamanver
Copy link

hishamanver commented Dec 18, 2020

Getting the following warning when running prsync in python 3.8 and greater

bash-5.0# prsync --errdir=/tmp/err --outdir=/tmp/out -x "-avx --numeric-ids" -H "root@172.17.0.4" /root/test/ /root /usr/local/lib/python3.9/site-packages/psshlib/manager.py:349: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used dest = self.files[filename] = open( [1] 14:51:54 [SUCCESS] root@172.17.0.4
bash-5.0#

Some references on the problem

https://bugs.python.org/issue32236
benoitc/gunicorn#2146 (potential fix)

Would it break any existing implementations if I were to set buffering=0 on the file write function call?

https://github.com/lilydjwg/pssh/blob/master/psshlib/manager.py#L344

@hishamanver
Copy link
Author

I have tested this, setting buffering to 0 silences the warning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant