Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
nexedi
ZODB
Commits
a4868a4f
Commit
a4868a4f
authored
Aug 29, 2002
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Whitespace cleanup.
parent
059c3a5f
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
72 additions
and
82 deletions
+72
-82
src/ZEO/ClientStub.py
src/ZEO/ClientStub.py
+2
-2
src/ZEO/CommitLog.py
src/ZEO/CommitLog.py
+2
-3
src/ZEO/Exceptions.py
src/ZEO/Exceptions.py
+2
-2
src/ZEO/ICache.py
src/ZEO/ICache.py
+1
-7
src/ZEO/ServerStub.py
src/ZEO/ServerStub.py
+2
-2
src/ZEO/StorageServer.py
src/ZEO/StorageServer.py
+6
-6
src/ZEO/TransactionBuffer.py
src/ZEO/TransactionBuffer.py
+4
-4
src/ZEO/__init__.py
src/ZEO/__init__.py
+2
-2
src/ZEO/smac.py
src/ZEO/smac.py
+3
-3
src/ZEO/start.py
src/ZEO/start.py
+9
-9
src/ZEO/tests/Cache.py
src/ZEO/tests/Cache.py
+2
-2
src/ZEO/tests/CommitLockTests.py
src/ZEO/tests/CommitLockTests.py
+0
-1
src/ZEO/tests/TestThread.py
src/ZEO/tests/TestThread.py
+0
-1
src/ZEO/tests/ThreadTests.py
src/ZEO/tests/ThreadTests.py
+2
-2
src/ZEO/tests/__init__.py
src/ZEO/tests/__init__.py
+2
-2
src/ZEO/tests/forker.py
src/ZEO/tests/forker.py
+2
-2
src/ZEO/tests/multi.py
src/ZEO/tests/multi.py
+2
-2
src/ZEO/tests/speed.py
src/ZEO/tests/speed.py
+2
-2
src/ZEO/tests/stress.py
src/ZEO/tests/stress.py
+2
-2
src/ZEO/tests/testClientCache.py
src/ZEO/tests/testClientCache.py
+2
-2
src/ZEO/tests/testStart.py
src/ZEO/tests/testStart.py
+5
-6
src/ZEO/tests/testTransactionBuffer.py
src/ZEO/tests/testTransactionBuffer.py
+2
-2
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+7
-7
src/ZEO/tests/winserver.py
src/ZEO/tests/winserver.py
+2
-2
src/ZEO/util.py
src/ZEO/util.py
+4
-4
src/ZEO/zrpc/smac.py
src/ZEO/zrpc/smac.py
+3
-3
No files found.
src/ZEO/ClientStub.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""Stub for interface exported by ClientStorage"""
...
...
src/ZEO/CommitLog.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""Log a transaction's commit info during two-phase commit.
...
...
@@ -44,4 +44,3 @@ class CommitLog:
self
.
read
=
1
self
.
file
.
seek
(
0
)
return
self
.
stores
,
cPickle
.
Unpickler
(
self
.
file
)
src/ZEO/Exceptions.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""Exceptions for ZEO."""
...
...
src/ZEO/ICache.py
View file @
a4868a4f
...
...
@@ -17,7 +17,7 @@ class ICache(Base):
client -- a string; if specified, cache is persistent.
var -- var directory to store cache files in
"""
def
open
():
"""Returns a sequence of object info tuples.
...
...
@@ -75,9 +75,3 @@ class ICache(Base):
size is a hint about the amount of data that is about to be
stored. The cache may want to evict some data to make space.
"""
src/ZEO/ServerStub.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""Stub for interface exposed by StorageServer"""
...
...
src/ZEO/StorageServer.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""Network ZODB storage server
...
...
@@ -114,7 +114,7 @@ class StorageServer:
class
ZEOStorage
:
"""Proxy to underlying storage for a single remote client."""
def
__init__
(
self
,
server
):
self
.
server
=
server
self
.
client
=
None
...
...
@@ -305,7 +305,7 @@ class ZEOStorage:
else
:
self
.
strategy
=
DelayedCommitStrategy
(
self
.
__storage
,
self
.
wait
)
t
=
Transaction
()
t
.
id
=
id
t
.
user
=
user
...
...
@@ -365,7 +365,7 @@ class ZEOStorage:
# the finishing transaction's reply before restarting the waiting
# transaction. If the restart takes a long time, the previous
# client will be blocked until it finishes.
def
wait
(
self
):
if
self
.
__storage
.
_transaction
:
d
=
Delay
()
...
...
@@ -401,7 +401,7 @@ class ZEOStorage:
return
0
else
:
return
1
def
restart
(
self
,
delay
=
None
):
old_strategy
=
self
.
strategy
self
.
strategy
=
ImmediateCommitStrategy
(
self
.
__storage
,
...
...
src/ZEO/TransactionBuffer.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""A TransactionBuffer store transaction updates until commit or abort.
...
...
@@ -35,12 +35,12 @@ class TransactionBuffer:
self
.
pickler
=
cPickle
.
Pickler
(
self
.
file
,
1
)
self
.
pickler
.
fast
=
1
def
close
(
self
):
def
close
(
self
):
try
:
self
.
file
.
close
()
except
OSError
:
pass
def
store
(
self
,
oid
,
version
,
data
):
"""Store oid, version, data for later retrieval"""
...
...
src/ZEO/__init__.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
version
=
"2.0b1"
src/ZEO/smac.py
View file @
a4868a4f
...
...
@@ -2,18 +2,18 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""Sized message async connections
$Id: smac.py,v 1.2
0 2002/08/28 18:24:50
gvanrossum Exp $
$Id: smac.py,v 1.2
1 2002/08/29 16:31:17
gvanrossum Exp $
"""
import
asyncore
,
struct
...
...
src/ZEO/start.py
View file @
a4868a4f
...
...
@@ -2,18 +2,18 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""Start the server storage.
$Id: start.py,v 1.4
2 2002/08/27 18:43:12 bwarsaw
Exp $
$Id: start.py,v 1.4
3 2002/08/29 16:31:17 gvanrossum
Exp $
"""
from
__future__
import
nested_scopes
...
...
@@ -217,7 +217,7 @@ def main(argv):
os
.
environ
[
'STUPID_LOG_SEVERITY'
]
=
'-300'
set_uid
(
UID
)
if
Z
:
try
:
import
posix
...
...
@@ -230,7 +230,7 @@ def main(argv):
try
:
import
ZEO.StorageServer
,
asyncore
storages
=
{}
for
o
,
v
in
opts
:
if
o
==
'-S'
:
...
...
@@ -259,14 +259,14 @@ def main(argv):
unix
=
host
,
port
ZEO
.
StorageServer
.
StorageServer
(
unix
,
storages
)
try
:
ppid
,
pid
=
os
.
getppid
(),
os
.
getpid
()
except
:
pass
# getpid not supported
else
:
open
(
env
.
zeo_pid
,
'w'
).
write
(
"%s %s"
%
(
ppid
,
pid
))
except
:
# Log startup exception and tell zdaemon not to restart us.
info
=
sys
.
exc_info
()
...
...
@@ -277,9 +277,9 @@ def main(argv):
import
traceback
traceback
.
print_exception
(
*
info
)
sys
.
exit
(
0
)
try
:
asyncore
.
loop
()
except
SystemExit
:
...
...
src/ZEO/tests/Cache.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""Tests of the ZEO cache"""
...
...
src/ZEO/tests/CommitLockTests.py
View file @
a4868a4f
...
...
@@ -194,4 +194,3 @@ class CommitLockTests:
t
=
time
.
time
()
t
=
apply
(
TimeStamp
,(
time
.
gmtime
(
t
)[:
5
]
+
(
t
%
60
,)))
return
`t`
src/ZEO/tests/TestThread.py
View file @
a4868a4f
...
...
@@ -40,4 +40,3 @@ class TestThread(threading.Thread):
self
.
join
(
timeout
)
if
self
.
isAlive
():
self
.
_testcase
.
fail
(
"Thread did not finish: %s"
%
self
)
src/ZEO/tests/ThreadTests.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""Compromising positions involving threads."""
...
...
src/ZEO/tests/__init__.py
View file @
a4868a4f
...
...
@@ -2,12 +2,12 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
src/ZEO/tests/forker.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""Library for forking storage server and connecting client storage"""
...
...
src/ZEO/tests/multi.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""A multi-client test of the ZEO storage server"""
...
...
src/ZEO/tests/speed.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
usage
=
"""Test speed of a ZODB storage
...
...
src/ZEO/tests/stress.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""A ZEO client-server stress test to look for leaks.
...
...
src/ZEO/tests/testClientCache.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""Test suite for the ZEO.ClientCache module.
...
...
src/ZEO/tests/testStart.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
import
os
...
...
@@ -29,7 +29,7 @@ try:
except
ImportError
:
# for compatibility with Zope 2.5 &c.
import
errno
def
removefs
(
base
):
"""Remove all files created by FileStorage with path base."""
for
ext
in
''
,
'.old'
,
'.tmp'
,
'.lock'
,
'.index'
,
'.pack'
:
...
...
@@ -144,7 +144,7 @@ class StartTests(unittest.TestCase):
def
testNoPort
(
self
):
outp
=
self
.
system
(
"-s"
)
self
.
assert_
(
outp
.
find
(
"No port specified"
)
!=
-
1
)
def
testStart
(
self
):
port
=
9090
outp
=
self
.
fork
(
"-s"
,
"-p"
,
str
(
port
))
...
...
@@ -187,11 +187,10 @@ class StartTests(unittest.TestCase):
os
.
unlink
(
logfile2
)
except
os
.
error
:
pass
def
test_suite
():
if
os
.
name
==
"posix"
:
return
unittest
.
makeSuite
(
StartTests
)
else
:
# Don't even bother with these tests on Windows
return
None
src/ZEO/tests/testTransactionBuffer.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
import
random
import
unittest
...
...
src/ZEO/tests/testZEO.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""Test suite for ZEO based on ZODB.tests"""
...
...
@@ -36,7 +36,7 @@ try:
except
ImportError
:
# for compatibility with Zope 2.5 &c.
import
errno
def
removefs
(
base
):
"""Remove all files created by FileStorage with path base."""
for
ext
in
''
,
'.old'
,
'.tmp'
,
'.lock'
,
'.index'
,
'.pack'
:
...
...
@@ -114,11 +114,11 @@ class GenericTests(StorageTestBase.StorageTestBase,
for
pid
in
self
.
_pids
:
os
.
waitpid
(
pid
,
0
)
self
.
delStorage
()
def
open
(
self
,
read_only
=
0
):
# XXX Needed to support ReadOnlyStorage tests. Ought to be a
# cleaner way.
addr
=
self
.
_storage
.
_addr
self
.
_storage
.
close
()
self
.
_storage
=
ZEO
.
ClientStorage
.
ClientStorage
(
addr
,
...
...
@@ -390,7 +390,7 @@ class ConnectionTests(StorageTestBase.StorageTestBase):
zLOG
.
LOG
(
"checkReconnection"
,
zLOG
.
INFO
,
"finished"
)
class
UnixConnectionTests
(
ConnectionTests
):
def
_startServer
(
self
,
create
=
1
,
index
=
0
):
path
=
"%s.%d"
%
(
self
.
file
,
index
)
addr
=
self
.
addr
[
index
]
...
...
@@ -409,7 +409,7 @@ class UnixConnectionTests(ConnectionTests):
pass
class
WindowsConnectionTests
(
ConnectionTests
):
def
_startServer
(
self
,
create
=
1
,
index
=
0
):
path
=
"%s.%d"
%
(
self
.
file
,
index
)
addr
=
self
.
addr
[
index
]
...
...
src/ZEO/tests/winserver.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""Helper file used to launch ZEO server for Windows tests"""
...
...
src/ZEO/util.py
View file @
a4868a4f
...
...
@@ -2,14 +2,14 @@
#
# Copyright (c) 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""Utilities for setting up the server environment."""
...
...
@@ -45,6 +45,6 @@ class Environment:
pid
=
os
.
environ
.
get
(
"ZEO_SERVER_PID"
)
if
pid
is
None
:
pid
=
os
.
path
.
join
(
self
.
var
,
"ZEO_SERVER.pid"
)
self
.
zeo_pid
=
pid
self
.
zeo_pid
=
pid
self
.
fs
=
os
.
path
.
join
(
self
.
var
,
"Data.fs"
)
src/ZEO/zrpc/smac.py
View file @
a4868a4f
...
...
@@ -2,18 +2,18 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
"""Sized message async connections
$Id: smac.py,v 1.2
0 2002/08/28 18:24:50
gvanrossum Exp $
$Id: smac.py,v 1.2
1 2002/08/29 16:31:17
gvanrossum Exp $
"""
import
asyncore
,
struct
...
...
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