Add Python 3 compatibility for rbssh.
Review Request #10475 — Created March 28, 2019 and submitted
Python 3 changed
sys.stderrto require Unicode
strings, but this doesn't work so well for binary data, which rbssh
writes. Instead, we need to use the
bufferattribute of both of these.
This change updates rbssh to determine the right object to write to for
Python 2 and 3. It also disables warning output, which interferes with
the communication (and is triggered quite a lot by paramiko's
interaction with cryptography).
rbssh-based unit tests pass on Python 2 and 3 (when used with other