diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2023-01-09 23:36:47 -0500 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2023-01-09 23:38:58 -0500 |
commit | a43ad5e6c1a038dcc7cab596b15f7bba462dc95a (patch) | |
tree | b635210bf8185289d3e570b4a9cc3e476091a9ee | |
parent | 8bda24dcb4bc8ca0969e78b3cced9bf82c010343 (diff) |
Some semi-missed removals of 'long'
- a couple spots where we wrote longs as int64 and ints as int. I
_think_ the right thing to do here is write all ints as int64 given
how Python handles these under 3.
- docs bits
-rw-r--r-- | paramiko/message.py | 4 | ||||
-rw-r--r-- | paramiko/server.py | 2 | ||||
-rw-r--r-- | paramiko/sftp_client.py | 4 | ||||
-rw-r--r-- | paramiko/sftp_server.py | 4 |
4 files changed, 5 insertions, 9 deletions
diff --git a/paramiko/message.py b/paramiko/message.py index b555e2cd..fc832732 100644 --- a/paramiko/message.py +++ b/paramiko/message.py @@ -31,8 +31,8 @@ from paramiko.util import u class Message(object): """ An SSH2 message is a stream of bytes that encodes some combination of - strings, integers, bools, and infinite-precision integers (known in Python - as longs). This class builds or breaks down such a byte stream. + strings, integers, bools, and infinite-precision integers. This class + builds or breaks down such a byte stream. Normally you don't need to deal with anything this low-level, but it's exposed for people implementing custom extensions, or features that diff --git a/paramiko/server.py b/paramiko/server.py index f1638b64..68f5ae92 100644 --- a/paramiko/server.py +++ b/paramiko/server.py @@ -355,7 +355,7 @@ class ServerInterface(object): If the request was successful and you would like to return contextual data to the remote host, return a tuple. Items in the tuple will be sent back with the successful result. (Note that the items in the - tuple can only be strings, ints, longs, or bools.) + tuple can only be strings, ints, or bools.) The default implementation always returns ``False``, indicating that it does not support any global requests. diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index d4396399..eaaf0dad 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -827,10 +827,8 @@ class SFTPClient(BaseSFTP, ClosingContextManager): msg = Message() msg.add_int(self.request_number) for item in arg: - if isinstance(item, long): + if isinstance(item, int): msg.add_int64(item) - elif isinstance(item, int): - msg.add_int(item) elif isinstance(item, SFTPAttributes): item._pack(msg) else: diff --git a/paramiko/sftp_server.py b/paramiko/sftp_server.py index dcb24626..94c451f7 100644 --- a/paramiko/sftp_server.py +++ b/paramiko/sftp_server.py @@ -228,10 +228,8 @@ class SFTPServer(BaseSFTP, SubsystemHandler): msg = Message() msg.add_int(request_number) for item in arg: - if isinstance(item, long): + if isinstance(item, int): msg.add_int64(item) - elif isinstance(item, int): - msg.add_int(item) elif isinstance(item, (str, bytes)): msg.add_string(item) elif type(item) is SFTPAttributes: |