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
Kirill Smelkov
ZODB
Commits
9a580027
Commit
9a580027
authored
Jul 10, 2010
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DemoStorages didn't close their changes databases when they were
created temporarily (not passed to the constructor).
parent
8bf3c3cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
src/CHANGES.txt
src/CHANGES.txt
+4
-0
src/ZODB/DemoStorage.py
src/ZODB/DemoStorage.py
+7
-1
src/ZODB/DemoStorage.test
src/ZODB/DemoStorage.test
+5
-0
No files found.
src/CHANGES.txt
View file @
9a580027
...
...
@@ -8,6 +8,10 @@
Bugs fixed
----------
- When a demo storage push method was used to create a new demo
storage and the new storage was closed, the original was
(incorrectly) closed.
- DemoStorages didn't close their changes databases when they were
created temporarily (not passed to the constructor).
...
...
src/ZODB/DemoStorage.py
View file @
9a580027
...
...
@@ -94,7 +94,12 @@ class DemoStorage(object):
self
.
base
.
cleanup
()
self
.
changes
.
cleanup
()
__opened
=
True
def
opened
(
self
):
return
self
.
__opened
def
close
(
self
):
self
.
__opened
=
False
if
self
.
close_base_on_close
:
self
.
base
.
close
()
if
self
.
close_changes_on_close
:
...
...
@@ -253,7 +258,8 @@ class DemoStorage(object):
return
self
.
base
def
push
(
self
,
changes
=
None
):
return
self
.
__class__
(
base
=
self
,
changes
=
changes
)
return
self
.
__class__
(
base
=
self
,
changes
=
changes
,
close_base_on_close
=
False
)
def
store
(
self
,
oid
,
serial
,
data
,
version
,
transaction
):
assert
version
==
''
,
"versions aren't supported"
...
...
src/ZODB/DemoStorage.test
View file @
9a580027
...
...
@@ -185,6 +185,11 @@ The pop method closes the changes storage and returns the base
>>> changes.opened()
False
If storage returned by push is closed, the original storage isn't:
>>> demo3.push().close()
>>> demo2.opened()
True
Blob Support
============
...
...
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