[Zope3-checkins] SVN: Zope3/trunk/src/transaction/ Converted XXX to
TODO.
Stephan Richter
srichter at cosmos.phy.tufts.edu
Tue Jul 13 13:07:03 EDT 2004
Log message for revision 26482:
Converted XXX to TODO.
Changed:
U Zope3/trunk/src/transaction/__init__.py
U Zope3/trunk/src/transaction/_transaction.py
U Zope3/trunk/src/transaction/tests/test_transaction.py
-=-
Modified: Zope3/trunk/src/transaction/__init__.py
===================================================================
--- Zope3/trunk/src/transaction/__init__.py 2004-07-13 17:04:09 UTC (rev 26481)
+++ Zope3/trunk/src/transaction/__init__.py 2004-07-13 17:07:03 UTC (rev 26482)
@@ -11,7 +11,11 @@
# FOR A PARTICULAR PURPOSE.
#
############################################################################
+"""Exported transaction functions.
+$Id$
+"""
+
from transaction._transaction import Transaction
from transaction._manager import TransactionManager, ThreadTransactionManager
@@ -29,5 +33,5 @@
def abort(sub=False):
manager.get().abort(sub)
-# XXX Issue deprecation warning if this variant is used?
+# TODO: Issue deprecation warning if this variant is used?
get_transaction = get
Modified: Zope3/trunk/src/transaction/_transaction.py
===================================================================
--- Zope3/trunk/src/transaction/_transaction.py 2004-07-13 17:04:09 UTC (rev 26481)
+++ Zope3/trunk/src/transaction/_transaction.py 2004-07-13 17:07:03 UTC (rev 26482)
@@ -25,7 +25,7 @@
participate in a transaction -- register() and join(). join() takes a
resource manager and adds it to the list of resources. register() is
for backwards compatibility. It takes a persistent object and
-registers its _p_jar attribute. XXX explain adapter
+registers its _p_jar attribute. TODO: explain adapter
Subtransactions
---------------
@@ -54,7 +54,7 @@
The second argument to tpc_begin() indicates that a subtransaction
commit is beginning (if it is true). In a subtransaction, there is no
-tpc_vote() call. (XXX I don't have any idea why.) The tpc_finish()
+tpc_vote() call. (XXX: I don't have any idea why.) The tpc_finish()
or tpc_abort() call applies just to that subtransaction.
Once a resource manager is involved in a subtransaction, all
@@ -187,11 +187,11 @@
def join(self, resource):
if self.status != Status.ACTIVE:
- # XXX Should it be possible to join a committing transaction?
+ # TODO: Should it be possible to join a committing transaction?
# I think some users want it.
raise ValueError("expected txn status %r, but it's %r" % (
Status.ACTIVE, self.status))
- # XXX the prepare check is a bit of a hack, perhaps it would
+ # TODO: the prepare check is a bit of a hack, perhaps it would
# be better to use interfaces. If this is a ZODB4-style
# resource manager, it needs to be adapted, too.
if myhasattr(resource, "prepare"):
@@ -219,7 +219,7 @@
self._adapters[manager] = adapter
self.join(adapter)
else:
- # XXX comment out this expensive assert later
+ # TODO: comment out this expensive assert later
# Use id() to guard against proxies.
assert id(obj) not in map(id, adapter.objects)
adapter.objects.append(obj)
@@ -230,7 +230,7 @@
self._resources.append(adapter)
def begin(self):
- # XXX I'm not sure how this should be implemented. Not doing
+ # TODO: I'm not sure how this should be implemented. Not doing
# anything now, but my best guess is: If nothing has happened
# yet, it's fine. Otherwise, abort this transaction and let
# the txn manager create a new one.
@@ -293,8 +293,8 @@
for rm in L:
rm.tpc_finish(self)
except:
- # XXX do we need to make this warning stronger?
- # XXX It would be nice if the system could be configured
+ # TODO: do we need to make this warning stronger?
+ # TODO: It would be nice if the system could be configured
# to stop committing transactions at this point.
self.log.critical("A storage error occured during the second "
"phase of the two-phase commit. Resources "
@@ -365,8 +365,8 @@
# Merge all of _sub, _nonsub, and _resources.
d = dict(self._sub)
d.update(self._nonsub)
- # XXX I think _sub and _nonsub are disjoint, and that
- # XXX _resources is empty. If so, we can simplify this code.
+ # TODO: I think _sub and _nonsub are disjoint, and that
+ # _resources is empty. If so, we can simplify this code.
assert len(d) == len(self._sub) + len(self._nonsub)
assert not self._resources
for rm in self._resources:
@@ -430,7 +430,7 @@
def setExtendedInfo(self, name, value):
self._extension[name] = value
-# XXX We need a better name for the adapters.
+# TODO: We need a better name for the adapters.
class MultiObjectResourceAdapter(object):
"""Adapt the old-style register() call to the new-style join().
@@ -538,7 +538,7 @@
self._datamanager = datamanager
self._rollback = None
- # XXX I'm not sure why commit() doesn't do anything
+ # TODO: I'm not sure why commit() doesn't do anything
def commit(self, transaction):
pass
Modified: Zope3/trunk/src/transaction/tests/test_transaction.py
===================================================================
--- Zope3/trunk/src/transaction/tests/test_transaction.py 2004-07-13 17:04:09 UTC (rev 26481)
+++ Zope3/trunk/src/transaction/tests/test_transaction.py 2004-07-13 17:07:03 UTC (rev 26482)
@@ -203,7 +203,7 @@
assert self.nosub1._p_jar.ctpc_finish == 0
assert self.nosub1._p_jar.cabort == 1
- # XXX
+ # XXX:
def BUGtestNSJSubTransactionCommitAbort(self):
"""
this reveals a bug in transaction.py
More information about the Zope3-Checkins
mailing list