Commit a5347703 authored by Martijn Faassen's avatar Martijn Faassen

Remove unused imports.

parent 52c6285f
......@@ -11,7 +11,6 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
import random
from unittest import TestCase, TestSuite, TextTestRunner, makeSuite
from BTrees.OOBTree import OOBTree, OOBucket, OOSet, OOTreeSet
......
......@@ -15,7 +15,6 @@
import unittest
import ZODB
from ZODB.MappingStorage import MappingStorage
from ZODB.DB import DB
......
......@@ -13,7 +13,7 @@
##############################################################################
"""Manage the asyncore mainloop in a multi-threaded app.
$Id: __init__.py,v 1.7 2003/10/02 18:17:26 jeremy Exp $
$Id: __init__.py,v 1.8 2004/02/27 00:31:51 faassen Exp $
"""
from LoopCallback import register_loop_callback, loop, remove_loop_callback
from LoopCallback import register_loop_callback, remove_loop_callback
......@@ -29,8 +29,7 @@ import types
from ZEO import ServerStub
from ZEO.cache import ClientCache
from ZEO.TransactionBuffer import TransactionBuffer
from ZEO.Exceptions import ClientStorageError, UnrecognizedResult, \
ClientDisconnected, AuthError
from ZEO.Exceptions import ClientStorageError, ClientDisconnected, AuthError
from ZEO.auth import get_module
from ZEO.zrpc.client import ConnectionManager
......
......@@ -16,7 +16,7 @@
import struct
import time
from ZEO.StorageServer import StorageServer, ZEOStorage, log
from ZEO.StorageServer import StorageServer, log
from ZEO.zrpc.server import ManagedServerConnection
# a bunch of codes
......
......@@ -29,8 +29,6 @@ import struct
import tempfile
import time
from sets import Set
from ZODB.utils import z64, u64
##
......
......@@ -34,7 +34,6 @@ Unless -C is specified, -a and -f are required.
import os
import sys
import getopt
import signal
import socket
......
......@@ -16,7 +16,6 @@ import os
import sys
import time
import random
import socket
import asyncore
import tempfile
import threading
......@@ -27,7 +26,6 @@ import ZEO.ServerStub
from ZEO.ClientStorage import ClientStorage
from ZEO.Exceptions import ClientDisconnected
from ZEO.zrpc.marshal import Marshaller
from ZEO.zrpc.error import DisconnectedError
from ZEO.tests import forker
from ZODB.DB import DB
......
......@@ -19,7 +19,6 @@ from ZODB.Transaction import Transaction
from ZODB.tests.StorageTestBase import zodb_pickle, MinPO
import ZEO.ClientStorage
from ZEO.Exceptions import ClientDisconnected
ZERO = '\0'*8
......
......@@ -17,7 +17,6 @@ import os
import sys
import time
import errno
import random
import socket
import StringIO
import tempfile
......
......@@ -19,7 +19,6 @@ import persistent
import persistent.mapping
from ZEO.tests import forker
import asyncore
import os
import tempfile
import time
......
......@@ -42,12 +42,11 @@ Options:
"""
import asyncore
import sys, os, getopt, string, time
import sys, os, getopt, time
##sys.path.insert(0, os.getcwd())
import ZODB, ZODB.FileStorage
import ZODB
import persistent
import ZEO.ClientStorage, ZEO.StorageServer
from ZEO.tests import forker
from ZODB.POSException import ConflictError
......
......@@ -23,11 +23,9 @@ from ZEO.ClientStorage import ClientStorage
from ZODB.MappingStorage import MappingStorage
from ZEO.tests import forker
from ZODB.tests import MinPO
import zLOG
import os
import random
import sys
import types
NUM_TRANSACTIONS_PER_CONN = 10
......
......@@ -18,17 +18,10 @@ import tempfile
import time
import unittest
import zLOG
from ThreadedAsync import LoopCallback
from ZEO import zeopasswd
from ZEO.ClientStorage import ClientStorage
from ZEO.Exceptions import ClientDisconnected
from ZEO.StorageServer import StorageServer
from ZEO.tests.ConnectionTests import CommonSetupTearDown
from ZODB.FileStorage import FileStorage
class AuthTest(CommonSetupTearDown):
__super_getServerConfig = CommonSetupTearDown.getServerConfig
__super_setUp = CommonSetupTearDown.setUp
......
......@@ -13,11 +13,10 @@
##############################################################################
"""Test that the monitor produce sensible results.
$Id: testMonitor.py,v 1.8 2003/11/28 16:44:48 jim Exp $
$Id: testMonitor.py,v 1.9 2004/02/27 00:31:52 faassen Exp $
"""
import socket
import time
import unittest
from ZEO.tests.ConnectionTests import CommonSetupTearDown
......
......@@ -15,8 +15,6 @@
# System imports
import os
import sys
import time
import random
import socket
import asyncore
......
......@@ -18,7 +18,6 @@ import os
import sys
import tempfile
import unittest
from StringIO import StringIO
import ZODB.config
......
......@@ -18,7 +18,6 @@ import sys
import time
import errno
import getopt
import random
import socket
import signal
import asyncore
......
......@@ -3,7 +3,6 @@
import os
import ZEO
import zLOG
import zdaemon.zdctl
......
......@@ -25,7 +25,6 @@ from ZEO.zrpc.log import short_repr, log
from ZEO.zrpc.marshal import Marshaller
from ZEO.zrpc.trigger import trigger
import zLOG
from ZODB import POSException
REPLY = ".reply" # message name used for replies
ASYNC = 1
......
......@@ -12,7 +12,6 @@
#
##############################################################################
import os
import types
import zLOG
import threading
......
......@@ -15,7 +15,7 @@ import asyncore
import socket
import types
from ZEO.zrpc.connection import Connection, Delay
from ZEO.zrpc.connection import Connection
from ZEO.zrpc.log import log
import zLOG
import ThreadedAsync.LoopCallback
......
......@@ -13,7 +13,7 @@
##############################################################################
"""Handy standard storage machinery
$Id: BaseStorage.py,v 1.43 2004/02/26 22:53:23 jeremy Exp $
$Id: BaseStorage.py,v 1.44 2004/02/27 00:31:53 faassen Exp $
"""
import cPickle
import threading
......@@ -26,7 +26,6 @@ from persistent.TimeStamp import TimeStamp
import zLOG
from ZODB import POSException
from ZODB.UndoLogCompatible import UndoLogCompatible
from ZODB.utils import z64
class BaseStorage(UndoLogCompatible):
_transaction=None # Transaction that is being committed
......
......@@ -13,7 +13,7 @@
##############################################################################
"""Database connection support
$Id: Connection.py,v 1.126 2004/02/26 22:57:09 jeremy Exp $"""
$Id: Connection.py,v 1.127 2004/02/27 00:31:53 faassen Exp $"""
import logging
import sys
......@@ -24,7 +24,6 @@ from time import time
from utils import u64
from persistent import PickleCache
from zLOG import LOG, ERROR, BLATHER, WARNING
from ZODB.ConflictResolution import ResolvedSerial
from ZODB.ExportImport import ExportImport
......@@ -115,7 +114,7 @@ class Connection(ExportImport, object):
@group Other Methods: oldstate, exchange, getDebugInfo, setDebugInfo,
getTransferCounts
$Id: Connection.py,v 1.126 2004/02/26 22:57:09 jeremy Exp $
$Id: Connection.py,v 1.127 2004/02/27 00:31:53 faassen Exp $
"""
_tmp = None
......
......@@ -13,10 +13,10 @@
##############################################################################
"""Database objects
$Id: DB.py,v 1.63 2004/02/25 12:31:56 jim Exp $"""
__version__='$Revision: 1.63 $'[11:-2]
$Id: DB.py,v 1.64 2004/02/27 00:31:53 faassen Exp $"""
__version__='$Revision: 1.64 $'[11:-2]
import cPickle, cStringIO, sys, POSException, UndoLogCompatible
import cPickle, cStringIO, sys, UndoLogCompatible
from Connection import Connection
from thread import allocate_lock
from Transaction import Transaction, get_transaction
......@@ -25,8 +25,6 @@ from time import time, ctime
from zLOG import LOG, ERROR
from ZODB.broken import find_global
from types import StringType
def list2dict(L):
d = {}
for elt in L:
......
......@@ -13,7 +13,7 @@
##############################################################################
"""Storage implementation using a log written to a single file.
$Revision: 1.6 $
$Revision: 1.7 $
"""
import base64
......@@ -38,8 +38,7 @@ from ZODB.utils import p64, u64, cp, z64
from ZODB.FileStorage.fspack import FileStoragePacker
from ZODB.FileStorage.format \
import FileStorageFormatter, DataHeader, TxnHeader, DATA_HDR, \
DATA_HDR_LEN, TRANS_HDR, TRANS_HDR_LEN, CorruptedDataError, \
DATA_VERSION_HDR_LEN
DATA_HDR_LEN, TRANS_HDR, TRANS_HDR_LEN, CorruptedDataError
try:
from ZODB.fsIndex import fsIndex
......
......@@ -117,9 +117,8 @@
import struct
from ZODB.POSException import POSKeyError
from ZODB.serialize import referencesf
from ZODB.utils import p64, u64, z64, oid_repr, t32
from zLOG import LOG, BLATHER, WARNING, ERROR, PANIC
from ZODB.utils import u64, oid_repr, t32
from zLOG import LOG, ERROR
class CorruptedError(Exception):
pass
......
......@@ -13,14 +13,14 @@
##############################################################################
"""Mounted database support
$Id: Mount.py,v 1.21 2003/11/28 16:44:49 jim Exp $"""
__version__='$Revision: 1.21 $'[11:-2]
$Id: Mount.py,v 1.22 2004/02/27 00:31:53 faassen Exp $"""
__version__='$Revision: 1.22 $'[11:-2]
import thread, persistent, Acquisition
from Acquisition import aq_base
import string, time, sys
from POSException import MountedStorageError
from zLOG import LOG, ERROR, INFO, WARNING
from zLOG import LOG, INFO, WARNING
# dbs is a holder for all DB objects, needed to overcome
# threading issues. It maps connection params to a DB object
......
......@@ -13,9 +13,8 @@
##############################################################################
"""ZODB-defined exceptions
$Id: POSException.py,v 1.22 2003/11/28 16:44:49 jim Exp $"""
$Id: POSException.py,v 1.23 2004/02/27 00:31:53 faassen Exp $"""
from types import StringType, DictType
from ZODB.utils import oid_repr, serial_repr
def _fmt_undo(oid, reason):
......
......@@ -13,13 +13,13 @@
##############################################################################
"""Transaction management
$Id: Transaction.py,v 1.57 2004/02/19 02:59:06 jeremy Exp $
$Id: Transaction.py,v 1.58 2004/02/27 00:31:53 faassen Exp $
"""
import sys
from thread import get_ident as _get_ident
from zLOG import LOG, ERROR, PANIC, INFO, BLATHER, WARNING
from ZODB.POSException import ConflictError, TransactionError
from ZODB.POSException import TransactionError
from ZODB.utils import oid_repr
# Flag indicating whether certain errors have occurred.
......
......@@ -18,9 +18,7 @@ don't support versions or Undo. This may be useful when implementing
objects like hit counters that don't need or want to participate
in undo or versions.
"""
__version__='$Revision: 1.4 $'[11:-2]
import base64, POSException, time, string, utils
__version__='$Revision: 1.5 $'[11:-2]
from MappingStorage import MappingStorage
from BaseStorage import BaseStorage
......
......@@ -34,7 +34,7 @@ from types import StringType
from ZODB.serialize import referencesf
from ZODB.utils import p64, u64, z64, oid_repr
from zLOG import LOG, BLATHER, WARNING, ERROR, PANIC
from zLOG import LOG, ERROR
try:
from ZODB.fsIndex import fsIndex
......
......@@ -80,9 +80,9 @@ except ImportError:
import ZODB
import getopt, ZODB.FileStorage, struct, time
import getopt, ZODB.FileStorage, time
from struct import unpack
from ZODB.utils import t32, p64, u64
from ZODB.utils import t32, u64
from persistent.TimeStamp import TimeStamp
from cPickle import loads
from ZODB.FileStorage import RecordIterator
......
......@@ -23,7 +23,7 @@ import struct
from ZODB.FileStorage.format import TRANS_HDR, DATA_HDR, TRANS_HDR_LEN, \
DATA_HDR_LEN, DATA_VERSION_HDR_LEN
from ZODB.utils import p64, u64
from ZODB.utils import u64
from persistent.TimeStamp import TimeStamp
class TxnHeader:
......
......@@ -19,11 +19,6 @@ from persistent import Persistent
from ZODB.tests.StorageTestBase import zodb_unpickle, zodb_pickle
import sys
import types
from cPickle import Pickler, Unpickler
from cStringIO import StringIO
class PCounter(Persistent):
_value = 0
......
......@@ -17,7 +17,6 @@ import os
import random
import stat
import tempfile
import unittest
import ZODB, ZODB.FileStorage
from StorageTestBase import StorageTestBase
......
......@@ -19,9 +19,6 @@ all these tests.
from ZODB.Transaction import Transaction
from ZODB.tests.MinPO import MinPO
from ZODB.tests.StorageTestBase import zodb_unpickle
class HistoryStorage:
def checkSimpleHistory(self):
......
......@@ -7,7 +7,7 @@ import ZODB
from persistent.mapping import PersistentMapping
from ZODB.tests.StorageTestBase \
import StorageTestBase, zodb_pickle, zodb_unpickle, handle_serials
import zodb_pickle, zodb_unpickle, handle_serials
from ZODB.tests.MinPO import MinPO
from ZODB.Transaction import Transaction
from ZODB.POSException import ConflictError
......
......@@ -34,7 +34,6 @@ from ZODB.serialize import referencesf
from ZODB.tests.MinPO import MinPO
from ZODB.tests.StorageTestBase import snooze
from ZODB.POSException import ConflictError, StorageError
from ZODB.FileStorage import FileStorage
from ZODB.tests.MTStorage import TestThread
......
......@@ -21,7 +21,7 @@ import types
from ZODB import POSException
from ZODB.Transaction import Transaction
from ZODB.serialize import referencesf
from ZODB.utils import u64, p64
from ZODB.utils import p64
from ZODB import DB
from persistent import Persistent
......
......@@ -16,7 +16,6 @@
import time
from ZODB import POSException
from ZODB.serialize import referencesf
from ZODB.Transaction import Transaction
from ZODB.tests.MinPO import MinPO
......
......@@ -25,7 +25,6 @@ import gc
import ZODB
import ZODB.MappingStorage
from ZODB.POSException import ConflictError
from persistent.cPickleCache import PickleCache
from persistent.mapping import PersistentMapping
from ZODB.tests.MinPO import MinPO
......
......@@ -12,14 +12,10 @@
#
##############################################################################
import os
import errno
import shutil
import tempfile
import unittest
import ZODB.config
import ZODB.tests
from ZODB.POSException import ReadOnlyError
......
......@@ -12,7 +12,7 @@
#
##############################################################################
import ZODB.DemoStorage
import os, unittest
import unittest
from ZODB.tests import StorageTestBase, BasicStorage, \
VersionStorage, Synchronization
......
......@@ -12,13 +12,9 @@
#
##############################################################################
import ZODB.FileStorage
import sys, os, unittest
import errno
import filecmp
import StringIO
import os, unittest
from ZODB.Transaction import Transaction
from ZODB import POSException
from ZODB.fsrecover import recover
from ZODB.tests import StorageTestBase, BasicStorage, \
TransactionalUndoStorage, VersionStorage, \
......@@ -26,7 +22,7 @@ from ZODB.tests import StorageTestBase, BasicStorage, \
Synchronization, ConflictResolution, HistoryStorage, \
IteratorStorage, Corruption, RevisionStorage, PersistentStorage, \
MTStorage, ReadOnlyStorage, RecoveryStorage
from ZODB.tests.StorageTestBase import MinPO, zodb_unpickle, zodb_pickle
from ZODB.tests.StorageTestBase import MinPO, zodb_pickle
class BaseFileStorageTests(StorageTestBase.StorageTestBase):
......
......@@ -12,7 +12,7 @@
#
##############################################################################
import ZODB.MappingStorage
import os, unittest
import unittest
from ZODB.tests import StorageTestBase
from ZODB.tests \
......
......@@ -14,7 +14,7 @@
"""
Revision information:
$Id: testTransaction.py,v 1.18 2004/02/19 02:59:10 jeremy Exp $
$Id: testTransaction.py,v 1.19 2004/02/27 00:31:55 faassen Exp $
"""
"""
......@@ -44,7 +44,6 @@ TODO
"""
import random
from types import TupleType
import unittest
......
......@@ -11,7 +11,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
import unittest, sys
import unittest
from ZODB.fsIndex import fsIndex
from ZODB.utils import p64
......
......@@ -14,7 +14,7 @@
"""Nitty-gritty conversion of a ZODB 4 FileStorage to a ZODB 3 FileStorage."""
import sys
from cPickle import dumps, Pickler, Unpickler
from cPickle import Pickler, Unpickler
from cStringIO import StringIO
from ZODB.FileStorage import FileStorage
......
......@@ -18,7 +18,7 @@ from struct import unpack
from ZODB.zodb4.z4interfaces import ZERO
from ZODB.zodb4.z4utils import u64, splitrefs
from ZODB.zodb4.z4format import FileStorageFormatter, DataHeader, TxnHeader
from ZODB.zodb4.z4format import FileStorageFormatter
from ZODB.zodb4.z4format import TRANS_HDR, TRANS_HDR_LEN, DATA_HDR
from ZODB.zodb4.z4format import DATA_HDR_LEN, DATA_VERSION_HDR_LEN
......
......@@ -14,11 +14,7 @@
# originally zodb.utils
from persistent.TimeStamp import TimeStamp
import struct
import time
from sets import Set
def p64(v):
"""Pack an integer or long into a 8-byte string"""
......
......@@ -14,7 +14,7 @@
##############################################################################
"""Tool to dump the last few transactions from a FileStorage."""
from ZODB.fstools import prev_txn, TxnHeader
from ZODB.fstools import prev_txn
import binascii
import getopt
......
......@@ -74,17 +74,13 @@ Positional arguments:
pairs. E.g. "name=full;frequency=3600"
"""
import os
import re
import sys
import time
import errno
import getopt
import marshal
import profile
import traceback
import ZODB
from ZODB import utils
from ZODB import StorageTypes
from ZODB.TimeStamp import TimeStamp
......
......@@ -5,7 +5,6 @@ An example of the log format is:
2002-04-15T13:05:29 BLATHER(-100) ZEO Server storea(3235680, [714], 235339406490168806) ('10.0.26.30', 45514)
"""
import operator
import re
import time
......
......@@ -9,7 +9,6 @@ The current implementation only supports FileStorage.
Current limitations / simplifications: Ignores revisions and versions.
"""
import ZODB
from ZODB.FileStorage import FileStorage
from ZODB.utils import U64
from ZODB.fsdump import get_pickle_metadata
......
......@@ -19,7 +19,7 @@ This uses Vinay Sajip's PEP 282 logging module.
__version__='$Revision$'[11:-2]
import os, sys, time
import os, time
import logging
from BaseLogger import BaseLogger
from ZConfig.components.logger import loghandler
......
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