From nobody Sat Apr 30 16:02:46 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C6E921AAC1A2; Sat, 30 Apr 2022 16:02:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KrDf01TkGz4bnG; Sat, 30 Apr 2022 16:02:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651334569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xot1eJQLn+AMPESCKEQD+6kHmmIXMG8xbEcJHYYid+0=; b=Ujdlsick0uBSpS22EOFDY372GFO+Y/rue7+hSkY/T+utXJiPtS5B5Gn96uqVggF4VR+JZF nU1w8nca/MRF8i++gLsz0nptKQfYvKWX9SxZQg5FyYesF66XCMtu4mpEjEQBozpl90V6Z4 b/vIFBp6Fu1B9MOxeTqTUKLf0wnBMHUZ7qFoewo3qrXz+e6TUZ75uNFYvwwGGEJNwlg1YW nXODBIBE46K2Fm62c41soKQAFZQDfAJL9Z51RVq0H8w7nGeto7Yws6MCUHoU73Lpub3eAw HrGhr69hXE2Yx3o06hcfIlovoZqUC6TROvaz2CcxK/Mazg21SUVyhl9bbWl2zA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B498824523; Sat, 30 Apr 2022 16:02:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23UG2kgR009007; Sat, 30 Apr 2022 16:02:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23UG2kqh009006; Sat, 30 Apr 2022 16:02:46 GMT (envelope-from git) Date: Sat, 30 Apr 2022 16:02:46 GMT Message-Id: <202204301602.23UG2kqh009006@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 6f7516452ecf - main - security/py-ssh: Remove obsoleted port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f7516452ecf34b5e3da0ccaae3e72de93c98379 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651334569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xot1eJQLn+AMPESCKEQD+6kHmmIXMG8xbEcJHYYid+0=; b=eU/EiADXqWlnwyB/xiPZckuPKyASj93tjIDbhnLZfGh9DQI5+KuYQAvHTRvwaNmabvWVHq LmtGILJOVn5KtQ4lN3jG4o/bPymow5uG0lEjrTO0vVk+LzBQd6zgljDA6gxHH0HAS7w3mZ xygzQw9f71RH//DIRuDC/ZTmdmlyMwUZXKPd0zEv7bLh9536h3xyA0uA927u0/ucTaolhJ y+54g2dGwAU9vHrE51UvqImB8jBWfSTexeJAXtTi6KQI2xdfCaEKFwwOhg14jwGD04JfMZ vxqyMZhnxBguY3nPJgNQTe+Yn5ajTc6OzTkCtsYvmjNFXx6IeqceIIfxjg7g3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651334569; a=rsa-sha256; cv=none; b=a8Hyh+vRZ+3/+SZ6jfUoPIqGeqfPjGZ1vzNsgKuWL6CEJPal2U1a1ZuVPVA1ZiobXzkEy0 a0M7Klzle/e9ywujrL+Uqey4RBkfwHiaUEOjHy261I/7xl/m29ahk6qyA1L9vhilkZqRrM fJan39slbmENyoU+acG8yzIypW8JiMtUY4SEHaN8oTPNyqIqqEnLupGvho0Q2MWTyKgFtQ fdahydRMhV1FWUwX1jnWNJNwtOITpnrnreCfJSx3EglH4PpWfd9PqXV4Q2hmbYiXvmRYQf 3y04VWuQmofEIaPEq2LThTGQadlTrKfSbsUIgd7iazvl9kjdTJ5tAT3uF3HkIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=6f7516452ecf34b5e3da0ccaae3e72de93c98379 commit 6f7516452ecf34b5e3da0ccaae3e72de93c98379 Author: Po-Chuan Hsieh AuthorDate: 2022-04-30 15:57:14 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-04-30 15:57:14 +0000 security/py-ssh: Remove obsoleted port Use security/py-paramiko instead. This library originated as a fork of the Paramiko library, and has now been merged back into it. Approved by: lwhsu (maintainer) --- MOVED | 1 + security/Makefile | 1 - security/py-ssh/Makefile | 20 - security/py-ssh/distinfo | 2 - security/py-ssh/files/patch-2to3 | 941 ----------------------------------- security/py-ssh/files/patch-setup.py | 10 - security/py-ssh/pkg-descr | 6 - 7 files changed, 1 insertion(+), 980 deletions(-) diff --git a/MOVED b/MOVED index 5061a7b1cc6c..17a4eaec9e81 100644 --- a/MOVED +++ b/MOVED @@ -17139,3 +17139,4 @@ math/py-gmpy2-devel|math/py-gmpy2|2022-04-22|No more need for the -devel port, p net/google-cloud-sdk-app-engine-go||2022-04-27|Obsolete, not supported by the current GCP SDK www/py-dj32-django-modelcluster|www/py-django-modelcluster|2022-04-30|Remove obsoleted port. Use www/py-django-modelcluster instead www/rubygem-rack-proxy06|www/rubygem-rack-proxy|2022-04-30|Remove obsoleted port. Use www/rubygem-rack-proxy instead +security/py-ssh|security/py-paramiko|2022-04-30|Remove obsoleted port. Use security/py-paramiko instead diff --git a/security/Makefile b/security/Makefile index 4d179e1f055b..66f61f6149ac 100644 --- a/security/Makefile +++ b/security/Makefile @@ -973,7 +973,6 @@ SUBDIR += py-signedjson SUBDIR += py-social-auth-core SUBDIR += py-spake2 - SUBDIR += py-ssh SUBDIR += py-ssh-audit SUBDIR += py-sshpubkeys SUBDIR += py-stem diff --git a/security/py-ssh/Makefile b/security/py-ssh/Makefile deleted file mode 100644 index e0af68b92494..000000000000 --- a/security/py-ssh/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Created by: Li-Wen Hsu - -PORTNAME= ssh -PORTVERSION= 1.8.0 -PORTREVISION= 1 -CATEGORIES= security python -MASTER_SITES= CHEESESHOP -PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} - -MAINTAINER= lwhsu@FreeBSD.org -COMMENT= Python SSH2 protocol library - -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pycrypto>=2.1:security/py-pycrypto@${PY_FLAVOR} - -USES= python:3.6+ -USE_PYTHON= distutils autoplist - -NO_ARCH= yes - -.include diff --git a/security/py-ssh/distinfo b/security/py-ssh/distinfo deleted file mode 100644 index 93f673c63174..000000000000 --- a/security/py-ssh/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (ssh-1.8.0.tar.gz) = b0aca1faf8a12e6aae24ab9cfae90d061a8741b680c8afad21da6ff8b8ae28d7 -SIZE (ssh-1.8.0.tar.gz) = 795832 diff --git a/security/py-ssh/files/patch-2to3 b/security/py-ssh/files/patch-2to3 deleted file mode 100644 index d3db3ca9d53f..000000000000 --- a/security/py-ssh/files/patch-2to3 +++ /dev/null @@ -1,941 +0,0 @@ ---- ssh/auth_handler.py.orig 2012-04-19 22:17:28 UTC -+++ ssh/auth_handler.py -@@ -198,7 +198,7 @@ class AuthHandler (object): - if self.auth_method == 'password': - m.add_boolean(False) - password = self.password -- if isinstance(password, unicode): -+ if isinstance(password, str): - password = password.encode('UTF-8') - m.add_string(password) - elif self.auth_method == 'publickey': -@@ -308,7 +308,7 @@ class AuthHandler (object): - keyblob = m.get_string() - try: - key = self.transport._key_info[keytype](Message(keyblob)) -- except SSHException, e: -+ except SSHException as e: - self.transport._log(INFO, 'Auth rejected: public key: %s' % str(e)) - key = None - except: ---- ssh/channel.py.orig 2012-05-05 04:45:50 UTC -+++ ssh/channel.py -@@ -607,7 +607,7 @@ class Channel (object): - """ - try: - out = self.in_buffer.read(nbytes, self.timeout) -- except PipeTimeout, e: -+ except PipeTimeout as e: - raise socket.timeout() - - ack = self._check_add_window(len(out)) -@@ -657,7 +657,7 @@ class Channel (object): - """ - try: - out = self.in_stderr_buffer.read(nbytes, self.timeout) -- except PipeTimeout, e: -+ except PipeTimeout as e: - raise socket.timeout() - - ack = self._check_add_window(len(out)) ---- ssh/client.py.orig 2012-09-10 18:40:40 UTC -+++ ssh/client.py -@@ -189,8 +189,8 @@ class SSHClient (object): - """ - f = open(filename, 'w') - f.write('# SSH host keys collected by ssh\n') -- for hostname, keys in self._host_keys.iteritems(): -- for keytype, key in keys.iteritems(): -+ for hostname, keys in self._host_keys.items(): -+ for keytype, key in keys.items(): - f.write('%s %s %s\n' % (hostname, keytype, key.get_base64())) - f.close() - -@@ -326,7 +326,7 @@ class SSHClient (object): - - if key_filename is None: - key_filenames = [] -- elif isinstance(key_filename, (str, unicode)): -+ elif isinstance(key_filename, str): - key_filenames = [ key_filename ] - else: - key_filenames = key_filename -@@ -434,7 +434,7 @@ class SSHClient (object): - two_factor = (allowed_types == ['password']) - if not two_factor: - return -- except SSHException, e: -+ except SSHException as e: - saved_exception = e - - if not two_factor: -@@ -448,7 +448,7 @@ class SSHClient (object): - if not two_factor: - return - break -- except SSHException, e: -+ except SSHException as e: - saved_exception = e - - if not two_factor and allow_agent: -@@ -464,7 +464,7 @@ class SSHClient (object): - if not two_factor: - return - break -- except SSHException, e: -+ except SSHException as e: - saved_exception = e - - if not two_factor: -@@ -496,16 +496,16 @@ class SSHClient (object): - if not two_factor: - return - break -- except SSHException, e: -+ except SSHException as e: - saved_exception = e -- except IOError, e: -+ except IOError as e: - saved_exception = e - - if password is not None: - try: - self._transport.auth_password(username, password) - return -- except SSHException, e: -+ except SSHException as e: - saved_exception = e - elif two_factor: - raise SSHException('Two-factor authentication requires a password') ---- ssh/dsskey.py.orig 2012-04-19 22:17:28 UTC -+++ ssh/dsskey.py -@@ -93,7 +93,7 @@ class DSSKey (PKey): - - def sign_ssh_data(self, rng, data): - digest = SHA.new(data).digest() -- dss = DSA.construct((long(self.y), long(self.g), long(self.p), long(self.q), long(self.x))) -+ dss = DSA.construct((int(self.y), int(self.g), int(self.p), int(self.q), int(self.x))) - # generate a suitable k - qsize = len(util.deflate_long(self.q, 0)) - while True: -@@ -128,7 +128,7 @@ class DSSKey (PKey): - sigS = util.inflate_long(sig[20:], 1) - sigM = util.inflate_long(SHA.new(data).digest(), 1) - -- dss = DSA.construct((long(self.y), long(self.g), long(self.p), long(self.q))) -+ dss = DSA.construct((int(self.y), int(self.g), int(self.p), int(self.q))) - return dss.verify(sigM, (sigR, sigS)) - - def _encode_key(self): -@@ -184,7 +184,7 @@ class DSSKey (PKey): - # DSAPrivateKey = { version = 0, p, q, g, y, x } - try: - keylist = BER(data).decode() -- except BERException, x: -+ except BERException as x: - raise SSHException('Unable to parse key file: ' + str(x)) - if (type(keylist) is not list) or (len(keylist) < 6) or (keylist[0] != 0): - raise SSHException('not a valid DSA private key file (bad ber encoding)') ---- ssh/hostkeys.py.orig 2012-07-15 23:45:13 UTC -+++ ssh/hostkeys.py -@@ -79,7 +79,7 @@ class HostKeyEntry: - key = DSSKey(data=base64.decodestring(key)) - else: - return None -- except binascii.Error, e: -+ except binascii.Error as e: - raise InvalidHostKey(line, e) - - return cls(names, key) -@@ -277,7 +277,7 @@ class HostKeys (UserDict.DictMixin): - if len(entry) == 0: - self._entries.append(HostKeyEntry([hostname], None)) - return -- for key_type in entry.keys(): -+ for key_type in list(entry.keys()): - found = False - for e in self._entries: - if (hostname in e.hostnames) and (e.key.get_name() == key_type): -@@ -298,7 +298,7 @@ class HostKeys (UserDict.DictMixin): - - def values(self): - ret = [] -- for k in self.keys(): -+ for k in list(self.keys()): - ret.append(self.lookup(k)) - return ret - ---- ssh/kex_group1.py.orig 2012-04-19 22:17:28 UTC -+++ ssh/kex_group1.py -@@ -29,10 +29,10 @@ from ssh.message import Message - from ssh.ssh_exception import SSHException - - --_MSG_KEXDH_INIT, _MSG_KEXDH_REPLY = range(30, 32) -+_MSG_KEXDH_INIT, _MSG_KEXDH_REPLY = list(range(30, 32)) - - # draft-ietf-secsh-transport-09.txt, page 17 --P = 0xFFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381FFFFFFFFFFFFFFFFL -+P = 0xFFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381FFFFFFFFFFFFFFFF - G = 2 - - -@@ -42,9 +42,9 @@ class KexGroup1(object): - - def __init__(self, transport): - self.transport = transport -- self.x = 0L -- self.e = 0L -- self.f = 0L -+ self.x = 0 -+ self.e = 0 -+ self.f = 0 - - def start_kex(self): - self._generate_x() ---- ssh/message.py.orig 2012-04-19 22:17:28 UTC -+++ ssh/message.py -@@ -21,7 +21,7 @@ Implementation of an SSH2 "message". - """ - - import struct --import cStringIO -+import io - - from ssh import util - -@@ -46,9 +46,9 @@ class Message (object): - @type content: string - """ - if content != None: -- self.packet = cStringIO.StringIO(content) -+ self.packet = io.StringIO(content) - else: -- self.packet = cStringIO.StringIO() -+ self.packet = io.StringIO() - - def __str__(self): - """ -@@ -275,8 +275,8 @@ class Message (object): - return self.add_string(i) - elif type(i) is int: - return self.add_int(i) -- elif type(i) is long: -- if i > 0xffffffffL: -+ elif type(i) is int: -+ if i > 0xffffffff: - return self.add_mpint(i) - else: - return self.add_int(i) ---- ssh/packet.py.orig 2012-09-10 18:40:40 UTC -+++ ssh/packet.py -@@ -93,8 +93,8 @@ class Packetizer (object): - self.__mac_key_in = '' - self.__compress_engine_out = None - self.__compress_engine_in = None -- self.__sequence_number_out = 0L -- self.__sequence_number_in = 0L -+ self.__sequence_number_out = 0 -+ self.__sequence_number_in = 0 - - # lock around outbound writes (packet computation) - self.__write_lock = threading.RLock() -@@ -217,7 +217,7 @@ class Packetizer (object): - n -= len(x) - except socket.timeout: - got_timeout = True -- except socket.error, e: -+ except socket.error as e: - # on Linux, sometimes instead of socket.timeout, we get - # EAGAIN. this is a bug in recent (> 2.6.9) kernels but - # we need to work around it. -@@ -246,7 +246,7 @@ class Packetizer (object): - n = self.__socket.send(out) - except socket.timeout: - retry_write = True -- except socket.error, e: -+ except socket.error as e: - if (type(e.args) is tuple) and (len(e.args) > 0) and (e.args[0] == errno.EAGAIN): - retry_write = True - elif (type(e.args) is tuple) and (len(e.args) > 0) and (e.args[0] == errno.EINTR): -@@ -311,7 +311,7 @@ class Packetizer (object): - if self.__block_engine_out != None: - payload = struct.pack('>I', self.__sequence_number_out) + packet - out += compute_hmac(self.__mac_key_out, payload, self.__mac_engine_out)[:self.__mac_size_out] -- self.__sequence_number_out = (self.__sequence_number_out + 1) & 0xffffffffL -+ self.__sequence_number_out = (self.__sequence_number_out + 1) & 0xffffffff - self.write_all(out) - - self.__sent_bytes += len(out) -@@ -371,7 +371,7 @@ class Packetizer (object): - - msg = Message(payload[1:]) - msg.seqno = self.__sequence_number_in -- self.__sequence_number_in = (self.__sequence_number_in + 1) & 0xffffffffL -+ self.__sequence_number_in = (self.__sequence_number_in + 1) & 0xffffffff - - # check for rekey - raw_packet_size = packet_size + self.__mac_size_in + 4 -@@ -469,7 +469,7 @@ class Packetizer (object): - break - except socket.timeout: - pass -- except EnvironmentError, e: -+ except EnvironmentError as e: - if ((type(e.args) is tuple) and (len(e.args) > 0) and - (e.args[0] == errno.EINTR)): - pass ---- ssh/pkey.py.orig 2012-04-19 22:17:28 UTC -+++ ssh/pkey.py -@@ -304,7 +304,7 @@ class PKey (object): - # if we trudged to the end of the file, just try to cope. - try: - data = base64.decodestring(''.join(lines[start:end])) -- except base64.binascii.Error, e: -+ except base64.binascii.Error as e: - raise SSHException('base64 decoding error: ' + str(e)) - if 'proc-type' not in headers: - # unencryped: done -@@ -346,9 +346,9 @@ class PKey (object): - - @raise IOError: if there was an error writing the file. - """ -- f = open(filename, 'w', 0600) -+ f = open(filename, 'w', 0o600) - # grrr... the mode doesn't always take hold -- os.chmod(filename, 0600) -+ os.chmod(filename, 0o600) - self._write_private_key(tag, f, data, password) - f.close() - -@@ -356,7 +356,7 @@ class PKey (object): - f.write('-----BEGIN %s PRIVATE KEY-----\n' % tag) - if password is not None: - # since we only support one cipher here, use it -- cipher_name = self._CIPHER_TABLE.keys()[0] -+ cipher_name = list(self._CIPHER_TABLE.keys())[0] - cipher = self._CIPHER_TABLE[cipher_name]['cipher'] - keysize = self._CIPHER_TABLE[cipher_name]['keysize'] - blocksize = self._CIPHER_TABLE[cipher_name]['blocksize'] ---- ssh/server.py.orig 2012-05-06 22:10:09 UTC -+++ ssh/server.py -@@ -48,7 +48,7 @@ class InteractiveQuery (object): - self.instructions = instructions - self.prompts = [] - for x in prompts: -- if (type(x) is str) or (type(x) is unicode): -+ if (type(x) is str) or (type(x) is str): - self.add_prompt(x) - else: - self.add_prompt(x[0], x[1]) -@@ -602,7 +602,7 @@ class SubsystemHandler (threading.Thread): - try: - self.__transport._log(DEBUG, 'Starting handler for subsystem %s' % self.__name) - self.start_subsystem(self.__name, self.__transport, self.__channel) -- except Exception, e: -+ except Exception as e: - self.__transport._log(ERROR, 'Exception in subsystem handler for "%s": %s' % - (self.__name, str(e))) - self.__transport._log(ERROR, util.tb_strings()) ---- ssh/sftp_attr.py.orig 2012-04-19 22:17:28 UTC -+++ ssh/sftp_attr.py -@@ -44,7 +44,7 @@ class SFTPAttributes (object): - FLAG_UIDGID = 2 - FLAG_PERMISSIONS = 4 - FLAG_AMTIME = 8 -- FLAG_EXTENDED = 0x80000000L -+ FLAG_EXTENDED = 0x80000000 - - def __init__(self): - """ -@@ -139,11 +139,11 @@ class SFTPAttributes (object): - msg.add_int(self.st_mode) - if self._flags & self.FLAG_AMTIME: - # throw away any fractional seconds -- msg.add_int(long(self.st_atime)) -- msg.add_int(long(self.st_mtime)) -+ msg.add_int(int(self.st_atime)) -+ msg.add_int(int(self.st_mtime)) - if self._flags & self.FLAG_EXTENDED: - msg.add_int(len(self.attr)) -- for key, val in self.attr.iteritems(): -+ for key, val in self.attr.items(): - msg.add_string(key) - msg.add_string(val) - return -@@ -158,7 +158,7 @@ class SFTPAttributes (object): - out += 'mode=' + oct(self.st_mode) + ' ' - if (self.st_atime is not None) and (self.st_mtime is not None): - out += 'atime=%d mtime=%d ' % (self.st_atime, self.st_mtime) -- for k, v in self.attr.iteritems(): -+ for k, v in self.attr.items(): - out += '"%s"=%r ' % (str(k), v) - out += ']' - return out -@@ -194,13 +194,13 @@ class SFTPAttributes (object): - ks = 's' - else: - ks = '?' -- ks += self._rwx((self.st_mode & 0700) >> 6, self.st_mode & stat.S_ISUID) -- ks += self._rwx((self.st_mode & 070) >> 3, self.st_mode & stat.S_ISGID) -+ ks += self._rwx((self.st_mode & 0o700) >> 6, self.st_mode & stat.S_ISUID) -+ ks += self._rwx((self.st_mode & 0o70) >> 3, self.st_mode & stat.S_ISGID) - ks += self._rwx(self.st_mode & 7, self.st_mode & stat.S_ISVTX, True) - else: - ks = '?---------' - # compute display date -- if (self.st_mtime is None) or (self.st_mtime == 0xffffffffL): -+ if (self.st_mtime is None) or (self.st_mtime == 0xffffffff): - # shouldn't really happen - datestr = '(unknown date)' - else: ---- ssh/sftp_client.py.orig 2012-08-29 17:56:54 UTC -+++ ssh/sftp_client.py -@@ -85,7 +85,7 @@ class SFTPClient (BaseSFTP): - self.ultra_debug = transport.get_hexdump() - try: - server_version = self._send_version() -- except EOFError, x: -+ except EOFError as x: - raise SSHException('EOF during negotiation') - self._log(INFO, 'Opened sftp connection (server version %d)' % server_version) - -@@ -178,7 +178,7 @@ class SFTPClient (BaseSFTP): - while True: - try: - t, msg = self._request(CMD_READDIR, handle) -- except EOFError, e: -+ except EOFError as e: - # done with handle - break - if t != CMD_NAME: -@@ -285,7 +285,7 @@ class SFTPClient (BaseSFTP): - self._log(DEBUG, 'rename(%r, %r)' % (oldpath, newpath)) - self._request(CMD_RENAME, oldpath, newpath) - -- def mkdir(self, path, mode=0777): -+ def mkdir(self, path, mode=0o777): - """ - Create a folder (directory) named C{path} with numeric mode C{mode}. - The default mode is 0777 (octal). On some systems, mode is ignored. -@@ -369,7 +369,7 @@ class SFTPClient (BaseSFTP): - """ - dest = self._adjust_cwd(dest) - self._log(DEBUG, 'symlink(%r, %r)' % (source, dest)) -- if type(source) is unicode: -+ if type(source) is str: - source = source.encode('utf-8') - self._request(CMD_SYMLINK, source, dest) - -@@ -643,7 +643,7 @@ class SFTPClient (BaseSFTP): - for item in arg: - if isinstance(item, int): - msg.add_int(item) -- elif isinstance(item, long): -+ elif isinstance(item, int): - msg.add_int64(item) - elif isinstance(item, str): - msg.add_string(item) -@@ -663,7 +663,7 @@ class SFTPClient (BaseSFTP): - while True: - try: - t, data = self._read_packet() -- except EOFError, e: -+ except EOFError as e: - raise SSHException('Server connection dropped: %s' % (str(e),)) - msg = Message(data) - num = msg.get_int() -@@ -689,7 +689,7 @@ class SFTPClient (BaseSFTP): - return (None, None) - - def _finish_responses(self, fileobj): -- while fileobj in self._expecting.values(): -+ while fileobj in list(self._expecting.values()): - self._read_response() - fileobj._check_exception() - -@@ -716,7 +716,7 @@ class SFTPClient (BaseSFTP): - Return an adjusted path if we're emulating a "current working - directory" for the server. - """ -- if type(path) is unicode: -+ if type(path) is str: - path = path.encode('utf-8') - if self._cwd is None: - return path ---- ssh/sftp_file.py.orig 2012-08-29 17:56:54 UTC -+++ ssh/sftp_file.py -@@ -53,12 +53,12 @@ class SFTPFile (BufferedFile): - self._saved_exception = None - - def __del__(self): -- self._close(async=True) -+ self._close(asynchronous=True) - - def close(self): -- self._close(async=False) -+ self._close(asynchronous=False) - -- def _close(self, async=False): -+ def _close(self, asynchronous=False): - # We allow double-close without signaling an error, because real - # Python file objects do. However, we must protect against actually - # sending multiple CMD_CLOSE packets, because after we close our -@@ -73,7 +73,7 @@ class SFTPFile (BufferedFile): - self.sftp._finish_responses(self) - BufferedFile.close(self) - try: -- if async: -+ if asynchronous: - # GC'd file handle could be called from an arbitrary thread -- don't wait for a response - self.sftp._async_request(type(None), CMD_CLOSE, self.handle) - else: -@@ -107,7 +107,7 @@ class SFTPFile (BufferedFile): - return None. this guarantees nothing about the number of bytes - collected in the prefetch buffer so far. - """ -- k = [i for i in self._prefetch_data.keys() if i <= offset] -+ k = [i for i in list(self._prefetch_data.keys()) if i <= offset] - if len(k) == 0: - return None - index = max(k) -@@ -152,7 +152,7 @@ class SFTPFile (BufferedFile): - data = self._read_prefetch(size) - if data is not None: - return data -- t, msg = self.sftp._request(CMD_READ, self.handle, long(self._realpos), int(size)) -+ t, msg = self.sftp._request(CMD_READ, self.handle, int(self._realpos), int(size)) - if t != CMD_DATA: - raise SFTPError('Expected data') - return msg.get_string() -@@ -160,7 +160,7 @@ class SFTPFile (BufferedFile): - def _write(self, data): - # may write less than requested if it would exceed max packet size - chunk = min(len(data), self.MAX_REQUEST_SIZE) -- req = self.sftp._async_request(type(None), CMD_WRITE, self.handle, long(self._realpos), str(data[:chunk])) -+ req = self.sftp._async_request(type(None), CMD_WRITE, self.handle, int(self._realpos), str(data[:chunk])) - if not self.pipelined or self.sftp.sock.recv_ready(): - t, msg = self.sftp._read_response(req) - if t != CMD_STATUS: -@@ -340,7 +340,7 @@ class SFTPFile (BufferedFile): - @since: 1.4 - """ - t, msg = self.sftp._request(CMD_EXTENDED, 'check-file', self.handle, -- hash_algorithm, long(offset), long(length), block_size) -+ hash_algorithm, int(offset), int(length), block_size) - ext = msg.get_string() - alg = msg.get_string() - data = msg.get_remainder() -@@ -450,14 +450,14 @@ class SFTPFile (BufferedFile): - # do these read requests in a temporary thread because there may be - # a lot of them, so it may block. - for offset, length in chunks: -- self.sftp._async_request(self, CMD_READ, self.handle, long(offset), int(length)) -+ self.sftp._async_request(self, CMD_READ, self.handle, int(offset), int(length)) - - def _async_response(self, t, msg): - if t == CMD_STATUS: - # save exception and re-raise it on next file operation - try: - self.sftp._convert_status(msg) -- except Exception, x: -+ except Exception as x: - self._saved_exception = x - return - if t != CMD_DATA: ---- ssh/sftp_handle.py.orig 2012-04-19 22:17:28 UTC -+++ ssh/sftp_handle.py -@@ -100,7 +100,7 @@ class SFTPHandle (object): - readfile.seek(offset) - self.__tell = offset - data = readfile.read(length) -- except IOError, e: -+ except IOError as e: - self.__tell = None - return SFTPServer.convert_errno(e.errno) - self.__tell += len(data) -@@ -139,7 +139,7 @@ class SFTPHandle (object): - self.__tell = offset - writefile.write(data) - writefile.flush() -- except IOError, e: -+ except IOError as e: - self.__tell = None - return SFTPServer.convert_errno(e.errno) - if self.__tell is not None: ---- ssh/sftp_server.py.orig 2012-04-19 22:17:28 UTC -+++ ssh/sftp_server.py -@@ -92,7 +92,7 @@ class SFTPServer (BaseSFTP, SubsystemHandler): - except EOFError: - self._log(DEBUG, 'EOF -- end of session') - return -- except Exception, e: -+ except Exception as e: - self._log(DEBUG, 'Exception on channel: ' + str(e)) - self._log(DEBUG, util.tb_strings()) - return -@@ -100,7 +100,7 @@ class SFTPServer (BaseSFTP, SubsystemHandler): - request_number = msg.get_int() - try: - self._process(t, request_number, msg) -- except Exception, e: -+ except Exception as e: - self._log(DEBUG, 'Exception in server processing: ' + str(e)) - self._log(DEBUG, util.tb_strings()) - # send some kind of failure message, at least -@@ -113,9 +113,9 @@ class SFTPServer (BaseSFTP, SubsystemHandler): - self.server.session_ended() - super(SFTPServer, self).finish_subsystem() - # close any file handles that were left open (so we can return them to the OS quickly) -- for f in self.file_table.itervalues(): -+ for f in self.file_table.values(): - f.close() -- for f in self.folder_table.itervalues(): -+ for f in self.folder_table.values(): - f.close() - self.file_table = {} - self.folder_table = {} -@@ -179,7 +179,7 @@ class SFTPServer (BaseSFTP, SubsystemHandler): - for item in arg: - if type(item) is int: - msg.add_int(item) -- elif type(item) is long: -+ elif type(item) is int: - msg.add_int64(item) - elif type(item) is str: - msg.add_string(item) ---- ssh/transport.py.orig 2012-09-13 23:42:52 UTC -+++ ssh/transport.py -@@ -110,8 +110,8 @@ class SecurityOptions (object): - x = tuple(x) - if type(x) is not tuple: - raise TypeError('expected tuple or list') -- possible = getattr(self._transport, orig).keys() -- forbidden = filter(lambda n: n not in possible, x) -+ possible = list(getattr(self._transport, orig).keys()) -+ forbidden = [n for n in x if n not in possible] - if len(forbidden) > 0: - raise ValueError('unknown cipher') - setattr(self._transport, name, x) -@@ -175,7 +175,7 @@ class ChannelMap (object): - def values(self): - self._lock.acquire() - try: -- return self._map.values() -+ return list(self._map.values()) - finally: - self._lock.release() - -@@ -273,7 +273,7 @@ class Transport (threading.Thread): - @param sock: a socket or socket-like object to create the session over. - @type sock: socket - """ -- if isinstance(sock, (str, unicode)): -+ if isinstance(sock, str): - # convert "host:port" into (host, port) - hl = sock.split(':', 1) - if len(hl) == 1: -@@ -291,7 +291,7 @@ class Transport (threading.Thread): - sock = socket.socket(af, socket.SOCK_STREAM) - try: - retry_on_signal(lambda: sock.connect((hostname, port))) -- except socket.error, e: -+ except socket.error as e: - reason = str(e) - else: - break -@@ -373,7 +373,7 @@ class Transport (threading.Thread): - - @rtype: str - """ -- out = ' 0) and (ord(s[0]) >= 0x80): - negative = 1 -@@ -60,16 +60,16 @@ def inflate_long(s, always_positive=False): - for i in range(0, len(s), 4): - out = (out << 32) + struct.unpack('>I', s[i:i+4])[0] *** 69 LINES SKIPPED ***