Commit 29a9e80b authored by Vincent Pelletier's avatar Vincent Pelletier

Drop backward compatibility with older ZODB.

Update README to set minimum ZODB version instead of minimum Zope version.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2507 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 8253d5f7
...@@ -11,7 +11,7 @@ Requirements ...@@ -11,7 +11,7 @@ Requirements
- MySQLdb http://sourceforge.net/projects/mysql-python - MySQLdb http://sourceforge.net/projects/mysql-python
- Zope 2.8 or later - ZODB 3.10 or later (required python 2.5 or later, only for client nodes)
Overview Overview
......
...@@ -64,13 +64,6 @@ else: ...@@ -64,13 +64,6 @@ else:
compress = real_compress compress = real_compress
makeChecksum = real_makeChecksum makeChecksum = real_makeChecksum
# Set environment variable to non-empty value to ignore:
# - multiple calls to tpc_begin for same transaction
# - tpc_finish called for different transaction
# This is needed to conform to the "old" ZODB API (ex: 3.4).
RELAX_TRANSACTION_CHECKS = bool(os.getenv('NEO_RELAX_TRANSACTION_CHECKS',
False))
class ThreadContext(object): class ThreadContext(object):
def __init__(self): def __init__(self):
...@@ -606,8 +599,6 @@ class Application(object): ...@@ -606,8 +599,6 @@ class Application(object):
# First get a transaction, only one is allowed at a time # First get a transaction, only one is allowed at a time
if self.local_var.txn is transaction: if self.local_var.txn is transaction:
# We already begin the same transaction # We already begin the same transaction
if RELAX_TRANSACTION_CHECKS:
return
raise StorageTransactionError('Duplicate tpc_begin calls') raise StorageTransactionError('Duplicate tpc_begin calls')
if self.local_var.txn is not None: if self.local_var.txn is not None:
raise NeoException, 'local_var is not clean in tpc_begin' raise NeoException, 'local_var is not clean in tpc_begin'
...@@ -865,8 +856,6 @@ class Application(object): ...@@ -865,8 +856,6 @@ class Application(object):
"""Finish current transaction.""" """Finish current transaction."""
local_var = self.local_var local_var = self.local_var
if local_var.txn is not transaction: if local_var.txn is not transaction:
if RELAX_TRANSACTION_CHECKS:
return
raise StorageTransactionError('tpc_finish called for wrong ' raise StorageTransactionError('tpc_finish called for wrong '
'transaction') 'transaction')
if not local_var.txn_voted: if not local_var.txn_voted:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment