Merge lp:~barry/ubuntu/natty/guppy/685127-ftbfs into lp:ubuntu/natty/guppy

Proposed by Barry Warsaw
Status: Merged
Merge reported by: Didier Roche-Tolomelli
Merged at revision: not available
Proposed branch: lp:~barry/ubuntu/natty/guppy/685127-ftbfs
Merge into: lp:ubuntu/natty/guppy
Diff against target: 140 lines (+111/-0)
5 files modified
.bzrignore (+1/-0)
debian/changelog (+24/-0)
debian/patches/python27-compat-upstream (+84/-0)
debian/patches/series (+1/-0)
debian/source/format (+1/-0)
To merge this branch: bzr merge lp:~barry/ubuntu/natty/guppy/685127-ftbfs
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+42898@code.launchpad.net

Description of the change

guppy (0.1.9-2build2) natty; urgency=low

  * Unreleased upstream changes to support Python 2.7. (LP: #685127)

    2010-06-08 Sverker Nilsson <sverker@sverker-laptop>

     * guppy/heapy/test/test_Part.py (MixedCase.test_1): Changed the
     test result if sys.version >= 2.7; because the size of strings
     was optimized 8 bytes. (How ? )

     * src/sets/bitset.c (mutbitset_iop_PyLongObject): Used
     _PyLong_Frexp instead of _PyLong_AsScaledDouble if
     PY_VERSION_HEX >= 0x02070000 . (_PyLong_AsScaledDouble disappeared
     but I think I should complain, couldn't figure out how to add an
     issue with the tracker.)

    2010-02-16 Sverker Nilsson <sverker@sverker-laptop>

     * guppy/sets/test.py (Test.test16.tsv): Expected OverflowError
     instead of ValueError, an inconsequential change to do with
     possiboe test error reporting.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file '.bzrignore'
--- .bzrignore 1970-01-01 00:00:00 +0000
+++ .bzrignore 2010-12-07 00:36:06 +0000
@@ -0,0 +1,1 @@
1.pc
02
=== modified file 'debian/changelog'
--- debian/changelog 2010-12-03 00:01:18 +0000
+++ debian/changelog 2010-12-07 00:36:06 +0000
@@ -1,3 +1,27 @@
1guppy (0.1.9-2build2) natty; urgency=low
2
3 * Unreleased upstream changes to support Python 2.7. (LP: #685127)
4
5 2010-06-08 Sverker Nilsson <sverker@sverker-laptop>
6
7 * guppy/heapy/test/test_Part.py (MixedCase.test_1): Changed the
8 test result if sys.version >= 2.7; because the size of strings
9 was optimized 8 bytes. (How ? )
10
11 * src/sets/bitset.c (mutbitset_iop_PyLongObject): Used
12 _PyLong_Frexp instead of _PyLong_AsScaledDouble if
13 PY_VERSION_HEX >= 0x02070000 . (_PyLong_AsScaledDouble disappeared
14 but I think I should complain, couldn't figure out how to add an
15 issue with the tracker.)
16
17 2010-02-16 Sverker Nilsson <sverker@sverker-laptop>
18
19 * guppy/sets/test.py (Test.test16.tsv): Expected OverflowError
20 instead of ValueError, an inconsequential change to do with
21 possiboe test error reporting.
22
23 -- Barry Warsaw <barry@ubuntu.com> Mon, 06 Dec 2010 18:14:02 -0500
24
1guppy (0.1.9-2build1) natty; urgency=low25guppy (0.1.9-2build1) natty; urgency=low
226
3 * Rebuild to add support for python 2.7.27 * Rebuild to add support for python 2.7.
428
=== added directory 'debian/patches'
=== added file 'debian/patches/python27-compat-upstream'
--- debian/patches/python27-compat-upstream 1970-01-01 00:00:00 +0000
+++ debian/patches/python27-compat-upstream 2010-12-07 00:36:06 +0000
@@ -0,0 +1,84 @@
1--- a/guppy/heapy/test/test_Part.py
2+++ b/guppy/heapy/test/test_Part.py
3@@ -88,16 +88,24 @@
4
5 class MixedCase(support.TestCase):
6 def test_1(self):
7+ import sys
8 x = self.iso(1, 2, 1.0, 2.0, '1', '2')
9 if self.allocation_behaves_as_originally:
10- self.aseq(str(x), """\
11+ if sys.version < '2.7':
12+ self.aseq(str(x), """\
13 Partition of a set of 6 objects. Total size = 112 bytes.
14 Index Count % Size % Cumulative % Kind (class / dict of class)
15 0 2 33 56 50 56 50 str
16 1 2 33 32 29 88 79 float
17 2 2 33 24 21 112 100 int""")
18-
19-
20+ else:
21+ self.aseq(str(x), """\
22+Partition of a set of 6 objects. Total size = 104 bytes.
23+ Index Count % Size % Cumulative % Kind (class / dict of class)
24+ 0 2 33 48 46 48 46 str
25+ 1 2 33 32 31 80 77 float
26+ 2 2 33 24 23 104 100 int""")
27+
28 for row in x.partition.get_rows():
29 self.assert_(row.set <= row.kind)
30
31--- a/guppy/sets/test.py
32+++ b/guppy/sets/test.py
33@@ -892,7 +892,7 @@
34 except OverflowError:
35 pass
36 else:
37- raise 'expected ValueError'
38+ raise 'expected OverflowError'
39
40 tsv(bitset([maxint]), 1)
41 tsv(bitset([minint]), -1)
42--- a/src/sets/bitset.c
43+++ b/src/sets/bitset.c
44@@ -2017,7 +2017,11 @@
45 int cpl = 0;
46 PyObject *w = 0;
47
48- x = _PyLong_AsScaledDouble(v, &e);
49+#if PY_VERSION_HEX >= 0x02070000
50+ x = _PyLong_Frexp(v, &e);
51+#else
52+ x = _PyLong_AsScaledDouble(v, &e);
53+#endif
54 if (x == -1 && PyErr_Occurred())
55 return -1;
56 if (x < 0) {
57@@ -2026,15 +2030,24 @@
58 w = PyNumber_Invert(v);
59 if (!w) return -1;
60 v = w;
61+#if PY_VERSION_HEX >= 0x02070000
62+ x = _PyLong_Frexp(v, &e);
63+#else
64 x = _PyLong_AsScaledDouble(v, &e);
65+#endif
66 if (x == -1 && PyErr_Occurred())
67 return -1;
68 assert(x >= 0);
69 }
70- if (x != 0)
71- num_bits = 1.0 * e * SHIFT + log(x)/log(2) + 1;
72+ if (x != 0) {
73+ num_bits = e;
74+#if PY_VERSION_HEX < 0x02070000
75+ num_bits *= SHIFT;
76+#endif
77+ num_bits += log(x)/log(2) + 1;
78+ }
79 else
80- num_bits = 0;
81+ num_bits = 0;
82
83 num_poses = (long)(num_bits / NyBits_N + 1);
84 /* fprintf(stderr, "x %f e %d num_bits %f num_poses %ld\n", x, e, num_bits, num_poses); */
085
=== added file 'debian/patches/series'
--- debian/patches/series 1970-01-01 00:00:00 +0000
+++ debian/patches/series 2010-12-07 00:36:06 +0000
@@ -0,0 +1,1 @@
1python27-compat-upstream
02
=== added directory 'debian/source'
=== added file 'debian/source/format'
--- debian/source/format 1970-01-01 00:00:00 +0000
+++ debian/source/format 2010-12-07 00:36:06 +0000
@@ -0,0 +1,1 @@
13.0 (quilt)

Subscribers

People subscribed via source and target branches

to all changes: