[Zope3-checkins]
SVN: Zope3/branches/ZopeX3-3.0.0-Zope-2.8/src/zope/app/mail/delivery.py
Change MailDataManager to implement the actual IDataManager
interface.
Tim Peters
tim.one at comcast.net
Thu Mar 31 14:01:02 EST 2005
Log message for revision 29758:
Change MailDataManager to implement the actual IDataManager interface.
I don't think I like this -- it's a lot more complicated, and you really
can't tell from the current interface description what the heck all these
methods are supposed to do. That's not MailDataManager's fault, though.
Changed:
U Zope3/branches/ZopeX3-3.0.0-Zope-2.8/src/zope/app/mail/delivery.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-03-31 16:48:05 UTC (rev 29757)
+++ Zope3/branches/ZopeX3-3.0.0-Zope-2.8/src/zope/app/mail/delivery.py 2005-03-31 19:01:01 UTC (rev 29758)
@@ -44,22 +44,34 @@
self.args = args
self.onAbort = onAbort
- def prepare(self, transaction):
- pass
+ def commit(self, transaction):
+ self.callable(*self.args)
def abort(self, transaction):
- if self.onAbort:
+ if self.onAbort:
self.onAbort()
- def commit(self, transaction):
- self.callable(*self.args)
-
- def savepoint(self, transaction):
- return NoSavepointSupportRollback(self)
-
def sortKey(self):
return id(self)
+ # No subtransaction support.
+ def abort_sub(self, transaction):
+ pass
+ commit_sub = abort_sub
+
+ def beforeCompletion(self, transaction):
+ pass
+
+ afterCompletion = beforeCompletion
+
+ def tpc_begin(self, transaction, subtransaction=False):
+ assert not subtransaction
+
+ def tpc_vote(self, transaction):
+ pass
+
+ tpc_finish = tpc_abort = tpc_vote
+
class AbstractMailDelivery(object):
def newMessageId(self):
More information about the Zope3-Checkins
mailing list