[CalendarServer-changes] [6834] CalendarServer/branches/users/glyph/db-reconnect/twext/enterprise

source_changes at macosforge.org source_changes at macosforge.org
Fri Jan 28 17:40:57 PST 2011


Revision: 6834
          http://trac.macosforge.org/projects/calendarserver/changeset/6834
Author:   glyph at apple.com
Date:     2011-01-28 17:40:57 -0800 (Fri, 28 Jan 2011)
Log Message:
-----------
Clean up FIXMEs, doc bugs.

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/db-reconnect/twext/enterprise/adbapi2.py
    CalendarServer/branches/users/glyph/db-reconnect/twext/enterprise/test/test_adbapi2.py

Modified: CalendarServer/branches/users/glyph/db-reconnect/twext/enterprise/adbapi2.py
===================================================================
--- CalendarServer/branches/users/glyph/db-reconnect/twext/enterprise/adbapi2.py	2011-01-29 01:40:46 UTC (rev 6833)
+++ CalendarServer/branches/users/glyph/db-reconnect/twext/enterprise/adbapi2.py	2011-01-29 01:40:57 UTC (rev 6834)
@@ -53,8 +53,9 @@
 from twext.enterprise.ienterprise import AlreadyFinishedError, IAsyncTransaction
 
 
-# FIXME: there should be no default, it should be discovered dynamically
-# everywhere.  Right now we're only using pgdb so we only support that.
+# FIXME: there should be no default for DEFAULT_PARAM_STYLE, it should be
+# discovered dynamically everywhere.  Right now we're only using pgdb so we only
+# support that.
 
 DEFAULT_PARAM_STYLE = 'pyformat'
 
@@ -65,7 +66,7 @@
     """
     implements(IAsyncTransaction)
 
-    # FIXME: this should *really* be 
+    # See DEFAULT_PARAM_STYLE FIXME above.
     paramstyle = DEFAULT_PARAM_STYLE
 
     def __init__(self, threadHolder, connection, cursor):
@@ -178,9 +179,7 @@
 
     implements(IAsyncTransaction)
 
-    # FIXME: this should be relayed from the connection factory of the thing
-    # creating the spooled transaction.
-
+    # See DEFAULT_PARAM_STYLE FIXME above.
     paramstyle = DEFAULT_PARAM_STYLE
 
     def __init__(self):
@@ -409,7 +408,6 @@
         """
         holder = self._createHolder()
         holder.start()
-        # FIXME: attach the holder to the txn so it can be aborted.
         txn = _ConnectingPsuedoTxn(self, holder)
         # take up a slot in the 'busy' list, sit there so we can be aborted.
         self.busy.append(txn)
@@ -428,9 +426,6 @@
             txn._baseTxn = baseTxn
             self.reclaim(txn)
         def maybeTryAgain(f):
-            # not all errors are errors in connect() - in particular there's the
-            # possibility of errors in submit(); TODO: test for shutdown while
-            # connecting.
             log.err(f)
             txn._retry = self.reactor.callLater(self.RETRY_TIMEOUT, resubmit)
         def resubmit():
@@ -443,7 +438,7 @@
     def reclaim(self, txn):
         """
         Shuck the L{PooledSqlTxn} wrapper off, and recycle the underlying
-        BaseSqlTxn into the free list.
+        L{BaseSqlTxn} into the free list.
         """
         self.busy.remove(txn)
         baseTxn = txn._baseTxn
@@ -548,7 +543,7 @@
 
 class QueryComplete(Command):
     """
-    A query issued with ExecSQL is complete.
+    A query issued with L{ExecSQL} is complete.
     """
 
     arguments = [('queryID', String()),
@@ -700,8 +695,7 @@
 
     implements(IAsyncTransaction)
 
-    # FIXME: this needs to come from the other end of the wire.
-
+    # See DEFAULT_PARAM_STYLE FIXME above.
     paramstyle = DEFAULT_PARAM_STYLE
 
     def __init__(self, client, transactionID):

Modified: CalendarServer/branches/users/glyph/db-reconnect/twext/enterprise/test/test_adbapi2.py
===================================================================
--- CalendarServer/branches/users/glyph/db-reconnect/twext/enterprise/test/test_adbapi2.py	2011-01-29 01:40:46 UTC (rev 6833)
+++ CalendarServer/branches/users/glyph/db-reconnect/twext/enterprise/test/test_adbapi2.py	2011-01-29 01:40:57 UTC (rev 6834)
@@ -32,6 +32,9 @@
 
 
 class Child(object):
+    """
+    An object with a L{Parent}, in its list of C{children}.
+    """
     def __init__(self, parent):
         self.parent = parent
         self.parent.children.append(self)
@@ -42,6 +45,9 @@
 
 
 class Parent(object):
+    """
+    An object with a list of L{Child}ren.
+    """
 
     def __init__(self):
         self.children = []
@@ -115,7 +121,6 @@
 
 class ConnectionFactory(Parent):
 
-
     def __init__(self):
         Parent.__init__(self)
         self.idcounter = count(1)
@@ -414,7 +419,6 @@
         [holder] = self.holders
         self.assertEquals(holder.started, True)
         self.assertEquals(holder.stopped, True)
-        # FIXME: next, 'failed' case.
 
 
     def test_shutdownDuringAttemptFailed(self):
@@ -436,6 +440,6 @@
         [holder] = self.holders
         self.assertEquals(holder.started, True)
         self.assertEquals(holder.stopped, True)
-        # FIXME: next, 'failed' case.
 
 
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110128/ab7384a2/attachment-0001.html>


More information about the calendarserver-changes mailing list