Commit 09831488 authored by Tim Peters's avatar Tim Peters

Merge rev 29450 from ZODB trunk.

ZODB is an XXX-free zone now.
parent e3c2ad6d
......@@ -326,10 +326,10 @@ script already has the appropriate magical comments for chkconfig.
zdctl reference
---------------
XXX TBD
TBD
zdrun reference
---------------
XXX TBD
TBD
......@@ -11,8 +11,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""XXX short summary goes here.
"""
$Id$
"""
import unittest
......
......@@ -44,7 +44,7 @@ class TransactionBuffer:
# can happen in Python if one thread closes a file that another
# thread is reading. In a debug build, an assert() can fail.
# XXX If an operation is performed on a closed TransactionBuffer,
# Caution: If an operation is performed on a closed TransactionBuffer,
# it has no effect and does not raise an exception. The only time
# this should occur is when a ClientStorage is closed in one
# thread while another thread is in its tpc_finish(). It's not
......
......@@ -139,7 +139,7 @@ class Suicide(threading.Thread):
os.kill(pid, signal.SIGKILL)
else:
from ZEO.tests.forker import shutdown_zeo_server
# XXX If the -k option was given to zeoserver, then the
# Nott: If the -k option was given to zeoserver, then the
# process will go away but the temp files won't get
# cleaned up.
shutdown_zeo_server(self._adminaddr)
......@@ -167,7 +167,6 @@ def main():
zo.realize(["-C", configfile])
zeo_port = int(zo.address[1])
# XXX a hack
if zo.auth_protocol == "plaintext":
import ZEO.tests.auth_plaintext
......
......@@ -117,7 +117,7 @@ if os.name == 'posix':
else:
# XXX Should define a base class that has the common methods and
# TODO: Should define a base class that has the common methods and
# then put the platform-specific in a subclass named trigger.
# win32-safe version
......
......@@ -61,7 +61,7 @@ class TmpStore:
serial = h[:8]
return self._file.read(size), serial
# XXX clarify difference between self._storage & self._db._storage
# TODO: clarify difference between self._storage & self._db._storage
def modifiedInVersion(self, oid):
if self._index.has_key(oid):
......@@ -118,6 +118,6 @@ class TmpStore:
return ()
def versionEmpty(self, version):
# XXX what is this supposed to do?
# TODO: what is this supposed to do?
if version == self._bver:
return len(self._index)
<component prefix="ZODB.config">
<!-- XXX needs descriptions for everything -->
<!-- TODO needs descriptions for everything -->
<abstracttype name="ZODB.storage"/>
<abstracttype name="ZODB.database"/>
......@@ -95,7 +95,7 @@
<key name="var">
<description>
The directory where persistent cache files are stored. By
default cache files, if they are persistent, are stored in
default cache files, if they are persistent, are stored in
the current directory.
</description>
</key>
......
......@@ -603,7 +603,7 @@ class TransactionalUndoStorage:
self._storage.pack(t, referencesf)
cn.sync()
# XXX Is _cache supposed to have a clear() method, or not?
# TODO: Is _cache supposed to have a clear() method, or not?
# cn._cache.clear()
# The last undo set the value to 3 and pack should
......
......@@ -186,7 +186,7 @@ class VersionStorage:
eq = self.assertEqual
oid, version = self._setup_version()
# XXX Not sure I can write a test for getSerial() in the
# Not sure I can write a test for getSerial() in the
# presence of aborted versions, because FileStorage and
# Berkeley storage give a different answer. I think Berkeley
# is right and FS is wrong.
......@@ -219,9 +219,8 @@ class VersionStorage:
self._storage.tpc_begin(t)
# And try to abort the empty version
if (hasattr(self._storage, 'supportsTransactionalUndo')
and self._storage.supportsTransactionalUndo()):
# XXX FileStorage used to be broken on this one
if (hasattr(self._storage, 'supportsTransactionalUndo') and
self._storage.supportsTransactionalUndo()):
self.assertRaises(POSException.VersionError,
self._storage.abortVersion,
'', t)
......@@ -236,9 +235,8 @@ class VersionStorage:
eq(zodb_unpickle(data), MinPO(51))
def checkCommitVersionErrors(self):
if not (hasattr(self._storage, 'supportsTransactionalUndo')
and self._storage.supportsTransactionalUndo()):
# XXX FileStorage used to be broken on this one
if not (hasattr(self._storage, 'supportsTransactionalUndo') and
self._storage.supportsTransactionalUndo()):
return
eq = self.assertEqual
oid1, version1 = self._setup_version('one')
......
......@@ -33,7 +33,7 @@ def transact(f, note=None, retries=5):
TransactionError occurs, the transaction will not be retried.
"""
# XXX deal with ZEO disconnected errors?
# TODO: deal with ZEO disconnected errors?
def g(*args, **kwargs):
n = retries
......
/*****************************************************************************
Copyright (c) 2001, 2004 Zope Corporation and Contributors.
Copyright (c) 2001, 2004 Zope Corporation and Contributors.
All Rights Reserved.
This software is subject to the provisions of the Zope Public License,
......@@ -43,7 +43,7 @@ static short joff[2][12] = {
static double gmoff=0;
/* XXX should this be stored in sconv? */
/* TODO: May be better (faster) to store in a file static. */
#define SCONV ((double)60) / ((double)(1<<16)) / ((double)(1<<16))
static int
......@@ -121,7 +121,6 @@ TimeStamp_hash(TimeStamp *self)
register unsigned char *p = (unsigned char *)self->data;
register int len = 8;
register long x = *p << 7;
/* XXX unroll loop? */
while (--len >= 0)
x = (1000003*x) ^ *p++;
x ^= 8;
......@@ -131,7 +130,7 @@ TimeStamp_hash(TimeStamp *self)
}
typedef struct {
/* XXX reverse-engineer what's in these things and comment them */
/* TODO: reverse-engineer what's in these things and comment them */
int y;
int m;
int d;
......
......@@ -71,7 +71,7 @@ def test_basic_pickling():
>>> pickle.loads(pickle.dumps(x, 1)) == x
1
XXX disable until Python 2.3.4 >>> pickle.loads(pickle.dumps(x, 2)) == x
>>> pickle.loads(pickle.dumps(x, 2)) == x
1
>>> x.__setstate__({'z': 1})
......@@ -121,8 +121,7 @@ def test_pickling_w_overrides():
1
>>> pickle.loads(pickle.dumps(x, 1)) == x
1
XXX disable until Python 2.3.4 >>> pickle.loads(pickle.dumps(x, 2)) == x
>>> pickle.loads(pickle.dumps(x, 2)) == x
1
"""
......@@ -160,8 +159,7 @@ def test_pickling_w_slots_only():
1
>>> pickle.loads(pickle.dumps(x, 1)) == x
1
XXX disable until Python 2.3.4 >>> pickle.loads(pickle.dumps(x, 2)) == x
>>> pickle.loads(pickle.dumps(x, 2)) == x
1
>>> x.s4 = 'spam'
......@@ -177,8 +175,7 @@ def test_pickling_w_slots_only():
1
>>> pickle.loads(pickle.dumps(x, 1)) == x
1
XXX disable until Python 2.3.4 >>> pickle.loads(pickle.dumps(x, 2)) == x
>>> pickle.loads(pickle.dumps(x, 2)) == x
1
"""
......@@ -212,8 +209,7 @@ def test_pickling_w_slots():
1
>>> pickle.loads(pickle.dumps(x, 1)) == x
1
XXX disable until Python 2.3.4 >>> pickle.loads(pickle.dumps(x, 2)) == x
>>> pickle.loads(pickle.dumps(x, 2)) == x
1
>>> x.s4 = 'spam'
......@@ -230,8 +226,7 @@ def test_pickling_w_slots():
1
>>> pickle.loads(pickle.dumps(x, 1)) == x
1
XXX disable until Python 2.3.4 >>> pickle.loads(pickle.dumps(x, 2)) == x
>>> pickle.loads(pickle.dumps(x, 2)) == x
1
"""
......@@ -252,8 +247,7 @@ def test_pickling_w_slots_w_empty_dict():
1
>>> pickle.loads(pickle.dumps(x, 1)) == x
1
XXX disable until Python 2.3.4 >>> pickle.loads(pickle.dumps(x, 2)) == x
>>> pickle.loads(pickle.dumps(x, 2)) == x
1
>>> x.s4 = 'spam'
......@@ -270,8 +264,7 @@ def test_pickling_w_slots_w_empty_dict():
1
>>> pickle.loads(pickle.dumps(x, 1)) == x
1
XXX disable until Python 2.3.4 >>> pickle.loads(pickle.dumps(x, 2)) == x
>>> pickle.loads(pickle.dumps(x, 2)) == x
1
"""
......
......@@ -11,8 +11,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""XXX short summary goes here.
"""
$Id$
"""
import unittest
......
......@@ -234,9 +234,8 @@ class PersistentWeakKeyDictionary(Persistent):
>>> db.close()
"""
# XXX it is expensive trying to load dead objects from the database.
# It would be helpful if the data manager/connection cached these.
# TODO: It's expensive trying to load dead objects from the database.
# It would be helpful if the data manager/connection cached these.
def __init__(self, adict=None, **kwargs):
self.data = {}
......@@ -298,4 +297,4 @@ class PersistentWeakKeyDictionary(Persistent):
for k, v in adict.items():
self.data[WeakRef(k)] = v
# XXX Someone else can fill out the rest of the methods, with tests. :)
# TODO: May need more methods, and tests.
......@@ -115,7 +115,7 @@ class Status:
- The number of currently active transactions.
- The number of reported queued transactions.
- Client restarts.
- Number of current connections. XXX (This might not be useful.)
- Number of current connections (but this might not be useful).
We can observe these events by reading the following sorts of log
entries:
......@@ -191,7 +191,7 @@ class Status:
if mo is None:
return
called_method = mo.group('method')
# XXX exit earlier if we've got zeoLoad, because it's the most
# Exit early if we've got zeoLoad, because it's the most
# frequently called method and we don't use it.
if called_method == "zeoLoad":
return
......
......@@ -44,7 +44,7 @@ ZEO_VERSION = 2
def check_server(addr, storage, write):
t0 = time.time()
if ZEO_VERSION == 2:
# XXX should do retries w/ exponential backoff
# TODO: should do retries w/ exponential backoff.
cs = ClientStorage(addr, storage=storage, wait=0,
read_only=(not write))
else:
......
......@@ -54,7 +54,7 @@ methods and support a second argument to tpc_begin().
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 (I don't know why not). The tpc_finish()
or tpc_abort() call applies just to that subtransaction.
Once a resource manager is involved in a subtransaction, all
......@@ -128,9 +128,6 @@ manager calls beforeCompletion() when it starts a top-level two-phase
commit. It calls afterCompletion() when a top-level transaction is
committed or aborted. The methods are passed the current Transaction
as their only argument.
XXX This code isn't tested.
"""
import logging
......
......@@ -203,7 +203,6 @@ class TransactionTests(unittest.TestCase):
assert self.nosub1._p_jar.ctpc_finish == 0
assert self.nosub1._p_jar.cabort == 1
# XXX:
def BUGtestNSJSubTransactionCommitAbort(self):
"""
this reveals a bug in transaction.py
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment