Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
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
neoppod
Commits
d9ab77b8
Commit
d9ab77b8
authored
Nov 13, 2013
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client: drop support for ZODB < 3.10
parent
c4b2c78b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
16 deletions
+9
-16
neo/client/Storage.py
neo/client/Storage.py
+3
-3
neo/client/__init__.py
neo/client/__init__.py
+1
-4
neo/client/app.py
neo/client/app.py
+4
-8
neo/tests/client/testClientApp.py
neo/tests/client/testClientApp.py
+1
-1
No files found.
neo/client/Storage.py
View file @
d9ab77b8
...
...
@@ -30,7 +30,7 @@ class Storage(BaseStorage.BaseStorage,
ConflictResolution
.
ConflictResolvingStorage
):
"""Wrapper class for neoclient."""
implements
(
*
filter
(
None
,
(
implements
(
ZODB
.
interfaces
.
IStorage
,
# "restore" missing for the moment, but "store" implements this
# interface.
...
...
@@ -41,8 +41,8 @@ class Storage(BaseStorage.BaseStorage,
# ZODB.interfaces.IStorageIteration,
ZODB
.
interfaces
.
IStorageUndoable
,
ZODB
.
interfaces
.
IExternalGC
,
getattr
(
ZODB
.
interfaces
,
'ReadVerifyingStorage'
,
None
),
# BBB ZODB 3.9
)
))
ZODB
.
interfaces
.
ReadVerifyingStorage
,
)
def
__init__
(
self
,
master_nodes
,
name
,
read_only
=
False
,
compress
=
None
,
logfile
=
None
,
_app
=
None
,
**
kw
):
...
...
neo/client/__init__.py
View file @
d9ab77b8
...
...
@@ -100,10 +100,7 @@ if 1:
# know any legitimate use of DB access outside a transaction.
def
afterCompletion
(
self
,
*
ignored
):
try
:
self
.
_readCurrent
.
clear
()
except
AttributeError
:
# BBB: ZODB < 3.10
pass
self
.
_readCurrent
.
clear
()
# PATCH: do not call sync()
self
.
_flush_invalidations
()
Connection
.
afterCompletion
=
afterCompletion
neo/client/app.py
View file @
d9ab77b8
...
...
@@ -641,14 +641,14 @@ class Application(object):
# A later serial has already been resolved, skip.
resolved_serial_set
.
update
(
conflict_serial_set
)
continue
# BBB: On ZODB < 3.10, tryToResolveConflict returns None
# instead of raising ConflictError.
try
:
new_data
=
tryToResolveConflict
(
oid
,
conflict_serial
,
serial
,
data
)
except
ConflictError
:
new_data
=
None
if
new_data
is
not
None
:
logging
.
info
(
'Conflict resolution failed for '
'%r:%r with %r'
,
dump
(
oid
),
dump
(
serial
),
dump
(
conflict_serial
))
else
:
logging
.
info
(
'Conflict resolution succeeded for '
'%r:%r with %r'
,
dump
(
oid
),
dump
(
serial
),
dump
(
conflict_serial
))
...
...
@@ -660,10 +660,6 @@ class Application(object):
self
.
_store
(
txn_context
,
oid
,
conflict_serial
,
new_data
)
append
(
oid
)
continue
else
:
logging
.
info
(
'Conflict resolution failed for '
'%r:%r with %r'
,
dump
(
oid
),
dump
(
serial
),
dump
(
conflict_serial
))
raise
ConflictError
(
oid
=
oid
,
serials
=
(
conflict_serial
,
serial
),
data
=
data
)
return
result
...
...
neo/tests/client/testClientApp.py
View file @
d9ab77b8
...
...
@@ -62,7 +62,7 @@ def resolving_tryToResolveConflict(oid, conflict_serial, serial, data):
return
data
def
failing_tryToResolveConflict
(
oid
,
conflict_serial
,
serial
,
data
):
r
eturn
None
r
aise
ConflictError
class
ClientApplicationTests
(
NeoUnitTestBase
):
...
...
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