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
1=== added file '.bzrignore'
2--- .bzrignore 1970-01-01 00:00:00 +0000
3+++ .bzrignore 2010-12-07 00:36:06 +0000
4@@ -0,0 +1,1 @@
5+.pc
6
7=== modified file 'debian/changelog'
8--- debian/changelog 2010-12-03 00:01:18 +0000
9+++ debian/changelog 2010-12-07 00:36:06 +0000
10@@ -1,3 +1,27 @@
11+guppy (0.1.9-2build2) natty; urgency=low
12+
13+ * Unreleased upstream changes to support Python 2.7. (LP: #685127)
14+
15+ 2010-06-08 Sverker Nilsson <sverker@sverker-laptop>
16+
17+ * guppy/heapy/test/test_Part.py (MixedCase.test_1): Changed the
18+ test result if sys.version >= 2.7; because the size of strings
19+ was optimized 8 bytes. (How ? )
20+
21+ * src/sets/bitset.c (mutbitset_iop_PyLongObject): Used
22+ _PyLong_Frexp instead of _PyLong_AsScaledDouble if
23+ PY_VERSION_HEX >= 0x02070000 . (_PyLong_AsScaledDouble disappeared
24+ but I think I should complain, couldn't figure out how to add an
25+ issue with the tracker.)
26+
27+ 2010-02-16 Sverker Nilsson <sverker@sverker-laptop>
28+
29+ * guppy/sets/test.py (Test.test16.tsv): Expected OverflowError
30+ instead of ValueError, an inconsequential change to do with
31+ possiboe test error reporting.
32+
33+ -- Barry Warsaw <barry@ubuntu.com> Mon, 06 Dec 2010 18:14:02 -0500
34+
35 guppy (0.1.9-2build1) natty; urgency=low
36
37 * Rebuild to add support for python 2.7.
38
39=== added directory 'debian/patches'
40=== added file 'debian/patches/python27-compat-upstream'
41--- debian/patches/python27-compat-upstream 1970-01-01 00:00:00 +0000
42+++ debian/patches/python27-compat-upstream 2010-12-07 00:36:06 +0000
43@@ -0,0 +1,84 @@
44+--- a/guppy/heapy/test/test_Part.py
45++++ b/guppy/heapy/test/test_Part.py
46+@@ -88,16 +88,24 @@
47+
48+ class MixedCase(support.TestCase):
49+ def test_1(self):
50++ import sys
51+ x = self.iso(1, 2, 1.0, 2.0, '1', '2')
52+ if self.allocation_behaves_as_originally:
53+- self.aseq(str(x), """\
54++ if sys.version < '2.7':
55++ self.aseq(str(x), """\
56+ Partition of a set of 6 objects. Total size = 112 bytes.
57+ Index Count % Size % Cumulative % Kind (class / dict of class)
58+ 0 2 33 56 50 56 50 str
59+ 1 2 33 32 29 88 79 float
60+ 2 2 33 24 21 112 100 int""")
61+-
62+-
63++ else:
64++ self.aseq(str(x), """\
65++Partition of a set of 6 objects. Total size = 104 bytes.
66++ Index Count % Size % Cumulative % Kind (class / dict of class)
67++ 0 2 33 48 46 48 46 str
68++ 1 2 33 32 31 80 77 float
69++ 2 2 33 24 23 104 100 int""")
70++
71+ for row in x.partition.get_rows():
72+ self.assert_(row.set <= row.kind)
73+
74+--- a/guppy/sets/test.py
75++++ b/guppy/sets/test.py
76+@@ -892,7 +892,7 @@
77+ except OverflowError:
78+ pass
79+ else:
80+- raise 'expected ValueError'
81++ raise 'expected OverflowError'
82+
83+ tsv(bitset([maxint]), 1)
84+ tsv(bitset([minint]), -1)
85+--- a/src/sets/bitset.c
86++++ b/src/sets/bitset.c
87+@@ -2017,7 +2017,11 @@
88+ int cpl = 0;
89+ PyObject *w = 0;
90+
91+- x = _PyLong_AsScaledDouble(v, &e);
92++#if PY_VERSION_HEX >= 0x02070000
93++ x = _PyLong_Frexp(v, &e);
94++#else
95++ x = _PyLong_AsScaledDouble(v, &e);
96++#endif
97+ if (x == -1 && PyErr_Occurred())
98+ return -1;
99+ if (x < 0) {
100+@@ -2026,15 +2030,24 @@
101+ w = PyNumber_Invert(v);
102+ if (!w) return -1;
103+ v = w;
104++#if PY_VERSION_HEX >= 0x02070000
105++ x = _PyLong_Frexp(v, &e);
106++#else
107+ x = _PyLong_AsScaledDouble(v, &e);
108++#endif
109+ if (x == -1 && PyErr_Occurred())
110+ return -1;
111+ assert(x >= 0);
112+ }
113+- if (x != 0)
114+- num_bits = 1.0 * e * SHIFT + log(x)/log(2) + 1;
115++ if (x != 0) {
116++ num_bits = e;
117++#if PY_VERSION_HEX < 0x02070000
118++ num_bits *= SHIFT;
119++#endif
120++ num_bits += log(x)/log(2) + 1;
121++ }
122+ else
123+- num_bits = 0;
124++ num_bits = 0;
125+
126+ num_poses = (long)(num_bits / NyBits_N + 1);
127+ /* fprintf(stderr, "x %f e %d num_bits %f num_poses %ld\n", x, e, num_bits, num_poses); */
128
129=== added file 'debian/patches/series'
130--- debian/patches/series 1970-01-01 00:00:00 +0000
131+++ debian/patches/series 2010-12-07 00:36:06 +0000
132@@ -0,0 +1,1 @@
133+python27-compat-upstream
134
135=== added directory 'debian/source'
136=== added file 'debian/source/format'
137--- debian/source/format 1970-01-01 00:00:00 +0000
138+++ debian/source/format 2010-12-07 00:36:06 +0000
139@@ -0,0 +1,1 @@
140+3.0 (quilt)

Subscribers

People subscribed via source and target branches

to all changes: