An error occurred fetching the project authors.
- 29 Jun, 2004 1 commit
-
-
Tim Peters authored
-
- 07 Jun, 2004 1 commit
-
-
Tim Peters authored
-
- 02 Jun, 2004 1 commit
-
-
Jim Fulton authored
-
- 31 May, 2004 2 commits
-
-
Tim Peters authored
testItemsNegativeIndex (3 instances): repaired off-by-one glitch in loop (range(i, j, k) is always exclusive of j).
-
Casey Duncan authored
Fix bug indexing BTreeItems with negative values. Previous code assumed that idexes passed to BTreeItem_item would be negative, in practice this was not the case, and an index of -1 actually passed len(items)-1 as the index argument. Consequently, it was possible to access each item using two negative indexes (i.e., -1 and -len(items)-1). This made each item appear twice in a reverse iteration. Code in BTreeItems_seek attempted to match the sign of the pseudoindex kept in the BTreeItems obj and the incoming index. Since this incoming index was never legitimately negative as it assumed, actually negatives passed in due to "overshooting" the first item would repeat the items again from the end. Removal of this code corrects the problem. Unittests which provoke the error in the original code have also been added.
-
- 16 Apr, 2004 1 commit
-
-
Jeremy Hylton authored
-
- 28 Nov, 2003 1 commit
-
-
Jim Fulton authored
-
- 18 Nov, 2003 1 commit
-
-
Tres Seaver authored
-
- 02 Oct, 2003 1 commit
-
-
Jeremy Hylton authored
-
- 23 Apr, 2003 1 commit
-
-
Jeremy Hylton authored
-
- 31 Jan, 2003 1 commit
-
-
Tim Peters authored
since the last call may have left us with an invalid index. Raise RuntimeError instead of segfaulting (or picking up random trash) if so. A new (and previously segfaulting) test case is courtesy of Steve Alexander.
-
- 14 Jan, 2003 1 commit
-
-
Tim Peters authored
is check.check(btree), which performs value-based sanity checks on a BTree (or TreeSet) that the btree._check() method doesn't do. The new checks include that all the bucket keys are in sorted order, and that all the keys within each bucket, and within each internal BTree node, lie within the range necessary for that node. That last is a subtle invariant that can't be checked locally: it requires propagating range info down the tree, and modifying it for each child and each level. This *should* catch any BTree B for which iterating over the keys yields a key K for which B.has_key(K) returns false. Another function check.display(btree) prints the internal structure of a BTree (or TreeSet, Bucket, or Set) to stdout. If check.check(B) ever complains, a clearer picture of the damage can be gotten by staring at check.display(B)'s output. Also beefed up the regular BTree tests by calling check.check() in key places. No surprises (the tests still pass).
-
- 27 Aug, 2002 1 commit
-
-
Guido van Rossum authored
identification harder, especially when generic test classes are inherited by multiple specific test classes.)
-
- 14 Aug, 2002 1 commit
-
-
Martijn Pieters authored
-
- 08 Aug, 2002 1 commit
-
-
Jeremy Hylton authored
StorageTestBase.removefs() will attempt to remove files with all the possible extensions that FileStorage will create. It will raise os.error for any error except ENOENT. Remove many variants of removefs() implemented in the various test suites.
-
- 28 Jun, 2002 1 commit
-
-
Tim Peters authored
fine; just keeping the test suite as closely in synch as possible.
-
- 19 Jun, 2002 1 commit
-
-
Tim Peters authored
of verifying that BTree invariants are satisfied, raising AssertionError if they're not. Nothing calls this method by magic; it's for debugging.
-
- 17 Jun, 2002 1 commit
-
-
Tim Peters authored
deletion endcases uncovered by the new degenerate-BTree tests. The degenerate testDeletes() and testEmptyFirstBucketReportedByGuido() are enabled now.
-
- 14 Jun, 2002 1 commit
-
-
Tim Peters authored
disabled for now, because it dies in lots of ways. I hope, but don't know, that they're all related to "Guido's bug". Also backported the "Guido's bug" test case from the Zope3 project. This is also disabled for now.
-
- 13 Jun, 2002 7 commits
-
-
Tim Peters authored
search returned a seemingly random slice of the tree. A new test on the painfully constructed highly-degenerate BTree turned up lots of these. It turns out that BTree_rangeSearch had a much harder job than it thought it had <0.7 wink>.
-
Tim Peters authored
for lo > hi either, except if they happened to be in the same bucket. All sorts of strange results followed (the range should be empty if lo > hi, and is after this patch).
-
Tim Peters authored
passed in, it was quite possible for this to return *low > *high, and the caller could crash due to trying to create a list with "negative length". Changed the routine to consider a range empty if min>max on input, and added test cases that fail before this patch.
-
Tim Peters authored
-
Tim Peters authored
legitimate) BTree. New test testDegenerateBasicOps() does basic sanity checks on it. More tests against this tree will follow.
-
Tim Peters authored
classes entirely (like for IITreeSets), and to run other test classes twice.
-
Tim Peters authored
key S in a bucket in a BTree is deleted, doing a range search on the BTree with S on the high end may claim that the range is empty even when it's not. It proved difficult to fix this correctly and efficiently in all cases (our BTrees don't like "searching backwards"). The implementation here is a new and non-recursive one (in effect, to do this efficiently you have to remember the deepest point in the tree where it was *possible* to "go one left" of where binary search tells you to go; an iterative algorithm makes that part all but obvious). Alas, the number of uses of persistence macros is amazing, unfortunately making this still-hairy algorithm hard to follow. testPathologicalRangeSearch(): uncommented the lines that failed before this patch. They pass now. Insecurity: The test case only exercises the simplest possible form of the failure. Any failing case is hard to provoke, even the simplest. The hairier failing cases require generating degenerate trees, deep and with some interior nodes near the top having just one or two children (since the tree needs to be deep too, that isn't easy to provoke). I'll think about how to provoke this without needing to build up multi-million element trees first; maybe using __setstate__ directly is the answer.
-
- 12 Jun, 2002 1 commit
-
-
Tim Peters authored
commented out for now, because it fails. I'm working on a fix. The problem was found by eyeballing the range-test implementation. If you delete a key from a BTree that just happens to be the first key in a bucket, then a later high-end range search giving that specific key as the endpoint claims that no keys are in the range, and whether or not that's actually true.
-
- 09 Jun, 2002 2 commits
-
-
http://collector.zope.org/Zope/419Tim Peters authored
"BTreeItems slice contains 1 too many elements" This also fixes many related glitches, such as that giving an out-of-bound slice index raised IndexError instead of clipping. BTreeItems_slice(): Emulate Python slicing semantics in all cases. testBTrees.py: new testSlicing() tests in MappingBase and NormalSetTests to ensure that slicing of .keys()/.items()/.values() works exactly the same way as slicing of Python lists, in all one-sided, two-sided and whole-structure ([:]) cases, with both negative and positive slice indices, and mixtures of + and -, and whether in bounds or out of bounds.
-
Tim Peters authored
-
- 31 May, 2002 1 commit
-
-
Toby Dickenson authored
long overdue merge of toby-cmp-error-branch. btrees no longer ignore exceptions raised by the key comparison function
-
- 30 May, 2002 2 commits
-
-
Jim Fulton authored
initial fix causes core dumps. We'll reenable this test when the bug gets fixed (again).
-
Jeremy Hylton authored
-
- 28 May, 2002 1 commit
-
-
Jim Fulton authored
keys at the beginning of the BTree were deleted.
-
- 11 Feb, 2002 1 commit
-
-
Guido van Rossum authored
-
- 25 Jan, 2002 1 commit
-
-
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.
-
- 21 Dec, 2001 1 commit
-
-
Andreas Jung authored
- replaced assert statements by calls to self.assertEqual() and self.assert_()
-
- 20 Dec, 2001 1 commit
-
-
Andreas Jung authored
-
- 28 Nov, 2001 1 commit
-
-
matt@zope.com authored
-
- 19 Oct, 2001 1 commit
-
-
Andreas Jung authored
-
- 20 Sep, 2001 1 commit
-
-
Jeremy Hylton authored
Based on conversation with Evan yesterday, I think this is safe.
-