summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2019-06-14 21:04:26 -0400
committerJeff Forcier <jeff@bitprophet.org>2019-06-14 21:05:23 -0400
commit72a068c2387daf37b2d369f774f818169f6e5f60 (patch)
tree039e7f67d5d923082efefa3f8f0a3d51090fe88d
parentdad77ab135152deda5c0dde879af2791f47b650f (diff)
Add docstrings so Channel(Stderr|Stdin)File appear in Sphinx
Also tweak changelog a bit while I am making it render correctly...
-rw-r--r--paramiko/channel.py12
-rw-r--r--sites/www/changelog.rst6
2 files changed, 16 insertions, 2 deletions
diff --git a/paramiko/channel.py b/paramiko/channel.py
index 9f2d8f01..72f65012 100644
--- a/paramiko/channel.py
+++ b/paramiko/channel.py
@@ -1366,6 +1366,12 @@ class ChannelFile(BufferedFile):
class ChannelStderrFile(ChannelFile):
+ """
+ A file-like wrapper around `.Channel` stderr.
+
+ See `Channel.makefile_stderr` for details.
+ """
+
def _read(self, size):
return self.channel.recv_stderr(size)
@@ -1375,6 +1381,12 @@ class ChannelStderrFile(ChannelFile):
class ChannelStdinFile(ChannelFile):
+ """
+ A file-like wrapper around `.Channel` stdin.
+
+ See `Channel.makefile_stdin` for details.
+ """
+
def close(self):
super(ChannelStdinFile, self).close()
self.channel.shutdown_write()
diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst
index abd73b06..8838f5aa 100644
--- a/sites/www/changelog.rst
+++ b/sites/www/changelog.rst
@@ -6,13 +6,15 @@ Changelog
<paramiko.client.SSHClient.exec_command>` previously returned a naive
`~paramiko.channel.ChannelFile` object for its ``stdin`` value; such objects
don't know to properly shut down the remote end's stdin when they
- ``.close()``. This leads to issues when running remote commands that read
- from stdin.
+ ``.close()``. This lead to issues (such as hangs) when running remote
+ commands that read from stdin.
A new subclass, `~paramiko.channel.ChannelStdinFile`, has been created which
closes remote stdin when it itself is closed.
`~paramiko.client.SSHClient.exec_command` has been updated to use that class
for its ``stdin`` return value.
+
+ Thanks to Brandon Rhodes for the report & steps to reproduce.
- :release:`2.5.0 <2019-06-09>`
- :feature:`1233` (also :issue:`1229`, :issue:`1332`) Add support for
encrypt-then-MAC (ETM) schemes (``hmac-sha2-256-etm@openssh.com``,