Commit e93492cc authored by Grégory Wisniewski's avatar Grégory Wisniewski

Remove unused imports.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1457 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 393ebf73
......@@ -27,7 +27,6 @@ from neo.connector import getConnectorHandler
from neo.bootstrap import BootstrapManager
from neo.pt import PartitionTable
from neo import protocol
from neo.util import parseMasterList
from neo.protocol import NodeTypes, NodeStates, Packets
class Dispatcher:
......
......@@ -20,7 +20,7 @@ from ZODB.config import BaseConfig
class NeoStorage(BaseConfig):
def open(self):
from Storage import Storage
from neo.client.Storage import Storage
return Storage(master_nodes=self.config.master_nodes,
name=self.config.name, connector = self.config.connector)
......
......@@ -18,7 +18,6 @@
from neo import logging
from neo.locking import RLock
from neo import protocol
from neo.protocol import PacketMalformedError, Packets
from neo.event import IdleEvent
from neo.connector import ConnectorException, ConnectorTryAgainException, \
......
......@@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
from neo import logging
from neo.protocol import Packets, PacketMalformedError
from neo.protocol import PacketMalformedError
from neo.util import dump
from neo.handler import EventHandler
......
......@@ -33,7 +33,7 @@ from neo.master.handlers import verification, storage, client, shutdown
from neo.master.handlers import administration
from neo.master.pt import PartitionTable
from neo.master.transactions import TransactionManager
from neo.util import dump, parseMasterList
from neo.util import dump
from neo.connector import getConnectorHandler
REQUIRED_NODE_NUMBER = 1
......
......@@ -17,7 +17,6 @@
from neo import logging
from neo import protocol
from neo.protocol import NodeStates, Packets, UnexpectedPacketError
from neo.master.handlers import BaseServiceHandler
from neo.util import dump
......
......@@ -17,9 +17,8 @@
from neo import logging
from neo import protocol
from neo.protocol import UnexpectedPacketError, ProtocolError
from neo.protocol import CellStates, ErrorCodes, Packets
from neo.protocol import CellStates, Packets
from neo.master.handlers import BaseServiceHandler
from neo.exception import OperationFailure
from neo.util import dump
......
......@@ -15,7 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
from neo import logging
from time import time, gmtime
from struct import pack, unpack
......
......@@ -19,7 +19,6 @@ from neo.connector import getConnectorHandler
from neo.connection import ClientConnection
from neo.event import EventManager
from neo.neoctl.handler import CommandEventHandler
from neo import protocol
from neo.protocol import ClusterStates, NodeStates, ErrorCodes, Packets
class NotReadyException(Exception):
......
......@@ -30,7 +30,7 @@ from neo.storage.replicator import Replicator
from neo.storage.database import buildDatabaseManager
from neo.connector import getConnectorHandler
from neo.pt import PartitionTable
from neo.util import dump, parseMasterList
from neo.util import dump
from neo.bootstrap import BootstrapManager
class Application(object):
......
......@@ -21,7 +21,6 @@ from MySQLdb.constants.CR import SERVER_GONE_ERROR, SERVER_LOST
from neo import logging
from array import array
import string
from struct import pack, unpack
from neo.storage.database import DatabaseManager
from neo.exception import DatabaseFailure
......
......@@ -17,7 +17,6 @@
from neo import logging
from neo import protocol
from neo.protocol import CellStates, Packets
from neo.storage.handlers import BaseMasterHandler
from neo.exception import OperationFailure
......
......@@ -19,7 +19,6 @@ from neo import logging
from random import choice
from neo.storage.handlers import replication
from neo import protocol
from neo.protocol import NodeTypes, NodeStates, CellStates, Packets
from neo.connection import ClientConnection
from neo.util import dump
......
......@@ -25,7 +25,6 @@ from neo.client.exception import NEOStorageError, NEOStorageNotFoundError, \
from neo import protocol
from neo.protocol import Packets, INVALID_TID, INVALID_SERIAL
from neo.util import makeChecksum
import neo.connection
def _getMasterConnection(self):
if self.master_conn is None:
......
......@@ -19,11 +19,9 @@ import unittest
from mock import Mock
from struct import pack, unpack
from neo.tests import NeoTestBase
from neo import protocol
from neo.protocol import Packet, Packets, NodeTypes, NodeStates
from neo.protocol import Packets, NodeTypes, NodeStates
from neo.master.handlers.client import ClientServiceHandler
from neo.master.app import Application
from neo.exception import OperationFailure
class MasterClientHandlerTests(NeoTestBase):
......
......@@ -18,7 +18,7 @@
import unittest
from struct import pack, unpack
from neo.tests import NeoTestBase
from neo.protocol import Packet, Packets
from neo.protocol import Packets
from neo.protocol import NodeTypes, NodeStates, CellStates
from neo.master.handlers.recovery import RecoveryHandler
from neo.master.app import Application
......
......@@ -16,12 +16,10 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import unittest
from neo import logging
from mock import Mock
from struct import pack, unpack
from struct import pack
from neo.tests import NeoTestBase
from neo import protocol
from neo.protocol import Packet, Packets
from neo.protocol import Packets
from neo.protocol import NodeTypes, NodeStates, CellStates
from neo.master.handlers.storage import StorageServiceHandler
from neo.master.handlers.client import ClientServiceHandler
......
......@@ -17,7 +17,7 @@
import unittest
from mock import Mock
from struct import pack
from struct import pack, unpack
from neo.tests import NeoTestBase
from neo.master.transactions import Transaction, TransactionManager
......@@ -109,7 +109,6 @@ class testTransactionManager(NeoTestBase):
self.assertTrue(tid1 is not None)
self.assertEqual(txnman.getLastTID(), tid1)
# set a new last TID
from struct import pack, unpack
ntid = pack('!Q', unpack('!Q', tid1)[0] + 10)
txnman.setLastTID(ntid)
self.assertEqual(txnman.getLastTID(), ntid)
......
......@@ -19,8 +19,8 @@ import unittest
from struct import pack, unpack
from neo.tests import NeoTestBase
from neo import protocol
from neo.protocol import Packet, Packets
from neo.protocol import NodeTypes, NodeStates, ErrorCodes
from neo.protocol import Packets
from neo.protocol import NodeTypes, NodeStates
from neo.master.handlers.verification import VerificationHandler
from neo.master.app import Application
from neo.exception import VerificationFailure
......
......@@ -15,18 +15,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
import unittest
from neo import logging
from struct import pack, unpack
from struct import unpack
from mock import Mock
from collections import deque
from neo.tests import NeoTestBase
from neo.storage.app import Application
from neo.storage.handlers.client import TransactionInformation
from neo.storage.handlers.client import ClientOperationHandler
from neo.exception import PrimaryFailure, OperationFailure
from neo.pt import PartitionTable
from neo.protocol import Packets, Packet, INVALID_PARTITION
from neo.protocol import INVALID_TID, INVALID_OID, INVALID_SERIAL
......
......@@ -21,7 +21,7 @@ from neo.tests import NeoTestBase
from neo.pt import PartitionTable
from neo.storage.app import Application
from neo.storage.handlers.initialization import InitializationHandler
from neo.protocol import Packet, Packets, CellStates
from neo.protocol import Packets, CellStates
from neo.exception import PrimaryFailure
class StorageInitializationHandlerTests(NeoTestBase):
......
......@@ -15,10 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
import unittest
from neo import logging
from struct import pack, unpack
from mock import Mock
from collections import deque
from neo.tests import NeoTestBase
......
......@@ -15,10 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
import unittest
from neo import logging
from struct import pack, unpack
from mock import Mock
from collections import deque
from neo.tests import NeoTestBase
......
......@@ -15,9 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
import unittest
from neo import logging
import MySQLdb
from mock import Mock
from neo.util import dump, p64, u64
......@@ -59,7 +57,6 @@ class StorageMySQSLdbTests(NeoTestBase):
self.assertEquals(db.db, NEO_SQL_DATABASE)
self.assertEquals(db.user, NEO_SQL_USER)
# & connect
import MySQLdb
self.assertTrue(isinstance(db.conn, MySQLdb.connection))
self.assertEquals(db.isUnderTransaction(), False)
......
......@@ -21,7 +21,7 @@ from neo.tests import NeoTestBase
from neo.pt import PartitionTable
from neo.storage.app import Application
from neo.storage.handlers.verification import VerificationHandler
from neo.protocol import Packet, Packets, CellStates, ErrorCodes
from neo.protocol import Packets, CellStates, ErrorCodes
from neo.protocol import INVALID_OID, INVALID_TID
from neo.exception import PrimaryFailure, OperationFailure
from neo.util import p64, u64
......
......@@ -19,7 +19,6 @@ import unittest
from mock import Mock
from neo.tests import NeoTestBase
from neo.handler import EventHandler
from neo.protocol import UnexpectedPacketError
from neo.protocol import PacketMalformedError, UnexpectedPacketError, \
BrokenNodeDisallowedError, NotReadyError, ProtocolError
......
......@@ -15,15 +15,11 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import unittest, os
from mock import Mock
import unittest
from neo import protocol
from neo.protocol import Packets
from neo.protocol import NodeTypes, NodeStates, CellStates
from neo.protocol import ErrorCodes, Packets, Packet
from neo.protocol import PACKET_HEADER_SIZE
from neo.protocol import ErrorCodes, Packets
from neo.tests import NeoTestBase
from time import time, gmtime
class ProtocolTests(NeoTestBase):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment