- 11 Feb, 2002 5 commits
-
-
Guido van Rossum authored
-
Guido van Rossum authored
-
Jeremy Hylton authored
Summary of changes: - Add function gc_all_items() to call gc_item() on everything in dict. This factors out common code in all the gc methods. - Add check_size() function that factors out code to check cache size before starting a gc. - Simplify argument processing in cc_invalidate(), avoiding a second call to PyArg_ParseTuple() when argument is a sequence instead of a dictionary. - Chance code to reflect belief that NULL return from PyDict_GetItem() does not set exception, except in cases that don't apply for the pickle cache like comparing a string with high-order bit set to a Unicode object. - Use if (!expr) instead of UNLESS(). - Remove all statements from conditionals. - Reformat to 4 spaces and Python-style brace placement. - Put whitespace around operators and after commas.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
- 07 Feb, 2002 1 commit
-
-
Andreas Jung authored
-
- 30 Jan, 2002 12 commits
-
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
Jeremy Hylton authored
Refactor main() to report all errors and exit with non-zero status.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
Remove useless -d option.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
- 28 Jan, 2002 1 commit
-
-
Jeremy Hylton authored
-
- 27 Jan, 2002 1 commit
-
-
Guido van Rossum authored
the trunk. Sigh, if I'd known about that, I wouldn't have written another test suite for TimeStamp. :-(
-
- 26 Jan, 2002 1 commit
-
-
Guido van Rossum authored
aborted.
-
- 25 Jan, 2002 11 commits
-
-
Tim Peters authored
integers, due to MS's slothful 18.2Hz updating of time.time(). The test implicitly assumed in one spot that "the midpoint" between two revids was strictly larger than the smaller one, but that wasn't true on Windows. Adjusted the computation (as suggested by Guido) so that "strictly larger" holds in the end even when the inputs are adjacent integers.
-
Jeremy Hylton authored
-
Guido van Rossum authored
the code try: root = self._getRoot() ... except: self._closeDB(root) self._delDB() raise which fails with an UnboundLocalError if the first line in the try clause fails. Fixed this by setting 'root = None' before each such try clause, and adding a None check to _closeDB(). Also removed a useless 'root = None' from the body of _closeDB(). Barry: I saw this in the saz 1.0c1 release. Is it worth backporting? Probably not given that we're not going to do a merge pre-1.0.
-
Jeremy Hylton authored
Put the tpc_begin() -> tpc_finish() in a try/except. If an error occurs, abort the current transaction and re-raise the error. It appears that some storages (well, only Standby Storage) has trouble shutting down if a transaction is in progress.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
Replace three small integers with symbolic constants. TRANS_HDR_LEN = 23 DATA_HDR_LEN = 42 DATA_VERSION_HDR_LEN = 58 The constants make it easier to remember what kind of header is being read and/or what kind of offset is being computed. Refactor commitVersion(): - Keep locking & arg checking in commitVersion(), but move actual commit logic to _commitVersion(). This removes a level of indentation. - Remove local vars that alias attributes of other vars Add a few more POSKeyError exceptions.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
-
Guido van Rossum authored
-
Guido van Rossum authored
-
Guido van Rossum authored
Highlights: BaseStorage.py: Fix copyTransactionsFrom() when commitVersion(), abortVersion() or transactionalUndo() is used. FileStorage.py: Add restore() method, which can store data records corresponding to undo or version manipulations; add close() method to FileIterator class; raise POSKeyError instead of KeyError for bad keys, to ensure safe formatting of transaction ids (binary strings) in tracebacks. POSException.py: Add POSKeyError. fsdump.py: Deal with records indicating the undo or abort of a version doing object creation. tests/IteratorStorage.py: New unittests for the iterator() method and interface of the storage API; new unit tests for extended file iterators; new class, IteratorDeepCompare; test of the iterator .close() method. tests/testFileStorage.py: Add class FileStorageRecoveryTest, which adds two simple tests for copyTransactionsFrom(). This indirectly tests the new restore() method.
-
- 24 Jan, 2002 8 commits
-
-
Jeremy Hylton authored
1. The exception is in serial, not arg. 2. Must call handle_serials() before tpc_finish(), because handle_serials() may raise an exception that causes the transaction to abort.
-
Jeremy Hylton authored
The main test suite handles ZEO now.
-
Jeremy Hylton authored
-
Guido van Rossum authored
Laredo. [merging from Recovery branch into trunk]
-
matt@zope.com authored
Py_None.
-
Jeremy Hylton authored
Make sure that the test undoes an object creation and make sure that the iterator for that transaction return None for the data attribute.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
This will allow an iterator to handle aborted versions and undone object creations. XXX Still need a test for the latter.
-