pssh is output RuntimeWarning when using Python3.8

Bug #1923720 reported by junya-yamashita
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pssh (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When using pssh commands with -e or -o options,I received below warning.

```
/usr/lib/python3/dist-packages/psshlib/manager.py:304: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.files[filename] = open(filename, 'wb', buffering=1)
```

example:

```
vagrant@ubuntu-2004:~$ /usr/bin/parallel-ssh -H vagrant@127.0.0.1 -e stderr -i 'hostname'
/usr/lib/python3/dist-packages/psshlib/manager.py:304: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.files[filename] = open(filename, 'wb', buffering=1)
[1] 15:19:59 [SUCCESS] vagrant@127.0.0.1
ubuntu-2004
```

It seems can fix /usr/lib/python3/dist-packages/psshlib/manager.py:304 as below.

```
+ self.files[filename] = open(filename, 'wb', buffering=0)
- self.files[filename] = open(filename, 'wb', buffering=1)
```

please fix package.Thank you.

Reference:https://bugs.python.org/issue32236
Environment:

```
vagrant@ubuntu-2004:~$ python3 --version
Python 3.8.5
vagrant@ubuntu-2004:~$ /usr/bin/parallel-ssh --version
2.3.1
vagrant@ubuntu-2004:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
```

description: updated
description: updated
CharlesA (charlesa)
affects: ubuntuforums.org → pssh (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pssh (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.