- 02 Nov, 2001 1 commit
-
-
Barry Warsaw authored
acceptability of serials=None for the object-creation store() call. Note that _dostore() itself never exercises this condition because it coerces its own serial argument to ZERO (a.k.a. '\0'*8) when None is passed in.
-
- 31 Oct, 2001 1 commit
-
-
Jeremy Hylton authored
The Mapping_update() method iterated over a sequence of 2-tuples, but held an extra reference to the sequence. The sequence object was DECREFed on an error exit but not on the normal return. The fix reworks the control flow of the function to make the reference counting behavior a little clearer: - Test for call with no arguments and return immediately if so. - If the argument is a sequence, don't INCREF it. - If the argument passed isn't a sequence, call its items() method and store the result in the local variables seq and items. - On exit, do Py_XDECREF(items). This will do a decref only if a the second case above applied. Two other minor nits: - Make consistent use of spaces around = in assignments (as opposed to a fix of both) - Remove assignment from conditional expression.
-
- 29 Oct, 2001 3 commits
-
-
Jeremy Hylton authored
pack() uses a coarse-grain timer to decide which revisions to look at during a pack. The tests depend on a pack() called after a commit to see that committed transaction, but the implementation can't guarantee that it will. In particular, pack() converts its time argument to a TimeStamp by truncating to the nearest second. If a transaction T1 commits and pack is called (with the current time as its argument) during the same second, the pack() will not consider T1. This was causing intermittent, but frequent test failures on Windows. The fix is to add a small delay in the pack test cases to guarantee that pack(time.time()) will always see the last committed transaction.
-
Jeremy Hylton authored
If the packpos returned by the read_index() call is 4, return immediately. In this case, the very first transaction, which contains the root object, is after the pack time. This is a degenerate case, but it seems clearest to do nothing. This change eliminates an unexpected traceback in pack() that occurred frequently, but not every time, when testing on Windows. When read_index() returned 4, a seek() call in _redundant_pack() would fail with a bad argument. Add an assertion to _redundant_pack() because it should never be called with bogus arguments as a result of the other change.
-
Jeremy Hylton authored
Don't test for explicit end-of-line markers, since they vary across platforms. Instead, strip() the line read and test for the actual content.
-
- 26 Oct, 2001 3 commits
-
-
Jeremy Hylton authored
If a storage doesn't support T.U. and is old enough, you need to first check if it has a supportsTransactionalUndo attribute.
-
Jeremy Hylton authored
There are a few problems with Zope 2.3 that prevented the tests from succeeding. Since the 1.0 release must support Zope 2.3, we'll need to hack the various tests to work around them. Assuming releases after 1.0 don't need to work with 2.3: After the 1.0 final release, I'll tag both ZEO and ZODB trees and then undo all these silly changes. Problems: - no support for transactional undo or getSerial() - FileStorage commitVersion() and abortVersion() didn't check for bogus arguments
-
Jeremy Hylton authored
-
- 24 Oct, 2001 4 commits
-
-
Jeremy Hylton authored
This implementation is only faster for an object that is not modified in a version. For an object modified in a version, it should be about the same as the default getSerial() in BaseStorage.
-
Barry Warsaw authored
situation.
-
Jeremy Hylton authored
Didn't write a more interesting test in checkAbortVersion: # XXX 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.
-
Jeremy Hylton authored
BaseStorage implements this in terms of modifiedInVersion() and load(). Other storages may (perhaps even should) implement it more efficiently.
-
- 22 Oct, 2001 4 commits
-
-
Andreas Jung authored
now a full success :-)
-
Jeremy Hylton authored
(Minor change to tb handling to avoid unnecessary binding to None for v and tb.)
-
Jeremy Hylton authored
Prevents memory leak for each _restore_index() call.
-
Jeremy Hylton authored
-
- 19 Oct, 2001 3 commits
-
-
Andreas Jung authored
exceptions (this error occured when trying to access an OOBTree with a string with non-ascii encoding e.g. latin1. In this case Python raises a Unicode exception that has not been caught and not propagated to the application.
-
Andreas Jung authored
-
Shane Hathaway authored
-
- 18 Oct, 2001 1 commit
-
-
Jeremy Hylton authored
Replace explicit equality tests in assert statements, which aren't executed when running python -O, when self.assertEquals(), which also has the side effect of producing better error messages when the test fails.
-
- 17 Oct, 2001 1 commit
-
-
Tres Seaver authored
o Land unit test cleanup from branch. o Known breakage as of 2001/10/17: - TAL test suite is very broken (TAL is currently suppressed in lib/python/.testinfo). - AccessControl tests don't run if run first; lib/python/.testinfo pushes them to the end of the queue, at which point they *do* run. Global side effects suck! - lib/python/BTrees/testBTreesUnicode.py: weird flakiness around comparison of ASCII and Unicode strings; breaks in different ways under Python 2.1 and 2.2. - lib/python/Products/PageTemplates/tests: three tests break due to security asserctions.
-
- 15 Oct, 2001 3 commits
-
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
Andreas Jung authored
strings as keys
-
- 10 Oct, 2001 2 commits
-
-
Jeremy Hylton authored
-
Jeremy Hylton authored
Add getLogFile() method that provides hook for SpreadLog subclass.
-
- 08 Oct, 2001 5 commits
-
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
Jeremy Hylton authored
This change includes a minor change to semantics for reinitialization(). There are three chief performance-related changes: - Do not check whether logging is enabled in the actual log call. Instead check enviroment variables when the module is imported and whenever an explicit initialize() call is made. This might seem like it limits the user's ability to turn logging on and off, but I don't believe it does. Logging is controlled by environment variables. Once the Python script is working, the environment variables won't change. This change makes the case of no logging fast, instead of slow. - Each log call goes through a method on the stupid_log_write() object instead of through __call__(). It's much faster to call a method than an instance. - Use "print >> file" rather than "file.write()". It appears to be a bit faster. Replaced _set_stupid_dest() with _set_log_dest().
-
Jeremy Hylton authored
-
- 05 Oct, 2001 9 commits
-
-
Jeremy Hylton authored
-
Jeremy Hylton authored
Also, reformat code using guidlines from the Friends of Whitespace. Fix newTimeStamp() so that it always returns a timestamp. XXX still not sure that it works.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
Jeremy Hylton authored
Replace long multiplies with long shifts in U64() and u64().
-
Jeremy Hylton authored
-
Jeremy Hylton authored
- use update() method where appropriate - don't pass None as second argument to get(). it's the default. - consistent space after comma between args
-
Jeremy Hylton authored
In tpc_vote() rename local variable id to tid. Add doc string to read_index(), helpful but not complete yet. In read_index(), replace an iteration over the tindex for each transaction with a few calls that do the work with much less overhead.
-
Jeremy Hylton authored
Also, add an open() method to open the storage. Used by PersistentStorage, too.
-