Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
14b1ec0d
Commit
14b1ec0d
authored
Dec 29, 2003
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Whitespace normalization.
parent
11cdf9fc
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
61 additions
and
71 deletions
+61
-71
src/BTrees/Length.py
src/BTrees/Length.py
+1
-1
src/BTrees/tests/testConflict.py
src/BTrees/tests/testConflict.py
+0
-1
src/Persistence/__init__.py
src/Persistence/__init__.py
+1
-2
src/Persistence/mapping.py
src/Persistence/mapping.py
+5
-5
src/Persistence/tests/test_ExtensionClass.py
src/Persistence/tests/test_ExtensionClass.py
+24
-27
src/Persistence/tests/test_mapping.py
src/Persistence/tests/test_mapping.py
+2
-2
src/ZEO/tests/auth_plaintext.py
src/ZEO/tests/auth_plaintext.py
+1
-1
src/ZEO/tests/testTransactionBuffer.py
src/ZEO/tests/testTransactionBuffer.py
+1
-1
src/ZEO/tests/test_cache.py
src/ZEO/tests/test_cache.py
+1
-1
src/ZEO/zeopasswd.py
src/ZEO/zeopasswd.py
+3
-4
src/ZODB/FileStorage/FileStorage.py
src/ZODB/FileStorage/FileStorage.py
+3
-3
src/ZODB/Transaction.py
src/ZODB/Transaction.py
+2
-2
src/ZODB/tests/VersionStorage.py
src/ZODB/tests/VersionStorage.py
+1
-1
src/ZODB/tests/testZODB.py
src/ZODB/tests/testZODB.py
+0
-1
src/persistent/tests/test_pickle.py
src/persistent/tests/test_pickle.py
+15
-18
src/scripts/fsstats.py
src/scripts/fsstats.py
+1
-1
No files found.
src/BTrees/Length.py
View file @
14b1ec0d
...
@@ -28,7 +28,7 @@ class Length(persistent.Persistent):
...
@@ -28,7 +28,7 @@ class Length(persistent.Persistent):
longer works as expected, because new-style classes cache
longer works as expected, because new-style classes cache
class-defined slot methods (like __len__) in C type slots. Thus,
class-defined slot methods (like __len__) in C type slots. Thus,
instance-define slot fillers are ignores.
instance-define slot fillers are ignores.
"""
"""
def
__init__
(
self
,
v
=
0
):
def
__init__
(
self
,
v
=
0
):
...
...
src/BTrees/tests/testConflict.py
View file @
14b1ec0d
...
@@ -722,4 +722,3 @@ def test_suite():
...
@@ -722,4 +722,3 @@ def test_suite():
NastyConfict
):
NastyConfict
):
suite
.
addTest
(
makeSuite
(
k
))
suite
.
addTest
(
makeSuite
(
k
))
return
suite
return
suite
src/Persistence/__init__.py
View file @
14b1ec0d
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
##############################################################################
##############################################################################
"""Persistence and ExtensionClass combined
"""Persistence and ExtensionClass combined
$Id: __init__.py,v 1.
7 2003/12/15 07:30:27 jim
Exp $
$Id: __init__.py,v 1.
8 2003/12/29 22:40:45 tim_one
Exp $
"""
"""
from
persistent
import
PickleCache
from
persistent
import
PickleCache
...
@@ -53,4 +53,3 @@ import sys
...
@@ -53,4 +53,3 @@ import sys
sys
.
modules
[
'BoboPOS'
]
=
sys
.
modules
[
'Persistence'
]
sys
.
modules
[
'BoboPOS'
]
=
sys
.
modules
[
'Persistence'
]
sys
.
modules
[
'BoboPOS.PersistentMapping'
]
=
sys
.
modules
[
'Persistence.mapping'
]
sys
.
modules
[
'BoboPOS.PersistentMapping'
]
=
sys
.
modules
[
'Persistence.mapping'
]
del
sys
del
sys
src/Persistence/mapping.py
View file @
14b1ec0d
...
@@ -14,9 +14,9 @@
...
@@ -14,9 +14,9 @@
"""Python implementation of persistent base types
"""Python implementation of persistent base types
$Id: mapping.py,v 1.
1 2003/12/15 06:56:46 jim
Exp $"""
$Id: mapping.py,v 1.
2 2003/12/29 22:40:45 tim_one
Exp $"""
__version__
=
'$Revision: 1.
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
import
Persistence
import
Persistence
import
persistent
import
persistent
...
@@ -25,13 +25,13 @@ from persistent.mapping import PersistentMapping
...
@@ -25,13 +25,13 @@ from persistent.mapping import PersistentMapping
if
Persistence
.
Persistent
is
not
persistent
.
Persistent
:
if
Persistence
.
Persistent
is
not
persistent
.
Persistent
:
class
PersistentMapping
(
Persistence
.
Persistent
,
PersistentMapping
):
class
PersistentMapping
(
Persistence
.
Persistent
,
PersistentMapping
):
"""Legacy persistent mapping class
"""Legacy persistent mapping class
This class mixes in ExtensionClass Base if it is present.
This class mixes in ExtensionClass Base if it is present.
Unless you actually want ExtensionClass semantics, use
Unless you actually want ExtensionClass semantics, use
persistent.mapping.PersistentMapping instead.
persistent.mapping.PersistentMapping instead.
"""
"""
def
__setstate__
(
self
,
state
):
def
__setstate__
(
self
,
state
):
if
'data'
not
in
state
:
if
'data'
not
in
state
:
state
[
'data'
]
=
state
[
'_container'
]
state
[
'data'
]
=
state
[
'_container'
]
...
...
src/Persistence/tests/test_ExtensionClass.py
View file @
14b1ec0d
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
##############################################################################
##############################################################################
"""Test ExtensionClass support in Persistence.Persistent
"""Test ExtensionClass support in Persistence.Persistent
$Id: test_ExtensionClass.py,v 1.
2 2003/11/28 16:44:47 jim
Exp $
$Id: test_ExtensionClass.py,v 1.
3 2003/12/29 22:40:46 tim_one
Exp $
"""
"""
from
Persistence
import
Persistent
from
Persistence
import
Persistent
...
@@ -59,7 +59,7 @@ else:
...
@@ -59,7 +59,7 @@ else:
('bar called', 42)
('bar called', 42)
This is for compatability with old code. New code should use super
This is for compatability with old code. New code should use super
instead.
instead.
The base class, Base, exists mainly to support the __of__ protocol.
The base class, Base, exists mainly to support the __of__ protocol.
The __of__ protocol is similar to __get__ except that __of__ is called
The __of__ protocol is similar to __get__ except that __of__ is called
...
@@ -89,7 +89,7 @@ else:
...
@@ -89,7 +89,7 @@ else:
>>> class O(Base):
>>> class O(Base):
... def __get__(*a):
... def __get__(*a):
... return a
... return a
...
...
>>> o1 = O()
>>> o1 = O()
>>> o2 = O()
>>> o2 = O()
>>> C.o1 = o1
>>> C.o1 = o1
...
@@ -105,8 +105,8 @@ else:
...
@@ -105,8 +105,8 @@ else:
def
test_mixing
():
def
test_mixing
():
"""Test working with a classic class
"""Test working with a classic class
>>> class Classic:
>>> class Classic:
... def x(self):
... def x(self):
... return 42
... return 42
>>> class O(Persistent):
>>> class O(Persistent):
...
@@ -115,7 +115,7 @@ else:
...
@@ -115,7 +115,7 @@ else:
>>> class O2(Classic, O):
>>> class O2(Classic, O):
... def __of__(*a):
... def __of__(*a):
... return (O2.inheritedAttribute('__of__')(*a),
... return (O2.inheritedAttribute('__of__')(*a),
... O2.inheritedAttribute('x')(a[0]))
... O2.inheritedAttribute('x')(a[0]))
>>> class C(Persistent):
>>> class C(Persistent):
...
@@ -135,13 +135,13 @@ else:
...
@@ -135,13 +135,13 @@ else:
Test working with a new style
Test working with a new style
>>> class Modern(object):
>>> class Modern(object):
... def x(self):
... def x(self):
... return 42
... return 42
>>> class O2(Modern, O):
>>> class O2(Modern, O):
... def __of__(*a):
... def __of__(*a):
... return (O2.inheritedAttribute('__of__')(*a),
... return (O2.inheritedAttribute('__of__')(*a),
... O2.inheritedAttribute('x')(a[0]))
... O2.inheritedAttribute('x')(a[0]))
>>> o2 = O2()
>>> o2 = O2()
...
@@ -235,7 +235,7 @@ else:
...
@@ -235,7 +235,7 @@ else:
def
test_class_creation_under_stress
():
def
test_class_creation_under_stress
():
"""
"""
>>> for i in range(100):
>>> for i in range(100):
... class B(Persistent):
... class B(Persistent):
... print i,
... print i,
... if i and i%20 == 0:
... if i and i%20 == 0:
...
@@ -286,7 +286,7 @@ def test_basic_pickling():
...
@@ -286,7 +286,7 @@ def test_basic_pickling():
>>> print_dict(x.__getstate__())
>>> print_dict(x.__getstate__())
{'__name__': 'x', 'aaa': 1, 'bbb': 'foo'}
{'__name__': 'x', 'aaa': 1, 'bbb': 'foo'}
>>> f, (c,), state = x.__reduce__()
>>> f, (c,), state = x.__reduce__()
>>> f.__name__
>>> f.__name__
'__newobj__'
'__newobj__'
...
@@ -294,10 +294,10 @@ def test_basic_pickling():
...
@@ -294,10 +294,10 @@ def test_basic_pickling():
'copy_reg'
'copy_reg'
>>> c.__name__
>>> c.__name__
'Simple'
'Simple'
>>> print_dict(state)
>>> print_dict(state)
{'__name__': 'x', 'aaa': 1, 'bbb': 'foo'}
{'__name__': 'x', 'aaa': 1, 'bbb': 'foo'}
>>> pickle.loads(pickle.dumps(x)) == x
>>> pickle.loads(pickle.dumps(x)) == x
1
1
>>> pickle.loads(pickle.dumps(x, 0)) == x
>>> pickle.loads(pickle.dumps(x, 0)) == x
...
@@ -347,7 +347,7 @@ def test_pickling_w_overrides():
...
@@ -347,7 +347,7 @@ def test_pickling_w_overrides():
'Custom'
'Custom'
>>> ax, ay, a
>>> ax, ay, a
('x', 'y', 99)
('x', 'y', 99)
>>> pickle.loads(pickle.dumps(x)) == x
>>> pickle.loads(pickle.dumps(x)) == x
1
1
>>> pickle.loads(pickle.dumps(x, 0)) == x
>>> pickle.loads(pickle.dumps(x, 0)) == x
...
@@ -356,7 +356,7 @@ def test_pickling_w_overrides():
...
@@ -356,7 +356,7 @@ def test_pickling_w_overrides():
1
1
>>> pickle.loads(pickle.dumps(x, 2)) == x
>>> pickle.loads(pickle.dumps(x, 2)) == x
1
1
"""
"""
class
Slotted
(
Persistent
):
class
Slotted
(
Persistent
):
...
@@ -372,7 +372,7 @@ class SubSlotted(Slotted):
...
@@ -372,7 +372,7 @@ class SubSlotted(Slotted):
Slotted
.
__init__
(
self
,
s1
,
s2
)
Slotted
.
__init__
(
self
,
s1
,
s2
)
self
.
s3
=
s3
self
.
s3
=
s3
def
__cmp__
(
self
,
other
):
def
__cmp__
(
self
,
other
):
return
cmpattrs
(
self
,
other
,
'__class__'
,
's1'
,
's2'
,
's3'
,
's4'
)
return
cmpattrs
(
self
,
other
,
'__class__'
,
's1'
,
's2'
,
's3'
,
's4'
)
...
@@ -388,7 +388,7 @@ def test_pickling_w_slots_only():
...
@@ -388,7 +388,7 @@ def test_pickling_w_slots_only():
>>> d
>>> d
>>> print_dict(s)
>>> print_dict(s)
{'s1': 'x', 's2': 'y', 's3': 'z'}
{'s1': 'x', 's2': 'y', 's3': 'z'}
>>> pickle.loads(pickle.dumps(x)) == x
>>> pickle.loads(pickle.dumps(x)) == x
1
1
>>> pickle.loads(pickle.dumps(x, 0)) == x
>>> pickle.loads(pickle.dumps(x, 0)) == x
...
@@ -399,12 +399,12 @@ def test_pickling_w_slots_only():
...
@@ -399,12 +399,12 @@ def test_pickling_w_slots_only():
1
1
>>> x.s4 = 'spam'
>>> x.s4 = 'spam'
>>> d, s = x.__getstate__()
>>> d, s = x.__getstate__()
>>> d
>>> d
>>> print_dict(s)
>>> print_dict(s)
{'s1': 'x', 's2': 'y', 's3': 'z', 's4': 'spam'}
{'s1': 'x', 's2': 'y', 's3': 'z', 's4': 'spam'}
>>> pickle.loads(pickle.dumps(x)) == x
>>> pickle.loads(pickle.dumps(x)) == x
1
1
>>> pickle.loads(pickle.dumps(x, 0)) == x
>>> pickle.loads(pickle.dumps(x, 0)) == x
...
@@ -423,7 +423,7 @@ class SubSubSlotted(SubSlotted):
...
@@ -423,7 +423,7 @@ class SubSubSlotted(SubSlotted):
self
.
__dict__
.
update
(
kw
)
self
.
__dict__
.
update
(
kw
)
self
.
_v_favorite_color
=
'blue'
self
.
_v_favorite_color
=
'blue'
self
.
_p_foo
=
'bar'
self
.
_p_foo
=
'bar'
def
__cmp__
(
self
,
other
):
def
__cmp__
(
self
,
other
):
return
cmpattrs
(
self
,
other
,
return
cmpattrs
(
self
,
other
,
'__class__'
,
's1'
,
's2'
,
's3'
,
's4'
,
'__class__'
,
's1'
,
's2'
,
's3'
,
's4'
,
...
@@ -441,7 +441,7 @@ def test_pickling_w_slots():
...
@@ -441,7 +441,7 @@ def test_pickling_w_slots():
{'aaa': 1, 'bbb': 'foo'}
{'aaa': 1, 'bbb': 'foo'}
>>> print_dict(s)
>>> print_dict(s)
{'s1': 'x', 's2': 'y', 's3': 'z'}
{'s1': 'x', 's2': 'y', 's3': 'z'}
>>> pickle.loads(pickle.dumps(x)) == x
>>> pickle.loads(pickle.dumps(x)) == x
1
1
>>> pickle.loads(pickle.dumps(x, 0)) == x
>>> pickle.loads(pickle.dumps(x, 0)) == x
...
@@ -452,7 +452,7 @@ def test_pickling_w_slots():
...
@@ -452,7 +452,7 @@ def test_pickling_w_slots():
1
1
>>> x.s4 = 'spam'
>>> x.s4 = 'spam'
>>> d, s = x.__getstate__()
>>> d, s = x.__getstate__()
>>> print_dict(d)
>>> print_dict(d)
{'aaa': 1, 'bbb': 'foo'}
{'aaa': 1, 'bbb': 'foo'}
...
@@ -482,7 +482,7 @@ def test_pickling_w_slots_w_empty_dict():
...
@@ -482,7 +482,7 @@ def test_pickling_w_slots_w_empty_dict():
{}
{}
>>> print_dict(s)
>>> print_dict(s)
{'s1': 'x', 's2': 'y', 's3': 'z'}
{'s1': 'x', 's2': 'y', 's3': 'z'}
>>> pickle.loads(pickle.dumps(x)) == x
>>> pickle.loads(pickle.dumps(x)) == x
1
1
>>> pickle.loads(pickle.dumps(x, 0)) == x
>>> pickle.loads(pickle.dumps(x, 0)) == x
...
@@ -493,7 +493,7 @@ def test_pickling_w_slots_w_empty_dict():
...
@@ -493,7 +493,7 @@ def test_pickling_w_slots_w_empty_dict():
1
1
>>> x.s4 = 'spam'
>>> x.s4 = 'spam'
>>> d, s = x.__getstate__()
>>> d, s = x.__getstate__()
>>> print_dict(d)
>>> print_dict(d)
{}
{}
...
@@ -520,6 +520,3 @@ def test_suite():
...
@@ -520,6 +520,3 @@ def test_suite():
))
))
if
__name__
==
'__main__'
:
unittest
.
main
()
if
__name__
==
'__main__'
:
unittest
.
main
()
src/Persistence/tests/test_mapping.py
View file @
14b1ec0d
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
##############################################################################
##############################################################################
"""XXX short summary goes here.
"""XXX short summary goes here.
$Id: test_mapping.py,v 1.
1 2003/12/15 06:58:26 jim
Exp $
$Id: test_mapping.py,v 1.
2 2003/12/29 22:40:46 tim_one
Exp $
"""
"""
import
unittest
import
unittest
from
doctest
import
DocTestSuite
from
doctest
import
DocTestSuite
...
@@ -80,7 +80,7 @@ def test_old_pickles():
...
@@ -80,7 +80,7 @@ def test_old_pickles():
>>> items.sort()
>>> items.sort()
>>> items
>>> items
[('x', 1), ('y', 2)]
[('x', 1), ('y', 2)]
"""
"""
def
test_suite
():
def
test_suite
():
...
...
src/ZEO/tests/auth_plaintext.py
View file @
14b1ec0d
...
@@ -29,7 +29,7 @@ def session_key(username, realm, password):
...
@@ -29,7 +29,7 @@ def session_key(username, realm, password):
return
sha
.
new
(
"%s:%s:%s"
%
(
username
,
realm
,
password
)).
hexdigest
()
return
sha
.
new
(
"%s:%s:%s"
%
(
username
,
realm
,
password
)).
hexdigest
()
class
StorageClass
(
ZEOStorage
):
class
StorageClass
(
ZEOStorage
):
def
auth
(
self
,
username
,
password
):
def
auth
(
self
,
username
,
password
):
try
:
try
:
dbpw
=
self
.
database
.
get_password
(
username
)
dbpw
=
self
.
database
.
get_password
(
username
)
...
...
src/ZEO/tests/testTransactionBuffer.py
View file @
14b1ec0d
...
@@ -37,7 +37,7 @@ class TransBufTests(unittest.TestCase):
...
@@ -37,7 +37,7 @@ class TransBufTests(unittest.TestCase):
tbuf
.
invalidate
(
*
new_invalidate_data
())
tbuf
.
invalidate
(
*
new_invalidate_data
())
for
o
in
tbuf
:
for
o
in
tbuf
:
pass
pass
def
doUpdates
(
self
,
tbuf
):
def
doUpdates
(
self
,
tbuf
):
data
=
[]
data
=
[]
for
i
in
range
(
10
):
for
i
in
range
(
10
):
...
...
src/ZEO/tests/test_cache.py
View file @
14b1ec0d
...
@@ -130,7 +130,7 @@ class CacheTests(unittest.TestCase):
...
@@ -130,7 +130,7 @@ class CacheTests(unittest.TestCase):
self
.
cache
.
store
(
n2
,
"version"
,
n2
,
None
,
"version data for n2"
)
self
.
cache
.
store
(
n2
,
"version"
,
n2
,
None
,
"version data for n2"
)
self
.
cache
.
store
(
n3
,
""
,
n3
,
n4
,
"non-current data for n3"
)
self
.
cache
.
store
(
n3
,
""
,
n3
,
n4
,
"non-current data for n3"
)
self
.
cache
.
store
(
n3
,
""
,
n4
,
n5
,
"more non-current data for n3"
)
self
.
cache
.
store
(
n3
,
""
,
n4
,
n5
,
"more non-current data for n3"
)
path
=
tempfile
.
mktemp
()
path
=
tempfile
.
mktemp
()
# Copy data from self.cache into path, reaching into the cache
# Copy data from self.cache into path, reaching into the cache
# guts to make the copy.
# guts to make the copy.
...
...
src/ZEO/zeopasswd.py
View file @
14b1ec0d
...
@@ -47,8 +47,8 @@ def usage(msg):
...
@@ -47,8 +47,8 @@ def usage(msg):
def
options
(
args
):
def
options
(
args
):
"""Password-specific options loaded from regular ZEO config file."""
"""Password-specific options loaded from regular ZEO config file."""
try
:
try
:
opts
,
args
=
getopt
.
getopt
(
args
,
"dr:p:f:C:"
,
[
"configure="
,
opts
,
args
=
getopt
.
getopt
(
args
,
"dr:p:f:C:"
,
[
"configure="
,
"protocol="
,
"protocol="
,
"filename="
,
"filename="
,
"realm"
])
"realm"
])
except
getopt
.
error
,
msg
:
except
getopt
.
error
,
msg
:
...
@@ -56,7 +56,7 @@ def options(args):
...
@@ -56,7 +56,7 @@ def options(args):
config
=
None
config
=
None
delete
=
0
delete
=
0
auth_protocol
=
None
auth_protocol
=
None
auth_db
=
""
auth_db
=
""
auth_realm
=
None
auth_realm
=
None
for
k
,
v
in
opts
:
for
k
,
v
in
opts
:
if
k
==
'-C'
or
k
==
'--configure'
:
if
k
==
'-C'
or
k
==
'--configure'
:
...
@@ -127,4 +127,3 @@ def main(args=None, dbclass=None):
...
@@ -127,4 +127,3 @@ def main(args=None, dbclass=None):
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
main
(
sys
.
argv
[
1
:])
main
(
sys
.
argv
[
1
:])
src/ZODB/FileStorage/FileStorage.py
View file @
14b1ec0d
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
##############################################################################
##############################################################################
"""Storage implementation using a log written to a single file.
"""Storage implementation using a log written to a single file.
$Revision: 1.
2
$
$Revision: 1.
3
$
"""
"""
import
base64
import
base64
...
@@ -607,12 +607,12 @@ class FileStorage(BaseStorage.BaseStorage,
...
@@ -607,12 +607,12 @@ class FileStorage(BaseStorage.BaseStorage,
if
h
.
tid
<
tid
:
if
h
.
tid
<
tid
:
break
break
pos
=
h
.
prev
pos
=
h
.
prev
end_tid
=
h
.
tid
end_tid
=
h
.
tid
if
not
pos
:
if
not
pos
:
return
None
return
None
if
h
.
back
:
if
h
.
back
:
data
,
_
,
_
,
_
=
self
.
_loadBack_impl
(
oid
,
h
.
back
)
data
,
_
,
_
,
_
=
self
.
_loadBack_impl
(
oid
,
h
.
back
)
return
data
,
h
.
tid
,
end_tid
return
data
,
h
.
tid
,
end_tid
...
...
src/ZODB/Transaction.py
View file @
14b1ec0d
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
##############################################################################
##############################################################################
"""Transaction management
"""Transaction management
$Id: Transaction.py,v 1.5
5 2003/11/28 16:44:49 jim
Exp $
$Id: Transaction.py,v 1.5
6 2003/12/29 22:40:48 tim_one
Exp $
"""
"""
import
sys
import
sys
from
thread
import
get_ident
as
_get_ident
from
thread
import
get_ident
as
_get_ident
...
@@ -271,7 +271,7 @@ class Transaction:
...
@@ -271,7 +271,7 @@ class Transaction:
"abort. This shouldn't happen."
,
"abort. This shouldn't happen."
,
error
=
sys
.
exc_info
())
error
=
sys
.
exc_info
())
raise
error
[
0
],
error
[
1
],
error
[
2
]
raise
error
[
0
],
error
[
1
],
error
[
2
]
def
_get_jars
(
self
,
objects
,
subtransaction
):
def
_get_jars
(
self
,
objects
,
subtransaction
):
# Returns a list of jars for this transaction.
# Returns a list of jars for this transaction.
...
...
src/ZODB/tests/VersionStorage.py
View file @
14b1ec0d
...
@@ -205,7 +205,7 @@ class VersionStorage:
...
@@ -205,7 +205,7 @@ class VersionStorage:
# is not current
# is not current
self
.
_dostore
(
oid
,
revid
=
tid
,
data
=
MinPO
(
17
))
self
.
_dostore
(
oid
,
revid
=
tid
,
data
=
MinPO
(
17
))
ltid
=
self
.
_storage
.
lastTransaction
()
ltid
=
self
.
_storage
.
lastTransaction
()
ncdata
,
ncstart
,
end
=
self
.
_storage
.
loadBefore
(
oid
,
ltid
)
ncdata
,
ncstart
,
end
=
self
.
_storage
.
loadBefore
(
oid
,
ltid
)
self
.
assertEqual
(
data
,
ncdata
)
self
.
assertEqual
(
data
,
ncdata
)
...
...
src/ZODB/tests/testZODB.py
View file @
14b1ec0d
...
@@ -300,4 +300,3 @@ def test_suite():
...
@@ -300,4 +300,3 @@ def test_suite():
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
unittest
.
main
(
defaultTest
=
"test_suite"
)
unittest
.
main
(
defaultTest
=
"test_suite"
)
src/persistent/tests/test_pickle.py
View file @
14b1ec0d
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
##############################################################################
##############################################################################
"""Basic pickling tests
"""Basic pickling tests
$Id: test_pickle.py,v 1.
2 2003/11/28 16:44:56 jim
Exp $
$Id: test_pickle.py,v 1.
3 2003/12/29 22:40:50 tim_one
Exp $
"""
"""
from
persistent
import
Persistent
from
persistent
import
Persistent
...
@@ -55,7 +55,7 @@ def test_basic_pickling():
...
@@ -55,7 +55,7 @@ def test_basic_pickling():
>>> print_dict(x.__getstate__())
>>> print_dict(x.__getstate__())
{'__name__': 'x', 'aaa': 1, 'bbb': 'foo'}
{'__name__': 'x', 'aaa': 1, 'bbb': 'foo'}
>>> f, (c,), state = x.__reduce__()
>>> f, (c,), state = x.__reduce__()
>>> f.__name__
>>> f.__name__
'__newobj__'
'__newobj__'
...
@@ -63,10 +63,10 @@ def test_basic_pickling():
...
@@ -63,10 +63,10 @@ def test_basic_pickling():
'copy_reg'
'copy_reg'
>>> c.__name__
>>> c.__name__
'Simple'
'Simple'
>>> print_dict(state)
>>> print_dict(state)
{'__name__': 'x', 'aaa': 1, 'bbb': 'foo'}
{'__name__': 'x', 'aaa': 1, 'bbb': 'foo'}
>>> pickle.loads(pickle.dumps(x)) == x
>>> pickle.loads(pickle.dumps(x)) == x
1
1
>>> pickle.loads(pickle.dumps(x, 0)) == x
>>> pickle.loads(pickle.dumps(x, 0)) == x
...
@@ -116,7 +116,7 @@ def test_pickling_w_overrides():
...
@@ -116,7 +116,7 @@ def test_pickling_w_overrides():
'Custom'
'Custom'
>>> ax, ay, a
>>> ax, ay, a
('x', 'y', 99)
('x', 'y', 99)
>>> pickle.loads(pickle.dumps(x)) == x
>>> pickle.loads(pickle.dumps(x)) == x
1
1
>>> pickle.loads(pickle.dumps(x, 0)) == x
>>> pickle.loads(pickle.dumps(x, 0)) == x
...
@@ -125,7 +125,7 @@ def test_pickling_w_overrides():
...
@@ -125,7 +125,7 @@ def test_pickling_w_overrides():
1
1
>>> pickle.loads(pickle.dumps(x, 2)) == x
>>> pickle.loads(pickle.dumps(x, 2)) == x
1
1
"""
"""
class
Slotted
(
Persistent
):
class
Slotted
(
Persistent
):
...
@@ -141,7 +141,7 @@ class SubSlotted(Slotted):
...
@@ -141,7 +141,7 @@ class SubSlotted(Slotted):
Slotted
.
__init__
(
self
,
s1
,
s2
)
Slotted
.
__init__
(
self
,
s1
,
s2
)
self
.
s3
=
s3
self
.
s3
=
s3
def
__cmp__
(
self
,
other
):
def
__cmp__
(
self
,
other
):
return
cmpattrs
(
self
,
other
,
'__class__'
,
's1'
,
's2'
,
's3'
,
's4'
)
return
cmpattrs
(
self
,
other
,
'__class__'
,
's1'
,
's2'
,
's3'
,
's4'
)
...
@@ -157,7 +157,7 @@ def test_pickling_w_slots_only():
...
@@ -157,7 +157,7 @@ def test_pickling_w_slots_only():
>>> d
>>> d
>>> print_dict(s)
>>> print_dict(s)
{'s1': 'x', 's2': 'y', 's3': 'z'}
{'s1': 'x', 's2': 'y', 's3': 'z'}
>>> pickle.loads(pickle.dumps(x)) == x
>>> pickle.loads(pickle.dumps(x)) == x
1
1
>>> pickle.loads(pickle.dumps(x, 0)) == x
>>> pickle.loads(pickle.dumps(x, 0)) == x
...
@@ -168,12 +168,12 @@ def test_pickling_w_slots_only():
...
@@ -168,12 +168,12 @@ def test_pickling_w_slots_only():
1
1
>>> x.s4 = 'spam'
>>> x.s4 = 'spam'
>>> d, s = x.__getstate__()
>>> d, s = x.__getstate__()
>>> d
>>> d
>>> print_dict(s)
>>> print_dict(s)
{'s1': 'x', 's2': 'y', 's3': 'z', 's4': 'spam'}
{'s1': 'x', 's2': 'y', 's3': 'z', 's4': 'spam'}
>>> pickle.loads(pickle.dumps(x)) == x
>>> pickle.loads(pickle.dumps(x)) == x
1
1
>>> pickle.loads(pickle.dumps(x, 0)) == x
>>> pickle.loads(pickle.dumps(x, 0)) == x
...
@@ -192,7 +192,7 @@ class SubSubSlotted(SubSlotted):
...
@@ -192,7 +192,7 @@ class SubSubSlotted(SubSlotted):
self
.
__dict__
.
update
(
kw
)
self
.
__dict__
.
update
(
kw
)
self
.
_v_favorite_color
=
'blue'
self
.
_v_favorite_color
=
'blue'
self
.
_p_foo
=
'bar'
self
.
_p_foo
=
'bar'
def
__cmp__
(
self
,
other
):
def
__cmp__
(
self
,
other
):
return
cmpattrs
(
self
,
other
,
return
cmpattrs
(
self
,
other
,
'__class__'
,
's1'
,
's2'
,
's3'
,
's4'
,
'__class__'
,
's1'
,
's2'
,
's3'
,
's4'
,
...
@@ -210,7 +210,7 @@ def test_pickling_w_slots():
...
@@ -210,7 +210,7 @@ def test_pickling_w_slots():
{'aaa': 1, 'bbb': 'foo'}
{'aaa': 1, 'bbb': 'foo'}
>>> print_dict(s)
>>> print_dict(s)
{'s1': 'x', 's2': 'y', 's3': 'z'}
{'s1': 'x', 's2': 'y', 's3': 'z'}
>>> pickle.loads(pickle.dumps(x)) == x
>>> pickle.loads(pickle.dumps(x)) == x
1
1
>>> pickle.loads(pickle.dumps(x, 0)) == x
>>> pickle.loads(pickle.dumps(x, 0)) == x
...
@@ -221,7 +221,7 @@ def test_pickling_w_slots():
...
@@ -221,7 +221,7 @@ def test_pickling_w_slots():
1
1
>>> x.s4 = 'spam'
>>> x.s4 = 'spam'
>>> d, s = x.__getstate__()
>>> d, s = x.__getstate__()
>>> print_dict(d)
>>> print_dict(d)
{'aaa': 1, 'bbb': 'foo'}
{'aaa': 1, 'bbb': 'foo'}
...
@@ -251,7 +251,7 @@ def test_pickling_w_slots_w_empty_dict():
...
@@ -251,7 +251,7 @@ def test_pickling_w_slots_w_empty_dict():
{}
{}
>>> print_dict(s)
>>> print_dict(s)
{'s1': 'x', 's2': 'y', 's3': 'z'}
{'s1': 'x', 's2': 'y', 's3': 'z'}
>>> pickle.loads(pickle.dumps(x)) == x
>>> pickle.loads(pickle.dumps(x)) == x
1
1
>>> pickle.loads(pickle.dumps(x, 0)) == x
>>> pickle.loads(pickle.dumps(x, 0)) == x
...
@@ -262,7 +262,7 @@ def test_pickling_w_slots_w_empty_dict():
...
@@ -262,7 +262,7 @@ def test_pickling_w_slots_w_empty_dict():
1
1
>>> x.s4 = 'spam'
>>> x.s4 = 'spam'
>>> d, s = x.__getstate__()
>>> d, s = x.__getstate__()
>>> print_dict(d)
>>> print_dict(d)
{}
{}
...
@@ -289,6 +289,3 @@ def test_suite():
...
@@ -289,6 +289,3 @@ def test_suite():
))
))
if
__name__
==
'__main__'
:
unittest
.
main
()
if
__name__
==
'__main__'
:
unittest
.
main
()
src/scripts/fsstats.py
View file @
14b1ec0d
...
@@ -164,7 +164,7 @@ def main(path):
...
@@ -164,7 +164,7 @@ def main(path):
if tid is not None:
if tid is not None:
txn_objects.add(objects)
txn_objects.add(objects)
m = rx_txn.search(line)
m = rx_txn.search(line)
if not m:
if not m:
continue
continue
...
...
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