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
Joshua
zodb
Commits
85398aa0
Commit
85398aa0
authored
Nov 30, 2007
by
Gary Poster
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix small bug that the Connection.isReadOnly method did not work after a savepoint
parent
edea5b56
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
2 deletions
+20
-2
NEWS.txt
NEWS.txt
+2
-0
src/ZODB/Connection.py
src/ZODB/Connection.py
+1
-0
src/ZODB/component.xml
src/ZODB/component.xml
+2
-2
src/ZODB/tests/testConnectionSavepoint.py
src/ZODB/tests/testConnectionSavepoint.py
+15
-0
No files found.
NEWS.txt
View file @
85398aa0
...
...
@@ -34,6 +34,8 @@ General
on datetimes or serials (TIDs). See
src/ZODB/historical_connections.txt.
- (3.9.0a1) Fixed small bug that the Connection.isReadOnly method didn't
work after a savepoint.
ZEO
---
...
...
src/ZODB/Connection.py
View file @
85398aa0
...
...
@@ -1175,6 +1175,7 @@ class TmpStore:
self
.
_storage
=
storage
for
method
in
(
'getName'
,
'new_oid'
,
'getSize'
,
'sortKey'
,
'loadBefore'
,
'isReadOnly'
):
setattr
(
self
,
method
,
getattr
(
storage
,
method
))
...
...
src/ZODB/component.xml
View file @
85398aa0
...
...
@@ -182,8 +182,8 @@
</description>
<key
name=
"historical-pool-size"
datatype=
"integer"
default=
"3"
/>
<description>
The expected maximum
number of connections simultaneously open
per historical revisio
n.
The expected maximum
total number of historical connections
simultaneously ope
n.
</description>
<key
name=
"historical-cache-size"
datatype=
"integer"
default=
"1000"
/>
<description>
...
...
src/ZODB/tests/testConnectionSavepoint.py
View file @
85398aa0
...
...
@@ -138,6 +138,21 @@ Verify all the values are as expected:
>>> db.close()
"""
def
testIsReadonly
():
"""
\
The connection isReadonly method relies on the _storage to have an isReadOnly.
We simply rely on the underlying storage method.
>>> import ZODB.tests.util
>>> db = ZODB.tests.util.DB()
>>> connection = db.open()
>>> root = connection.root()
>>> root['a'] = 1
>>> sp = transaction.savepoint()
>>> connection.isReadOnly()
False
"""
def
test_suite
():
return
unittest
.
TestSuite
((
doctest
.
DocFileSuite
(
'testConnectionSavepoint.txt'
),
...
...
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