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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZEO
Commits
4654bb13
Commit
4654bb13
authored
Jul 07, 1999
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug that messed up ZClass persistence.
parent
a9db74f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
27 deletions
+31
-27
src/ZODB/Connection.py
src/ZODB/Connection.py
+31
-27
No files found.
src/ZODB/Connection.py
View file @
4654bb13
...
@@ -84,8 +84,8 @@
...
@@ -84,8 +84,8 @@
##############################################################################
##############################################################################
"""Database connection support
"""Database connection support
$Id: Connection.py,v 1.1
4 1999/07/07 10:58:47
jim Exp $"""
$Id: Connection.py,v 1.1
5 1999/07/07 19:52:28
jim Exp $"""
__version__
=
'$Revision: 1.1
4
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
5
$'
[
11
:
-
2
]
from
cPickleCache
import
PickleCache
from
cPickleCache
import
PickleCache
from
POSException
import
ConflictError
,
ExportError
from
POSException
import
ConflictError
,
ExportError
...
@@ -402,31 +402,35 @@ class Connection(ExportImport.ExportImport):
...
@@ -402,31 +402,35 @@ class Connection(ExportImport.ExportImport):
def
setklassstate
(
self
,
object
,
def
setklassstate
(
self
,
object
,
tt
=
type
(()),
ct
=
type
(
HelperClass
)):
tt
=
type
(()),
ct
=
type
(
HelperClass
)):
oid
=
object
.
_p_oid
try
:
__traceback_info__
=
oid
oid
=
object
.
_p_oid
p
,
serial
=
self
.
_storage
.
load
(
oid
,
self
.
_version
)
__traceback_info__
=
oid
file
=
StringIO
(
p
)
p
,
serial
=
self
.
_storage
.
load
(
oid
,
self
.
_version
)
unpickler
=
Unpickler
(
file
)
file
=
StringIO
(
p
)
unpickler
.
persistent_load
=
self
.
_persistent_load
unpickler
=
Unpickler
(
file
)
unpickler
.
persistent_load
=
self
.
_persistent_load
copy
=
unpickler
.
load
()
copy
=
unpickler
.
load
()
klass
,
args
=
copy
klass
,
args
=
copy
if
klass
is
not
ExtensionKlass
:
LOG
(
'ZODB'
,
ERROR
,
if
klass
is
not
ExtensionKlass
:
"Unexpected klass when setting class state on %s"
LOG
(
'ZODB'
,
ERROR
,
%
getattr
(
object
,
'__name__'
,
'(?)'
))
"Unexpected klass when setting class state on %s"
return
%
getattr
(
object
,
'__name__'
,
'(?)'
))
return
copy
=
apply
(
klass
,
args
)
object
.
__dict__
.
clear
()
copy
=
apply
(
klass
,
args
)
object
.
__dict__
.
update
(
copy
.
__dict__
)
object
.
__dict__
.
clear
()
object
.
__dict__
.
update
(
copy
.
__dict__
)
object
.
_p_oid
=
oid
object
.
_p_jar
=
self
object
.
_p_oid
=
oid
object
.
_p_changed
=
None
object
.
_p_jar
=
self
object
.
_p_serial
=
serial
object
.
_p_changed
=
0
object
.
_p_serial
=
serial
except
:
LOG
(
'ZODB'
,
ERROR
,
'setklassstate failed'
,
error
=
sys
.
exc_info
)
raise
def
tpc_abort
(
self
,
transaction
):
def
tpc_abort
(
self
,
transaction
):
self
.
_storage
.
tpc_abort
(
transaction
)
self
.
_storage
.
tpc_abort
(
transaction
)
...
...
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