inverse of 'i made you a patch but cvs eated it'

This commit is contained in:
jasper 2015-11-20 10:25:13 +00:00
parent db3b485ca5
commit e965c73fb0
7 changed files with 0 additions and 201 deletions

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-guppy_heapy_Part_py,v 1.1.1.1 2011/11/17 17:12:11 kili Exp $
Python-2.7 fix from upstream svn.
--- guppy/heapy/Part.py.orig Fri Jun 12 12:21:05 2009
+++ guppy/heapy/Part.py Wed Nov 16 16:11:13 2011
@@ -702,7 +702,7 @@ class SetPartition(Partition):
for (minusize, name, kind, part) in tosort:
size = -minusize
cumulsize += size
- assert size == part.size
+ # assert size == part.size
rows.append(PartRow(
part.count, size, name,
len(rows), cumulsize,

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-guppy_heapy_test_support_py,v 1.1.1.1 2011/11/17 17:12:11 kili Exp $
Disable yet another failing test for now.
--- guppy/heapy/test/support.py.orig Fri Jun 12 12:20:53 2009
+++ guppy/heapy/test/support.py Wed Nov 16 17:14:22 2011
@@ -256,8 +256,6 @@ class TestCase(unittest.TestCase):
if cont <= 0:
if cont < 0:
pdb.set_trace()
- else:
- self.assert_(0)
def asis(self, a, b, cont=0):
if a is not b:

View File

@ -1,30 +0,0 @@
$OpenBSD: patch-guppy_heapy_test_test_Classifiers_py,v 1.1.1.1 2011/11/17 17:12:11 kili Exp $
Disable those (failing) assertions to get further through the test cases.
--- guppy/heapy/test/test_Classifiers.py.orig Fri Jun 12 12:20:53 2009
+++ guppy/heapy/test/test_Classifiers.py Wed Nov 16 17:16:20 2011
@@ -261,7 +261,6 @@ class SpecialCases(TestCase):
print >>o, iso(c1.__dict__).kind
slow = time()-t
- self.assert_( slow/fast < 1.5 )
# This is another slow case according to notes Nov 18 2004.
# A succession of different unreachable dicts.
@@ -273,7 +272,6 @@ class SpecialCases(TestCase):
print >>o, iso(list(dn)[i]).kind
slow = time()-t
- self.assert_( slow/fast < 1.5 )
N = 5
@@ -283,7 +281,6 @@ class SpecialCases(TestCase):
t = time()
print >>o, [x[0] for x in Use.Clodo.classifier.partition(dn)]
slow = time()-t
- self.assert_( slow/fast < 1.5 )
# Check that ref counts for target objects are the same as initially

View File

@ -1,34 +0,0 @@
$OpenBSD: patch-guppy_heapy_test_test_Part_py,v 1.1.1.1 2011/11/17 17:12:11 kili Exp $
Python-2.7 fix from upstream svn.
--- guppy/heapy/test/test_Part.py.orig Fri Jun 12 12:20:53 2009
+++ guppy/heapy/test/test_Part.py Wed Nov 16 16:11:13 2011
@@ -88,16 +88,24 @@ Set of 100 <float> objects. Total size = 1600 bytes.
class MixedCase(support.TestCase):
def test_1(self):
+ import sys
x = self.iso(1, 2, 1.0, 2.0, '1', '2')
if self.allocation_behaves_as_originally:
- self.aseq(str(x), """\
+ if sys.version < '2.7':
+ self.aseq(str(x), """\
Partition of a set of 6 objects. Total size = 112 bytes.
Index Count % Size % Cumulative % Kind (class / dict of class)
0 2 33 56 50 56 50 str
1 2 33 32 29 88 79 float
2 2 33 24 21 112 100 int""")
-
-
+ else:
+ self.aseq(str(x), """\
+Partition of a set of 6 objects. Total size = 104 bytes.
+ Index Count % Size % Cumulative % Kind (class / dict of class)
+ 0 2 33 48 46 48 46 str
+ 1 2 33 32 31 80 77 float
+ 2 2 33 24 23 104 100 int""")
+
for row in x.partition.get_rows():
self.assert_(row.set <= row.kind)

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-guppy_sets_test_py,v 1.1.1.1 2011/11/17 17:12:11 kili Exp $
Python-2.7 fix from upstream svn.
--- guppy/sets/test.py.orig Tue Jun 23 15:48:32 2009
+++ guppy/sets/test.py Wed Nov 16 16:11:13 2011
@@ -892,7 +892,7 @@ MutBitSet([])
except OverflowError:
pass
else:
- raise 'expected ValueError'
+ raise 'expected OverflowError'
tsv(bitset([maxint]), 1)
tsv(bitset([minint]), -1)

View File

@ -1,35 +0,0 @@
$OpenBSD: patch-src_heapy_hv_cli_dictof_c,v 1.1.1.1 2011/11/17 17:12:11 kili Exp $
Python-2.7 fix from upstream svn.
--- src/heapy/hv_cli_dictof.c.orig Fri Jun 12 12:21:09 2009
+++ src/heapy/hv_cli_dictof.c Wed Nov 16 16:11:13 2011
@@ -73,6 +73,19 @@ hv_cli_dictof_get_static_types_list(NyHeapViewObject *
return PySequence_List(hv->static_types);
}
+static PyObject *
+hv_get_objects(NyHeapViewObject *hv) {
+ PyObject *p = hv_heap(hv, Py_None, Py_None);
+ PyObject *r;
+ if (!p)
+ goto err;
+ r = PySequence_List(p);
+ Py_DECREF(p);
+ return r;
+ err:
+ return 0;
+}
+
static int
hv_cli_dictof_update_new_method(NyHeapViewObject *hv, NyNodeGraphObject *rg)
{
@@ -88,7 +101,7 @@ hv_cli_dictof_update_new_method(NyHeapViewObject *hv,
if (!(dictsowned = NyMutNodeSet_New())) goto err;
if (!(lists[0] = hv_cli_dictof_get_static_types_list(hv))) goto err;
- if (!(lists[1] = gc_get_objects())) goto err;
+ if (!(lists[1] = hv_get_objects(hv))) goto err;
for (k = 0; k < 2; k++) {
PyObject *objects = lists[k];
len = PyList_Size(objects);

View File

@ -1,57 +0,0 @@
$OpenBSD: patch-src_sets_bitset_c,v 1.1.1.1 2011/11/17 17:12:11 kili Exp $
Python-2.7 fix from upstream svn and from debian bug tracker.
--- src/sets/bitset.c.orig Thu Jun 18 17:20:43 2009
+++ src/sets/bitset.c Wed Nov 16 16:26:34 2011
@@ -2011,13 +2011,21 @@ mutbitset_iop_PyLongObject(NyMutBitSetObject *ms, int
{
NyBits *buf;
int r = -1;
+#if PY_VERSION_HEX >= 0x02070000
+ Py_ssize_t e;
+#else
int e;
+#endif
long num_poses, num_bytes;
double num_bits, x;
int cpl = 0;
PyObject *w = 0;
- x = _PyLong_AsScaledDouble(v, &e);
+#if PY_VERSION_HEX >= 0x02070000
+ x = _PyLong_Frexp(v, &e);
+#else
+ x = _PyLong_AsScaledDouble(v, &e);
+#endif
if (x == -1 && PyErr_Occurred())
return -1;
if (x < 0) {
@@ -2026,15 +2034,24 @@ mutbitset_iop_PyLongObject(NyMutBitSetObject *ms, int
w = PyNumber_Invert(v);
if (!w) return -1;
v = w;
+#if PY_VERSION_HEX >= 0x02070000
+ x = _PyLong_Frexp(v, &e);
+#else
x = _PyLong_AsScaledDouble(v, &e);
+#endif
if (x == -1 && PyErr_Occurred())
return -1;
assert(x >= 0);
}
- if (x != 0)
- num_bits = 1.0 * e * SHIFT + log(x)/log(2) + 1;
+ if (x != 0) {
+ num_bits = e;
+#if PY_VERSION_HEX < 0x02070000
+ num_bits *= SHIFT;
+#endif
+ num_bits += log(x)/log(2) + 1;
+ }
else
- num_bits = 0;
+ num_bits = 0;
num_poses = (long)(num_bits / NyBits_N + 1);
/* fprintf(stderr, "x %f e %d num_bits %f num_poses %ld\n", x, e, num_bits, num_poses); */