[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0.0-Zope-2.8/src/zope/app/ Merge rev 29970 from Zope3 trunk.

Tim Peters tim.one at comcast.net
Thu Apr 14 14:18:08 EDT 2005


Log message for revision 29984:
  Merge rev 29970 from Zope3 trunk.
  
  Updated to work with a version of ZODB without the premature and
  non-working savepoint feature.
  
  This is needed to allow Zope trunk to work again with a current
  version of ZODB.
  

Changed:
  U   Zope3/branches/ZopeX3-3.0.0-Zope-2.8/src/zope/app/mail/delivery.py
  U   Zope3/branches/ZopeX3-3.0.0-Zope-2.8/src/zope/app/rdb/__init__.py

-=-
Modified: Zope3/branches/ZopeX3-3.0.0-Zope-2.8/src/zope/app/mail/delivery.py
===================================================================
--- Zope3/branches/ZopeX3-3.0.0-Zope-2.8/src/zope/app/mail/delivery.py	2005-04-14 18:08:45 UTC (rev 29983)
+++ Zope3/branches/ZopeX3-3.0.0-Zope-2.8/src/zope/app/mail/delivery.py	2005-04-14 18:18:08 UTC (rev 29984)
@@ -34,7 +34,6 @@
 from zope.app.mail.maildir import Maildir
 from transaction.interfaces import IDataManager
 import transaction
-from transaction.util import NoSavepointSupportRollback
 
 class MailDataManager(object):
     implements(IDataManager)

Modified: Zope3/branches/ZopeX3-3.0.0-Zope-2.8/src/zope/app/rdb/__init__.py
===================================================================
--- Zope3/branches/ZopeX3-3.0.0-Zope-2.8/src/zope/app/rdb/__init__.py	2005-04-14 18:08:45 UTC (rev 29983)
+++ Zope3/branches/ZopeX3-3.0.0-Zope-2.8/src/zope/app/rdb/__init__.py	2005-04-14 18:18:08 UTC (rev 29984)
@@ -25,8 +25,7 @@
 from persistent import Persistent
 
 import transaction
-from transaction.interfaces import IDataManager, IRollback
-from transaction.util import NoSavepointSupportRollback
+from transaction.interfaces import IDataManager
 
 from zope.security.checker import NamesChecker
 
@@ -362,30 +361,6 @@
     def commit(self, txn):
         self._dbconn.commit()
 
-    def savepoint(self, txn):
-        """Create a savepoint that can not be rolled back
-
-        Savepoint implementation for data managers that do not
-        support savepoints. We don't raise an error here, because
-        there's no harm in ignoring a call if no one ever tries to
-        rollback a savepoint.  By ignoring the call, the data
-        manager can be used with data managers that so support
-        savepoints.
-
-        We return a rollback that raises an error if we call it.
-
-        >>> dm = ZopeDBTransactionManager(None)
-        >>> rb = dm.savepoint(None)
-        >>> rb.rollback()
-        Traceback (most recent call last):
-        ...
-        NotImplementedError: """ \
-           """ZopeDBTransactionManager data managers do not support """ \
-           """savepoints (aka subtransactions
-        """
-
-        return NoSavepointSupportRollback(self)
-
     def sortKey(self):
         """
         ZODB uses a global sort order to prevent deadlock when it commits
@@ -444,7 +419,3 @@
     klass_namespace['__slots__'] = tuple(columns)
 
     return type('GeneratedRowClass', (Row,), klass_namespace)
-
-
-
-



More information about the Zope3-Checkins mailing list