[Checkins] SVN: zc.twist/trunk/s make zc.twist work with ZODB 3.8;
is not backward compatible in that you can no
Benji York
benji at zope.com
Thu Jun 28 17:39:14 EDT 2007
Log message for revision 77197:
make zc.twist work with ZODB 3.8; is not backward compatible in that you can no
longer pass mvcc, version, or synch to get_connection
Changed:
U zc.twist/trunk/setup.py
U zc.twist/trunk/src/zc/twist/__init__.py
-=-
Modified: zc.twist/trunk/setup.py
===================================================================
--- zc.twist/trunk/setup.py 2007-06-28 21:35:26 UTC (rev 77196)
+++ zc.twist/trunk/setup.py 2007-06-28 21:39:14 UTC (rev 77197)
@@ -13,7 +13,7 @@
description='Mixing Twisted and ZODB',
license='ZPL',
install_requires=[
- 'ZODB3 ==3.7',
+ 'ZODB3',
'zope.component',
'setuptools',
'twisted ==2.1dev',
Modified: zc.twist/trunk/src/zc/twist/__init__.py
===================================================================
--- zc.twist/trunk/src/zc/twist/__init__.py 2007-06-28 21:35:26 UTC (rev 77196)
+++ zc.twist/trunk/src/zc/twist/__init__.py 2007-06-28 21:39:14 UTC (rev 77197)
@@ -1,5 +1,6 @@
import random
import types
+import warnings
import ZODB.interfaces
import ZODB.POSException
@@ -75,8 +76,9 @@
available = len(pool.available) + (size - all)
return available
-def get_connection(db, mvcc=True, version='', synch=True,
- deferred=None, backoff=None):
+missing = object()
+
+def get_connection(db, deferred=None, backoff=None):
if deferred is None:
deferred = twisted.internet.defer.Deferred()
if backoff is None:
@@ -90,13 +92,10 @@
# later.
if backoff < .5 and not availableConnectionCount(db):
twisted.internet.reactor.callLater(
- backoff, get_connection, db, mvcc, version, synch,
- deferred, backoff)
+ backoff, get_connection, db, deferred, backoff)
return deferred
- deferred.callback(
- db.open(version=version, mvcc=mvcc,
- transaction_manager=transaction.TransactionManager(),
- synch=synch))
+ deferred.callback(db.open(
+ transaction_manager=transaction.TransactionManager()))
return deferred
def sanitize(failure):
@@ -109,9 +108,6 @@
class Partial(object):
attempt_count = 0
- mvcc = True
- version = ''
- synch = True
def __init__(self, call, *args, **kwargs):
self.call = Reference(call)
@@ -135,8 +131,7 @@
return call(*args, **kwargs)
self.attempt_count = 0
d = twisted.internet.defer.Deferred()
- get_connection(db, self.mvcc, self.version, self.synch
- ).addCallback(self._call, d)
+ get_connection(db).addCallback(self._call, d)
return d
def _resolve(self, conn):
More information about the Checkins
mailing list