Merge lp:~jtv/launchpad/testfix into lp:launchpad

Proposed by Jeroen T. Vermeulen
Status: Merged
Approved by: Graham Binns
Approved revision: no longer in the source branch.
Merged at revision: 11512
Proposed branch: lp:~jtv/launchpad/testfix
Merge into: lp:launchpad
Diff against target: 83 lines (+14/-7)
5 files modified
lib/canonical/launchpad/mail/tests/test_handlers.py (+2/-0)
lib/lp/answers/browser/tests/test_questiontarget.py (+2/-0)
lib/lp/bugs/scripts/bugnotification.py (+7/-6)
lib/lp/buildmaster/tests/test_packagebuild.py (+2/-0)
lib/lp/services/doc/propertycache.txt (+1/-1)
To merge this branch: bzr merge lp:~jtv/launchpad/testfix
Reviewer Review Type Date Requested Status
Graham Binns (community) release-critical Approve
Henning Eggers (community) code Approve
Review via email: mp+34663@code.launchpad.net

Commit message

Fix 2.6-isms that broke the devel build.

Description of the change

= Testfix =

Urgent; blocking release-critical fixes.

Eliminates some 2.6-isms that snuck into devel somehow and were breaking the build.

To test:
{{{
./bin/test -vvc -t test_handlers -t test_questiontarget -t test_packagebuild -t test_sourcepackagerecipebuild -t test_binarypackagebuild -t test_hasbuildrecords -t test_publishing_models -t bugnotification -t notification-sending.txt -t propertycache.txt
}}}

To post a comment you must log in.
Revision history for this message
Henning Eggers (henninge) :
review: Approve (code)
Revision history for this message
Graham Binns (gmb) :
review: Approve (release\)
Revision history for this message
Graham Binns (gmb) wrote :

Hah.

review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/mail/tests/test_handlers.py'
--- lib/canonical/launchpad/mail/tests/test_handlers.py 2010-08-27 13:38:13 +0000
+++ lib/canonical/launchpad/mail/tests/test_handlers.py 2010-09-06 09:17:56 +0000
@@ -1,6 +1,8 @@
1# Copyright 2009 Canonical Ltd. This software is licensed under the1# Copyright 2009 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).2# GNU Affero General Public License version 3 (see the file LICENSE).
33
4from __future__ import with_statement
5
4__metaclass__ = type6__metaclass__ = type
57
6from doctest import DocTestSuite8from doctest import DocTestSuite
79
=== modified file 'lib/lp/answers/browser/tests/test_questiontarget.py'
--- lib/lp/answers/browser/tests/test_questiontarget.py 2010-08-26 17:45:46 +0000
+++ lib/lp/answers/browser/tests/test_questiontarget.py 2010-09-06 09:17:56 +0000
@@ -3,6 +3,8 @@
33
4"""Test questiontarget views."""4"""Test questiontarget views."""
55
6from __future__ import with_statement
7
6__metaclass__ = type8__metaclass__ = type
79
8import os10import os
911
=== modified file 'lib/lp/bugs/scripts/bugnotification.py'
--- lib/lp/bugs/scripts/bugnotification.py 2010-08-23 09:25:17 +0000
+++ lib/lp/bugs/scripts/bugnotification.py 2010-09-06 09:17:56 +0000
@@ -13,10 +13,7 @@
13 ]13 ]
1414
15from itertools import groupby15from itertools import groupby
16from operator import (16from operator import itemgetter
17 attrgetter,
18 itemgetter,
19 )
2017
21import transaction18import transaction
22from zope.component import getUtility19from zope.component import getUtility
@@ -196,10 +193,14 @@
196 yield comment_count or 1, notification193 yield comment_count or 1, notification
197194
198195
196def get_bug_and_owner(notification):
197 """Retrieve `notification`'s `bug` and `message.owner` attributes."""
198 return notification.bug, notification.message.owner
199
200
199def notification_batches(notifications):201def notification_batches(notifications):
200 """Batch notifications for `get_email_notifications`."""202 """Batch notifications for `get_email_notifications`."""
201 notifications_grouped = groupby(203 notifications_grouped = groupby(notifications, get_bug_and_owner)
202 notifications, attrgetter("bug", "message.owner"))
203 for (bug, person), notification_group in notifications_grouped:204 for (bug, person), notification_group in notifications_grouped:
204 batches = notification_comment_batches(notification_group)205 batches = notification_comment_batches(notification_group)
205 for comment_group, batch in groupby(batches, itemgetter(0)):206 for comment_group, batch in groupby(batches, itemgetter(0)):
206207
=== modified file 'lib/lp/buildmaster/tests/test_packagebuild.py'
--- lib/lp/buildmaster/tests/test_packagebuild.py 2010-08-30 13:58:15 +0000
+++ lib/lp/buildmaster/tests/test_packagebuild.py 2010-09-06 09:17:56 +0000
@@ -3,6 +3,8 @@
33
4"""Tests for `IPackageBuild`."""4"""Tests for `IPackageBuild`."""
55
6from __future__ import with_statement
7
6__metaclass__ = type8__metaclass__ = type
79
8from datetime import datetime10from datetime import datetime
911
=== modified file 'lib/lp/services/doc/propertycache.txt'
--- lib/lp/services/doc/propertycache.txt 2010-08-23 10:33:27 +0000
+++ lib/lp/services/doc/propertycache.txt 2010-09-06 09:17:56 +0000
@@ -16,7 +16,7 @@
16 >>> class Foo:16 >>> class Foo:
17 ... @cachedproperty17 ... @cachedproperty
18 ... def bar(self):18 ... def bar(self):
19 ... return next(counter)19 ... return counter.next()
2020
21 >>> foo = Foo()21 >>> foo = Foo()
2222