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
54d3adc2
Commit
54d3adc2
authored
Jul 02, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug that caused bogus registrations when custom __setstate__
methods did setattrs.
parent
765fa2f7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
10 deletions
+26
-10
src/ZODB/Persistence.py
src/ZODB/Persistence.py
+26
-10
No files found.
src/ZODB/Persistence.py
View file @
54d3adc2
...
...
@@ -3,7 +3,7 @@
__doc__
=
'''Python implementation of a persistent base types
$Id: Persistence.py,v 1.1
3 1998/06/05 22:07:05
jim Exp $'''
$Id: Persistence.py,v 1.1
4 1998/07/02 16:17:44
jim Exp $'''
# Copyright
#
# Copyright 1996 Digital Creations, L.C., 910 Princess Anne
...
...
@@ -58,7 +58,7 @@ $Id: Persistence.py,v 1.13 1998/06/05 22:07:05 jim Exp $'''
#
# (540) 371-6909
#
__version__
=
'$Revision: 1.1
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
4
$'
[
11
:
-
2
]
try
:
from
cPersistence
import
Persistent
...
...
@@ -129,18 +129,30 @@ except:
def
__setattr__
(
self
,
key
,
value
):
' '
changed
=
self
.
_p_changed
if
changed
:
self
.
__dict__
[
key
]
=
value
return
k
=
key
[:
3
]
if
k
==
'_p_'
or
k
==
'_v_'
:
self
.
__dict__
[
key
]
=
value
return
jar
=
self
.
_p_jar
if
self
.
_p_changed
is
None
:
jar
.
setstate
(
self
)
if
jar
is
None
:
self
.
__dict__
[
key
]
=
value
if
jar
is
not
None
:
return
d
=
self
.
__dict__
if
changed
is
None
:
d
[
'_p_changed'
]
=
1
jar
.
setstate
(
self
)
d
[
key
]
=
value
try
:
get_transaction
().
register
(
self
)
self
.
_p_changed
=
1
d
[
'_p_changed'
]
=
1
except
:
pass
def
__changed__
(
self
,
v
=-
1
):
...
...
@@ -192,6 +204,10 @@ except:
############################################################################
# $Log: Persistence.py,v $
# Revision 1.14 1998/07/02 16:17:44 jim
# Fixed bug that caused bogus registrations when custom __setstate__
# methods did setattrs.
#
# Revision 1.13 1998/06/05 22:07:05 jim
# Fixed bug in Persistent.__setattr__ that caused changes to
# "volatile" attributes (starting with _v_) to cause database writes.
...
...
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