From 2d4ad462d58370dcf498b56b567f3babca0052d6 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Sun, 24 Apr 2016 12:12:47 -0700 Subject: Expose some effectively-public Channel attributes in API docs. Closes #621 --- paramiko/channel.py | 5 +++++ sites/www/changelog.rst | 3 +++ 2 files changed, 8 insertions(+) diff --git a/paramiko/channel.py b/paramiko/channel.py index 44a4b291..f4540bcd 100644 --- a/paramiko/channel.py +++ b/paramiko/channel.py @@ -88,15 +88,20 @@ class Channel (ClosingContextManager): :param int chanid: the ID of this channel, as passed by an existing `.Transport`. """ + #: Channel ID self.chanid = chanid + #: Remote channel ID self.remote_chanid = 0 + #: `.Transport` managing this channel self.transport = None + #: Whether the connection is presently active self.active = False self.eof_received = 0 self.eof_sent = 0 self.in_buffer = BufferedPipe() self.in_stderr_buffer = BufferedPipe() self.timeout = None + #: Whether the connection has been closed self.closed = False self.ultra_debug = False self.lock = threading.Lock() diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst index ce984035..feef1c9b 100644 --- a/sites/www/changelog.rst +++ b/sites/www/changelog.rst @@ -2,6 +2,9 @@ Changelog ========= +* :support:`621 backported` Annotate some public attributes on + `~paramiko.channel.Channel` such as ``.closed``. Thanks to Sergey Vasilyev + for the report. * :bug:`632` Fix logic bug in the SFTP client's callback-calling functionality; previously there was a chance the given callback would fire twice at the end of a transfer. Thanks to ``@ab9-er`` for catch & original patch. -- cgit v1.2.3