diff --git a/paramiko/transport.py b/paramiko/transport.py index e7a36c4..4f41a41 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -33,7 +33,7 @@ import paramiko from paramiko import util from paramiko.auth_handler import AuthHandler from paramiko.channel import Channel -from paramiko.common import * +from paramiko.common import * # Legit, uses dozens of constants & funcs from paramiko.compress import ZlibCompressor, ZlibDecompressor from paramiko.dsskey import DSSKey from paramiko.kex_gex import KexGex diff --git a/paramiko/util.py b/paramiko/util.py index 0e582dc..93998ff 100644 --- a/paramiko/util.py +++ b/paramiko/util.py @@ -30,7 +30,7 @@ import struct import traceback import threading -from paramiko.common import * +from paramiko.common import PY2, DEBUG, long, zero_byte, byte_ord, xffffffff, logging, b, max_byte from paramiko.config import SSHConfig diff --git a/tests/loop.py b/tests/loop.py index 6e933f8..4f5dc16 100644 --- a/tests/loop.py +++ b/tests/loop.py @@ -21,7 +21,7 @@ """ import threading, socket -from paramiko.common import * +from paramiko.common import asbytes class LoopSocket (object): diff --git a/tests/stub_sftp.py b/tests/stub_sftp.py index 58e4be2..4fbcead 100644 --- a/tests/stub_sftp.py +++ b/tests/stub_sftp.py @@ -24,7 +24,7 @@ import os import sys from paramiko import ServerInterface, SFTPServerInterface, SFTPServer, SFTPAttributes, \ SFTPHandle, SFTP_OK, AUTH_SUCCESSFUL, OPEN_SUCCEEDED -from paramiko.common import * +from paramiko.common import o666 class StubServer (ServerInterface): diff --git a/tests/test_file.py b/tests/test_file.py index 33a4913..e11d7fd 100755 --- a/tests/test_file.py +++ b/tests/test_file.py @@ -22,7 +22,7 @@ Some unit tests for the BufferedFile abstraction. import unittest from paramiko.file import BufferedFile -from paramiko.common import * +from paramiko.common import linefeed_byte, crlf, cr_byte class LoopbackFile (BufferedFile): diff --git a/tests/test_kex.py b/tests/test_kex.py index e69c051..4286d6e 100644 --- a/tests/test_kex.py +++ b/tests/test_kex.py @@ -26,7 +26,7 @@ import paramiko.util from paramiko.kex_group1 import KexGroup1 from paramiko.kex_gex import KexGex from paramiko import Message -from paramiko.common import * +from paramiko.common import byte_chr class FakeRng (object): diff --git a/tests/test_message.py b/tests/test_message.py index 4da52cf..f308c03 100644 --- a/tests/test_message.py +++ b/tests/test_message.py @@ -22,7 +22,7 @@ Some unit tests for ssh protocol message blocks. import unittest from paramiko.message import Message -from paramiko.common import * +from paramiko.common import byte_chr, zero_byte class MessageTest (unittest.TestCase): diff --git a/tests/test_packetizer.py b/tests/test_packetizer.py index 5c36fed..09d7fcc 100644 --- a/tests/test_packetizer.py +++ b/tests/test_packetizer.py @@ -25,7 +25,7 @@ from tests.loop import LoopSocket from Crypto.Cipher import AES from Crypto.Hash import SHA, HMAC from paramiko import Message, Packetizer, util -from paramiko.common import * +from paramiko.common import byte_chr, zero_byte x55 = byte_chr(0x55) x1f = byte_chr(0x1f) diff --git a/tests/test_sftp.py b/tests/test_sftp.py index f8fab1c..8242201 100755 --- a/tests/test_sftp.py +++ b/tests/test_sftp.py @@ -25,13 +25,14 @@ do test file operations in (so no existing files will be harmed). from binascii import hexlify import os +import sys import warnings import threading import unittest from tempfile import mkstemp import paramiko -from paramiko.common import * +from paramiko.common import PY2, b, u, StringIO, o777, o600 from tests.stub_sftp import StubServer, StubSFTPServer from tests.loop import LoopSocket from tests.util import test_path diff --git a/tests/test_sftp_big.py b/tests/test_sftp_big.py index 6870c6b..b1b13d5 100644 --- a/tests/test_sftp_big.py +++ b/tests/test_sftp_big.py @@ -33,7 +33,7 @@ import time import unittest import paramiko -from paramiko.common import * +from paramiko.common import o660 from tests.stub_sftp import StubServer, StubSFTPServer from tests.loop import LoopSocket from tests.test_sftp import get_sftp