Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
d9471e2e
Commit
d9471e2e
authored
Oct 26, 2011
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use relative imports inside each virtual package
parent
0ad980c8
Changes
100
Show whitespace changes
Inline
Side-by-side
Showing
100 changed files
with
161 additions
and
171 deletions
+161
-171
neo/admin/app.py
neo/admin/app.py
+1
-1
neo/client/Storage.py
neo/client/Storage.py
+2
-3
neo/client/app.py
neo/client/app.py
+8
-8
neo/client/config.py
neo/client/config.py
+1
-1
neo/client/handlers/master.py
neo/client/handlers/master.py
+2
-3
neo/client/handlers/storage.py
neo/client/handlers/storage.py
+3
-3
neo/client/iterator.py
neo/client/iterator.py
+1
-2
neo/client/pool.py
neo/client/pool.py
+1
-1
neo/lib/attributeTracker.py
neo/lib/attributeTracker.py
+1
-1
neo/lib/bootstrap.py
neo/lib/bootstrap.py
+4
-4
neo/lib/config.py
neo/lib/config.py
+2
-2
neo/lib/connection.py
neo/lib/connection.py
+7
-10
neo/lib/dispatcher.py
neo/lib/dispatcher.py
+2
-2
neo/lib/event.py
neo/lib/event.py
+2
-2
neo/lib/handler.py
neo/lib/handler.py
+3
-3
neo/lib/logger.py
neo/lib/logger.py
+4
-4
neo/lib/node.py
neo/lib/node.py
+3
-3
neo/lib/protocol.py
neo/lib/protocol.py
+1
-1
neo/lib/pt.py
neo/lib/pt.py
+4
-4
neo/master/app.py
neo/master/app.py
+8
-9
neo/master/handlers/administration.py
neo/master/handlers/administration.py
+1
-1
neo/master/handlers/client.py
neo/master/handlers/client.py
+2
-3
neo/master/handlers/election.py
neo/master/handlers/election.py
+1
-1
neo/master/handlers/identification.py
neo/master/handlers/identification.py
+1
-1
neo/master/handlers/secondary.py
neo/master/handlers/secondary.py
+1
-1
neo/master/handlers/shutdown.py
neo/master/handlers/shutdown.py
+1
-1
neo/master/handlers/storage.py
neo/master/handlers/storage.py
+2
-4
neo/master/recovery.py
neo/master/recovery.py
+1
-1
neo/master/verification.py
neo/master/verification.py
+1
-1
neo/neoctl/app.py
neo/neoctl/app.py
+1
-1
neo/neoctl/neoctl.py
neo/neoctl/neoctl.py
+1
-1
neo/storage/app.py
neo/storage/app.py
+6
-6
neo/storage/database/__init__.py
neo/storage/database/__init__.py
+3
-3
neo/storage/database/btree.py
neo/storage/database/btree.py
+2
-2
neo/storage/database/mysqldb.py
neo/storage/database/mysqldb.py
+2
-2
neo/storage/handlers/client.py
neo/storage/handlers/client.py
+3
-3
neo/storage/handlers/hidden.py
neo/storage/handlers/hidden.py
+1
-1
neo/storage/handlers/identification.py
neo/storage/handlers/identification.py
+2
-2
neo/storage/handlers/initialization.py
neo/storage/handlers/initialization.py
+1
-1
neo/storage/handlers/master.py
neo/storage/handlers/master.py
+1
-1
neo/storage/handlers/storage.py
neo/storage/handlers/storage.py
+1
-1
neo/storage/handlers/verification.py
neo/storage/handlers/verification.py
+1
-1
neo/storage/replicator.py
neo/storage/replicator.py
+1
-1
neo/tests/client/testClientApp.py
neo/tests/client/testClientApp.py
+2
-2
neo/tests/client/testConnectionPool.py
neo/tests/client/testConnectionPool.py
+1
-1
neo/tests/client/testMasterHandler.py
neo/tests/client/testMasterHandler.py
+1
-1
neo/tests/client/testStorageHandler.py
neo/tests/client/testStorageHandler.py
+1
-1
neo/tests/functional/__init__.py
neo/tests/functional/__init__.py
+2
-2
neo/tests/functional/testClient.py
neo/tests/functional/testClient.py
+2
-2
neo/tests/functional/testCluster.py
neo/tests/functional/testCluster.py
+1
-1
neo/tests/functional/testMaster.py
neo/tests/functional/testMaster.py
+1
-1
neo/tests/functional/testStorage.py
neo/tests/functional/testStorage.py
+1
-1
neo/tests/master/testClientHandler.py
neo/tests/master/testClientHandler.py
+1
-1
neo/tests/master/testElectionHandler.py
neo/tests/master/testElectionHandler.py
+1
-1
neo/tests/master/testMasterApp.py
neo/tests/master/testMasterApp.py
+1
-1
neo/tests/master/testMasterPT.py
neo/tests/master/testMasterPT.py
+1
-1
neo/tests/master/testRecovery.py
neo/tests/master/testRecovery.py
+1
-1
neo/tests/master/testStorageHandler.py
neo/tests/master/testStorageHandler.py
+1
-1
neo/tests/master/testTransactions.py
neo/tests/master/testTransactions.py
+1
-1
neo/tests/master/testVerification.py
neo/tests/master/testVerification.py
+1
-1
neo/tests/storage/testClientHandler.py
neo/tests/storage/testClientHandler.py
+1
-1
neo/tests/storage/testIdentificationHandler.py
neo/tests/storage/testIdentificationHandler.py
+1
-1
neo/tests/storage/testInitializationHandler.py
neo/tests/storage/testInitializationHandler.py
+1
-1
neo/tests/storage/testMasterHandler.py
neo/tests/storage/testMasterHandler.py
+1
-1
neo/tests/storage/testReplication.py
neo/tests/storage/testReplication.py
+1
-1
neo/tests/storage/testReplicationHandler.py
neo/tests/storage/testReplicationHandler.py
+1
-1
neo/tests/storage/testReplicator.py
neo/tests/storage/testReplicator.py
+1
-1
neo/tests/storage/testStorageApp.py
neo/tests/storage/testStorageApp.py
+1
-1
neo/tests/storage/testStorageBTree.py
neo/tests/storage/testStorageBTree.py
+1
-1
neo/tests/storage/testStorageDBTests.py
neo/tests/storage/testStorageDBTests.py
+1
-1
neo/tests/storage/testStorageHandler.py
neo/tests/storage/testStorageHandler.py
+1
-1
neo/tests/storage/testStorageMySQLdb.py
neo/tests/storage/testStorageMySQLdb.py
+1
-1
neo/tests/storage/testTransactions.py
neo/tests/storage/testTransactions.py
+1
-1
neo/tests/storage/testVerificationHandler.py
neo/tests/storage/testVerificationHandler.py
+1
-1
neo/tests/testBootstrap.py
neo/tests/testBootstrap.py
+1
-1
neo/tests/testConnection.py
neo/tests/testConnection.py
+2
-2
neo/tests/testDispatcher.py
neo/tests/testDispatcher.py
+1
-1
neo/tests/testEvent.py
neo/tests/testEvent.py
+1
-1
neo/tests/testHandler.py
neo/tests/testHandler.py
+1
-1
neo/tests/testNodes.py
neo/tests/testNodes.py
+1
-1
neo/tests/testPT.py
neo/tests/testPT.py
+1
-1
neo/tests/testProtocol.py
neo/tests/testProtocol.py
+1
-1
neo/tests/testUtil.py
neo/tests/testUtil.py
+1
-1
neo/tests/threaded/__init__.py
neo/tests/threaded/__init__.py
+1
-1
neo/tests/threaded/test.py
neo/tests/threaded/test.py
+1
-1
neo/tests/zodb/__init__.py
neo/tests/zodb/__init__.py
+3
-3
neo/tests/zodb/testBasic.py
neo/tests/zodb/testBasic.py
+1
-1
neo/tests/zodb/testConflict.py
neo/tests/zodb/testConflict.py
+1
-1
neo/tests/zodb/testHistory.py
neo/tests/zodb/testHistory.py
+1
-1
neo/tests/zodb/testIterator.py
neo/tests/zodb/testIterator.py
+1
-1
neo/tests/zodb/testMT.py
neo/tests/zodb/testMT.py
+1
-1
neo/tests/zodb/testPack.py
neo/tests/zodb/testPack.py
+1
-1
neo/tests/zodb/testPersistent.py
neo/tests/zodb/testPersistent.py
+1
-1
neo/tests/zodb/testReadOnly.py
neo/tests/zodb/testReadOnly.py
+1
-1
neo/tests/zodb/testRecovery.py
neo/tests/zodb/testRecovery.py
+2
-2
neo/tests/zodb/testRevision.py
neo/tests/zodb/testRevision.py
+1
-1
neo/tests/zodb/testSynchronization.py
neo/tests/zodb/testSynchronization.py
+1
-1
neo/tests/zodb/testUndo.py
neo/tests/zodb/testUndo.py
+1
-1
neo/tests/zodb/testVersion.py
neo/tests/zodb/testVersion.py
+1
-1
neo/tests/zodb/testZODB.py
neo/tests/zodb/testZODB.py
+1
-1
No files found.
neo/admin/app.py
View file @
d9471e2e
...
...
@@ -21,7 +21,7 @@ from neo.lib.node import NodeManager
from
neo.lib.event
import
EventManager
from
neo.lib.connection
import
ListeningConnection
from
neo.lib.exception
import
PrimaryFailure
from
neo.admin
.handler
import
AdminEventHandler
,
MasterEventHandler
,
\
from
.handler
import
AdminEventHandler
,
MasterEventHandler
,
\
MasterRequestEventHandler
from
neo.lib.connector
import
getConnectorHandler
from
neo.lib.bootstrap
import
BootstrapManager
...
...
neo/client/Storage.py
View file @
d9471e2e
...
...
@@ -24,9 +24,8 @@ from functools import wraps
from
neo.lib
import
setupLog
from
neo.lib.util
import
add64
from
neo.lib.protocol
import
ZERO_TID
from
neo.client.app
import
Application
from
neo.client.exception
import
NEOStorageNotFoundError
from
neo.client.exception
import
NEOStorageDoesNotExistError
from
.app
import
Application
from
.exception
import
NEOStorageNotFoundError
,
NEOStorageDoesNotExistError
def
check_read_only
(
func
):
def
wrapped
(
self
,
*
args
,
**
kw
):
...
...
neo/client/app.py
View file @
d9471e2e
...
...
@@ -36,19 +36,19 @@ from neo.lib.locking import Lock
from
neo.lib.connection
import
MTClientConnection
,
OnTimeout
,
ConnectionClosed
from
neo.lib.node
import
NodeManager
from
neo.lib.connector
import
getConnectorHandler
from
neo.client
.exception
import
NEOStorageError
,
NEOStorageCreationUndoneError
from
neo.client
.exception
import
NEOStorageNotFoundError
from
.exception
import
NEOStorageError
,
NEOStorageCreationUndoneError
from
.exception
import
NEOStorageNotFoundError
from
neo.lib.exception
import
NeoException
from
neo.client
.handlers
import
storage
,
master
from
.handlers
import
storage
,
master
from
neo.lib.dispatcher
import
Dispatcher
,
ForgottenPacket
from
neo.client
.poll
import
ThreadedPoll
,
psThreadedPoll
from
neo.client
.iterator
import
Iterator
from
neo.client
.cache
import
ClientCache
from
neo.client
.pool
import
ConnectionPool
from
.poll
import
ThreadedPoll
,
psThreadedPoll
from
.iterator
import
Iterator
from
.cache
import
ClientCache
from
.pool
import
ConnectionPool
from
neo.lib.util
import
u64
,
parseMasterList
from
neo.lib.profiling
import
profiler_decorator
,
PROFILING_ENABLED
from
neo.lib.debug
import
register
as
registerLiveDebugger
from
neo.client
.container
import
ThreadContainer
,
TransactionContainer
from
.container
import
ThreadContainer
,
TransactionContainer
if
PROFILING_ENABLED
:
# Those functions require a "real" python function wrapper before they can
...
...
neo/client/config.py
View file @
d9471e2e
...
...
@@ -20,7 +20,7 @@ from ZODB.config import BaseConfig
class
NeoStorage
(
BaseConfig
):
def
open
(
self
):
from
neo.client
.Storage
import
Storage
from
.Storage
import
Storage
config
=
self
.
config
return
Storage
(
**
dict
((
k
,
getattr
(
config
,
k
))
for
k
in
config
.
getSectionAttributes
()))
neo/client/handlers/master.py
View file @
d9471e2e
...
...
@@ -16,12 +16,11 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import
neo.lib
from
neo.client.handlers
import
BaseHandler
,
AnswerBaseHandler
from
neo.lib.pt
import
MTPartitionTable
as
PartitionTable
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
,
ProtocolError
from
neo.lib.util
import
dump
from
neo.client.exception
import
NEOStorageError
from
.
import
BaseHandler
,
AnswerBaseHandler
from
..exception
import
NEOStorageError
class
PrimaryBootstrapHandler
(
AnswerBaseHandler
):
""" Bootstrap handler used when looking for the primary master """
...
...
neo/client/handlers/storage.py
View file @
d9471e2e
...
...
@@ -19,12 +19,12 @@ from ZODB.TimeStamp import TimeStamp
from
ZODB.POSException
import
ConflictError
import
neo.lib
from
neo.client.handlers
import
BaseHandler
,
AnswerBaseHandler
from
neo.lib.protocol
import
NodeTypes
,
ProtocolError
,
LockState
,
ZERO_TID
from
neo.lib.util
import
dump
from
neo.client.exception
import
NEOStorageError
,
NEOStorageNotFoundError
from
neo.client.exception
import
NEOStorageDoesNotExistError
from
neo.lib.exception
import
NodeNotReady
from
.
import
BaseHandler
,
AnswerBaseHandler
from
..exception
import
NEOStorageError
,
NEOStorageNotFoundError
from
..exception
import
NEOStorageDoesNotExistError
class
StorageEventHandler
(
BaseHandler
):
...
...
neo/client/iterator.py
View file @
d9471e2e
...
...
@@ -19,8 +19,7 @@ from ZODB import BaseStorage
from
zope.interface
import
implements
import
ZODB.interfaces
from
neo.lib.util
import
u64
,
add64
from
neo.client.exception
import
NEOStorageCreationUndoneError
from
neo.client.exception
import
NEOStorageNotFoundError
from
.exception
import
NEOStorageCreationUndoneError
,
NEOStorageNotFoundError
CHUNK_LENGTH
=
100
...
...
neo/client/pool.py
View file @
d9471e2e
...
...
@@ -22,9 +22,9 @@ import neo.lib
from
neo.lib.locking
import
RLock
from
neo.lib.protocol
import
NodeTypes
,
Packets
from
neo.lib.connection
import
MTClientConnection
,
ConnectionClosed
from
neo.client.exception
import
NEOStorageError
from
neo.lib.profiling
import
profiler_decorator
from
neo.lib.exception
import
NodeNotReady
from
.exception
import
NEOStorageError
# How long before we might retry a connection to a node to which connection
# failed in the past.
...
...
neo/lib/attributeTracker.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
ATTRIBUTE_TRACKER_ENABLED
=
False
from
neo.lib
.locking
import
LockUser
from
.locking
import
LockUser
"""
Usage example:
...
...
neo/lib/bootstrap.py
View file @
d9471e2e
...
...
@@ -18,10 +18,10 @@
import
neo
from
time
import
sleep
from
neo.lib
.handler
import
EventHandler
from
neo.lib
.protocol
import
Packets
from
neo.lib
.util
import
dump
from
neo.lib
.connection
import
ClientConnection
from
.handler
import
EventHandler
from
.protocol
import
Packets
from
.util
import
dump
from
.connection
import
ClientConnection
NO_SERVER
=
(
'0.0.0.0'
,
0
)
...
...
neo/lib/config.py
View file @
d9471e2e
...
...
@@ -16,8 +16,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
from
ConfigParser
import
SafeConfigParser
from
neo.lib
import
util
from
neo.lib
.util
import
parseNodeAddress
from
.
import
util
from
.util
import
parseNodeAddress
class
ConfigurationManager
(
object
):
"""
...
...
neo/lib/connection.py
View file @
d9471e2e
...
...
@@ -19,18 +19,15 @@ from functools import wraps
from
time
import
time
import
neo.lib
from
neo.lib.locking
import
RLock
from
neo.lib.protocol
import
PacketMalformedError
,
Packets
,
ParserState
from
neo.lib.connector
import
ConnectorException
,
ConnectorTryAgainException
,
\
from
.
import
attributeTracker
from
.connector
import
ConnectorException
,
ConnectorTryAgainException
,
\
ConnectorInProgressException
,
ConnectorConnectionRefusedException
,
\
ConnectorConnectionClosedException
from
neo.lib.util
import
dump
from
neo.lib.logger
import
PACKET_LOGGER
from
neo.lib
import
attributeTracker
from
neo.lib.util
import
ReadBuffer
from
neo.lib.profiling
import
profiler_decorator
from
.locking
import
RLock
from
.logger
import
PACKET_LOGGER
from
.profiling
import
profiler_decorator
from
.protocol
import
PacketMalformedError
,
Packets
,
ParserState
from
.util
import
dump
,
ReadBuffer
CRITICAL_TIMEOUT
=
30
...
...
neo/lib/dispatcher.py
View file @
d9471e2e
...
...
@@ -16,8 +16,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
from
functools
import
wraps
from
neo.lib
.locking
import
Lock
,
Empty
from
neo.lib
.profiling
import
profiler_decorator
from
.locking
import
Lock
,
Empty
from
.profiling
import
profiler_decorator
EMPTY
=
{}
NOBODY
=
[]
...
...
neo/lib/event.py
View file @
d9471e2e
...
...
@@ -17,8 +17,8 @@
from
time
import
time
import
neo.lib
from
neo.lib
.epoll
import
Epoll
from
neo.lib
.profiling
import
profiler_decorator
from
.epoll
import
Epoll
from
.profiling
import
profiler_decorator
class
EpollEventManager
(
object
):
"""This class manages connections and events based on epoll(5)."""
...
...
neo/lib/handler.py
View file @
d9471e2e
...
...
@@ -16,9 +16,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import
neo.lib
from
neo.lib.protocol
import
NodeStates
,
ErrorCodes
,
Packets
,
Errors
from
neo.lib.protocol
import
PacketMalformedError
,
UnexpectedPacketError
,
\
BrokenNodeDisallowedError
,
NotReadyError
,
ProtocolError
from
.protocol
import
(
NodeStates
,
Packets
,
ErrorCodes
,
Errors
,
BrokenNodeDisallowedError
,
NotReadyError
,
PacketMalformedError
,
ProtocolError
,
UnexpectedPacketError
)
class
EventHandler
(
object
):
...
...
neo/lib/logger.py
View file @
d9471e2e
...
...
@@ -17,10 +17,10 @@
from
base64
import
b64encode
import
neo
from
neo.lib
.protocol
import
PacketMalformedError
from
neo.lib
.util
import
dump
from
neo.lib
.handler
import
EventHandler
from
neo.lib
.profiling
import
profiler_decorator
from
.protocol
import
PacketMalformedError
from
.util
import
dump
from
.handler
import
EventHandler
from
.profiling
import
profiler_decorator
LOGGER_ENABLED
=
False
...
...
neo/lib/node.py
View file @
d9471e2e
...
...
@@ -18,10 +18,10 @@
from
time
import
time
import
neo.lib
from
neo.lib
.util
import
dump
from
neo.lib
.protocol
import
NodeTypes
,
NodeStates
from
.util
import
dump
from
.protocol
import
NodeTypes
,
NodeStates
from
neo.lib
import
attributeTracker
from
.
import
attributeTracker
class
Node
(
object
):
"""This class represents a node."""
...
...
neo/lib/protocol.py
View file @
d9471e2e
...
...
@@ -22,7 +22,7 @@ from socket import inet_ntoa, inet_aton
from
cStringIO
import
StringIO
from
struct
import
Struct
from
neo.lib
.util
import
Enum
,
getAddressType
from
.util
import
Enum
,
getAddressType
# The protocol version (major, minor).
PROTOCOL_VERSION
=
(
4
,
1
)
...
...
neo/lib/pt.py
View file @
d9471e2e
...
...
@@ -18,10 +18,10 @@
from
functools
import
wraps
import
neo
from
neo.lib
import
protocol
from
neo.lib
.protocol
import
CellStates
from
neo.lib
.util
import
dump
,
u64
from
neo.lib
.locking
import
RLock
from
.
import
protocol
from
.protocol
import
CellStates
from
.util
import
dump
,
u64
from
.locking
import
RLock
class
PartitionTableException
(
Exception
):
"""
...
...
neo/master/app.py
View file @
d9471e2e
...
...
@@ -20,23 +20,22 @@ import os, sys
from
time
import
time
from
neo.lib
import
protocol
from
neo.lib.connector
import
getConnectorHandler
from
neo.lib.debug
import
register
as
registerLiveDebugger
from
neo.lib.protocol
import
UUID_NAMESPACES
,
ZERO_TID
from
neo.lib.protocol
import
ClusterStates
,
NodeStates
,
NodeTypes
,
Packets
from
neo.lib.node
import
NodeManager
from
neo.lib.event
import
EventManager
from
neo.lib.connection
import
ListeningConnection
,
ClientConnection
from
neo.lib.exception
import
ElectionFailure
,
PrimaryFailure
,
OperationFailure
from
neo.master.handlers
import
election
,
identification
,
secondary
from
neo.master.handlers
import
storage
,
client
,
shutdown
from
neo.master.handlers
import
administration
from
neo.master.pt
import
PartitionTable
from
neo.master.transactions
import
TransactionManager
from
neo.master.verification
import
VerificationManager
from
neo.master.recovery
import
RecoveryManager
from
neo.lib.util
import
dump
from
neo.lib.connector
import
getConnectorHandler
from
.handlers
import
election
,
identification
,
secondary
from
.handlers
import
administration
,
client
,
storage
,
shutdown
from
.pt
import
PartitionTable
from
.recovery
import
RecoveryManager
from
.transactions
import
TransactionManager
from
.verification
import
VerificationManager
from
neo.lib.debug
import
register
as
registerLiveDebugger
class
Application
(
object
):
"""The master node application."""
...
...
neo/master/handlers/administration.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
neo
from
neo.master.handlers
import
MasterHandler
from
.
import
MasterHandler
from
neo.lib.protocol
import
ClusterStates
,
NodeStates
,
Packets
,
ProtocolError
from
neo.lib.protocol
import
Errors
from
neo.lib.util
import
dump
...
...
neo/master/handlers/client.py
View file @
d9471e2e
...
...
@@ -16,11 +16,10 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import
neo.lib
from
neo.lib.protocol
import
NodeStates
,
Packets
,
ProtocolError
from
neo.master.handlers
import
MasterHandler
from
neo.lib.util
import
dump
from
neo.master.transactions
import
DelayedError
from
.
import
MasterHandler
from
..transactions
import
DelayedError
class
ClientServiceHandler
(
MasterHandler
):
""" Handler dedicated to client during service state """
...
...
neo/master/handlers/election.py
View file @
d9471e2e
...
...
@@ -21,9 +21,9 @@ from neo.lib.protocol import NodeTypes, NodeStates, Packets
from
neo.lib.protocol
import
NotReadyError
,
ProtocolError
,
\
UnexpectedPacketError
from
neo.lib.protocol
import
BrokenNodeDisallowedError
from
neo.master.handlers
import
MasterHandler
from
neo.lib.exception
import
ElectionFailure
from
neo.lib.util
import
dump
from
.
import
MasterHandler
class
ClientElectionHandler
(
MasterHandler
):
...
...
neo/master/handlers/identification.py
View file @
d9471e2e
...
...
@@ -19,7 +19,7 @@ import neo
from
neo.lib.protocol
import
NodeTypes
,
Packets
from
neo.lib.protocol
import
BrokenNodeDisallowedError
,
ProtocolError
from
neo.master.handlers
import
MasterHandler
from
.
import
MasterHandler
class
IdentificationHandler
(
MasterHandler
):
...
...
neo/master/handlers/secondary.py
View file @
d9471e2e
...
...
@@ -15,7 +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.
from
neo.master.handlers
import
MasterHandler
from
.
import
MasterHandler
from
neo.lib.exception
import
ElectionFailure
,
PrimaryFailure
from
neo.lib.protocol
import
NodeTypes
,
Packets
...
...
neo/master/handlers/shutdown.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
neo.lib
from
neo.lib
import
protocol
from
neo.master.handlers
import
BaseServiceHandler
from
.
import
BaseServiceHandler
class
ShutdownHandler
(
BaseServiceHandler
):
"""This class deals with events for a shutting down phase."""
...
...
neo/master/handlers/storage.py
View file @
d9471e2e
...
...
@@ -16,14 +16,12 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import
neo.lib
from
neo.lib.protocol
import
ProtocolError
from
neo.lib.protocol
import
Packets
from
neo.master.handlers
import
BaseServiceHandler
from
neo.lib.protocol
import
Packets
,
ProtocolError
from
neo.lib.exception
import
OperationFailure
from
neo.lib.util
import
dump
from
neo.lib.connector
import
ConnectorConnectionClosedException
from
neo.lib.pt
import
PartitionTableException
from
.
import
BaseServiceHandler
class
StorageServiceHandler
(
BaseServiceHandler
):
...
...
neo/master/recovery.py
View file @
d9471e2e
...
...
@@ -21,7 +21,7 @@ import neo
from
neo.lib.util
import
dump
from
neo.lib.protocol
import
Packets
,
ProtocolError
,
ClusterStates
,
NodeStates
from
neo.lib.protocol
import
NotReadyError
,
ZERO_OID
,
ZERO_TID
from
neo.master
.handlers
import
MasterHandler
from
.handlers
import
MasterHandler
class
RecoveryManager
(
MasterHandler
):
...
...
neo/master/verification.py
View file @
d9471e2e
...
...
@@ -18,7 +18,7 @@
import
neo
from
neo.lib.util
import
dump
from
neo.lib.protocol
import
ClusterStates
,
Packets
,
NodeStates
from
neo.master
.handlers
import
BaseServiceHandler
from
.handlers
import
BaseServiceHandler
class
VerificationFailure
(
Exception
):
...
...
neo/neoctl/app.py
View file @
d9471e2e
...
...
@@ -15,7 +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.
from
neo.neoctl
.neoctl
import
NeoCTL
,
NotReadyException
from
.neoctl
import
NeoCTL
,
NotReadyException
from
neo.lib.util
import
bin
,
dump
from
neo.lib.protocol
import
ClusterStates
,
NodeStates
,
NodeTypes
...
...
neo/neoctl/neoctl.py
View file @
d9471e2e
...
...
@@ -18,9 +18,9 @@
from
neo.lib.connector
import
getConnectorHandler
from
neo.lib.connection
import
ClientConnection
from
neo.lib.event
import
EventManager
from
neo.neoctl.handler
import
CommandEventHandler
from
neo.lib.protocol
import
ClusterStates
,
NodeStates
,
ErrorCodes
,
Packets
from
neo.lib.util
import
getConnectorFromAddress
from
.handler
import
CommandEventHandler
class
NotReadyException
(
Exception
):
pass
...
...
neo/storage/app.py
View file @
d9471e2e
...
...
@@ -24,16 +24,16 @@ from neo.lib.node import NodeManager
from
neo.lib.event
import
EventManager
from
neo.lib.connection
import
ListeningConnection
from
neo.lib.exception
import
OperationFailure
,
PrimaryFailure
from
neo.storage.handlers
import
identification
,
verification
,
initialization
from
neo.storage.handlers
import
master
,
hidden
from
neo.storage.replicator
import
Replicator
from
neo.storage.database
import
buildDatabaseManager
from
neo.storage.transactions
import
TransactionManager
from
neo.storage.exception
import
AlreadyPendingError
from
neo.lib.connector
import
getConnectorHandler
from
neo.lib.pt
import
PartitionTable
from
neo.lib.util
import
dump
from
neo.lib.bootstrap
import
BootstrapManager
from
.database
import
buildDatabaseManager
from
.exception
import
AlreadyPendingError
from
.handlers
import
identification
,
verification
,
initialization
from
.handlers
import
master
,
hidden
from
.replicator
import
Replicator
from
.transactions
import
TransactionManager
from
neo.lib.debug
import
register
as
registerLiveDebugger
...
...
neo/storage/database/__init__.py
View file @
d9471e2e
...
...
@@ -16,19 +16,19 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
from
neo.lib.exception
import
DatabaseFailure
from
neo.storage.database
.manager
import
DatabaseManager
from
.manager
import
DatabaseManager
DATABASE_MANAGER_DICT
=
{}
try
:
from
neo.storage.database
.mysqldb
import
MySQLDatabaseManager
from
.mysqldb
import
MySQLDatabaseManager
except
ImportError
:
pass
else
:
DATABASE_MANAGER_DICT
[
'MySQL'
]
=
MySQLDatabaseManager
try
:
from
neo.storage.database
.btree
import
BTreeDatabaseManager
from
.btree
import
BTreeDatabaseManager
except
ImportError
:
pass
else
:
...
...
neo/storage/database/btree.py
View file @
d9471e2e
...
...
@@ -24,8 +24,8 @@ from BTrees.OOBTree import OOBTree as _OOBTree
import
neo.lib
from
hashlib
import
sha1
from
neo.storage.database
import
DatabaseManager
from
neo.storage.database
.manager
import
CreationUndone
from
.
import
DatabaseManager
from
.manager
import
CreationUndone
from
neo.lib.protocol
import
CellStates
,
ZERO_HASH
,
ZERO_OID
,
ZERO_TID
from
neo.lib
import
util
...
...
neo/storage/database/mysqldb.py
View file @
d9471e2e
...
...
@@ -26,8 +26,8 @@ from hashlib import sha1
import
re
import
string
from
neo.storage.database
import
DatabaseManager
from
neo.storage.database
.manager
import
CreationUndone
from
.
import
DatabaseManager
from
.manager
import
CreationUndone
from
neo.lib.exception
import
DatabaseFailure
from
neo.lib.protocol
import
CellStates
,
ZERO_OID
,
ZERO_TID
,
ZERO_HASH
from
neo.lib
import
util
...
...
neo/storage/handlers/client.py
View file @
d9471e2e
...
...
@@ -19,9 +19,9 @@ import neo.lib
from
neo.lib
import
protocol
from
neo.lib.util
import
dump
,
makeChecksum
from
neo.lib.protocol
import
Packets
,
LockState
,
Errors
,
ZERO_HASH
from
neo.storage.handlers
import
BaseClientAndStorageOperationHandler
from
neo.storage
.transactions
import
ConflictError
,
DelayedError
from
neo.storage
.exception
import
AlreadyPendingError
from
.
import
BaseClientAndStorageOperationHandler
from
.
.transactions
import
ConflictError
,
DelayedError
from
.
.exception
import
AlreadyPendingError
import
time
# Log stores taking (incl. lock delays) more than this many seconds.
...
...
neo/storage/handlers/hidden.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
neo.lib
from
neo.storage.handlers
import
BaseMasterHandler
from
.
import
BaseMasterHandler
from
neo.lib.protocol
import
CellStates
class
HiddenHandler
(
BaseMasterHandler
):
...
...
neo/storage/handlers/identification.py
View file @
d9471e2e
...
...
@@ -41,7 +41,7 @@ class IdentificationHandler(EventHandler):
raise
BrokenNodeDisallowedError
# choose the handler according to the node type
if
node_type
==
NodeTypes
.
CLIENT
:
from
neo.storage.handlers
.client
import
ClientOperationHandler
from
.client
import
ClientOperationHandler
handler
=
ClientOperationHandler
if
node
is
None
:
node
=
app
.
nm
.
createClient
()
...
...
@@ -51,7 +51,7 @@ class IdentificationHandler(EventHandler):
assert
not
node
.
isConnected
()
node
.
setRunning
()
elif
node_type
==
NodeTypes
.
STORAGE
:
from
neo.storage.handlers
.storage
import
StorageOperationHandler
from
.storage
import
StorageOperationHandler
handler
=
StorageOperationHandler
if
node
is
None
:
neo
.
lib
.
logging
.
error
(
'reject an unknown storage node %s'
,
...
...
neo/storage/handlers/initialization.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
neo.lib
from
neo.storage.handlers
import
BaseMasterHandler
from
.
import
BaseMasterHandler
from
neo.lib
import
protocol
class
InitializationHandler
(
BaseMasterHandler
):
...
...
neo/storage/handlers/master.py
View file @
d9471e2e
...
...
@@ -18,7 +18,7 @@
import
neo.lib
from
neo.lib.util
import
dump
from
neo.lib.protocol
import
CellStates
,
Packets
,
ProtocolError
from
neo.storage.handlers
import
BaseMasterHandler
from
.
import
BaseMasterHandler
class
MasterOperationHandler
(
BaseMasterHandler
):
...
...
neo/storage/handlers/storage.py
View file @
d9471e2e
...
...
@@ -15,7 +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.
from
neo.storage.handlers
import
BaseClientAndStorageOperationHandler
from
.
import
BaseClientAndStorageOperationHandler
from
neo.lib.protocol
import
Packets
class
StorageOperationHandler
(
BaseClientAndStorageOperationHandler
):
...
...
neo/storage/handlers/verification.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
neo
from
neo.storage.handlers
import
BaseMasterHandler
from
.
import
BaseMasterHandler
from
neo.lib.protocol
import
Packets
,
Errors
,
ProtocolError
,
INVALID_TID
from
neo.lib.util
import
dump
from
neo.lib.exception
import
OperationFailure
...
...
neo/storage/replicator.py
View file @
d9471e2e
...
...
@@ -18,7 +18,7 @@
import
neo.lib
from
random
import
choice
from
neo.storage
.handlers
import
replication
from
.handlers
import
replication
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
,
Packets
from
neo.lib.connection
import
ClientConnection
from
neo.lib.util
import
dump
...
...
neo/tests/client/testClientApp.py
View file @
d9471e2e
...
...
@@ -19,7 +19,7 @@ import unittest
from
cPickle
import
dumps
from
mock
import
Mock
,
ReturnValues
from
ZODB.POSException
import
StorageTransactionError
,
UndoError
,
ConflictError
from
neo.tests
import
NeoUnitTestBase
,
buildUrlFromString
,
ADDRESS_TYPE
from
..
import
NeoUnitTestBase
,
buildUrlFromString
,
ADDRESS_TYPE
from
neo.client.app
import
Application
from
neo.client.exception
import
NEOStorageError
,
NEOStorageNotFoundError
from
neo.client.exception
import
NEOStorageDoesNotExistError
...
...
@@ -784,7 +784,7 @@ class ClientApplicationTests(NeoUnitTestBase):
# the third will not be ready
# after the third, the partition table will be operational
# (as if it was connected to the primary master node)
from
neo.tests
import
DoNothingConnector
from
..
import
DoNothingConnector
# will raise IndexError at the third iteration
app
=
self
.
getApp
(
'127.0.0.1:10010 127.0.0.1:10011'
)
# TODO: test more connection failure cases
...
...
neo/tests/client/testConnectionPool.py
View file @
d9471e2e
...
...
@@ -18,7 +18,7 @@
import
unittest
from
mock
import
Mock
,
ReturnValues
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.client.app
import
ConnectionPool
from
neo.client.exception
import
NEOStorageError
...
...
neo/tests/client/testMasterHandler.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
unittest
from
mock
import
Mock
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.pt
import
PartitionTable
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
from
neo.client.handlers.master
import
PrimaryBootstrapHandler
...
...
neo/tests/client/testStorageHandler.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
unittest
from
mock
import
Mock
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
NodeTypes
,
LockState
from
neo.client.handlers.storage
import
StorageBootstrapHandler
,
\
StorageAnswersHandler
...
...
neo/tests/functional/__init__.py
View file @
d9471e2e
...
...
@@ -36,9 +36,9 @@ from neo.neoctl.neoctl import NeoCTL, NotReadyException
from
neo.lib
import
setupLog
from
neo.lib.protocol
import
ClusterStates
,
NodeTypes
,
CellStates
,
NodeStates
from
neo.lib.util
import
dump
from
neo.tests
import
DB_USER
,
setupMySQLdb
,
NeoTestBase
,
buildUrlFromString
,
\
from
..
import
DB_USER
,
setupMySQLdb
,
NeoTestBase
,
buildUrlFromString
,
\
ADDRESS_TYPE
,
IP_VERSION_FORMAT_DICT
,
getTempDirectory
from
neo.tests
.cluster
import
SocketLock
from
.
.cluster
import
SocketLock
from
neo.client.Storage
import
Storage
NEO_MASTER
=
'neomaster'
...
...
neo/tests/functional/testClient.py
View file @
d9471e2e
...
...
@@ -28,8 +28,8 @@ from ZODB.POSException import ConflictError
from
ZODB.tests.StorageTestBase
import
zodb_pickle
from
persistent
import
Persistent
from
neo.lib.util
import
SOCKET_CONNECTORS_DICT
from
neo.tests.functional
import
NEOCluster
,
NEOFunctionalTest
from
neo.tests
import
IP_VERSION_FORMAT_DICT
from
.
import
NEOCluster
,
NEOFunctionalTest
from
..
import
IP_VERSION_FORMAT_DICT
TREE_SIZE
=
6
...
...
neo/tests/functional/testCluster.py
View file @
d9471e2e
...
...
@@ -19,7 +19,7 @@ import unittest
import
transaction
from
persistent
import
Persistent
from
neo.tests.functional
import
NEOCluster
,
NEOFunctionalTest
from
.
import
NEOCluster
,
NEOFunctionalTest
class
ClusterTests
(
NEOFunctionalTest
):
...
...
neo/tests/functional/testMaster.py
View file @
d9471e2e
...
...
@@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import
unittest
from
neo.tests.functional
import
NEOCluster
,
NEOFunctionalTest
from
.
import
NEOCluster
,
NEOFunctionalTest
from
neo.lib.protocol
import
NodeStates
MASTER_NODE_COUNT
=
3
...
...
neo/tests/functional/testStorage.py
View file @
d9471e2e
...
...
@@ -20,7 +20,7 @@ import unittest
import
transaction
from
persistent
import
Persistent
from
neo.tests.functional
import
NEOCluster
,
NEOFunctionalTest
from
.
import
NEOCluster
,
NEOFunctionalTest
from
neo.lib.protocol
import
ClusterStates
,
NodeStates
from
ZODB.tests.StorageTestBase
import
zodb_pickle
from
MySQLdb
import
ProgrammingError
...
...
neo/tests/master/testClientHandler.py
View file @
d9471e2e
...
...
@@ -18,7 +18,7 @@
import
unittest
from
mock
import
Mock
from
struct
import
pack
,
unpack
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
,
Packets
from
neo.master.handlers.client
import
ClientServiceHandler
from
neo.master.app
import
Application
...
...
neo/tests/master/testElectionHandler.py
View file @
d9471e2e
...
...
@@ -18,7 +18,7 @@
import
unittest
from
mock
import
Mock
from
neo.lib
import
protocol
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
Packet
,
NodeTypes
,
NodeStates
from
neo.master.handlers.election
import
ClientElectionHandler
,
\
ServerElectionHandler
...
...
neo/tests/master/testMasterApp.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
unittest
from
mock
import
Mock
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.master.app
import
Application
from
neo.lib.util
import
p64
,
u64
...
...
neo/tests/master/testMasterPT.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
unittest
from
mock
import
Mock
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
NodeStates
,
CellStates
from
neo.master.pt
import
PartitionTable
from
neo.lib.node
import
StorageNode
...
...
neo/tests/master/testRecovery.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
unittest
from
struct
import
pack
,
unpack
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
,
CellStates
from
neo.master.recovery
import
RecoveryManager
from
neo.master.app
import
Application
...
...
neo/tests/master/testStorageHandler.py
View file @
d9471e2e
...
...
@@ -18,7 +18,7 @@
import
unittest
from
mock
import
Mock
from
struct
import
pack
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
,
Packets
from
neo.master.handlers.storage
import
StorageServiceHandler
from
neo.master.handlers.client
import
ClientServiceHandler
...
...
neo/tests/master/testTransactions.py
View file @
d9471e2e
...
...
@@ -18,7 +18,7 @@
import
unittest
from
mock
import
Mock
from
struct
import
pack
,
unpack
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
ZERO_TID
from
neo.master.transactions
import
Transaction
,
TransactionManager
...
...
neo/tests/master/testVerification.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
unittest
from
struct
import
pack
,
unpack
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
from
neo.master.verification
import
VerificationManager
,
VerificationFailure
from
neo.master.app
import
Application
...
...
neo/tests/storage/testClientHandler.py
View file @
d9471e2e
...
...
@@ -19,7 +19,7 @@ import unittest
from
mock
import
Mock
,
ReturnValues
from
collections
import
deque
from
neo.lib.util
import
makeChecksum
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.storage.app
import
Application
from
neo.storage.transactions
import
ConflictError
,
DelayedError
from
neo.storage.handlers.client
import
ClientOperationHandler
...
...
neo/tests/storage/testIdentificationHandler.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
unittest
from
mock
import
Mock
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
NodeTypes
,
NotReadyError
,
\
BrokenNodeDisallowedError
from
neo.lib.pt
import
PartitionTable
...
...
neo/tests/storage/testInitializationHandler.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
unittest
from
mock
import
Mock
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.pt
import
PartitionTable
from
neo.storage.app
import
Application
from
neo.storage.handlers.initialization
import
InitializationHandler
...
...
neo/tests/storage/testMasterHandler.py
View file @
d9471e2e
...
...
@@ -18,7 +18,7 @@
import
unittest
from
mock
import
Mock
from
collections
import
deque
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.storage.app
import
Application
from
neo.storage.handlers.master
import
MasterOperationHandler
from
neo.lib.exception
import
PrimaryFailure
,
OperationFailure
...
...
neo/tests/storage/testReplication.py
View file @
d9471e2e
...
...
@@ -20,7 +20,7 @@ from mock import Mock
from
struct
import
pack
from
collections
import
deque
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.storage.database
import
buildDatabaseManager
from
neo.storage.handlers.replication
import
ReplicationHandler
from
neo.storage.handlers.replication
import
RANGE_LENGTH
...
...
neo/tests/storage/testReplicationHandler.py
View file @
d9471e2e
...
...
@@ -18,7 +18,7 @@
import
unittest
from
mock
import
Mock
from
neo.lib.util
import
add64
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
Packets
,
ZERO_OID
,
ZERO_TID
from
neo.storage.handlers.replication
import
ReplicationHandler
from
neo.storage.handlers.replication
import
RANGE_LENGTH
,
MIN_RANGE_LENGTH
...
...
neo/tests/storage/testReplicator.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
unittest
from
mock
import
Mock
,
ReturnValues
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.storage.replicator
import
Replicator
,
Partition
,
Task
from
neo.lib.protocol
import
CellStates
,
NodeStates
,
Packets
...
...
neo/tests/storage/testStorageApp.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
unittest
from
mock
import
Mock
,
ReturnValues
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.storage.app
import
Application
from
neo.lib.protocol
import
CellStates
from
collections
import
deque
...
...
neo/tests/storage/testStorageBTree.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
unittest
from
mock
import
Mock
from
neo.tests.storage
.testStorageDBTests
import
StorageDBTests
from
.testStorageDBTests
import
StorageDBTests
from
neo.storage.database.btree
import
BTreeDatabaseManager
class
StorageBTreeTests
(
StorageDBTests
):
...
...
neo/tests/storage/testStorageDBTests.py
View file @
d9471e2e
...
...
@@ -19,7 +19,7 @@ import unittest
from
mock
import
Mock
from
neo.lib.util
import
dump
,
p64
,
u64
from
neo.lib.protocol
import
CellStates
,
ZERO_OID
,
ZERO_TID
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.exception
import
DatabaseFailure
from
neo.storage.database.mysqldb
import
MySQLDatabaseManager
...
...
neo/tests/storage/testStorageHandler.py
View file @
d9471e2e
...
...
@@ -18,7 +18,7 @@
import
unittest
from
mock
import
Mock
from
collections
import
deque
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.storage.app
import
Application
from
neo.storage.handlers.storage
import
StorageOperationHandler
from
neo.lib.protocol
import
INVALID_PARTITION
,
Packets
...
...
neo/tests/storage/testStorageMySQLdb.py
View file @
d9471e2e
...
...
@@ -19,7 +19,7 @@ import unittest
import
MySQLdb
from
mock
import
Mock
from
neo.lib.exception
import
DatabaseFailure
from
neo.tests.storage
.testStorageDBTests
import
StorageDBTests
from
.testStorageDBTests
import
StorageDBTests
from
neo.storage.database.mysqldb
import
MySQLDatabaseManager
NEO_SQL_DATABASE
=
'test_mysqldb0'
...
...
neo/tests/storage/testTransactions.py
View file @
d9471e2e
...
...
@@ -18,7 +18,7 @@
import
unittest
from
mock
import
Mock
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.storage.transactions
import
Transaction
,
TransactionManager
from
neo.storage.transactions
import
ConflictError
,
DelayedError
...
...
neo/tests/storage/testVerificationHandler.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
unittest
from
mock
import
Mock
from
neo.tests
import
NeoUnitTestBase
from
..
import
NeoUnitTestBase
from
neo.lib.pt
import
PartitionTable
from
neo.storage.app
import
Application
from
neo.storage.handlers.verification
import
VerificationHandler
...
...
neo/tests/testBootstrap.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
unittest
from
mock
import
Mock
from
neo.tests
import
NeoUnitTestBase
from
.
import
NeoUnitTestBase
from
neo.storage.app
import
Application
from
neo.lib.bootstrap
import
BootstrapManager
from
neo.lib.protocol
import
NodeTypes
...
...
neo/tests/testConnection.py
View file @
d9471e2e
...
...
@@ -22,12 +22,12 @@ from neo.lib.connection import ListeningConnection, Connection, \
ClientConnection
,
ServerConnection
,
MTClientConnection
,
\
HandlerSwitcher
,
CRITICAL_TIMEOUT
from
neo.lib.connector
import
getConnectorHandler
,
registerConnectorHandler
from
neo.tests
import
DoNothingConnector
from
.
import
DoNothingConnector
from
neo.lib.connector
import
ConnectorException
,
ConnectorTryAgainException
,
\
ConnectorInProgressException
,
ConnectorConnectionRefusedException
from
neo.lib.handler
import
EventHandler
from
neo.lib.protocol
import
Packets
,
ParserState
from
neo.tests
import
NeoUnitTestBase
from
.
import
NeoUnitTestBase
from
neo.lib.util
import
ReadBuffer
from
neo.lib.locking
import
Queue
...
...
neo/tests/testDispatcher.py
View file @
d9471e2e
...
...
@@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
from
mock
import
Mock
from
neo.tests
import
NeoTestBase
from
.
import
NeoTestBase
from
neo.lib.dispatcher
import
Dispatcher
,
ForgottenPacket
from
Queue
import
Queue
import
unittest
...
...
neo/tests/testEvent.py
View file @
d9471e2e
...
...
@@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import
unittest
from
mock
import
Mock
from
neo.tests
import
NeoUnitTestBase
from
.
import
NeoUnitTestBase
from
neo.lib.epoll
import
Epoll
from
neo.lib.event
import
EpollEventManager
...
...
neo/tests/testHandler.py
View file @
d9471e2e
...
...
@@ -17,7 +17,7 @@
import
unittest
from
mock
import
Mock
from
neo.tests
import
NeoUnitTestBase
from
.
import
NeoUnitTestBase
from
neo.lib.handler
import
EventHandler
from
neo.lib.protocol
import
PacketMalformedError
,
UnexpectedPacketError
,
\
BrokenNodeDisallowedError
,
NotReadyError
,
ProtocolError
...
...
neo/tests/testNodes.py
View file @
d9471e2e
...
...
@@ -21,7 +21,7 @@ from neo.lib import protocol
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
from
neo.lib.node
import
Node
,
MasterNode
,
StorageNode
,
\
ClientNode
,
AdminNode
,
NodeManager
from
neo.tests
import
NeoUnitTestBase
from
.
import
NeoUnitTestBase
from
time
import
time
class
NodesTests
(
NeoUnitTestBase
):
...
...
neo/tests/testPT.py
View file @
d9471e2e
...
...
@@ -20,7 +20,7 @@ from mock import Mock
from
neo.lib.protocol
import
NodeStates
,
CellStates
from
neo.lib.pt
import
Cell
,
PartitionTable
,
PartitionTableException
from
neo.lib.node
import
StorageNode
from
neo.tests
import
NeoUnitTestBase
from
.
import
NeoUnitTestBase
class
PartitionTableTests
(
NeoUnitTestBase
):
...
...
neo/tests/testProtocol.py
View file @
d9471e2e
...
...
@@ -19,7 +19,7 @@ import unittest
import
socket
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
,
CellStates
,
ClusterStates
from
neo.lib.protocol
import
ErrorCodes
,
Packets
,
Errors
,
LockState
from
neo.tests
import
NeoUnitTestBase
,
IP_VERSION_FORMAT_DICT
from
.
import
NeoUnitTestBase
,
IP_VERSION_FORMAT_DICT
class
ProtocolTests
(
NeoUnitTestBase
):
...
...
neo/tests/testUtil.py
View file @
d9471e2e
...
...
@@ -18,7 +18,7 @@
import
unittest
import
socket
from
neo.tests
import
NeoUnitTestBase
,
IP_VERSION_FORMAT_DICT
from
.
import
NeoUnitTestBase
,
IP_VERSION_FORMAT_DICT
from
neo.lib.util
import
ReadBuffer
,
getAddressType
,
parseNodeAddress
,
\
getConnectorFromAddress
,
SOCKET_CONNECTORS_DICT
...
...
neo/tests/threaded/__init__.py
View file @
d9471e2e
...
...
@@ -32,7 +32,7 @@ from neo.lib.connector import SocketConnector, \
from
neo.lib.event
import
EventManager
from
neo.lib.protocol
import
CellStates
,
ClusterStates
,
NodeStates
,
NodeTypes
from
neo.lib.util
import
SOCKET_CONNECTORS_DICT
,
parseMasterList
from
neo.tests
import
NeoTestBase
,
getTempDirectory
,
setupMySQLdb
,
\
from
..
import
NeoTestBase
,
getTempDirectory
,
setupMySQLdb
,
\
ADDRESS_TYPE
,
IP_VERSION_FORMAT_DICT
,
DB_PREFIX
,
DB_USER
BIND
=
IP_VERSION_FORMAT_DICT
[
ADDRESS_TYPE
],
0
...
...
neo/tests/threaded/test.py
View file @
d9471e2e
...
...
@@ -24,7 +24,7 @@ from neo.storage.transactions import TransactionManager, \
DelayedError
,
ConflictError
from
neo.lib.connection
import
MTClientConnection
from
neo.lib.protocol
import
NodeStates
,
Packets
,
ZERO_TID
from
neo.tests.threaded
import
NEOCluster
,
NEOThreadedTest
,
\
from
.
import
NEOCluster
,
NEOThreadedTest
,
\
Patch
,
ConnectionFilter
from
neo.lib.util
import
makeChecksum
from
neo.client.pool
import
CELL_CONNECTED
,
CELL_GOOD
...
...
neo/tests/zodb/__init__.py
View file @
d9471e2e
...
...
@@ -17,12 +17,12 @@
import
os
from
neo.tests
import
DB_PREFIX
from
..
import
DB_PREFIX
functional
=
int
(
os
.
getenv
(
'NEO_TEST_ZODB_FUNCTIONAL'
,
0
))
if
functional
:
from
neo.tests
.functional
import
NEOCluster
,
NEOFunctionalTest
as
TestCase
from
.
.functional
import
NEOCluster
,
NEOFunctionalTest
as
TestCase
else
:
from
neo.tests
.threaded
import
NEOCluster
,
NEOThreadedTest
as
TestCase
from
.
.threaded
import
NEOCluster
,
NEOThreadedTest
as
TestCase
class
ZODBTestCase
(
TestCase
):
...
...
neo/tests/zodb/testBasic.py
View file @
d9471e2e
...
...
@@ -19,7 +19,7 @@ import unittest
from
ZODB.tests.BasicStorage
import
BasicStorage
from
ZODB.tests.StorageTestBase
import
StorageTestBase
from
neo.tests.zodb
import
ZODBTestCase
from
.
import
ZODBTestCase
class
BasicTests
(
ZODBTestCase
,
StorageTestBase
,
BasicStorage
):
pass
...
...
neo/tests/zodb/testConflict.py
View file @
d9471e2e
...
...
@@ -19,7 +19,7 @@ import unittest
from
ZODB.tests.ConflictResolution
import
ConflictResolvingStorage
from
ZODB.tests.StorageTestBase
import
StorageTestBase
from
neo.tests.zodb
import
ZODBTestCase
from
.
import
ZODBTestCase
class
ConflictTests
(
ZODBTestCase
,
StorageTestBase
,
ConflictResolvingStorage
):
pass
...
...
neo/tests/zodb/testHistory.py
View file @
d9471e2e
...
...
@@ -19,7 +19,7 @@ import unittest
from
ZODB.tests.HistoryStorage
import
HistoryStorage
from
ZODB.tests.StorageTestBase
import
StorageTestBase
from
neo.tests.zodb
import
ZODBTestCase
from
.
import
ZODBTestCase
class
HistoryTests
(
ZODBTestCase
,
StorageTestBase
,
HistoryStorage
):
pass
...
...
neo/tests/zodb/testIterator.py
View file @
d9471e2e
...
...
@@ -20,7 +20,7 @@ from ZODB.tests.IteratorStorage import IteratorStorage
from
ZODB.tests.IteratorStorage
import
ExtendedIteratorStorage
from
ZODB.tests.StorageTestBase
import
StorageTestBase
from
neo.tests.zodb
import
ZODBTestCase
from
.
import
ZODBTestCase
class
IteratorTests
(
ZODBTestCase
,
StorageTestBase
,
IteratorStorage
,
ExtendedIteratorStorage
):
...
...
neo/tests/zodb/testMT.py
View file @
d9471e2e
...
...
@@ -19,7 +19,7 @@ import unittest
from
ZODB.tests.MTStorage
import
MTStorage
from
ZODB.tests.StorageTestBase
import
StorageTestBase
from
neo.tests.zodb
import
ZODBTestCase
from
.
import
ZODBTestCase
class
MTTests
(
ZODBTestCase
,
StorageTestBase
,
MTStorage
):
pass
...
...
neo/tests/zodb/testPack.py
View file @
d9471e2e
...
...
@@ -25,7 +25,7 @@ except ImportError:
from
ZODB.tests.PackableStorage
import
PackableUndoStorage
from
ZODB.tests.StorageTestBase
import
StorageTestBase
from
neo.tests.zodb
import
ZODBTestCase
from
.
import
ZODBTestCase
class
PackableTests
(
ZODBTestCase
,
StorageTestBase
,
PackableStorageWithOptionalGC
,
PackableUndoStorage
):
...
...
neo/tests/zodb/testPersistent.py
View file @
d9471e2e
...
...
@@ -19,7 +19,7 @@ import unittest
from
ZODB.tests.PersistentStorage
import
PersistentStorage
from
ZODB.tests.StorageTestBase
import
StorageTestBase
from
neo.tests.zodb
import
ZODBTestCase
from
.
import
ZODBTestCase
class
PersistentTests
(
ZODBTestCase
,
StorageTestBase
,
PersistentStorage
):
pass
...
...
neo/tests/zodb/testReadOnly.py
View file @
d9471e2e
...
...
@@ -19,7 +19,7 @@ import unittest
from
ZODB.tests.ReadOnlyStorage
import
ReadOnlyStorage
from
ZODB.tests.StorageTestBase
import
StorageTestBase
from
neo.tests.zodb
import
ZODBTestCase
from
.
import
ZODBTestCase
class
ReadOnlyTests
(
ZODBTestCase
,
StorageTestBase
,
ReadOnlyStorage
):
pass
...
...
neo/tests/zodb/testRecovery.py
View file @
d9471e2e
...
...
@@ -22,8 +22,8 @@ import ZODB
from
ZODB.tests.RecoveryStorage
import
RecoveryStorage
from
ZODB.tests.StorageTestBase
import
StorageTestBase
from
neo.tests
.functional
import
NEOCluster
from
neo.tests.zodb
import
ZODBTestCase
from
.
.functional
import
NEOCluster
from
.
import
ZODBTestCase
class
RecoveryTests
(
ZODBTestCase
,
StorageTestBase
,
RecoveryStorage
):
...
...
neo/tests/zodb/testRevision.py
View file @
d9471e2e
...
...
@@ -19,7 +19,7 @@ import unittest
from
ZODB.tests.RevisionStorage
import
RevisionStorage
from
ZODB.tests.StorageTestBase
import
StorageTestBase
from
neo.tests.zodb
import
ZODBTestCase
from
.
import
ZODBTestCase
class
RevisionTests
(
ZODBTestCase
,
StorageTestBase
,
RevisionStorage
):
pass
...
...
neo/tests/zodb/testSynchronization.py
View file @
d9471e2e
...
...
@@ -19,7 +19,7 @@ import unittest
from
ZODB.tests.StorageTestBase
import
StorageTestBase
from
ZODB.tests.Synchronization
import
SynchronizedStorage
from
neo.tests.zodb
import
ZODBTestCase
from
.
import
ZODBTestCase
class
SynchronizationTests
(
ZODBTestCase
,
StorageTestBase
,
SynchronizedStorage
):
pass
...
...
neo/tests/zodb/testUndo.py
View file @
d9471e2e
...
...
@@ -20,7 +20,7 @@ from ZODB.tests.StorageTestBase import StorageTestBase
from
ZODB.tests.TransactionalUndoStorage
import
TransactionalUndoStorage
from
ZODB.tests.ConflictResolution
import
ConflictResolvingTransUndoStorage
from
neo.tests.zodb
import
ZODBTestCase
from
.
import
ZODBTestCase
class
UndoTests
(
ZODBTestCase
,
StorageTestBase
,
TransactionalUndoStorage
,
ConflictResolvingTransUndoStorage
):
...
...
neo/tests/zodb/testVersion.py
View file @
d9471e2e
...
...
@@ -21,7 +21,7 @@ from ZODB.tests.TransactionalUndoVersionStorage import \
TransactionalUndoVersionStorage
from
ZODB.tests.StorageTestBase
import
StorageTestBase
from
neo.tests.zodb
import
ZODBTestCase
from
.
import
ZODBTestCase
class
VersionTests
(
ZODBTestCase
,
StorageTestBase
,
VersionStorage
,
TransactionalUndoVersionStorage
):
...
...
neo/tests/zodb/testZODB.py
View file @
d9471e2e
...
...
@@ -19,7 +19,7 @@ import unittest
from
ZODB.tests
import
testZODB
import
ZODB
from
neo.tests.zodb
import
ZODBTestCase
from
.
import
ZODBTestCase
class
NEOZODBTests
(
ZODBTestCase
,
testZODB
.
ZODBTests
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment