[Python 3]: Migration path for imports. Using absolute imports.

This commit is contained in:
Dorian 2013-10-22 07:51:54 -04:00
parent a77054d632
commit b2f74c1291
1 changed files with 27 additions and 26 deletions

View File

@ -50,6 +50,7 @@ Website: U{https://github.com/paramiko/paramiko/}
Mailing list: U{paramiko@librelist.com<mailto:paramiko@librelist.com>} Mailing list: U{paramiko@librelist.com<mailto:paramiko@librelist.com>}
""" """
from __future__ import absolute_import
import sys import sys
if sys.version_info < (2, 5): if sys.version_info < (2, 5):
@ -61,31 +62,31 @@ __version__ = "1.11.0"
__license__ = "GNU Lesser General Public License (LGPL)" __license__ = "GNU Lesser General Public License (LGPL)"
from transport import SecurityOptions, Transport from paramiko.transport import SecurityOptions, Transport
from client import SSHClient, MissingHostKeyPolicy, AutoAddPolicy, RejectPolicy, WarningPolicy from paramiko.client import SSHClient, MissingHostKeyPolicy, AutoAddPolicy, RejectPolicy, WarningPolicy
from auth_handler import AuthHandler from paramiko.auth_handler import AuthHandler
from channel import Channel, ChannelFile from paramiko.channel import Channel, ChannelFile
from ssh_exception import SSHException, PasswordRequiredException, \ from paramiko.ssh_exception import SSHException, PasswordRequiredException, \
BadAuthenticationType, ChannelException, BadHostKeyException, \ BadAuthenticationType, ChannelException, BadHostKeyException, \
AuthenticationException, ProxyCommandFailure AuthenticationException, ProxyCommandFailure
from server import ServerInterface, SubsystemHandler, InteractiveQuery from paramiko.server import ServerInterface, SubsystemHandler, InteractiveQuery
from rsakey import RSAKey from paramiko.rsakey import RSAKey
from dsskey import DSSKey from paramiko.dsskey import DSSKey
from sftp import SFTPError, BaseSFTP from paramiko.sftp import SFTPError, BaseSFTP
from sftp_client import SFTP, SFTPClient from paramiko.sftp_client import SFTP, SFTPClient
from sftp_server import SFTPServer from paramiko.sftp_server import SFTPServer
from sftp_attr import SFTPAttributes from paramiko.sftp_attr import SFTPAttributes
from sftp_handle import SFTPHandle from paramiko.sftp_handle import SFTPHandle
from sftp_si import SFTPServerInterface from paramiko.sftp_si import SFTPServerInterface
from sftp_file import SFTPFile from paramiko.sftp_file import SFTPFile
from message import Message from paramiko.message import Message
from packet import Packetizer from paramiko.packet import Packetizer
from file import BufferedFile from paramiko.file import BufferedFile
from agent import Agent, AgentKey from paramiko.agent import Agent, AgentKey
from pkey import PKey from paramiko.pkey import PKey
from hostkeys import HostKeys from paramiko.hostkeys import HostKeys
from config import SSHConfig from paramiko.config import SSHConfig
from proxy import ProxyCommand from paramiko.proxy import ProxyCommand
# fix module names for epydoc # fix module names for epydoc
for c in locals().values(): for c in locals().values():
@ -94,14 +95,14 @@ for c in locals().values():
c.__module__ = __name__ c.__module__ = __name__
del c del c
from common import AUTH_SUCCESSFUL, AUTH_PARTIALLY_SUCCESSFUL, AUTH_FAILED, \ from paramiko.common import AUTH_SUCCESSFUL, AUTH_PARTIALLY_SUCCESSFUL, AUTH_FAILED, \
OPEN_SUCCEEDED, OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED, OPEN_FAILED_CONNECT_FAILED, \ OPEN_SUCCEEDED, OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED, OPEN_FAILED_CONNECT_FAILED, \
OPEN_FAILED_UNKNOWN_CHANNEL_TYPE, OPEN_FAILED_RESOURCE_SHORTAGE OPEN_FAILED_UNKNOWN_CHANNEL_TYPE, OPEN_FAILED_RESOURCE_SHORTAGE
from sftp import SFTP_OK, SFTP_EOF, SFTP_NO_SUCH_FILE, SFTP_PERMISSION_DENIED, SFTP_FAILURE, \ from paramiko.sftp import SFTP_OK, SFTP_EOF, SFTP_NO_SUCH_FILE, SFTP_PERMISSION_DENIED, SFTP_FAILURE, \
SFTP_BAD_MESSAGE, SFTP_NO_CONNECTION, SFTP_CONNECTION_LOST, SFTP_OP_UNSUPPORTED SFTP_BAD_MESSAGE, SFTP_NO_CONNECTION, SFTP_CONNECTION_LOST, SFTP_OP_UNSUPPORTED
from common import io_sleep from paramiko.common import io_sleep
__all__ = [ 'Transport', __all__ = [ 'Transport',
'SSHClient', 'SSHClient',