← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~stevenk/launchpad/refactor-imports-redux into lp:launchpad

 

Steve Kowalik has proposed merging lp:~stevenk/launchpad/refactor-imports-redux into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~stevenk/launchpad/refactor-imports-redux/+merge/86312

Re-run format-imports over lib/lp and lib/canonical/launchpad.
-- 
https://code.launchpad.net/~stevenk/launchpad/refactor-imports-redux/+merge/86312
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/refactor-imports-redux into lp:launchpad.
=== modified file 'cronscripts/publishing/maintenance-check.py'
--- cronscripts/publishing/maintenance-check.py	2010-11-25 13:34:33 +0000
+++ cronscripts/publishing/maintenance-check.py	2011-12-20 00:00:32 +0000
@@ -9,6 +9,8 @@
 # this warning filter is only needed on older versions of python-apt,
 # once the machine runs lucid it can be removed
 import warnings
+
+
 warnings.filterwarnings("ignore", "apt API not stable yet")
 import apt
 warnings.resetwarnings()

=== modified file 'lib/canonical/launchpad/browser/logintoken.py'
--- lib/canonical/launchpad/browser/logintoken.py	2011-12-18 13:45:20 +0000
+++ lib/canonical/launchpad/browser/logintoken.py	2011-12-20 00:00:32 +0000
@@ -29,12 +29,7 @@
 
 from canonical.database.sqlbase import flush_database_updates
 from canonical.launchpad import _
-from lp.services.identity.interfaces.account import AccountStatus
 from canonical.launchpad.interfaces.authtoken import LoginTokenType
-from lp.services.identity.interfaces.emailaddress import (
-    EmailAddressStatus,
-    IEmailAddressSet,
-    )
 from canonical.launchpad.interfaces.logintoken import (
     IGPGKeyValidationForm,
     ILoginTokenSet,
@@ -70,6 +65,11 @@
     GPGVerificationError,
     IGPGHandler,
     )
+from lp.services.identity.interfaces.account import AccountStatus
+from lp.services.identity.interfaces.emailaddress import (
+    EmailAddressStatus,
+    IEmailAddressSet,
+    )
 
 
 class LoginTokenSetNavigation(GetitemNavigation):

=== modified file 'lib/canonical/launchpad/browser/tests/test_logintoken.py'
--- lib/canonical/launchpad/browser/tests/test_logintoken.py	2011-12-18 13:55:35 +0000
+++ lib/canonical/launchpad/browser/tests/test_logintoken.py	2011-12-20 00:00:32 +0000
@@ -11,9 +11,9 @@
     )
 from canonical.launchpad.ftests import LaunchpadFormHarness
 from canonical.launchpad.interfaces.authtoken import LoginTokenType
-from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from canonical.launchpad.interfaces.logintoken import ILoginTokenSet
 from canonical.testing.layers import DatabaseFunctionalLayer
+from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from lp.testing import TestCaseWithFactory
 
 

=== modified file 'lib/canonical/launchpad/components/apihelpers.py'
--- lib/canonical/launchpad/components/apihelpers.py	2011-04-01 06:17:23 +0000
+++ lib/canonical/launchpad/components/apihelpers.py	2011-12-20 00:00:32 +0000
@@ -29,7 +29,6 @@
 
 
 from lazr.restful.declarations import LAZR_WEBSERVICE_EXPORTED
-
 from zope.schema import getFields
 
 

=== modified file 'lib/canonical/launchpad/daemons/readyservice.py'
--- lib/canonical/launchpad/daemons/readyservice.py	2011-11-20 23:37:23 +0000
+++ lib/canonical/launchpad/daemons/readyservice.py	2011-12-20 00:00:32 +0000
@@ -17,6 +17,7 @@
 from twisted.application import service
 from twisted.python import log
 
+
 LOG_MAGIC = 'daemon ready!'
 
 

=== modified file 'lib/canonical/launchpad/daemons/tachandler.py'
--- lib/canonical/launchpad/daemons/tachandler.py	2011-11-22 08:55:51 +0000
+++ lib/canonical/launchpad/daemons/tachandler.py	2011-12-20 00:00:32 +0000
@@ -20,7 +20,6 @@
 import warnings
 
 from fixtures import Fixture
-
 from txfixtures.tachandler import (
     TacException,
     TacTestFixture,

=== modified file 'lib/canonical/launchpad/database/logintoken.py'
--- lib/canonical/launchpad/database/logintoken.py	2011-12-18 13:45:20 +0000
+++ lib/canonical/launchpad/database/logintoken.py	2011-12-20 00:00:32 +0000
@@ -35,7 +35,6 @@
     )
 from canonical.launchpad.helpers import get_email_template
 from canonical.launchpad.interfaces.authtoken import LoginTokenType
-from lp.services.identity.interfaces.emailaddress import IEmailAddressSet
 from canonical.launchpad.interfaces.logintoken import (
     ILoginToken,
     ILoginTokenSet,
@@ -52,6 +51,7 @@
 from lp.registry.interfaces.gpg import IGPGKeySet
 from lp.registry.interfaces.person import IPersonSet
 from lp.services.gpg.interfaces import IGPGHandler
+from lp.services.identity.interfaces.emailaddress import IEmailAddressSet
 from lp.services.mail.sendmail import (
     format_address,
     simple_sendmail,

=== modified file 'lib/canonical/launchpad/database/temporaryblobstorage.py'
--- lib/canonical/launchpad/database/temporaryblobstorage.py	2011-06-30 11:28:59 +0000
+++ lib/canonical/launchpad/database/temporaryblobstorage.py	2011-12-20 00:00:32 +0000
@@ -27,12 +27,12 @@
 from canonical.database.constants import DEFAULT
 from canonical.database.datetimecol import UtcDateTimeCol
 from canonical.database.sqlbase import SQLBase
+from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
 from canonical.launchpad.interfaces.temporaryblobstorage import (
     BlobTooLarge,
     ITemporaryBlobStorage,
     ITemporaryStorageManager,
     )
-from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
 from lp.services.job.interfaces.job import JobStatus
 from lp.services.utils import utc_now
 

=== modified file 'lib/canonical/launchpad/ftests/test_libraryfilealias.py'
--- lib/canonical/launchpad/ftests/test_libraryfilealias.py	2010-10-04 19:50:45 +0000
+++ lib/canonical/launchpad/ftests/test_libraryfilealias.py	2011-12-20 00:00:32 +0000
@@ -6,8 +6,8 @@
 __metaclass__ = type
 
 from cStringIO import StringIO
-
 import unittest
+
 import transaction
 from zope.component import getUtility
 

=== modified file 'lib/canonical/launchpad/ftests/test_wadl_generation.py'
--- lib/canonical/launchpad/ftests/test_wadl_generation.py	2011-07-07 20:07:36 +0000
+++ lib/canonical/launchpad/ftests/test_wadl_generation.py	2011-12-20 00:00:32 +0000
@@ -5,8 +5,8 @@
 
 __metaclass__ = type
 
+from lazr.restful.interfaces import IWebServiceConfiguration
 from testtools.matchers import StartsWith
-
 from zope.component import getUtility
 
 from canonical.launchpad.rest.wadl import (
@@ -14,7 +14,6 @@
     generate_wadl,
     )
 from canonical.testing import LaunchpadFunctionalLayer
-from lazr.restful.interfaces import IWebServiceConfiguration
 from lp.testing import TestCase
 
 

=== modified file 'lib/canonical/launchpad/interfaces/_schema_circular_imports.py'
--- lib/canonical/launchpad/interfaces/_schema_circular_imports.py	2011-12-18 13:45:20 +0000
+++ lib/canonical/launchpad/interfaces/_schema_circular_imports.py	2011-12-20 00:00:32 +0000
@@ -30,7 +30,6 @@
     patch_plain_parameter_type,
     patch_reference_property,
     )
-from lp.services.identity.interfaces.emailaddress import IEmailAddress
 from canonical.launchpad.interfaces.temporaryblobstorage import (
     ITemporaryBlobStorage,
     ITemporaryStorageManager,
@@ -169,6 +168,7 @@
 from lp.registry.interfaces.teammembership import ITeamMembership
 from lp.registry.interfaces.wikiname import IWikiName
 from lp.services.comments.interfaces.conversation import IComment
+from lp.services.identity.interfaces.emailaddress import IEmailAddress
 from lp.services.messages.interfaces.message import (
     IIndexedMessage,
     IMessage,

=== modified file 'lib/canonical/launchpad/interfaces/webservice.py'
--- lib/canonical/launchpad/interfaces/webservice.py	2011-12-18 13:55:35 +0000
+++ lib/canonical/launchpad/interfaces/webservice.py	2011-12-20 00:00:32 +0000
@@ -18,15 +18,16 @@
     'IWebServiceApplication',
     ]
 
+# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
+# import bugs.  Break this up into a per-package thing.
+from canonical.launchpad.interfaces import _schema_circular_imports
 from canonical.launchpad.interfaces.launchpad import IWebServiceApplication
-
-from lp.services.identity.interfaces.emailaddress import IEmailAddress
-from lp.services.messages.interfaces.message import IMessage
 from canonical.launchpad.interfaces.temporaryblobstorage import (
     ITemporaryBlobStorage,
     ITemporaryStorageManager,
     )
-# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
-# import bugs.  Break this up into a per-package thing.
-from canonical.launchpad.interfaces import _schema_circular_imports
+from lp.services.identity.interfaces.emailaddress import IEmailAddress
+from lp.services.messages.interfaces.message import IMessage
+
+
 _schema_circular_imports

=== modified file 'lib/canonical/launchpad/rest/bytestorage.py'
--- lib/canonical/launchpad/rest/bytestorage.py	2010-12-20 17:42:47 +0000
+++ lib/canonical/launchpad/rest/bytestorage.py	2011-12-20 00:00:32 +0000
@@ -16,7 +16,6 @@
     getMultiAdapter,
     getUtility,
     )
-
 from zope.interface import implements
 
 from canonical.launchpad.interfaces.librarian import (

=== modified file 'lib/canonical/launchpad/rest/configuration.py'
--- lib/canonical/launchpad/rest/configuration.py	2011-04-07 05:09:15 +0000
+++ lib/canonical/launchpad/rest/configuration.py	2011-12-20 00:00:32 +0000
@@ -12,12 +12,12 @@
 from zope.component import getUtility
 
 from canonical.config import config
-from lp.app import versioninfo
 from canonical.launchpad.webapp.interfaces import ILaunchBag
 from canonical.launchpad.webapp.servers import (
     WebServiceClientRequest,
     WebServicePublication,
     )
+from lp.app import versioninfo
 
 
 class LaunchpadWebServiceConfiguration(BaseWebServiceConfiguration):

=== modified file 'lib/canonical/launchpad/rest/me.py'
--- lib/canonical/launchpad/rest/me.py	2011-02-23 22:32:15 +0000
+++ lib/canonical/launchpad/rest/me.py	2011-12-20 00:00:32 +0000
@@ -16,11 +16,11 @@
 from zope.component import getUtility
 from zope.interface import implements
 
+from canonical.launchpad.webapp.interfaces import ICanonicalUrlData
 from lp.registry.interfaces.person import (
     IPerson,
     IPersonSet,
     )
-from canonical.launchpad.webapp.interfaces import ICanonicalUrlData
 
 
 class IMeLink(ITopLevelEntryLink, ICanonicalUrlData):

=== modified file 'lib/canonical/launchpad/rest/pillarset.py'
--- lib/canonical/launchpad/rest/pillarset.py	2010-11-08 16:08:22 +0000
+++ lib/canonical/launchpad/rest/pillarset.py	2011-12-20 00:00:32 +0000
@@ -12,8 +12,8 @@
 from lazr.restful.interfaces import ITopLevelEntryLink
 from zope.interface import implements
 
+from canonical.launchpad.webapp.interfaces import ICanonicalUrlData
 from lp.registry.interfaces.pillar import IPillarNameSet
-from canonical.launchpad.webapp.interfaces import ICanonicalUrlData
 
 
 class IPillarSetLink(ITopLevelEntryLink, ICanonicalUrlData):

=== modified file 'lib/canonical/launchpad/rest/wadl.py'
--- lib/canonical/launchpad/rest/wadl.py	2011-07-07 20:07:36 +0000
+++ lib/canonical/launchpad/rest/wadl.py	2011-12-20 00:00:32 +0000
@@ -5,10 +5,11 @@
 
 __metaclass__ = type
 
-import pkg_resources
 import subprocess
 import urlparse
 
+import pkg_resources
+
 from canonical.launchpad.webapp.interaction import (
     ANONYMOUS,
     setupInteractionByEmail,

=== modified file 'lib/canonical/launchpad/scripts/__init__.py'
--- lib/canonical/launchpad/scripts/__init__.py	2011-10-11 06:51:50 +0000
+++ lib/canonical/launchpad/scripts/__init__.py	2011-12-20 00:00:32 +0000
@@ -27,6 +27,7 @@
 import zope.site.hooks
 
 from canonical.config import config
+from canonical.database.postgresql import ConnectionString
 # these are intentional re-exports, apparently, used by *many* files.
 from canonical.launchpad.scripts.logger import (
     dummy_logger_options,
@@ -34,7 +35,6 @@
     logger,
     logger_options,
     )
-from canonical.database.postgresql import ConnectionString
 # Intentional re-export, following along the lines of the logger module.
 from canonical.launchpad.scripts.loghandlers import WatchedFileHandler
 from canonical.launchpad.webapp.authorization import (

=== modified file 'lib/canonical/launchpad/scripts/logger.py'
--- lib/canonical/launchpad/scripts/logger.py	2011-10-27 03:52:23 +0000
+++ lib/canonical/launchpad/scripts/logger.py	2011-12-20 00:00:32 +0000
@@ -34,9 +34,7 @@
 
 from contextlib import contextmanager
 from cStringIO import StringIO
-from datetime import (
-    timedelta,
-    )
+from datetime import timedelta
 import hashlib
 import logging
 from logging.handlers import WatchedFileHandler

=== modified file 'lib/canonical/launchpad/scripts/runlaunchpad.py'
--- lib/canonical/launchpad/scripts/runlaunchpad.py	2011-11-21 08:51:55 +0000
+++ lib/canonical/launchpad/scripts/runlaunchpad.py	2011-12-20 00:00:32 +0000
@@ -13,11 +13,10 @@
 import subprocess
 import sys
 
-from testtools.testresult.real import _details_to_str
-
 import fixtures
 from lazr.config import as_host_port
 from rabbitfixture.server import RabbitServerResources
+from testtools.testresult.real import _details_to_str
 from zope.app.server.main import main
 
 from canonical.config import config

=== modified file 'lib/canonical/launchpad/security.py'
--- lib/canonical/launchpad/security.py	2011-12-18 13:45:20 +0000
+++ lib/canonical/launchpad/security.py	2011-12-20 00:00:32 +0000
@@ -17,8 +17,6 @@
 from zope.interface import Interface
 
 from canonical.config import config
-from lp.services.identity.interfaces.account import IAccount
-from lp.services.identity.interfaces.emailaddress import IEmailAddress
 from canonical.launchpad.interfaces.librarian import (
     ILibraryFileAliasWithParent,
     )
@@ -158,6 +156,8 @@
 from lp.registry.interfaces.sourcepackage import ISourcePackage
 from lp.registry.interfaces.teammembership import ITeamMembership
 from lp.registry.interfaces.wikiname import IWikiName
+from lp.services.identity.interfaces.account import IAccount
+from lp.services.identity.interfaces.emailaddress import IEmailAddress
 from lp.services.messages.interfaces.message import IMessage
 from lp.services.oauth.interfaces import (
     IOAuthAccessToken,

=== modified file 'lib/canonical/launchpad/systemhomes.py'
--- lib/canonical/launchpad/systemhomes.py	2011-07-08 10:13:09 +0000
+++ lib/canonical/launchpad/systemhomes.py	2011-12-20 00:00:32 +0000
@@ -34,14 +34,14 @@
     IRosettaApplication,
     IWebServiceApplication,
     )
+from canonical.launchpad.interfaces.launchpadstatistic import (
+    ILaunchpadStatisticSet,
+    )
 from canonical.launchpad.webapp.interfaces import (
     IAPIDocRoot,
     ICanonicalUrlData,
     ILaunchBag,
     )
-from canonical.launchpad.interfaces.launchpadstatistic import (
-    ILaunchpadStatisticSet,
-    )
 from lp.bugs.errors import InvalidBugTargetType
 from lp.bugs.interfaces.bug import (
     CreateBugParams,
@@ -72,11 +72,11 @@
     IDistributionSourcePackage,
     )
 from lp.registry.interfaces.distroseries import IDistroSeriesSet
+from lp.registry.interfaces.mailinglist import IMailingListApplication
 from lp.registry.interfaces.product import (
     IProduct,
     IProductSet,
     )
-from lp.registry.interfaces.mailinglist import IMailingListApplication
 from lp.services.worlddata.interfaces.language import ILanguageSet
 from lp.testopenid.interfaces.server import ITestOpenIDApplication
 from lp.translations.interfaces.translationgroup import ITranslationGroupSet

=== modified file 'lib/canonical/launchpad/testing/browser.py'
--- lib/canonical/launchpad/testing/browser.py	2010-10-26 12:53:04 +0000
+++ lib/canonical/launchpad/testing/browser.py	2011-12-20 00:00:32 +0000
@@ -16,6 +16,7 @@
 """
 from lazr.uri._uri import URI
 
+
 __metaclass__ = type
 __all__ = [
     'Browser',

=== modified file 'lib/canonical/launchpad/testing/tests/test_googleservice.py'
--- lib/canonical/launchpad/testing/tests/test_googleservice.py	2011-08-12 11:19:40 +0000
+++ lib/canonical/launchpad/testing/tests/test_googleservice.py	2011-12-20 00:00:32 +0000
@@ -12,8 +12,8 @@
 import os
 import unittest
 
+from canonical.lazr.pidfile import pidfile_path
 from lp.services.googlesearch import googletestservice
-from canonical.lazr.pidfile import pidfile_path
 
 
 class TestServiceUtilities(unittest.TestCase):

=== modified file 'lib/canonical/launchpad/tests/test_token_creation.py'
--- lib/canonical/launchpad/tests/test_token_creation.py	2011-11-17 23:09:57 +0000
+++ lib/canonical/launchpad/tests/test_token_creation.py	2011-12-20 00:00:32 +0000
@@ -4,6 +4,7 @@
 __metaclass__ = type
 
 import random
+
 import testtools
 
 from canonical.database.constants import UTC_NOW

=== modified file 'lib/canonical/launchpad/webapp/adapter.py'
--- lib/canonical/launchpad/webapp/adapter.py	2011-12-08 02:23:15 +0000
+++ lib/canonical/launchpad/webapp/adapter.py	2011-12-20 00:00:32 +0000
@@ -17,7 +17,10 @@
 import traceback
 import warnings
 
-from lazr.restful.utils import get_current_browser_request, safe_hasattr
+from lazr.restful.utils import (
+    get_current_browser_request,
+    safe_hasattr,
+    )
 import psycopg2
 from psycopg2.extensions import (
     ISOLATION_LEVEL_AUTOCOMMIT,
@@ -62,6 +65,7 @@
     )
 from canonical.launchpad.readonly import is_read_only
 from canonical.launchpad.webapp.dbpolicy import MasterDatabasePolicy
+from canonical.launchpad.webapp.interaction import get_interaction_extras
 from canonical.launchpad.webapp.interfaces import (
     DEFAULT_FLAVOR,
     IStoreSelector,
@@ -71,20 +75,19 @@
     ReadOnlyModeViolation,
     SLAVE_FLAVOR,
     )
-from canonical.launchpad.webapp.interaction import get_interaction_extras
 from canonical.launchpad.webapp.opstats import OpStats
 from canonical.lazr.timeout import set_default_timeout_function
 from lp.services import features
 from lp.services.log.loglevels import DEBUG2
-from lp.services.timeline.requesttimeline import (
-    get_request_timeline,
-    set_request_timeline,
-    )
 from lp.services.stacktrace import (
     extract_stack,
     extract_tb,
     print_list,
     )
+from lp.services.timeline.requesttimeline import (
+    get_request_timeline,
+    set_request_timeline,
+    )
 
 
 __all__ = [

=== modified file 'lib/canonical/launchpad/webapp/authentication.py'
--- lib/canonical/launchpad/webapp/authentication.py	2011-12-18 13:55:35 +0000
+++ lib/canonical/launchpad/webapp/authentication.py	2011-12-20 00:00:32 +0000
@@ -35,7 +35,6 @@
 from zope.session.interfaces import ISession
 
 from canonical.config import config
-from lp.services.identity.interfaces.account import IAccountSet
 from canonical.launchpad.interfaces.launchpad import IPasswordEncryptor
 from canonical.launchpad.webapp.interfaces import (
     AccessLevel,
@@ -49,6 +48,7 @@
     IPerson,
     IPersonSet,
     )
+from lp.services.identity.interfaces.account import IAccountSet
 from lp.services.oauth.interfaces import OAUTH_CHALLENGE
 
 

=== modified file 'lib/canonical/launchpad/webapp/batching.py'
--- lib/canonical/launchpad/webapp/batching.py	2011-12-18 14:29:19 +0000
+++ lib/canonical/launchpad/webapp/batching.py	2011-12-20 00:00:32 +0000
@@ -4,6 +4,8 @@
 __metaclass__ = type
 
 from datetime import datetime
+from operator import isSequenceType
+import re
 
 from iso8601 import (
     parse_date,
@@ -11,8 +13,6 @@
     )
 import lazr.batchnavigator
 from lazr.batchnavigator.interfaces import IRangeFactory
-from operator import isSequenceType
-import re
 import simplejson
 from storm import Undef
 from storm.expr import (
@@ -42,18 +42,15 @@
     convert_storm_clause_to_string,
     sqlvalues,
     )
-
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.webapp.interfaces import (
     IStoreSelector,
+    ITableBatchNavigator,
     MAIN_STORE,
     SLAVE_FLAVOR,
     StormRangeFactoryError,
-    ITableBatchNavigator,
     )
 from canonical.launchpad.webapp.publisher import LaunchpadView
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.propertycache import cachedproperty
 
 

=== modified file 'lib/canonical/launchpad/webapp/errorlog.py'
--- lib/canonical/launchpad/webapp/errorlog.py	2011-12-14 03:23:42 +0000
+++ lib/canonical/launchpad/webapp/errorlog.py	2011-12-20 00:00:32 +0000
@@ -47,8 +47,8 @@
 from canonical.launchpad.webapp.pgsession import PGSessionBase
 from canonical.launchpad.webapp.vhosts import allvhosts
 from lp.app import versioninfo
+from lp.services.messaging import rabbit
 from lp.services.timeline.requesttimeline import get_request_timeline
-from lp.services.messaging import rabbit
 
 
 UTC = pytz.utc

=== modified file 'lib/canonical/launchpad/webapp/interaction.py'
--- lib/canonical/launchpad/webapp/interaction.py	2011-12-14 03:06:38 +0000
+++ lib/canonical/launchpad/webapp/interaction.py	2011-12-20 00:00:32 +0000
@@ -46,8 +46,8 @@
     )
 
 from canonical.launchpad.webapp.interfaces import (
+    IInteractionExtras,
     IOpenLaunchBag,
-    IInteractionExtras,
     IPlacelessAuthUtility,
     )
 

=== modified file 'lib/canonical/launchpad/webapp/launchbag.py'
--- lib/canonical/launchpad/webapp/launchbag.py	2011-12-18 13:55:35 +0000
+++ lib/canonical/launchpad/webapp/launchbag.py	2011-12-20 00:00:32 +0000
@@ -14,7 +14,6 @@
 from zope.interface import implements
 
 from canonical.database.sqlbase import block_implicit_flushes
-from lp.services.identity.interfaces.account import IAccount
 from canonical.launchpad.webapp.interaction import get_current_principal
 from canonical.launchpad.webapp.interfaces import (
     ILaunchBag,
@@ -31,6 +30,7 @@
 from lp.registry.interfaces.product import IProduct
 from lp.registry.interfaces.projectgroup import IProjectGroup
 from lp.registry.interfaces.sourcepackage import ISourcePackage
+from lp.services.identity.interfaces.account import IAccount
 from lp.soyuz.interfaces.distroarchseries import IDistroArchSeries
 
 

=== modified file 'lib/canonical/launchpad/webapp/launchpadform.py'
--- lib/canonical/launchpad/webapp/launchpadform.py	2010-11-23 23:22:27 +0000
+++ lib/canonical/launchpad/webapp/launchpadform.py	2011-12-20 00:00:32 +0000
@@ -17,3 +17,5 @@
     ReturnToReferrerMixin,
     safe_action,
     )
+
+

=== modified file 'lib/canonical/launchpad/webapp/login.py'
--- lib/canonical/launchpad/webapp/login.py	2011-12-18 13:55:35 +0000
+++ lib/canonical/launchpad/webapp/login.py	2011-12-20 00:00:32 +0000
@@ -40,7 +40,6 @@
 
 from canonical.config import config
 from canonical.launchpad import _
-from lp.services.identity.interfaces.account import AccountSuspendedError
 from canonical.launchpad.readonly import is_read_only
 from canonical.launchpad.webapp.dbpolicy import MasterDatabasePolicy
 from canonical.launchpad.webapp.error import SystemErrorView
@@ -59,6 +58,7 @@
     IPersonSet,
     PersonCreationRationale,
     )
+from lp.services.identity.interfaces.account import AccountSuspendedError
 from lp.services.openid.interfaces.openidconsumer import IOpenIDConsumerStore
 from lp.services.propertycache import cachedproperty
 from lp.services.timeline.requesttimeline import get_request_timeline

=== modified file 'lib/canonical/launchpad/webapp/namespace.py'
--- lib/canonical/launchpad/webapp/namespace.py	2011-07-28 13:58:14 +0000
+++ lib/canonical/launchpad/webapp/namespace.py	2011-12-20 00:00:32 +0000
@@ -13,11 +13,11 @@
 from zope.app.pagetemplate.viewpagetemplatefile import BoundPageTemplate
 from zope.app.publisher.browser import getDefaultViewName
 from zope.component import getMultiAdapter
+from zope.interface import implements
+from zope.publisher.interfaces.browser import IBrowserPublisher
 from zope.security.proxy import removeSecurityProxy
 from zope.traversing.interfaces import TraversalError
 from zope.traversing.namespace import view
-from zope.interface import implements
-from zope.publisher.interfaces.browser import IBrowserPublisher
 
 from lp.app.browser.launchpadform import LaunchpadFormView
 

=== modified file 'lib/canonical/launchpad/webapp/tests/test_authentication.py'
--- lib/canonical/launchpad/webapp/tests/test_authentication.py	2011-02-04 14:41:18 +0000
+++ lib/canonical/launchpad/webapp/tests/test_authentication.py	2011-12-20 00:00:32 +0000
@@ -8,10 +8,9 @@
 
 import unittest
 
+from contrib.oauth import OAuthRequest
 from zope.app.security.principalregistry import UnauthenticatedPrincipal
 
-from contrib.oauth import OAuthRequest
-
 from canonical.config import config
 from canonical.launchpad.ftests import login
 from canonical.launchpad.testing.systemdocs import (

=== modified file 'lib/canonical/launchpad/webapp/tests/test_authorization.py'
--- lib/canonical/launchpad/webapp/tests/test_authorization.py	2011-12-18 13:55:35 +0000
+++ lib/canonical/launchpad/webapp/tests/test_authorization.py	2011-12-20 00:00:32 +0000
@@ -20,7 +20,6 @@
     )
 import zope.testing.cleanup
 
-from lp.services.identity.interfaces.account import IAccount
 from canonical.launchpad.webapp.authentication import LaunchpadPrincipal
 from canonical.launchpad.webapp.authorization import (
     check_permission,
@@ -47,6 +46,7 @@
     )
 from lp.app.interfaces.security import IAuthorization
 from lp.app.security import AuthorizationBase
+from lp.services.identity.interfaces.account import IAccount
 from lp.testing import (
     ANONYMOUS,
     login,

=== modified file 'lib/canonical/launchpad/webapp/tests/test_authutility.py'
--- lib/canonical/launchpad/webapp/tests/test_authutility.py	2011-12-18 13:55:35 +0000
+++ lib/canonical/launchpad/webapp/tests/test_authutility.py	2011-12-20 00:00:32 +0000
@@ -16,7 +16,6 @@
 from zope.publisher.browser import TestRequest
 from zope.publisher.interfaces.http import IHTTPCredentials
 
-from lp.services.identity.interfaces.account import IAccount
 from canonical.launchpad.interfaces.launchpad import IPasswordEncryptor
 from canonical.launchpad.webapp.authentication import (
     LaunchpadPrincipal,
@@ -27,6 +26,7 @@
     IPlacelessLoginSource,
     )
 from lp.registry.interfaces.person import IPerson
+from lp.services.identity.interfaces.account import IAccount
 
 
 class DummyPerson(object):

=== modified file 'lib/canonical/launchpad/webapp/tests/test_batching.py'
--- lib/canonical/launchpad/webapp/tests/test_batching.py	2011-12-18 14:29:19 +0000
+++ lib/canonical/launchpad/webapp/tests/test_batching.py	2011-12-20 00:00:32 +0000
@@ -4,10 +4,10 @@
 __metaclass__ = type
 
 from datetime import datetime
+
+from lazr.batchnavigator.interfaces import IRangeFactory
 import pytz
 import simplejson
-
-from lazr.batchnavigator.interfaces import IRangeFactory
 from storm.expr import (
     compile,
     Desc,
@@ -19,9 +19,6 @@
     )
 from zope.security.proxy import isinstance as zope_isinstance
 
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.database.librarian import LibraryFileAlias
 from canonical.launchpad.webapp.batching import (
     BatchNavigator,
@@ -34,9 +31,10 @@
 from canonical.launchpad.webapp.testing import verifyObject
 from canonical.testing.layers import LaunchpadFunctionalLayer
 from lp.registry.model.person import Person
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.testing import (
+    person_logged_in,
     TestCaseWithFactory,
-    person_logged_in,
     )
 
 

=== modified file 'lib/canonical/launchpad/webapp/tests/test_errorlog.py'
--- lib/canonical/launchpad/webapp/tests/test_errorlog.py	2011-11-28 03:06:51 +0000
+++ lib/canonical/launchpad/webapp/tests/test_errorlog.py	2011-12-20 00:00:32 +0000
@@ -15,6 +15,7 @@
 from fixtures import TempDir
 from lazr.batchnavigator.interfaces import InvalidBatchSizeError
 from lazr.restful.declarations import error_status
+from lp_sitecustomize import customize_get_converter
 import oops_amqp
 import pytz
 import testtools
@@ -49,7 +50,6 @@
     GoneError,
     TranslationUnavailable,
     )
-from lp_sitecustomize import customize_get_converter
 
 
 UTC = pytz.utc

=== modified file 'lib/canonical/launchpad/webapp/tests/test_haproxy.py'
--- lib/canonical/launchpad/webapp/tests/test_haproxy.py	2011-06-09 01:21:09 +0000
+++ lib/canonical/launchpad/webapp/tests/test_haproxy.py	2011-12-20 00:00:32 +0000
@@ -8,17 +8,16 @@
 
 from textwrap import dedent
 
+from zope.app.testing.functional import HTTPCaller
+
 from canonical.config import config
-from canonical.testing.layers import FunctionalLayer
 from canonical.launchpad.webapp import haproxy
 from canonical.launchpad.webapp.dbpolicy import (
     DatabaseBlockedPolicy,
     LaunchpadDatabasePolicyFactory,
     )
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
-
-from zope.app.testing.functional import HTTPCaller
-
+from canonical.testing.layers import FunctionalLayer
 from lp.testing import TestCase
 
 

=== modified file 'lib/canonical/launchpad/webapp/tests/test_login.py'
--- lib/canonical/launchpad/webapp/tests/test_login.py	2011-12-18 13:45:20 +0000
+++ lib/canonical/launchpad/webapp/tests/test_login.py	2011-12-20 00:00:32 +0000
@@ -37,10 +37,6 @@
 from zope.session.interfaces import ISession
 from zope.testbrowser.testing import Browser as TestBrowser
 
-from lp.services.identity.interfaces.account import (
-    AccountStatus,
-    IAccountSet,
-    )
 from canonical.launchpad.interfaces.lpstorm import IStore
 from canonical.launchpad.testing.browser import (
     Browser,
@@ -70,6 +66,10 @@
     FunctionalLayer,
     )
 from lp.registry.interfaces.person import IPerson
+from lp.services.identity.interfaces.account import (
+    AccountStatus,
+    IAccountSet,
+    )
 from lp.services.openid.model.openididentifier import OpenIdIdentifier
 from lp.services.timeline.requesttimeline import get_request_timeline
 from lp.testing import (

=== modified file 'lib/canonical/launchpad/webapp/tests/test_login_account.py'
--- lib/canonical/launchpad/webapp/tests/test_login_account.py	2011-12-19 15:04:21 +0000
+++ lib/canonical/launchpad/webapp/tests/test_login_account.py	2011-12-20 00:00:32 +0000
@@ -14,10 +14,6 @@
     ANONYMOUS,
     login,
     )
-from lp.services.identity.interfaces.account import (
-    AccountCreationRationale,
-    IAccountSet,
-    )
 from canonical.launchpad.webapp.authentication import LaunchpadPrincipal
 from canonical.launchpad.webapp.interfaces import (
     CookieAuthLoggedInEvent,
@@ -31,6 +27,10 @@
     )
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
 from canonical.testing.layers import DatabaseFunctionalLayer
+from lp.services.identity.interfaces.account import (
+    AccountCreationRationale,
+    IAccountSet,
+    )
 from lp.testing import TestCaseWithFactory
 
 

=== modified file 'lib/canonical/launchpad/webapp/tests/test_pageid.py'
--- lib/canonical/launchpad/webapp/tests/test_pageid.py	2011-08-31 21:04:39 +0000
+++ lib/canonical/launchpad/webapp/tests/test_pageid.py	2011-12-20 00:00:32 +0000
@@ -5,8 +5,8 @@
 __metaclass__ = type
 
 
+from lazr.restful.interfaces import ICollectionResource
 from zope.interface import implements
-from lazr.restful.interfaces import ICollectionResource
 
 from canonical.launchpad.webapp.servers import WebServicePublication
 from lp.testing import TestCase

=== modified file 'lib/canonical/launchpad/webapp/tests/test_pgsession.py'
--- lib/canonical/launchpad/webapp/tests/test_pgsession.py	2011-08-12 11:37:08 +0000
+++ lib/canonical/launchpad/webapp/tests/test_pgsession.py	2011-12-20 00:00:32 +0000
@@ -5,10 +5,9 @@
 
 __metaclass__ = type
 
+from datetime import timedelta
 from unittest import TestCase
 
-from datetime import timedelta
-
 from zope.publisher.browser import TestRequest
 from zope.security.management import (
     endInteraction,

=== modified file 'lib/canonical/launchpad/webapp/tests/test_publication.py'
--- lib/canonical/launchpad/webapp/tests/test_publication.py	2011-12-18 13:55:35 +0000
+++ lib/canonical/launchpad/webapp/tests/test_publication.py	2011-12-20 00:00:32 +0000
@@ -26,7 +26,6 @@
     )
 
 from canonical.config import dbconfig
-from lp.services.identity.model.emailaddress import EmailAddress
 from canonical.launchpad.ftests import (
     ANONYMOUS,
     login,
@@ -62,6 +61,7 @@
     DatabaseFunctionalLayer,
     FunctionalLayer,
     )
+from lp.services.identity.model.emailaddress import EmailAddress
 from lp.services.oauth.interfaces import (
     IOAuthConsumerSet,
     IOAuthSignedRequest,

=== modified file 'lib/canonical/launchpad/webapp/tests/test_publisher.py'
--- lib/canonical/launchpad/webapp/tests/test_publisher.py	2011-12-12 18:22:50 +0000
+++ lib/canonical/launchpad/webapp/tests/test_publisher.py	2011-12-20 00:00:32 +0000
@@ -5,18 +5,22 @@
     DocTestSuite,
     ELLIPSIS,
     )
-from unittest import TestLoader, TestSuite
+from unittest import (
+    TestLoader,
+    TestSuite,
+    )
 
 from lazr.restful.interfaces import IJSONRequestCache
 import simplejson
 from zope.component import getUtility
 
-from canonical.testing.layers import DatabaseFunctionalLayer
+from canonical.launchpad.webapp import publisher
 from canonical.launchpad.webapp.publisher import (
     FakeRequest,
     LaunchpadView,
     )
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
+from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.services.features.flags import flag_info
 from lp.services.features.testing import FeatureFixture
 from lp.services.worlddata.interfaces.country import ICountrySet
@@ -26,8 +30,6 @@
     TestCaseWithFactory,
     )
 
-from canonical.launchpad.webapp import publisher
-
 
 class TestLaunchpadView(TestCaseWithFactory):
 

=== modified file 'lib/canonical/launchpad/webapp/tests/test_servers.py'
--- lib/canonical/launchpad/webapp/tests/test_servers.py	2011-10-11 07:09:47 +0000
+++ lib/canonical/launchpad/webapp/tests/test_servers.py	2011-12-20 00:00:32 +0000
@@ -32,9 +32,7 @@
     Interface,
     )
 
-from canonical.launchpad.webapp.interfaces import (
-    IFinishReadOnlyRequestEvent,
-    )
+from canonical.launchpad.webapp.interfaces import IFinishReadOnlyRequestEvent
 from canonical.launchpad.webapp.publication import LaunchpadBrowserPublication
 from canonical.launchpad.webapp.servers import (
     ApplicationServerSettingRequestFactory,

=== modified file 'lib/canonical/launchpad/webapp/tests/test_sighup.py'
--- lib/canonical/launchpad/webapp/tests/test_sighup.py	2010-12-17 20:58:27 +0000
+++ lib/canonical/launchpad/webapp/tests/test_sighup.py	2011-12-20 00:00:32 +0000
@@ -8,9 +8,11 @@
 import os
 import signal
 
+from canonical.launchpad.webapp import (
+    haproxy,
+    sighup,
+    )
 from canonical.testing.layers import FunctionalLayer
-from canonical.launchpad.webapp import haproxy
-from canonical.launchpad.webapp import sighup
 from lp.testing import TestCase
 
 

=== modified file 'lib/canonical/launchpad/webapp/tests/test_view_model.py'
--- lib/canonical/launchpad/webapp/tests/test_view_model.py	2011-11-16 19:31:51 +0000
+++ lib/canonical/launchpad/webapp/tests/test_view_model.py	2011-12-20 00:00:32 +0000
@@ -12,8 +12,8 @@
 from zope.configuration import xmlconfig
 
 from canonical.launchpad.webapp import LaunchpadView
+from canonical.launchpad.webapp.namespace import JsonModelNamespaceView
 from canonical.launchpad.webapp.publisher import canonical_url
-from canonical.launchpad.webapp.namespace import JsonModelNamespaceView
 import canonical.launchpad.webapp.tests
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.app.browser.launchpadform import LaunchpadFormView

=== modified file 'lib/canonical/launchpad/webapp/vocabulary.py'
--- lib/canonical/launchpad/webapp/vocabulary.py	2011-08-22 12:13:22 +0000
+++ lib/canonical/launchpad/webapp/vocabulary.py	2011-12-20 00:00:32 +0000
@@ -26,7 +26,6 @@
 from collections import namedtuple
 
 from lazr.restful.utils import safe_hasattr
-
 from sqlobject import (
     AND,
     CONTAINSSTRING,

=== modified file 'lib/canonical/launchpad/xmlrpc/application.py'
--- lib/canonical/launchpad/xmlrpc/application.py	2011-09-21 21:12:02 +0000
+++ lib/canonical/launchpad/xmlrpc/application.py	2011-12-20 00:00:32 +0000
@@ -38,7 +38,6 @@
 from lp.registry.interfaces.person import ISoftwareCenterAgentApplication
 from lp.services.features.xmlrpc import IFeatureFlagApplication
 
-
 # NOTE: If you add a traversal here, you should update
 # the regular expression in utilities/page-performance-report.ini
 class PrivateApplication:

=== modified file 'lib/lp/answers/browser/faqcollection.py'
--- lib/lp/answers/browser/faqcollection.py	2011-04-26 16:25:00 +0000
+++ lib/lp/answers/browser/faqcollection.py	2011-12-20 00:00:32 +0000
@@ -20,15 +20,15 @@
     )
 from canonical.launchpad.webapp.batching import BatchNavigator
 from canonical.launchpad.webapp.menu import enabled_with_permission
+from lp.answers.enums import (
+    QUESTION_STATUS_DEFAULT_SEARCH,
+    QuestionSort,
+    )
 from lp.answers.interfaces.faqcollection import (
     FAQSort,
     IFAQCollection,
     ISearchFAQsForm,
     )
-from lp.answers.enums import (
-    QuestionSort,
-    QUESTION_STATUS_DEFAULT_SEARCH,
-    )
 from lp.app.browser.launchpadform import (
     action,
     LaunchpadFormView,

=== modified file 'lib/lp/answers/browser/questionsubscription.py'
--- lib/lp/answers/browser/questionsubscription.py	2011-07-29 06:58:45 +0000
+++ lib/lp/answers/browser/questionsubscription.py	2011-12-20 00:00:32 +0000
@@ -9,9 +9,7 @@
     ]
 
 from lazr.delegates import delegates
-from lazr.restful.interfaces import (
-    IWebServiceClientRequest,
-)
+from lazr.restful.interfaces import IWebServiceClientRequest
 from simplejson import dumps
 from zope.traversing.browser import absoluteURL
 

=== modified file 'lib/lp/answers/browser/questiontarget.py'
--- lib/lp/answers/browser/questiontarget.py	2011-12-08 22:32:41 +0000
+++ lib/lp/answers/browser/questiontarget.py	2011-12-20 00:00:32 +0000
@@ -24,14 +24,13 @@
     ]
 
 from operator import attrgetter
-from simplejson import dumps
 from urllib import urlencode
 
 from lazr.restful.interfaces import (
     IJSONRequestCache,
     IWebServiceClientRequest,
     )
-
+from simplejson import dumps
 from z3c.ptcompat import ViewPageTemplateFile
 from zope.app.form.browser import DropdownWidget
 from zope.component import (

=== modified file 'lib/lp/answers/browser/tests/test_questionsubscription_views.py'
--- lib/lp/answers/browser/tests/test_questionsubscription_views.py	2011-08-02 01:55:59 +0000
+++ lib/lp/answers/browser/tests/test_questionsubscription_views.py	2011-12-20 00:00:32 +0000
@@ -5,6 +5,7 @@
 
 __metaclass__ = type
 
+from lazr.restful.interfaces import IWebServiceClientRequest
 from simplejson import dumps
 from storm.store import Store
 from testtools.matchers import Equals
@@ -13,7 +14,6 @@
 
 from canonical.launchpad.webapp import canonical_url
 from canonical.testing.layers import LaunchpadFunctionalLayer
-from lazr.restful.interfaces import IWebServiceClientRequest
 from lp.registry.interfaces.person import IPersonSet
 from lp.testing import (
     person_logged_in,

=== modified file 'lib/lp/answers/browser/tests/test_questiontarget.py'
--- lib/lp/answers/browser/tests/test_questiontarget.py	2011-10-17 07:43:15 +0000
+++ lib/lp/answers/browser/tests/test_questiontarget.py	2011-12-20 00:00:32 +0000
@@ -6,22 +6,21 @@
 __metaclass__ = type
 
 import os
-from simplejson import dumps
 from urllib import quote
 
 from BeautifulSoup import BeautifulSoup
+from lazr.restful.interfaces import (
+    IJSONRequestCache,
+    IWebServiceClientRequest,
+    )
+from simplejson import dumps
 from storm.store import Store
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy
 from zope.traversing.browser import absoluteURL
 
-from lazr.restful.interfaces import (
-    IJSONRequestCache,
-    IWebServiceClientRequest,
-    )
-
+from canonical.launchpad.testing.pages import find_tag_by_id
 from canonical.launchpad.webapp import canonical_url
-from canonical.launchpad.testing.pages import find_tag_by_id
 from canonical.testing.layers import (
     DatabaseFunctionalLayer,
     LaunchpadFunctionalLayer,

=== modified file 'lib/lp/answers/interfaces/question.py'
--- lib/lp/answers/interfaces/question.py	2011-09-23 14:15:37 +0000
+++ lib/lp/answers/interfaces/question.py	2011-12-20 00:00:32 +0000
@@ -18,8 +18,8 @@
 from lazr.restful.declarations import (
     call_with,
     export_as_webservice_entry,
+    export_write_operation,
     exported,
-    export_write_operation,
     operation_for_version,
     operation_parameters,
     REQUEST_USER,
@@ -29,7 +29,6 @@
     Reference,
     ReferenceChoice,
     )
-
 from zope.interface import (
     Attribute,
     Interface,
@@ -45,11 +44,11 @@
     )
 
 from canonical.launchpad import _
-from lp.answers.interfaces.faq import IFAQ
 from lp.answers.enums import (
     QuestionPriority,
     QuestionStatus,
     )
+from lp.answers.interfaces.faq import IFAQ
 from lp.answers.interfaces.questionmessage import IQuestionMessage
 from lp.answers.interfaces.questiontarget import IQuestionTarget
 from lp.registry.interfaces.person import IPerson

=== modified file 'lib/lp/answers/interfaces/questioncollection.py'
--- lib/lp/answers/interfaces/questioncollection.py	2011-05-16 15:18:05 +0000
+++ lib/lp/answers/interfaces/questioncollection.py	2011-12-20 00:00:32 +0000
@@ -13,17 +13,6 @@
     'ISearchableByQuestionOwner',
     ]
 
-from zope.interface import (
-    Attribute,
-    Interface,
-    )
-from zope.schema import (
-    Choice,
-    Int,
-    List,
-    TextLine,
-    )
-
 from lazr.restful.declarations import (
     collection_default_content,
     export_as_webservice_collection,
@@ -35,6 +24,16 @@
     operation_returns_entry,
     )
 from lazr.restful.fields import ReferenceChoice
+from zope.interface import (
+    Attribute,
+    Interface,
+    )
+from zope.schema import (
+    Choice,
+    Int,
+    List,
+    TextLine,
+    )
 
 from canonical.launchpad import _
 from lp.answers.enums import (

=== modified file 'lib/lp/answers/interfaces/questionmessage.py'
--- lib/lp/answers/interfaces/questionmessage.py	2011-05-17 18:45:12 +0000
+++ lib/lp/answers/interfaces/questionmessage.py	2011-12-20 00:00:32 +0000
@@ -11,6 +11,11 @@
     'IQuestionMessage',
     ]
 
+from lazr.restful.declarations import (
+    export_as_webservice_entry,
+    exported,
+    )
+from lazr.restful.fields import Reference
 from zope.interface import Interface
 from zope.schema import (
     Bool,
@@ -18,18 +23,12 @@
     Int,
     )
 
-from lazr.restful.declarations import (
-    export_as_webservice_entry,
-    exported,
-    )
-from lazr.restful.fields import Reference
-
 from canonical.launchpad import _
-from lp.services.messages.interfaces.message import IMessage
 from lp.answers.enums import (
     QuestionAction,
     QuestionStatus,
     )
+from lp.services.messages.interfaces.message import IMessage
 
 
 class IQuestionMessage(IMessage):

=== modified file 'lib/lp/answers/interfaces/questionreopening.py'
--- lib/lp/answers/interfaces/questionreopening.py	2011-04-26 15:44:26 +0000
+++ lib/lp/answers/interfaces/questionreopening.py	2011-12-20 00:00:32 +0000
@@ -19,8 +19,8 @@
     )
 
 from canonical.launchpad import _
+from lp.answers.enums import QuestionStatus
 from lp.answers.interfaces.question import IQuestion
-from lp.answers.enums import QuestionStatus
 from lp.registry.interfaces.person import IPerson
 
 

=== modified file 'lib/lp/answers/interfaces/questionsperson.py'
--- lib/lp/answers/interfaces/questionsperson.py	2011-05-18 14:26:24 +0000
+++ lib/lp/answers/interfaces/questionsperson.py	2011-12-20 00:00:32 +0000
@@ -8,6 +8,13 @@
     'IQuestionsPerson',
     ]
 
+from lazr.restful.declarations import (
+    export_read_operation,
+    operation_for_version,
+    operation_parameters,
+    operation_returns_collection_of,
+    )
+from lazr.restful.fields import ReferenceChoice
 from zope.interface import Interface
 from zope.schema import (
     Bool,
@@ -16,20 +23,12 @@
     TextLine,
     )
 
-from lazr.restful.declarations import (
-    export_read_operation,
-    operation_for_version,
-    operation_parameters,
-    operation_returns_collection_of,
-    )
-from lazr.restful.fields import ReferenceChoice
-
 from canonical.launchpad import _
 from lp.answers.enums import (
+    QUESTION_STATUS_DEFAULT_SEARCH,
     QuestionParticipation,
     QuestionSort,
     QuestionStatus,
-    QUESTION_STATUS_DEFAULT_SEARCH,
     )
 from lp.answers.interfaces.questioncollection import IQuestionCollection
 

=== modified file 'lib/lp/answers/interfaces/questionsubscription.py'
--- lib/lp/answers/interfaces/questionsubscription.py	2011-07-27 11:13:26 +0000
+++ lib/lp/answers/interfaces/questionsubscription.py	2011-12-20 00:00:32 +0000
@@ -16,7 +16,6 @@
     exported,
     )
 from lazr.restful.fields import Reference
-
 from zope.interface import Interface
 from zope.schema import (
     Datetime,

=== modified file 'lib/lp/answers/interfaces/questiontarget.py'
--- lib/lp/answers/interfaces/questiontarget.py	2011-08-16 01:54:08 +0000
+++ lib/lp/answers/interfaces/questiontarget.py	2011-12-20 00:00:32 +0000
@@ -13,15 +13,6 @@
     'ISearchQuestionsForm',
     ]
 
-from zope.interface import Interface
-from zope.schema import (
-    Choice,
-    Int,
-    List,
-    Set,
-    TextLine,
-    )
-
 from lazr.restful.declarations import (
     call_with,
     export_as_webservice_entry,
@@ -33,15 +24,23 @@
     REQUEST_USER,
     )
 from lazr.restful.fields import Reference
+from zope.interface import Interface
+from zope.schema import (
+    Choice,
+    Int,
+    List,
+    Set,
+    TextLine,
+    )
 
 from canonical.launchpad import _
-from lp.answers.interfaces.questioncollection import (
-    ISearchableByQuestionOwner,
-    )
 from lp.answers.enums import (
+    QUESTION_STATUS_DEFAULT_SEARCH,
     QuestionSort,
     QuestionStatus,
-    QUESTION_STATUS_DEFAULT_SEARCH,
+    )
+from lp.answers.interfaces.questioncollection import (
+    ISearchableByQuestionOwner,
     )
 from lp.registry.interfaces.person import IPerson
 from lp.services.fields import PublicPersonChoice

=== modified file 'lib/lp/answers/interfaces/webservice.py'
--- lib/lp/answers/interfaces/webservice.py	2011-07-27 11:13:26 +0000
+++ lib/lp/answers/interfaces/webservice.py	2011-12-20 00:00:32 +0000
@@ -23,13 +23,13 @@
     patch_reference_property,
     )
 from lp.answers.interfaces.question import IQuestion
-from lp.answers.interfaces.questionsubscription import IQuestionSubscription
 from lp.answers.interfaces.questioncollection import (
     IQuestionSet,
     ISearchableByQuestionOwner,
     )
-from lp.answers.interfaces.questionmessage import  IQuestionMessage
-from lp.answers.interfaces.questionsperson import  IQuestionsPerson
+from lp.answers.interfaces.questionmessage import IQuestionMessage
+from lp.answers.interfaces.questionsperson import IQuestionsPerson
+from lp.answers.interfaces.questionsubscription import IQuestionSubscription
 from lp.answers.interfaces.questiontarget import IQuestionTarget
 
 

=== modified file 'lib/lp/answers/model/questionmessage.py'
--- lib/lp/answers/model/questionmessage.py	2011-05-18 20:16:35 +0000
+++ lib/lp/answers/model/questionmessage.py	2011-12-20 00:00:32 +0000
@@ -17,13 +17,13 @@
 
 from canonical.database.enumcol import EnumCol
 from canonical.database.sqlbase import SQLBase
-from lp.services.messages.interfaces.message import IMessage
 from lp.answers.enums import (
     QuestionAction,
     QuestionStatus,
     )
 from lp.answers.interfaces.questionmessage import IQuestionMessage
 from lp.registry.interfaces.person import validate_public_person
+from lp.services.messages.interfaces.message import IMessage
 from lp.services.propertycache import cachedproperty
 
 

=== modified file 'lib/lp/answers/model/questionsubscription.py'
--- lib/lp/answers/model/questionsubscription.py	2011-07-27 11:13:26 +0000
+++ lib/lp/answers/model/questionsubscription.py	2011-12-20 00:00:32 +0000
@@ -10,7 +10,6 @@
 __all__ = ['QuestionSubscription']
 
 import pytz
-
 from sqlobject import ForeignKey
 from storm.locals import (
     DateTime,

=== modified file 'lib/lp/answers/tests/test_faq.py'
--- lib/lp/answers/tests/test_faq.py	2011-05-09 16:35:10 +0000
+++ lib/lp/answers/tests/test_faq.py	2011-12-20 00:00:32 +0000
@@ -7,8 +7,8 @@
 
 from zope.component import getUtility
 
+from canonical.launchpad.webapp.authorization import check_permission
 from canonical.testing.layers import DatabaseFunctionalLayer
-from canonical.launchpad.webapp.authorization import check_permission
 from lp.services.worlddata.interfaces.language import ILanguageSet
 from lp.testing import (
     login_person,

=== modified file 'lib/lp/answers/tests/test_faqtarget.py'
--- lib/lp/answers/tests/test_faqtarget.py	2011-05-09 16:35:10 +0000
+++ lib/lp/answers/tests/test_faqtarget.py	2011-12-20 00:00:32 +0000
@@ -7,8 +7,8 @@
 
 from zope.component import getUtility
 
+from canonical.launchpad.webapp.authorization import check_permission
 from canonical.testing.layers import DatabaseFunctionalLayer
-from canonical.launchpad.webapp.authorization import check_permission
 from lp.answers.interfaces.faqtarget import IFAQTarget
 from lp.services.worlddata.interfaces.language import ILanguageSet
 from lp.testing import (

=== modified file 'lib/lp/answers/tests/test_question_webservice.py'
--- lib/lp/answers/tests/test_question_webservice.py	2011-08-02 02:54:58 +0000
+++ lib/lp/answers/tests/test_question_webservice.py	2011-12-20 00:00:32 +0000
@@ -29,12 +29,12 @@
 from lp.registry.interfaces.person import IPersonSet
 from lp.services.worlddata.interfaces.language import ILanguageSet
 from lp.testing import (
-    TestCase,
-    TestCaseWithFactory,
     celebrity_logged_in,
     launchpadlib_for,
     logout,
     person_logged_in,
+    TestCase,
+    TestCaseWithFactory,
     ws_object,
     )
 from lp.testing.views import create_webservice_error_view

=== modified file 'lib/lp/answers/tests/test_question_workflow.py'
--- lib/lp/answers/tests/test_question_workflow.py	2011-05-21 18:54:42 +0000
+++ lib/lp/answers/tests/test_question_workflow.py	2011-12-20 00:00:32 +0000
@@ -39,7 +39,6 @@
 from canonical.launchpad.webapp.authorization import clear_cache
 from canonical.launchpad.webapp.interfaces import ILaunchBag
 from canonical.testing.layers import DatabaseFunctionalLayer
-from lp.answers.interfaces.question import IQuestion
 from lp.answers.enums import (
     QuestionAction,
     QuestionStatus,
@@ -48,6 +47,7 @@
     InvalidQuestionStateError,
     NotQuestionOwnerError,
     )
+from lp.answers.interfaces.question import IQuestion
 from lp.answers.interfaces.questionmessage import IQuestionMessage
 from lp.registry.interfaces.distribution import IDistributionSet
 from lp.registry.interfaces.person import (

=== modified file 'lib/lp/answers/vocabulary.py'
--- lib/lp/answers/vocabulary.py	2011-09-23 15:03:54 +0000
+++ lib/lp/answers/vocabulary.py	2011-12-20 00:00:32 +0000
@@ -10,7 +10,6 @@
     ]
 
 from sqlobject import OR
-
 from zope.interface import implements
 from zope.schema.vocabulary import SimpleTerm
 

=== modified file 'lib/lp/app/__init__.py'
--- lib/lp/app/__init__.py	2010-12-13 18:04:24 +0000
+++ lib/lp/app/__init__.py	2011-12-20 00:00:32 +0000
@@ -16,6 +16,7 @@
 # you want the old behavior, just like we do.
 from zope.app.form.browser import itemswidgets
 
+
 itemswidgets.EXPLICIT_EMPTY_SELECTION = False
 
 # Load versioninfo.py so that we get errors on start-up rather than waiting

=== modified file 'lib/lp/app/browser/launchpad.py'
--- lib/lp/app/browser/launchpad.py	2011-12-18 13:45:20 +0000
+++ lib/lp/app/browser/launchpad.py	2011-12-20 00:00:32 +0000
@@ -24,9 +24,7 @@
 
 
 import cgi
-from datetime import (
-    timedelta,
-    )
+from datetime import timedelta
 import operator
 import os
 import re
@@ -55,7 +53,6 @@
 
 from canonical.config import config
 from canonical.launchpad.helpers import intOrZero
-from lp.services.identity.interfaces.account import AccountStatus
 from canonical.launchpad.interfaces.launchpad import (
     IAppFrontPageSearchForm,
     IBazaarApplication,
@@ -137,6 +134,7 @@
     )
 from lp.registry.interfaces.projectgroup import IProjectGroupSet
 from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
+from lp.services.identity.interfaces.account import AccountStatus
 from lp.services.propertycache import cachedproperty
 from lp.services.utils import utc_now
 from lp.services.worlddata.interfaces.country import ICountrySet

=== modified file 'lib/lp/app/browser/lazrjs.py'
--- lib/lp/app/browser/lazrjs.py	2011-12-15 18:25:11 +0000
+++ lib/lp/app/browser/lazrjs.py	2011-12-20 00:00:32 +0000
@@ -16,22 +16,24 @@
     'vocabulary_to_choice_edit_items',
     ]
 
-import simplejson
-
 from lazr.enum import IEnumeratedType
 from lazr.restful.declarations import LAZR_WEBSERVICE_EXPORTED
 from lazr.restful.utils import (
     get_current_browser_request,
     safe_hasattr,
     )
+import simplejson
 from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
 from zope.component import getUtility
-from zope.security.checker import canAccess, canWrite
 from zope.schema.interfaces import (
     ICollection,
     IVocabulary,
     )
 from zope.schema.vocabulary import getVocabularyRegistry
+from zope.security.checker import (
+    canAccess,
+    canWrite,
+    )
 
 from canonical.launchpad.webapp.interfaces import ILaunchBag
 from canonical.launchpad.webapp.publisher import canonical_url

=== modified file 'lib/lp/app/browser/tales.py'
--- lib/lp/app/browser/tales.py	2011-12-19 20:39:48 +0000
+++ lib/lp/app/browser/tales.py	2011-12-20 00:00:32 +0000
@@ -23,40 +23,42 @@
 from lazr.uri import URI
 import pytz
 from z3c.ptcompat import ViewPageTemplateFile
+from zope.app import zapi
+from zope.component import (
+    adapts,
+    getMultiAdapter,
+    getUtility,
+    queryAdapter,
+    )
 from zope.error.interfaces import IErrorReportingUtility
 from zope.interface import (
     Attribute,
+    implements,
     Interface,
-    implements,
-    )
-from zope.component import (
-    adapts,
-    getUtility,
-    queryAdapter,
-    getMultiAdapter,
-    )
-from zope.app import zapi
+    )
 from zope.publisher.browser import BrowserView
+from zope.schema import TextLine
+from zope.security.interfaces import Unauthorized
+from zope.security.proxy import isinstance as zope_isinstance
 from zope.traversing.interfaces import (
+    IPathAdapter,
     ITraversable,
-    IPathAdapter,
     TraversalError,
     )
-from zope.security.interfaces import Unauthorized
-from zope.security.proxy import isinstance as zope_isinstance
-from zope.schema import TextLine
 
 from canonical.launchpad import _
 from canonical.launchpad.interfaces.launchpad import (
     IHasIcon,
     IHasLogo,
     IHasMugshot,
-    IPrivacy
+    IPrivacy,
     )
 from canonical.launchpad.layers import LaunchpadLayer
-from canonical.launchpad.webapp import canonical_url, urlappend
+from canonical.launchpad.webapp import (
+    canonical_url,
+    urlappend,
+    )
 from canonical.launchpad.webapp.authorization import check_permission
-from lp.app.browser.badge import IHasBadges
 from canonical.launchpad.webapp.interfaces import (
     IApplicationMenu,
     IContextMenu,
@@ -64,7 +66,7 @@
     ILaunchBag,
     INavigationMenu,
     IPrimaryContext,
-    NoCanonicalUrl
+    NoCanonicalUrl,
     )
 from canonical.launchpad.webapp.menu import (
     get_current_view,
@@ -73,23 +75,20 @@
 from canonical.launchpad.webapp.publisher import (
     get_current_browser_request,
     LaunchpadView,
-    nearest
+    nearest,
     )
 from canonical.launchpad.webapp.session import get_cookie_domain
 from canonical.lazr.canonicalurl import nearest_adapter
-from lp.app.browser.stringformatter import escape, FormattersAPI
+from lp.app.browser.badge import IHasBadges
+from lp.app.browser.stringformatter import (
+    escape,
+    FormattersAPI,
+    )
 from lp.blueprints.interfaces.specification import ISpecification
 from lp.blueprints.interfaces.sprint import ISprint
 from lp.bugs.interfaces.bug import IBug
 from lp.buildmaster.enums import BuildStatus
 from lp.code.interfaces.branch import IBranch
-from lp.services.features import getFeatureFlag
-from lp.soyuz.enums import ArchivePurpose
-from lp.soyuz.interfaces.archive import IPPA
-from lp.soyuz.interfaces.archivesubscriber import IArchiveSubscriberSet
-from lp.soyuz.interfaces.binarypackagename import (
-    IBinaryAndSourcePackageName,
-    )
 from lp.registry.interfaces.distribution import IDistribution
 from lp.registry.interfaces.distributionsourcepackage import (
     IDistributionSourcePackage,
@@ -97,6 +96,11 @@
 from lp.registry.interfaces.person import IPerson
 from lp.registry.interfaces.product import IProduct
 from lp.registry.interfaces.projectgroup import IProjectGroup
+from lp.services.features import getFeatureFlag
+from lp.soyuz.enums import ArchivePurpose
+from lp.soyuz.interfaces.archive import IPPA
+from lp.soyuz.interfaces.archivesubscriber import IArchiveSubscriberSet
+from lp.soyuz.interfaces.binarypackagename import IBinaryAndSourcePackageName
 
 
 SEPARATOR = ' : '

=== modified file 'lib/lp/app/browser/tests/test_formatters.py'
--- lib/lp/app/browser/tests/test_formatters.py	2011-12-07 16:38:28 +0000
+++ lib/lp/app/browser/tests/test_formatters.py	2011-12-20 00:00:32 +0000
@@ -5,10 +5,10 @@
 
 __metaclass__ = type
 
+from canonical.launchpad.webapp import canonical_url
 from canonical.testing.layers import DatabaseFunctionalLayer
-from canonical.launchpad.webapp import canonical_url
+from lp.app.browser.tales import PillarFormatterAPI
 from lp.testing import TestCaseWithFactory
-from lp.app.browser.tales import PillarFormatterAPI
 
 
 class TestPillarFormatterAPI(TestCaseWithFactory):

=== modified file 'lib/lp/app/browser/tests/test_inlineeditpickerwidget.py'
--- lib/lp/app/browser/tests/test_inlineeditpickerwidget.py	2011-08-22 12:13:22 +0000
+++ lib/lp/app/browser/tests/test_inlineeditpickerwidget.py	2011-12-20 00:00:32 +0000
@@ -8,8 +8,7 @@
 from zope.interface import (
     implements,
     Interface,
-)
-
+    )
 from zope.schema import Choice
 
 from canonical.testing.layers import DatabaseFunctionalLayer

=== modified file 'lib/lp/app/browser/tests/test_inlinemulticheckboxwidget.py'
--- lib/lp/app/browser/tests/test_inlinemulticheckboxwidget.py	2011-03-17 05:28:47 +0000
+++ lib/lp/app/browser/tests/test_inlinemulticheckboxwidget.py	2011-12-20 00:00:32 +0000
@@ -5,21 +5,20 @@
 
 __metaclass__ = type
 
+from lazr.enum import (
+    EnumeratedType,
+    Item,
+    )
 import simplejson
-
 from zope.interface import Interface
 from zope.schema import List
 from zope.schema._field import Choice
 from zope.schema.vocabulary import getVocabularyRegistry
 
-from lazr.enum import EnumeratedType, Item
-
 from canonical.launchpad.webapp.publisher import canonical_url
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.app.browser.lazrjs import InlineMultiCheckboxWidget
-from lp.testing import (
-    TestCaseWithFactory,
-    )
+from lp.testing import TestCaseWithFactory
 
 
 class Alphabet(EnumeratedType):

=== modified file 'lib/lp/app/browser/tests/test_launchpad.py'
--- lib/lp/app/browser/tests/test_launchpad.py	2011-12-18 13:45:20 +0000
+++ lib/lp/app/browser/tests/test_launchpad.py	2011-12-20 00:00:32 +0000
@@ -13,10 +13,7 @@
 from zope.security.interfaces import Unauthorized
 from zope.security.proxy import removeSecurityProxy
 
-from lp.services.identity.interfaces.account import AccountStatus
-from canonical.launchpad.webapp import (
-    canonical_url,
-    )
+from canonical.launchpad.webapp import canonical_url
 from canonical.launchpad.webapp.interfaces import (
     BrowserNotificationLevel,
     ILaunchpadRoot,
@@ -38,6 +35,7 @@
     IPersonSet,
     PersonVisibility,
     )
+from lp.services.identity.interfaces.account import AccountStatus
 from lp.testing import (
     ANONYMOUS,
     login,

=== modified file 'lib/lp/app/browser/tests/test_page_macro.py'
--- lib/lp/app/browser/tests/test_page_macro.py	2011-12-19 15:28:26 +0000
+++ lib/lp/app/browser/tests/test_page_macro.py	2011-12-20 00:00:32 +0000
@@ -6,6 +6,7 @@
 __metaclass__ = type
 
 import os
+
 from zope.interface import implements
 from zope.location.interfaces import LocationError
 from zope.traversing.interfaces import IPathAdapter
@@ -19,9 +20,9 @@
 from lp.testing import (
     FakeAdapterMixin,
     login_person,
+    test_tales,
     TestCase,
     TestCaseWithFactory,
-    test_tales,
     )
 from lp.testing.views import create_view
 

=== modified file 'lib/lp/app/browser/tests/test_stringformatter.py'
--- lib/lp/app/browser/tests/test_stringformatter.py	2011-11-20 11:50:33 +0000
+++ lib/lp/app/browser/tests/test_stringformatter.py	2011-12-20 00:00:32 +0000
@@ -13,7 +13,6 @@
     Equals,
     Matcher,
     )
-
 from zope.component import getUtility
 
 from canonical.config import config
@@ -24,8 +23,8 @@
     FormattersAPI,
     linkify_bug_numbers,
     )
+from lp.services.features.testing import FeatureFixture
 from lp.testing import TestCase
-from lp.services.features.testing import FeatureFixture
 
 
 def test_split_paragraphs():

=== modified file 'lib/lp/app/tests/test_doc.py'
--- lib/lp/app/tests/test_doc.py	2010-10-04 19:50:45 +0000
+++ lib/lp/app/tests/test_doc.py	2011-12-20 00:00:32 +0000
@@ -12,9 +12,7 @@
     setUp,
     tearDown,
     )
-from canonical.testing.layers import (
-    LaunchpadFunctionalLayer,
-    )
+from canonical.testing.layers import LaunchpadFunctionalLayer
 from lp.services.testing import build_test_suite
 
 

=== modified file 'lib/lp/app/tests/test_tales.py'
--- lib/lp/app/tests/test_tales.py	2011-12-13 17:45:31 +0000
+++ lib/lp/app/tests/test_tales.py	2011-12-20 00:00:32 +0000
@@ -3,32 +3,35 @@
 
 """tales.py doctests."""
 
-from datetime import datetime, timedelta
+from datetime import (
+    datetime,
+    timedelta,
+    )
 
 from lxml import html
 from pytz import utc
 from zope.component import (
     getAdapter,
-    getUtility
+    getUtility,
     )
 from zope.traversing.interfaces import (
     IPathAdapter,
     TraversalError,
     )
+
 from canonical.launchpad.webapp.authorization import (
     clear_cache,
     precache_permission_for_objects,
     )
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
-
 from canonical.testing.layers import (
     DatabaseFunctionalLayer,
     FunctionalLayer,
     LaunchpadFunctionalLayer,
     )
 from lp.app.browser.tales import (
+    DateTimeFormatterAPI,
     format_link,
-    DateTimeFormatterAPI,
     ObjectImageDisplayAPI,
     PersonFormatterAPI,
     )

=== modified file 'lib/lp/app/validators/validation.py'
--- lib/lp/app/validators/validation.py	2011-12-18 23:42:00 +0000
+++ lib/lp/app/validators/validation.py	2011-12-20 00:00:32 +0000
@@ -23,9 +23,6 @@
 from zope.component import getUtility
 
 from canonical.launchpad import _
-from lp.services.identity.interfaces.emailaddress import (
-    IEmailAddressSet,
-    )
 from canonical.launchpad.interfaces.launchpad import ILaunchBag
 from canonical.launchpad.webapp import canonical_url
 from canonical.launchpad.webapp.menu import structured
@@ -33,6 +30,7 @@
 from lp.app.validators import LaunchpadValidationError
 from lp.app.validators.cve import valid_cve
 from lp.app.validators.email import valid_email
+from lp.services.identity.interfaces.emailaddress import IEmailAddressSet
 
 
 def can_be_nominated_for_series(series):

=== modified file 'lib/lp/app/webservice/marshallers.py'
--- lib/lp/app/webservice/marshallers.py	2011-07-27 17:34:09 +0000
+++ lib/lp/app/webservice/marshallers.py	2011-12-20 00:00:32 +0000
@@ -15,8 +15,8 @@
     )
 from zope.component import getUtility
 
+from canonical.launchpad.webapp.interfaces import ILaunchBag
 from lp.services.utils import obfuscate_email
-from canonical.launchpad.webapp.interfaces import ILaunchBag
 
 
 class TextFieldMarshaller(LazrTextFieldMarshaller):

=== modified file 'lib/lp/app/widgets/exception.py'
--- lib/lp/app/widgets/exception.py	2011-02-01 21:01:02 +0000
+++ lib/lp/app/widgets/exception.py	2011-12-20 00:00:32 +0000
@@ -1,12 +1,14 @@
 # Copyright 2009 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
+from z3c.ptcompat import ViewPageTemplateFile
+from zope.app.form.browser.interfaces import IWidgetInputErrorView
+from zope.app.form.interfaces import (
+    IWidgetInputError,
+    WidgetInputError as _WidgetInputError,
+    )
 from zope.interface import implements
-from zope.app.form.interfaces import IWidgetInputError
-from zope.app.form.interfaces import WidgetInputError as _WidgetInputError
-from zope.app.form.browser.interfaces import IWidgetInputErrorView
 
-from z3c.ptcompat import ViewPageTemplateFile
 
 class WidgetInputError(_WidgetInputError):
     """A customized WidgetInputError to work around a bug in Z3

=== modified file 'lib/lp/app/widgets/itemswidgets.py'
--- lib/lp/app/widgets/itemswidgets.py	2011-02-08 15:43:30 +0000
+++ lib/lp/app/widgets/itemswidgets.py	2011-12-20 00:00:32 +0000
@@ -17,13 +17,15 @@
 
 import math
 
+from lazr.enum import IEnumeratedType
+from zope.app.form.browser import MultiCheckBoxWidget
+from zope.app.form.browser.itemswidgets import (
+    DropdownWidget,
+    RadioWidget,
+    )
+from zope.app.form.browser.widget import renderElement
 from zope.schema.interfaces import IChoice
 from zope.schema.vocabulary import SimpleVocabulary
-from zope.app.form.browser import MultiCheckBoxWidget
-from zope.app.form.browser.itemswidgets import DropdownWidget, RadioWidget
-from zope.app.form.browser.widget import renderElement
-
-from lazr.enum import IEnumeratedType
 
 from canonical.launchpad.webapp.menu import escape
 

=== modified file 'lib/lp/app/widgets/link.py'
--- lib/lp/app/widgets/link.py	2011-02-01 21:03:45 +0000
+++ lib/lp/app/widgets/link.py	2011-12-20 00:00:32 +0000
@@ -9,8 +9,9 @@
     ]
 
 from zope.app.form.browser import DisplayWidget
+from zope.component import queryAdapter
 from zope.traversing.interfaces import IPathAdapter
-from zope.component import queryAdapter
+
 
 class LinkWidget(DisplayWidget):
     """Renders using the tal formatter for fmt:link.

=== modified file 'lib/lp/app/widgets/owner.py'
--- lib/lp/app/widgets/owner.py	2011-02-01 21:03:45 +0000
+++ lib/lp/app/widgets/owner.py	2011-12-20 00:00:32 +0000
@@ -3,13 +3,17 @@
 
 __metaclass__ = type
 
+from zope.app.form.browser.interfaces import IBrowserWidget
+from zope.app.form.interfaces import IInputWidget
 from zope.component import getUtility
-from zope.interface import implements, Interface
-from zope.app.form.interfaces import IInputWidget
-from zope.app.form.browser.interfaces import IBrowserWidget
+from zope.interface import (
+    implements,
+    Interface,
+    )
 
 from canonical.launchpad.webapp.interfaces import ILaunchBag
 
+
 class RequestWidget(object):
     '''A widget that sets itself to a value calculated from request
 

=== modified file 'lib/lp/app/widgets/password.py'
--- lib/lp/app/widgets/password.py	2011-02-01 21:03:45 +0000
+++ lib/lp/app/widgets/password.py	2011-12-20 00:00:32 +0000
@@ -9,6 +9,7 @@
 
 __metaclass__ = type
 
+from z3c.ptcompat import ViewPageTemplateFile
 from zope.app.form.browser import PasswordWidget
 from zope.app.form.browser.interfaces import ITextBrowserWidget
 from zope.app.form.interfaces import WidgetInputError
@@ -16,8 +17,6 @@
 from zope.interface import implements
 from zope.schema.interfaces import ValidationError
 
-from z3c.ptcompat import ViewPageTemplateFile
-
 from canonical.launchpad import _
 from canonical.launchpad.interfaces.launchpad import IPasswordEncryptor
 from canonical.launchpad.webapp.interfaces import IMultiLineWidgetLayout

=== modified file 'lib/lp/app/widgets/popup.py'
--- lib/lp/app/widgets/popup.py	2011-10-20 00:53:01 +0000
+++ lib/lp/app/widgets/popup.py	2011-12-20 00:00:32 +0000
@@ -8,9 +8,9 @@
 __metaclass__ = type
 
 import cgi
+
+from lazr.restful.utils import safe_hasattr
 import simplejson
-
-from lazr.restful.utils import safe_hasattr
 from z3c.ptcompat import ViewPageTemplateFile
 from zope.app.form.browser.itemswidgets import (
     ItemsWidgetBase,

=== modified file 'lib/lp/app/widgets/tests/test_itemswidgets.py'
--- lib/lp/app/widgets/tests/test_itemswidgets.py	2011-02-08 15:43:30 +0000
+++ lib/lp/app/widgets/tests/test_itemswidgets.py	2011-12-20 00:00:32 +0000
@@ -5,19 +5,17 @@
 
 import doctest
 
+from lazr.enum import (
+    EnumeratedType,
+    Item,
+    )
+from testtools.matchers import DocTestMatches
 from zope.schema import Choice
 from zope.schema.vocabulary import (
     SimpleTerm,
     SimpleVocabulary,
     )
 
-from testtools.matchers import DocTestMatches
-
-from lazr.enum import (
-    EnumeratedType,
-    Item,
-    )
-
 from canonical.launchpad.webapp.menu import structured
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
 from canonical.testing.layers import DatabaseFunctionalLayer
@@ -27,9 +25,7 @@
     LaunchpadRadioWidgetWithDescription,
     PlainMultiCheckBoxWidget,
     )
-from lp.testing import (
-    TestCaseWithFactory,
-    )
+from lp.testing import TestCaseWithFactory
 
 
 class ItemWidgetTestCase(TestCaseWithFactory):

=== modified file 'lib/lp/app/widgets/tests/test_launchpadtarget.py'
--- lib/lp/app/widgets/tests/test_launchpadtarget.py	2011-11-30 20:56:43 +0000
+++ lib/lp/app/widgets/tests/test_launchpadtarget.py	2011-12-20 00:00:32 +0000
@@ -6,24 +6,22 @@
 import re
 
 from BeautifulSoup import BeautifulSoup
-
+from lazr.restful.fields import Reference
+from zope.app.form.browser.interfaces import IBrowserWidget
+from zope.app.form.interfaces import IInputWidget
 from zope.interface import (
     implements,
     Interface,
     )
-from zope.app.form.browser.interfaces import IBrowserWidget
-from zope.app.form.interfaces import IInputWidget
-
-from lazr.restful.fields import Reference
 
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
 from canonical.launchpad.webapp.testing import verifyObject
 from canonical.testing.layers import DatabaseFunctionalLayer
+from lp.app.validators import LaunchpadValidationError
 from lp.app.widgets.launchpadtarget import LaunchpadTargetWidget
-from lp.app.validators import LaunchpadValidationError
 from lp.registry.vocabularies import (
+    DistributionSourcePackageVocabulary,
     DistributionVocabulary,
-    DistributionSourcePackageVocabulary,
     ProductVocabulary,
     )
 from lp.services.features.testing import FeatureFixture

=== modified file 'lib/lp/app/widgets/tests/test_popup.py'
--- lib/lp/app/widgets/tests/test_popup.py	2011-08-25 04:27:35 +0000
+++ lib/lp/app/widgets/tests/test_popup.py	2011-12-20 00:00:32 +0000
@@ -4,7 +4,6 @@
 __metaclass__ = type
 
 import simplejson
-
 from zope.interface import Interface
 from zope.interface.interface import InterfaceClass
 from zope.schema import Choice

=== modified file 'lib/lp/app/widgets/tests/test_suggestion.py'
--- lib/lp/app/widgets/tests/test_suggestion.py	2011-08-20 23:01:50 +0000
+++ lib/lp/app/widgets/tests/test_suggestion.py	2011-12-20 00:00:32 +0000
@@ -11,7 +11,7 @@
 import doctest
 
 from pytz import utc
-
+from testtools.matchers import DocTestMatches
 from zope.component import provideUtility
 from zope.interface import implements
 from zope.schema import Choice
@@ -21,8 +21,6 @@
     SimpleVocabulary,
     )
 
-from testtools.matchers import DocTestMatches
-
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
 from canonical.launchpad.webapp.vocabulary import (
     FilteredVocabularyBase,

=== modified file 'lib/lp/archivepublisher/domination.py'
--- lib/lp/archivepublisher/domination.py	2011-12-18 14:29:19 +0000
+++ lib/lp/archivepublisher/domination.py	2011-12-20 00:00:32 +0000
@@ -76,13 +76,11 @@
     flush_database_updates,
     sqlvalues,
     )
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.interfaces.lpstorm import IStore
 from canonical.launchpad.utilities.orderingcheck import OrderingCheck
 from lp.registry.model.sourcepackagename import SourcePackageName
 from lp.services.database.bulk import load_related
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.soyuz.enums import (
     BinaryPackageFormat,
     PackagePublishingStatus,

=== modified file 'lib/lp/archivepublisher/htaccess.py'
--- lib/lp/archivepublisher/htaccess.py	2010-11-18 00:02:03 +0000
+++ lib/lp/archivepublisher/htaccess.py	2011-12-20 00:00:32 +0000
@@ -17,13 +17,14 @@
 
 
 import crypt
+from operator import attrgetter
 import os
 
-from operator import attrgetter
 from zope.component import getUtility
 
 from lp.soyuz.interfaces.archiveauthtoken import IArchiveAuthTokenSet
 
+
 HTACCESS_TEMPLATE = """
 AuthType           Basic
 AuthName           "Token Required"

=== modified file 'lib/lp/archivepublisher/model/ftparchive.py'
--- lib/lp/archivepublisher/model/ftparchive.py	2011-12-18 14:29:19 +0000
+++ lib/lp/archivepublisher/model/ftparchive.py	2011-12-20 00:00:32 +0000
@@ -11,9 +11,6 @@
 from storm.store import EmptyResultSet
 from zope.component import getUtility
 
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.database.librarian import LibraryFileAlias
 from canonical.launchpad.webapp.interfaces import (
     DEFAULT_FLAVOR,
@@ -27,6 +24,7 @@
     OutputLineHandler,
     ReturnCodeReceiver,
     )
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.database.stormexpr import Concatenate
 from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.model.binarypackagebuild import BinaryPackageBuild

=== modified file 'lib/lp/archivepublisher/scripts/generate_extra_overrides.py'
--- lib/lp/archivepublisher/scripts/generate_extra_overrides.py	2011-12-07 13:09:40 +0000
+++ lib/lp/archivepublisher/scripts/generate_extra_overrides.py	2011-12-20 00:00:32 +0000
@@ -14,11 +14,10 @@
 import os
 import re
 
+from germinate.archive import TagFile
 from germinate.germinator import Germinator
-from germinate.archive import TagFile
 from germinate.log import GerminateFormatter
 from germinate.seeds import SeedStructure
-
 from zope.component import getUtility
 
 from canonical.launchpad.webapp.dbpolicy import (

=== modified file 'lib/lp/archivepublisher/tests/test_ftparchive.py'
--- lib/lp/archivepublisher/tests/test_ftparchive.py	2011-09-15 12:52:57 +0000
+++ lib/lp/archivepublisher/tests/test_ftparchive.py	2011-12-20 00:00:32 +0000
@@ -15,10 +15,6 @@
 from zope.component import getUtility
 
 from canonical.config import config
-from lp.services.log.logger import (
-    BufferLogger,
-    DevNullLogger,
-    )
 from canonical.testing.layers import (
     LaunchpadZopelessLayer,
     ZopelessDatabaseLayer,
@@ -33,6 +29,10 @@
 from lp.archivepublisher.publishing import Publisher
 from lp.registry.interfaces.distribution import IDistributionSet
 from lp.registry.interfaces.pocket import PackagePublishingPocket
+from lp.services.log.logger import (
+    BufferLogger,
+    DevNullLogger,
+    )
 from lp.testing import TestCaseWithFactory
 
 

=== modified file 'lib/lp/archivepublisher/tests/test_generate_extra_overrides.py'
--- lib/lp/archivepublisher/tests/test_generate_extra_overrides.py	2011-12-07 13:06:19 +0000
+++ lib/lp/archivepublisher/tests/test_generate_extra_overrides.py	2011-12-20 00:00:32 +0000
@@ -15,7 +15,6 @@
     germinator,
     seeds,
     )
-
 import transaction
 
 from canonical.testing.layers import (

=== modified file 'lib/lp/archivepublisher/tests/test_publisherconfig.py'
--- lib/lp/archivepublisher/tests/test_publisherconfig.py	2011-03-16 17:04:49 +0000
+++ lib/lp/archivepublisher/tests/test_publisherconfig.py	2011-12-20 00:00:32 +0000
@@ -6,8 +6,8 @@
 __metaclass__ = type
 
 
+from storm.exceptions import IntegrityError
 from storm.store import Store
-from storm.exceptions import IntegrityError
 from zope.component import getUtility
 from zope.interface.verify import verifyObject
 from zope.security.interfaces import Unauthorized

=== modified file 'lib/lp/archiveuploader/tests/test_dscfile.py'
--- lib/lp/archiveuploader/tests/test_dscfile.py	2011-03-21 12:55:50 +0000
+++ lib/lp/archiveuploader/tests/test_dscfile.py	2011-12-20 00:00:32 +0000
@@ -20,7 +20,10 @@
 from lp.archiveuploader.tests import datadir
 from lp.archiveuploader.uploadpolicy import BuildDaemonUploadPolicy
 from lp.registry.interfaces.sourcepackage import SourcePackageFileType
-from lp.services.log.logger import BufferLogger, DevNullLogger
+from lp.services.log.logger import (
+    BufferLogger,
+    DevNullLogger,
+    )
 from lp.soyuz.enums import SourcePackageFormat
 from lp.testing import (
     TestCase,

=== modified file 'lib/lp/archiveuploader/tests/test_nascentuploadfile.py'
--- lib/lp/archiveuploader/tests/test_nascentuploadfile.py	2011-12-16 15:09:45 +0000
+++ lib/lp/archiveuploader/tests/test_nascentuploadfile.py	2011-12-20 00:00:32 +0000
@@ -22,13 +22,13 @@
     DebBinaryUploadFile,
     UploadError,
     )
-from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.archiveuploader.tests import AbsolutelyAnythingGoesUploadPolicy
 from lp.buildmaster.enums import BuildStatus
+from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.services.log.logger import BufferLogger
 from lp.soyuz.enums import (
+    PackagePublishingStatus,
     PackageUploadCustomFormat,
-    PackagePublishingStatus,
     )
 from lp.testing import TestCaseWithFactory
 

=== modified file 'lib/lp/archiveuploader/tests/test_recipeuploads.py'
--- lib/lp/archiveuploader/tests/test_recipeuploads.py	2011-08-18 09:26:46 +0000
+++ lib/lp/archiveuploader/tests/test_recipeuploads.py	2011-12-20 00:00:32 +0000
@@ -10,12 +10,12 @@
 from storm.store import Store
 from zope.component import getUtility
 
+from lp.archiveuploader.tests.test_uploadprocessor import (
+    TestUploadProcessorBase,
+    )
 from lp.archiveuploader.uploadprocessor import (
+    UploadHandler,
     UploadStatusEnum,
-    UploadHandler,
-    )
-from lp.archiveuploader.tests.test_uploadprocessor import (
-    TestUploadProcessorBase,
     )
 from lp.buildmaster.enums import BuildStatus
 from lp.code.interfaces.sourcepackagerecipebuild import (

=== modified file 'lib/lp/archiveuploader/tests/test_uploadpolicy.py'
--- lib/lp/archiveuploader/tests/test_uploadpolicy.py	2010-08-25 16:04:06 +0000
+++ lib/lp/archiveuploader/tests/test_uploadpolicy.py	2011-12-20 00:00:32 +0000
@@ -4,13 +4,15 @@
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 from canonical.testing.layers import DatabaseFunctionalLayer
-
 from lp.app.errors import NotFoundError
 from lp.archiveuploader.uploadpolicy import (
     AbstractUploadPolicy,
     ArchiveUploadType,
     )
-from lp.testing import TestCase, TestCaseWithFactory
+from lp.testing import (
+    TestCase,
+    TestCaseWithFactory,
+    )
 
 
 class TestUploadPolicy_validateUploadType(TestCase):

=== modified file 'lib/lp/archiveuploader/uploadprocessor.py'
--- lib/lp/archiveuploader/uploadprocessor.py	2011-09-29 06:59:03 +0000
+++ lib/lp/archiveuploader/uploadprocessor.py	2011-12-20 00:00:32 +0000
@@ -70,9 +70,7 @@
     BuildDaemonUploadPolicy,
     UploadPolicyError,
     )
-from lp.buildmaster.enums import (
-    BuildStatus,
-    )
+from lp.buildmaster.enums import BuildStatus
 from lp.buildmaster.interfaces.buildfarmjob import ISpecificBuildFarmJobSource
 from lp.code.interfaces.sourcepackagerecipebuild import (
     ISourcePackageRecipeBuild,

=== modified file 'lib/lp/blueprints/browser/specificationbranch.py'
--- lib/lp/blueprints/browser/specificationbranch.py	2011-09-13 05:23:16 +0000
+++ lib/lp/blueprints/browser/specificationbranch.py	2011-12-20 00:00:32 +0000
@@ -16,9 +16,7 @@
 from zope.interface import implements
 
 from canonical.launchpad import _
-from canonical.launchpad.webapp import (
-    canonical_url,
-    )
+from canonical.launchpad.webapp import canonical_url
 from canonical.launchpad.webapp.interfaces import ICanonicalUrlData
 from lp.app.browser.launchpadform import (
     action,

=== modified file 'lib/lp/blueprints/browser/specificationdependency.py'
--- lib/lp/blueprints/browser/specificationdependency.py	2010-11-23 23:22:27 +0000
+++ lib/lp/blueprints/browser/specificationdependency.py	2011-12-20 00:00:32 +0000
@@ -11,10 +11,9 @@
     'SpecificationDependencyTreeView',
     ]
 
+from lazr.restful.interface import copy_field
 from zope.interface import Interface
 
-from lazr.restful.interface import copy_field
-
 from canonical.launchpad import _
 from canonical.launchpad.webapp import (
     canonical_url,

=== modified file 'lib/lp/blueprints/browser/specificationfeedback.py'
--- lib/lp/blueprints/browser/specificationfeedback.py	2010-11-23 23:22:27 +0000
+++ lib/lp/blueprints/browser/specificationfeedback.py	2011-12-20 00:00:32 +0000
@@ -11,9 +11,7 @@
 
 from canonical.launchpad import _
 from canonical.launchpad.helpers import english_list
-from canonical.launchpad.webapp import (
-    canonical_url,
-    )
+from canonical.launchpad.webapp import canonical_url
 from lp.app.browser.launchpadform import (
     action,
     custom_widget,

=== modified file 'lib/lp/blueprints/browser/specificationsubscription.py'
--- lib/lp/blueprints/browser/specificationsubscription.py	2011-12-14 08:11:10 +0000
+++ lib/lp/blueprints/browser/specificationsubscription.py	2011-12-20 00:00:32 +0000
@@ -10,15 +10,12 @@
     'SpecificationSubscriptionEditView',
     ]
 
+from lazr.delegates import delegates
 from simplejson import dumps
 from zope.component import getUtility
 
-from lazr.delegates import delegates
-
 from canonical.launchpad import _
-from canonical.launchpad.webapp import (
-    canonical_url,
-    )
+from canonical.launchpad.webapp import canonical_url
 from canonical.launchpad.webapp.authorization import (
     precache_permission_for_objects,
     )

=== modified file 'lib/lp/blueprints/browser/tests/test_specification.py'
--- lib/lp/blueprints/browser/tests/test_specification.py	2011-12-14 08:11:10 +0000
+++ lib/lp/blueprints/browser/tests/test_specification.py	2011-12-20 00:00:32 +0000
@@ -13,7 +13,6 @@
 from zope.publisher.interfaces import NotFound
 from zope.security.proxy import removeSecurityProxy
 
-from canonical.launchpad.webapp.publisher import canonical_url
 from canonical.launchpad.testing.pages import (
     extract_text,
     find_tag_by_id,
@@ -21,6 +20,7 @@
     setupBrowserForUser,
     )
 from canonical.launchpad.webapp.interfaces import BrowserNotificationLevel
+from canonical.launchpad.webapp.publisher import canonical_url
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.app.browser.tales import format_link
 from lp.blueprints.browser import specification

=== modified file 'lib/lp/blueprints/browser/tests/test_specificationtarget.py'
--- lib/lp/blueprints/browser/tests/test_specificationtarget.py	2011-07-22 14:50:56 +0000
+++ lib/lp/blueprints/browser/tests/test_specificationtarget.py	2011-12-20 00:00:32 +0000
@@ -5,19 +5,18 @@
 
 
 from BeautifulSoup import BeautifulSoup
-
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy
 
 from canonical.launchpad.testing.pages import find_tag_by_id
 from canonical.testing.layers import DatabaseFunctionalLayer
+from lp.app.enums import ServiceUsage
+from lp.blueprints.browser.specificationtarget import HasSpecificationsView
+from lp.blueprints.interfaces.specification import ISpecificationSet
 from lp.blueprints.interfaces.specificationtarget import (
     IHasSpecifications,
     ISpecificationTarget,
     )
-from lp.app.enums import ServiceUsage
-from lp.blueprints.browser.specificationtarget import HasSpecificationsView
-from lp.blueprints.interfaces.specification import ISpecificationSet
 from lp.blueprints.publisher import BlueprintsLayer
 from lp.testing import (
     login_person,
@@ -25,8 +24,8 @@
     )
 from lp.testing.matchers import IsConfiguredBatchNavigator
 from lp.testing.views import (
+    create_initialized_view,
     create_view,
-    create_initialized_view,
     )
 
 

=== modified file 'lib/lp/blueprints/browser/tests/test_views.py'
--- lib/lp/blueprints/browser/tests/test_views.py	2010-10-04 19:50:45 +0000
+++ lib/lp/blueprints/browser/tests/test_views.py	2011-12-20 00:00:32 +0000
@@ -24,9 +24,9 @@
     logout,
     TestCaseWithFactory,
     )
+from lp.testing._webservice import QueryCollector
 from lp.testing.matchers import HasQueryCount
 from lp.testing.sampledata import ADMIN_EMAIL
-from lp.testing._webservice import QueryCollector
 
 
 class TestAssignments(TestCaseWithFactory):

=== modified file 'lib/lp/blueprints/interfaces/specificationmessage.py'
--- lib/lp/blueprints/interfaces/specificationmessage.py	2011-05-12 21:33:10 +0000
+++ lib/lp/blueprints/interfaces/specificationmessage.py	2011-12-20 00:00:32 +0000
@@ -18,8 +18,8 @@
     Int,
     )
 
+from lp.blueprints.interfaces.specification import ISpecification
 from lp.services.messages.interfaces.message import IMessage
-from lp.blueprints.interfaces.specification import ISpecification
 
 
 class ISpecificationMessage(Interface):

=== modified file 'lib/lp/blueprints/interfaces/specificationtarget.py'
--- lib/lp/blueprints/interfaces/specificationtarget.py	2011-03-24 13:16:48 +0000
+++ lib/lp/blueprints/interfaces/specificationtarget.py	2011-12-20 00:00:32 +0000
@@ -13,17 +13,11 @@
     'ISpecificationGoal',
     ]
 
-from zope.interface import (
-    Attribute,
-    Interface,
-    )
-from zope.schema import TextLine
-
 from lazr.lifecycle.snapshot import doNotSnapshot
 from lazr.restful.declarations import (
-    exported,
     export_as_webservice_entry,
     export_read_operation,
+    exported,
     operation_for_version,
     operation_parameters,
     operation_returns_entry,
@@ -32,6 +26,11 @@
     CollectionField,
     Reference,
     )
+from zope.interface import (
+    Attribute,
+    Interface,
+    )
+from zope.schema import TextLine
 
 from canonical.launchpad import _
 

=== modified file 'lib/lp/blueprints/interfaces/sprintspecification.py'
--- lib/lp/blueprints/interfaces/sprintspecification.py	2010-11-01 03:57:52 +0000
+++ lib/lp/blueprints/interfaces/sprintspecification.py	2011-12-20 00:00:32 +0000
@@ -11,8 +11,16 @@
     'ISprintSpecification',
     ]
 
-from zope.interface import Attribute, Interface
-from zope.schema import Choice, Datetime, Int, Text
+from zope.interface import (
+    Attribute,
+    Interface,
+    )
+from zope.schema import (
+    Choice,
+    Datetime,
+    Int,
+    Text,
+    )
 
 from canonical.launchpad import _
 from lp.blueprints.enums import SprintSpecificationStatus

=== modified file 'lib/lp/blueprints/interfaces/webservice.py'
--- lib/lp/blueprints/interfaces/webservice.py	2011-06-07 06:49:18 +0000
+++ lib/lp/blueprints/interfaces/webservice.py	2011-12-20 00:00:32 +0000
@@ -15,13 +15,15 @@
     'ISpecificationSubscription',
     ]
 
+# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
+# import bugs.  Break this up into a per-package thing.
+from canonical.launchpad.interfaces import _schema_circular_imports
 from lp.blueprints.interfaces.specification import ISpecification
 from lp.blueprints.interfaces.specificationbranch import ISpecificationBranch
 from lp.blueprints.interfaces.specificationsubscription import (
     ISpecificationSubscription,
     )
 from lp.blueprints.interfaces.specificationtarget import ISpecificationTarget
-# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
-# import bugs.  Break this up into a per-package thing.
-from canonical.launchpad.interfaces import _schema_circular_imports
+
+
 _schema_circular_imports

=== modified file 'lib/lp/blueprints/mail/tests/test_handler.py'
--- lib/lp/blueprints/mail/tests/test_handler.py	2011-02-28 04:18:00 +0000
+++ lib/lp/blueprints/mail/tests/test_handler.py	2011-12-20 00:00:32 +0000
@@ -5,7 +5,10 @@
 
 __metaclass__ = type
 
-from testtools.matchers import Equals, Is
+from testtools.matchers import (
+    Equals,
+    Is,
+    )
 
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.blueprints.mail.handler import (

=== modified file 'lib/lp/blueprints/model/specification.py'
--- lib/lp/blueprints/model/specification.py	2011-12-19 15:09:08 +0000
+++ lib/lp/blueprints/model/specification.py	2011-12-20 00:00:32 +0000
@@ -46,12 +46,7 @@
     SQLBase,
     sqlvalues,
     )
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
-from canonical.launchpad.helpers import (
-    get_contact_email_addresses,
-    )
+from canonical.launchpad.helpers import get_contact_email_addresses
 from lp.app.errors import UserCannotUnsubscribePerson
 from lp.blueprints.adapters import SpecificationDelta
 from lp.blueprints.enums import (
@@ -88,15 +83,15 @@
 from lp.registry.interfaces.distribution import IDistribution
 from lp.registry.interfaces.distroseries import IDistroSeries
 from lp.registry.interfaces.person import validate_public_person
+from lp.registry.interfaces.product import IProduct
 from lp.registry.interfaces.productseries import IProductSeries
-from lp.registry.interfaces.product import IProduct
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.propertycache import (
     cachedproperty,
     get_property_cache,
     )
 
 
-
 def recursive_blocked_query(spec):
     return """
         RECURSIVE blocked(id) AS (

=== modified file 'lib/lp/blueprints/model/specificationmessage.py'
--- lib/lp/blueprints/model/specificationmessage.py	2011-05-12 21:33:10 +0000
+++ lib/lp/blueprints/model/specificationmessage.py	2011-12-20 00:00:32 +0000
@@ -17,14 +17,14 @@
 from zope.interface import implements
 
 from canonical.database.sqlbase import SQLBase
+from lp.blueprints.interfaces.specificationmessage import (
+    ISpecificationMessage,
+    ISpecificationMessageSet,
+    )
 from lp.services.messages.model.message import (
     Message,
     MessageChunk,
     )
-from lp.blueprints.interfaces.specificationmessage import (
-    ISpecificationMessage,
-    ISpecificationMessageSet,
-    )
 
 
 class SpecificationMessage(SQLBase):

=== modified file 'lib/lp/blueprints/tests/test_doc.py'
--- lib/lp/blueprints/tests/test_doc.py	2011-08-12 15:57:11 +0000
+++ lib/lp/blueprints/tests/test_doc.py	2011-12-20 00:00:32 +0000
@@ -8,14 +8,12 @@
 import logging
 import os
 
-from lp.services.mail.tests.test_doc import (
-    ProcessMailLayer,
-    )
 from canonical.launchpad.testing.systemdocs import (
     LayeredDocFileSuite,
     setUp,
     tearDown,
     )
+from lp.services.mail.tests.test_doc import ProcessMailLayer
 from lp.services.testing import build_test_suite
 
 

=== modified file 'lib/lp/blueprints/tests/test_hasspecifications.py'
--- lib/lp/blueprints/tests/test_hasspecifications.py	2011-03-02 00:27:47 +0000
+++ lib/lp/blueprints/tests/test_hasspecifications.py	2011-12-20 00:00:32 +0000
@@ -7,9 +7,7 @@
 
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.blueprints.enums import SpecificationDefinitionStatus
-from lp.blueprints.interfaces.specificationtarget import (
-    IHasSpecifications,
-    )
+from lp.blueprints.interfaces.specificationtarget import IHasSpecifications
 from lp.testing import TestCaseWithFactory
 from lp.testing.matchers import DoesNotSnapshot
 

=== modified file 'lib/lp/blueprints/tests/test_implements.py'
--- lib/lp/blueprints/tests/test_implements.py	2010-11-26 13:43:34 +0000
+++ lib/lp/blueprints/tests/test_implements.py	2011-12-20 00:00:32 +0000
@@ -7,7 +7,9 @@
 
 from canonical.testing import DatabaseFunctionalLayer
 from lp.blueprints.interfaces.specificationtarget import (
-    IHasSpecifications, ISpecificationTarget)
+    IHasSpecifications,
+    ISpecificationTarget,
+    )
 from lp.testing import TestCaseWithFactory
 
 

=== modified file 'lib/lp/blueprints/tests/test_specification.py'
--- lib/lp/blueprints/tests/test_specification.py	2011-03-02 16:22:40 +0000
+++ lib/lp/blueprints/tests/test_specification.py	2011-12-20 00:00:32 +0000
@@ -12,12 +12,12 @@
 
 from canonical.launchpad.webapp.authorization import check_permission
 from canonical.testing.layers import DatabaseFunctionalLayer
-from lp.blueprints.errors import TargetAlreadyHasSpecification
 from lp.blueprints.enums import (
     NewSpecificationDefinitionStatus,
     SpecificationDefinitionStatus,
     SpecificationGoalStatus,
     )
+from lp.blueprints.errors import TargetAlreadyHasSpecification
 from lp.blueprints.interfaces.specification import ISpecificationSet
 from lp.testing import (
     login_person,

=== modified file 'lib/lp/blueprints/tests/test_webservice.py'
--- lib/lp/blueprints/tests/test_webservice.py	2011-09-27 20:34:52 +0000
+++ lib/lp/blueprints/tests/test_webservice.py	2011-12-20 00:00:32 +0000
@@ -6,7 +6,6 @@
 __metaclass__ = type
 
 import transaction
-
 from zope.security.management import endInteraction
 
 from canonical.launchpad.testing.pages import (

=== modified file 'lib/lp/blueprints/vocabularies/specification.py'
--- lib/lp/blueprints/vocabularies/specification.py	2010-09-26 22:17:48 +0000
+++ lib/lp/blueprints/vocabularies/specification.py	2011-12-20 00:00:32 +0000
@@ -15,7 +15,6 @@
 
 from canonical.launchpad.webapp.interfaces import ILaunchBag
 from canonical.launchpad.webapp.vocabulary import NamedSQLObjectVocabulary
-
 from lp.blueprints.model.specification import Specification
 
 

=== modified file 'lib/lp/blueprints/vocabularies/specificationdependency.py'
--- lib/lp/blueprints/vocabularies/specificationdependency.py	2011-08-22 12:13:22 +0000
+++ lib/lp/blueprints/vocabularies/specificationdependency.py	2011-12-20 00:00:32 +0000
@@ -11,7 +11,10 @@
 
 from operator import attrgetter
 
-from storm.locals import SQL, Store
+from storm.locals import (
+    SQL,
+    Store,
+    )
 from zope.component import getUtility
 from zope.interface import implements
 from zope.schema.vocabulary import SimpleTerm

=== modified file 'lib/lp/blueprints/vocabularies/sprint.py'
--- lib/lp/blueprints/vocabularies/sprint.py	2010-09-26 22:17:48 +0000
+++ lib/lp/blueprints/vocabularies/sprint.py	2011-12-20 00:00:32 +0000
@@ -11,7 +11,6 @@
 
 
 from canonical.launchpad.webapp.vocabulary import NamedSQLObjectVocabulary
-
 from lp.blueprints.model.sprint import Sprint
 
 

=== modified file 'lib/lp/blueprints/vocabularies/tests/test_specificationdependency.py'
--- lib/lp/blueprints/vocabularies/tests/test_specificationdependency.py	2011-03-14 03:17:24 +0000
+++ lib/lp/blueprints/vocabularies/tests/test_specificationdependency.py	2011-12-20 00:00:32 +0000
@@ -12,7 +12,6 @@
 
 from canonical.launchpad.webapp import canonical_url
 from canonical.testing.layers import DatabaseFunctionalLayer
-
 from lp.testing import TestCaseWithFactory
 
 

=== modified file 'lib/lp/bugs/browser/bugalsoaffects.py'
--- lib/lp/bugs/browser/bugalsoaffects.py	2011-12-18 14:17:16 +0000
+++ lib/lp/bugs/browser/bugalsoaffects.py	2011-12-20 00:00:32 +0000
@@ -30,10 +30,6 @@
     )
 
 from canonical.launchpad import _
-from lp.app.browser.multistep import (
-    MultiStepView,
-    StepView,
-    )
 from canonical.launchpad.webapp import canonical_url
 from canonical.launchpad.webapp.interfaces import ILaunchBag
 from canonical.launchpad.webapp.menu import structured
@@ -42,6 +38,10 @@
     custom_widget,
     LaunchpadFormView,
     )
+from lp.app.browser.multistep import (
+    MultiStepView,
+    StepView,
+    )
 from lp.app.enums import ServiceUsage
 from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.app.validators.email import email_validator

=== modified file 'lib/lp/bugs/browser/buglinktarget.py'
--- lib/lp/bugs/browser/buglinktarget.py	2011-12-03 14:02:18 +0000
+++ lib/lp/bugs/browser/buglinktarget.py	2011-12-20 00:00:32 +0000
@@ -38,7 +38,10 @@
     IBugLinkForm,
     IUnlinkBugsForm,
     )
-from lp.bugs.interfaces.bugtask import BugTaskSearchParams, IBugTaskSet
+from lp.bugs.interfaces.bugtask import (
+    BugTaskSearchParams,
+    IBugTaskSet,
+    )
 from lp.services.propertycache import (
     cachedproperty,
     get_property_cache,

=== modified file 'lib/lp/bugs/browser/bugmessage.py'
--- lib/lp/bugs/browser/bugmessage.py	2011-12-12 15:13:45 +0000
+++ lib/lp/bugs/browser/bugmessage.py	2011-12-20 00:00:32 +0000
@@ -12,9 +12,7 @@
 
 from zope.component import getUtility
 
-from canonical.launchpad.webapp import (
-    canonical_url,
-    )
+from canonical.launchpad.webapp import canonical_url
 from lp.app.browser.launchpadform import (
     action,
     LaunchpadFormView,

=== modified file 'lib/lp/bugs/browser/bugsubscriptionfilter.py'
--- lib/lp/bugs/browser/bugsubscriptionfilter.py	2011-05-17 12:29:03 +0000
+++ lib/lp/bugs/browser/bugsubscriptionfilter.py	2011-12-20 00:00:32 +0000
@@ -22,8 +22,8 @@
     LaunchpadEditFormView,
     )
 from lp.app.widgets.itemswidgets import LabeledMultiCheckBoxWidget
+from lp.bugs.browser.bugsubscription import AdvancedSubscriptionMixin
 from lp.bugs.browser.widgets.bug import BugTagsFrozenSetWidget
-from lp.bugs.browser.bugsubscription import AdvancedSubscriptionMixin
 from lp.bugs.enum import BugNotificationLevel
 from lp.bugs.interfaces.bugsubscriptionfilter import IBugSubscriptionFilter
 from lp.services.propertycache import cachedproperty

=== modified file 'lib/lp/bugs/browser/bugtarget.py'
--- lib/lp/bugs/browser/bugtarget.py	2011-12-12 04:16:26 +0000
+++ lib/lp/bugs/browser/bugtarget.py	2011-12-20 00:00:32 +0000
@@ -24,8 +24,8 @@
 from cStringIO import StringIO
 from datetime import datetime
 from functools import partial
+import httplib
 from operator import itemgetter
-import httplib
 import urllib
 from urlparse import urljoin
 

=== modified file 'lib/lp/bugs/browser/bugtask.py'
--- lib/lp/bugs/browser/bugtask.py	2011-12-19 20:52:33 +0000
+++ lib/lp/bugs/browser/bugtask.py	2011-12-20 00:00:32 +0000
@@ -55,7 +55,6 @@
 from operator import attrgetter
 import os.path
 import re
-import transaction
 import urllib
 import urlparse
 
@@ -79,6 +78,7 @@
 from pytz import utc
 from simplejson import dumps
 from simplejson.encoder import JSONEncoderForHTML
+import transaction
 from z3c.pt.pagetemplate import ViewPageTemplateFile
 from zope import (
     component,
@@ -107,9 +107,7 @@
     providedBy,
     )
 from zope.schema import Choice
-from zope.schema.interfaces import (
-    IContextSourceBinder,
-    )
+from zope.schema.interfaces import IContextSourceBinder
 from zope.schema.vocabulary import (
     getVocabularyRegistry,
     SimpleVocabulary,
@@ -286,6 +284,7 @@
     )
 from lp.services.utils import obfuscate_structure
 
+
 vocabulary_registry = getVocabularyRegistry()
 
 DISPLAY_BUG_STATUS_FOR_PATCHES = {

=== modified file 'lib/lp/bugs/browser/structuralsubscription.py'
--- lib/lp/bugs/browser/structuralsubscription.py	2011-12-08 22:32:41 +0000
+++ lib/lp/bugs/browser/structuralsubscription.py	2011-12-20 00:00:32 +0000
@@ -64,9 +64,7 @@
     IStructuralSubscriptionTarget,
     IStructuralSubscriptionTargetHelper,
     )
-from lp.registry.interfaces.distribution import (
-    IDistribution,
-    )
+from lp.registry.interfaces.distribution import IDistribution
 from lp.registry.interfaces.distributionsourcepackage import (
     IDistributionSourcePackage,
     )

=== modified file 'lib/lp/bugs/browser/tests/test_bug_context_menu.py'
--- lib/lp/bugs/browser/tests/test_bug_context_menu.py	2011-06-16 13:50:58 +0000
+++ lib/lp/bugs/browser/tests/test_bug_context_menu.py	2011-12-20 00:00:32 +0000
@@ -10,7 +10,6 @@
 from canonical.launchpad.webapp.interfaces import IOpenLaunchBag
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
 from canonical.testing.layers import DatabaseFunctionalLayer
-
 from lp.bugs.browser.bug import BugContextMenu
 from lp.bugs.enum import BugNotificationLevel
 from lp.services.features import get_relevant_feature_controller

=== modified file 'lib/lp/bugs/browser/tests/test_bug_views.py'
--- lib/lp/bugs/browser/tests/test_bug_views.py	2011-12-12 15:13:45 +0000
+++ lib/lp/bugs/browser/tests/test_bug_views.py	2011-12-20 00:00:32 +0000
@@ -5,32 +5,28 @@
 
 __metaclass__ = type
 
+from BeautifulSoup import BeautifulSoup
 import simplejson
-from zope.component import getUtility
-from zope.security.proxy import removeSecurityProxy
-
-from BeautifulSoup import BeautifulSoup
-
+from soupmatchers import (
+    HTMLContains,
+    Tag,
+    )
 from testtools.matchers import (
+    Contains,
     MatchesAll,
-    Contains,
     Not,
     )
-
-from soupmatchers import (
-    HTMLContains,
-    Tag,
-    )
-
+from zope.component import getUtility
+from zope.security.proxy import removeSecurityProxy
+
+from canonical.launchpad.testing.pages import find_tag_by_id
+from canonical.launchpad.webapp.interfaces import IOpenLaunchBag
 from canonical.launchpad.webapp.publisher import canonical_url
-from canonical.launchpad.webapp.interfaces import IOpenLaunchBag
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
-from canonical.launchpad.testing.pages import find_tag_by_id
 from canonical.testing.layers import (
     DatabaseFunctionalLayer,
     LaunchpadFunctionalLayer,
     )
-
 from lp.registry.interfaces.person import PersonVisibility
 from lp.services.features.testing import FeatureFixture
 from lp.testing import (
@@ -40,8 +36,8 @@
     TestCaseWithFactory,
     )
 from lp.testing.views import (
+    create_initialized_view,
     create_view,
-    create_initialized_view,
     )
 
 

=== modified file 'lib/lp/bugs/browser/tests/test_bugattachment_file_access.py'
--- lib/lp/bugs/browser/tests/test_bugattachment_file_access.py	2011-03-29 00:11:57 +0000
+++ lib/lp/bugs/browser/tests/test_bugattachment_file_access.py	2011-12-20 00:00:32 +0000
@@ -9,6 +9,7 @@
     urlparse,
     )
 
+from lazr.restfulclient.errors import NotFound as RestfulNotFound
 import transaction
 from zope.component import (
     getMultiAdapter,
@@ -29,7 +30,6 @@
     AppServerLayer,
     LaunchpadFunctionalLayer,
     )
-from lazr.restfulclient.errors import NotFound as RestfulNotFound
 from lp.bugs.browser.bugattachment import BugAttachmentFileNavigation
 from lp.testing import (
     launchpadlib_for,

=== modified file 'lib/lp/bugs/browser/tests/test_bugcomment.py'
--- lib/lp/bugs/browser/tests/test_bugcomment.py	2011-11-23 06:39:08 +0000
+++ lib/lp/bugs/browser/tests/test_bugcomment.py	2011-12-20 00:00:32 +0000
@@ -12,17 +12,14 @@
 from itertools import count
 
 from pytz import utc
-from zope.component import getUtility
-from zope.security.proxy import removeSecurityProxy
-
 from soupmatchers import (
     HTMLContains,
     Tag,
     )
+from zope.component import getUtility
+from zope.security.proxy import removeSecurityProxy
 
-from canonical.launchpad.ftests import (
-    login_person,
-    )
+from canonical.launchpad.ftests import login_person
 from canonical.launchpad.testing.pages import find_tag_by_id
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.app.interfaces.launchpad import ILaunchpadCelebrities

=== modified file 'lib/lp/bugs/browser/tests/test_buglisting.py'
--- lib/lp/bugs/browser/tests/test_buglisting.py	2011-11-24 23:22:16 +0000
+++ lib/lp/bugs/browser/tests/test_buglisting.py	2011-12-20 00:00:32 +0000
@@ -4,6 +4,7 @@
 __metaclass__ = type
 
 import os
+
 from soupmatchers import (
     HTMLContains,
     Tag,
@@ -37,8 +38,8 @@
     )
 from lp.testing.matchers import HasQueryCount
 from lp.testing.views import (
+    create_initialized_view,
     create_view,
-    create_initialized_view,
     )
 
 

=== modified file 'lib/lp/bugs/browser/tests/test_bugs.py'
--- lib/lp/bugs/browser/tests/test_bugs.py	2011-07-22 14:50:56 +0000
+++ lib/lp/bugs/browser/tests/test_bugs.py	2011-12-20 00:00:32 +0000
@@ -7,8 +7,8 @@
 
 from zope.component import getUtility
 
+from canonical.launchpad.testing.pages import find_tag_by_id
 from canonical.launchpad.webapp.publisher import canonical_url
-from canonical.launchpad.testing.pages import find_tag_by_id
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.bugs.interfaces.malone import IMaloneApplication
 from lp.bugs.publisher import BugsLayer

=== modified file 'lib/lp/bugs/browser/tests/test_bugsubscription_views.py'
--- lib/lp/bugs/browser/tests/test_bugsubscription_views.py	2011-12-13 17:45:31 +0000
+++ lib/lp/bugs/browser/tests/test_bugsubscription_views.py	2011-12-20 00:00:32 +0000
@@ -5,6 +5,7 @@
 
 __metaclass__ = type
 
+from lazr.restful.interfaces import IWebServiceClientRequest
 from simplejson import dumps
 from storm.store import Store
 from testtools.matchers import Equals
@@ -16,7 +17,6 @@
 from canonical.launchpad.webapp import canonical_url
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
 from canonical.testing.layers import LaunchpadFunctionalLayer
-from lazr.restful.interfaces import IWebServiceClientRequest
 from lp.bugs.browser.bugsubscription import (
     BugPortletSubscribersWithDetails,
     BugSubscriptionAddView,

=== modified file 'lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py'
--- lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py	2011-06-16 13:50:58 +0000
+++ lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py	2011-12-20 00:00:32 +0000
@@ -30,8 +30,8 @@
     BugTaskStatus,
     )
 from lp.testing import (
+    anonymous_logged_in,
     feature_flags,
-    anonymous_logged_in,
     login_person,
     normalize_whitespace,
     person_logged_in,

=== modified file 'lib/lp/bugs/browser/tests/test_bugtarget_tags.py'
--- lib/lp/bugs/browser/tests/test_bugtarget_tags.py	2011-11-22 03:30:19 +0000
+++ lib/lp/bugs/browser/tests/test_bugtarget_tags.py	2011-12-20 00:00:32 +0000
@@ -4,10 +4,8 @@
 __metaclass__ = type
 
 from canonical.testing.layers import DatabaseFunctionalLayer
-from lp.testing import (
-    TestCaseWithFactory,
-    )
 from lp.bugs.publisher import BugsLayer
+from lp.testing import TestCaseWithFactory
 from lp.testing.views import create_view
 
 

=== modified file 'lib/lp/bugs/browser/tests/test_bugtask.py'
--- lib/lp/bugs/browser/tests/test_bugtask.py	2011-12-19 12:22:48 +0000
+++ lib/lp/bugs/browser/tests/test_bugtask.py	2011-12-20 00:00:32 +0000
@@ -1,8 +1,10 @@
 # Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 from BeautifulSoup import BeautifulSoup
+
 from lp.registry.interfaces.person import PersonVisibility
 
+
 __metaclass__ = type
 
 from contextlib import contextmanager

=== modified file 'lib/lp/bugs/browser/tests/test_bugtracker_views.py'
--- lib/lp/bugs/browser/tests/test_bugtracker_views.py	2010-10-26 15:47:24 +0000
+++ lib/lp/bugs/browser/tests/test_bugtracker_views.py	2011-12-20 00:00:32 +0000
@@ -14,15 +14,12 @@
 from lp.registry.interfaces.person import IPersonSet
 from lp.testing import (
     login,
+    person_logged_in,
     TestCaseWithFactory,
     )
-from lp.testing.views import create_initialized_view
 from lp.testing.matchers import IsConfiguredBatchNavigator
-from lp.testing import (
-    person_logged_in,
-    TestCaseWithFactory,
-    )
 from lp.testing.sampledata import ADMIN_EMAIL
+from lp.testing.views import create_initialized_view
 
 
 class TestBugTrackerSetView(TestCaseWithFactory):

=== modified file 'lib/lp/bugs/browser/tests/test_bugwatch_views.py'
--- lib/lp/bugs/browser/tests/test_bugwatch_views.py	2011-08-16 15:32:58 +0000
+++ lib/lp/bugs/browser/tests/test_bugwatch_views.py	2011-12-20 00:00:32 +0000
@@ -7,10 +7,13 @@
 
 from zope.component import getUtility
 
+from canonical.testing.layers import LaunchpadFunctionalLayer
 from lp.services.messages.interfaces.message import IMessageSet
-from canonical.testing.layers import LaunchpadFunctionalLayer
-
-from lp.testing import login, login_person, TestCaseWithFactory
+from lp.testing import (
+    login,
+    login_person,
+    TestCaseWithFactory,
+    )
 from lp.testing.sampledata import ADMIN_EMAIL
 from lp.testing.views import create_initialized_view
 

=== modified file 'lib/lp/bugs/browser/tests/test_expose.py'
--- lib/lp/bugs/browser/tests/test_expose.py	2011-12-18 13:45:20 +0000
+++ lib/lp/bugs/browser/tests/test_expose.py	2011-12-20 00:00:32 +0000
@@ -20,7 +20,6 @@
 from zope.interface import implements
 from zope.traversing.browser import absoluteURL
 
-from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from canonical.launchpad.webapp.publisher import canonical_url
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
 from canonical.testing.layers import DatabaseFunctionalLayer
@@ -30,7 +29,7 @@
     expose_user_subscriptions_to_js,
     )
 from lp.registry.interfaces.teammembership import TeamMembershipStatus
-
+from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from lp.testing import (
     person_logged_in,
     StormStatementRecorder,

=== modified file 'lib/lp/bugs/browser/widgets/bugtask.py'
--- lib/lp/bugs/browser/widgets/bugtask.py	2011-12-04 17:54:41 +0000
+++ lib/lp/bugs/browser/widgets/bugtask.py	2011-12-20 00:00:32 +0000
@@ -59,6 +59,7 @@
 from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.app.widgets.helpers import get_widget_template
 from lp.app.widgets.itemswidgets import LaunchpadRadioWidget
+from lp.app.widgets.launchpadtarget import LaunchpadTargetWidget
 from lp.app.widgets.popup import (
     PersonPickerWidget,
     VocabularyPickerWidget,
@@ -67,7 +68,6 @@
     StrippedTextWidget,
     URIWidget,
     )
-from lp.app.widgets.launchpadtarget import LaunchpadTargetWidget
 from lp.bugs.interfaces.bugwatch import (
     IBugWatchSet,
     NoBugTrackerFound,

=== modified file 'lib/lp/bugs/externalbugtracker/bugzilla.py'
--- lib/lp/bugs/externalbugtracker/bugzilla.py	2011-08-11 13:23:38 +0000
+++ lib/lp/bugs/externalbugtracker/bugzilla.py	2011-12-20 00:00:32 +0000
@@ -13,10 +13,10 @@
 
 from email.Utils import parseaddr
 from httplib import BadStatusLine
+import re
+import string
 from urllib2 import URLError
 from xml.dom import minidom
-import re
-import string
 import xml.parsers.expat
 import xmlrpclib
 
@@ -25,7 +25,6 @@
 from zope.interface import implements
 
 from canonical.config import config
-from lp.services.messages.interfaces.message import IMessageSet
 from canonical.launchpad.webapp.url import (
     urlappend,
     urlparse,
@@ -55,6 +54,7 @@
     )
 from lp.services import encoding
 from lp.services.database.isolation import ensure_no_transaction
+from lp.services.messages.interfaces.message import IMessageSet
 
 
 class Bugzilla(ExternalBugTracker):

=== modified file 'lib/lp/bugs/externalbugtracker/tests/test_mantis.py'
--- lib/lp/bugs/externalbugtracker/tests/test_mantis.py	2011-03-02 00:05:27 +0000
+++ lib/lp/bugs/externalbugtracker/tests/test_mantis.py	2011-12-20 00:00:32 +0000
@@ -5,20 +5,24 @@
 
 __metaclass__ = type
 
-from testtools.matchers import Equals, Is
 import urllib2
 
+from testtools.matchers import (
+    Equals,
+    Is,
+    )
+
 from canonical.testing.layers import ZopelessLayer
 from lp.bugs.externalbugtracker import UnparsableBugData
 from lp.bugs.externalbugtracker.mantis import (
     Mantis,
     MantisBugBatchParser,
     )
+from lp.services.log.logger import BufferLogger
 from lp.testing import (
     monkey_patch,
     TestCase,
     )
-from lp.services.log.logger import BufferLogger
 
 
 class TestMantisBugBatchParser(TestCase):

=== modified file 'lib/lp/bugs/externalbugtracker/trac.py'
--- lib/lp/bugs/externalbugtracker/trac.py	2011-05-12 21:33:10 +0000
+++ lib/lp/bugs/externalbugtracker/trac.py	2011-12-20 00:00:32 +0000
@@ -20,7 +20,6 @@
 from zope.interface import implements
 
 from canonical.config import config
-from lp.services.messages.interfaces.message import IMessageSet
 from canonical.launchpad.webapp.url import urlappend
 from lp.app.validators.email import valid_email
 from lp.bugs.externalbugtracker.base import (
@@ -45,6 +44,7 @@
     UNKNOWN_REMOTE_IMPORTANCE,
     )
 from lp.services.database.isolation import ensure_no_transaction
+from lp.services.messages.interfaces.message import IMessageSet
 
 # Symbolic constants used for the Trac LP plugin.
 LP_PLUGIN_BUG_IDS_ONLY = 0

=== modified file 'lib/lp/bugs/interfaces/bug.py'
--- lib/lp/bugs/interfaces/bug.py	2011-11-22 04:55:07 +0000
+++ lib/lp/bugs/interfaces/bug.py	2011-12-20 00:00:32 +0000
@@ -22,7 +22,6 @@
     ]
 
 from lazr.enum import DBEnumeratedType
-
 from lazr.lifecycle.snapshot import doNotSnapshot
 from lazr.restful.declarations import (
     accessor_for,
@@ -66,10 +65,9 @@
 
 from canonical.launchpad import _
 from canonical.launchpad.interfaces.launchpad import IPrivacy
-from lp.services.messages.interfaces.message import IMessage
+from lp.app.errors import NotFoundError
 from lp.app.validators.attachment import attachment_size_constraint
 from lp.app.validators.name import bug_name_validator
-from lp.app.errors import NotFoundError
 from lp.bugs.interfaces.bugactivity import IBugActivity
 from lp.bugs.interfaces.bugattachment import IBugAttachment
 from lp.bugs.interfaces.bugbranch import IBugBranch
@@ -92,6 +90,7 @@
     Tag,
     Title,
     )
+from lp.services.messages.interfaces.message import IMessage
 
 
 class CreateBugParams:

=== modified file 'lib/lp/bugs/interfaces/bugactivity.py'
--- lib/lp/bugs/interfaces/bugactivity.py	2011-02-11 19:17:39 +0000
+++ lib/lp/bugs/interfaces/bugactivity.py	2011-12-20 00:00:32 +0000
@@ -12,6 +12,10 @@
     'IBugActivitySet',
     ]
 
+from lazr.restful.declarations import (
+    export_as_webservice_entry,
+    exported,
+    )
 from zope.interface import Interface
 from zope.schema import (
     Datetime,
@@ -19,18 +23,12 @@
     TextLine,
     )
 
-from lazr.restful.declarations import (
-    export_as_webservice_entry,
-    exported,
-    )
-
+from canonical.launchpad import _
 from lp.services.fields import (
     BugField,
     PersonChoice,
     )
 
-from canonical.launchpad import _
-
 
 class IBugActivity(Interface):
     """A log of all things that have happened to a bug."""

=== modified file 'lib/lp/bugs/interfaces/bugattachment.py'
--- lib/lp/bugs/interfaces/bugattachment.py	2011-05-12 21:33:10 +0000
+++ lib/lp/bugs/interfaces/bugattachment.py	2011-12-20 00:00:32 +0000
@@ -38,8 +38,8 @@
 
 from canonical.launchpad import _
 from canonical.launchpad.interfaces.launchpad import IHasBug
+from lp.services.fields import Title
 from lp.services.messages.interfaces.message import IMessage
-from lp.services.fields import Title
 
 
 class BugAttachmentType(DBEnumeratedType):

=== modified file 'lib/lp/bugs/interfaces/bugbranch.py'
--- lib/lp/bugs/interfaces/bugbranch.py	2011-02-10 14:42:11 +0000
+++ lib/lp/bugs/interfaces/bugbranch.py	2011-12-20 00:00:32 +0000
@@ -33,9 +33,7 @@
 from lp.code.interfaces.branch import IBranch
 from lp.code.interfaces.branchtarget import IHasBranchTarget
 from lp.registry.interfaces.person import IPerson
-from lp.services.fields import (
-    BugField,
-    )
+from lp.services.fields import BugField
 
 
 class IBugBranch(IHasDateCreated, IHasBug, IHasBranchTarget):

=== modified file 'lib/lp/bugs/interfaces/bugmessage.py'
--- lib/lp/bugs/interfaces/bugmessage.py	2011-05-12 21:33:10 +0000
+++ lib/lp/bugs/interfaces/bugmessage.py	2011-12-20 00:00:32 +0000
@@ -27,12 +27,12 @@
     )
 
 from canonical.launchpad.interfaces.launchpad import IHasBug
-from lp.services.messages.interfaces.message import IMessage
 from lp.app.validators.attachment import attachment_size_constraint
 from lp.bugs.interfaces.bug import IBug
 from lp.bugs.interfaces.bugwatch import IBugWatch
 from lp.registry.interfaces.person import IPerson
 from lp.services.fields import Title
+from lp.services.messages.interfaces.message import IMessage
 
 
 class IBugMessage(IHasBug):

=== modified file 'lib/lp/bugs/interfaces/bugnomination.py'
--- lib/lp/bugs/interfaces/bugnomination.py	2011-12-19 15:09:08 +0000
+++ lib/lp/bugs/interfaces/bugnomination.py	2011-12-20 00:00:32 +0000
@@ -51,9 +51,7 @@
     IHasBug,
     IHasDateCreated,
     )
-from lp.app.validators.validation import (
-    can_be_nominated_for_series,
-    )
+from lp.app.validators.validation import can_be_nominated_for_series
 from lp.bugs.interfaces.bug import IBug
 from lp.bugs.interfaces.bugtarget import IBugTarget
 from lp.registry.interfaces.distroseries import IDistroSeries

=== modified file 'lib/lp/bugs/interfaces/bugsubscription.py'
--- lib/lp/bugs/interfaces/bugsubscription.py	2011-06-09 07:11:01 +0000
+++ lib/lp/bugs/interfaces/bugsubscription.py	2011-12-20 00:00:32 +0000
@@ -32,9 +32,7 @@
     )
 
 from canonical.launchpad import _
-from canonical.launchpad.components.apihelpers import (
-    patch_reference_property,
-    )
+from canonical.launchpad.components.apihelpers import patch_reference_property
 from lp.bugs.enum import BugNotificationLevel
 from lp.services.fields import PersonChoice
 

=== modified file 'lib/lp/bugs/interfaces/bugsubscriptionfilter.py'
--- lib/lp/bugs/interfaces/bugsubscriptionfilter.py	2011-04-05 17:08:41 +0000
+++ lib/lp/bugs/interfaces/bugsubscriptionfilter.py	2011-12-20 00:00:32 +0000
@@ -36,9 +36,7 @@
     BugTaskImportance,
     BugTaskStatus,
     )
-from lp.bugs.interfaces.structuralsubscription import (
-    IStructuralSubscription,
-    )
+from lp.bugs.interfaces.structuralsubscription import IStructuralSubscription
 from lp.services.fields import (
     PersonChoice,
     SearchTag,

=== modified file 'lib/lp/bugs/interfaces/bugtaskfilter.py'
--- lib/lp/bugs/interfaces/bugtaskfilter.py	2011-03-28 00:00:14 +0000
+++ lib/lp/bugs/interfaces/bugtaskfilter.py	2011-12-20 00:00:32 +0000
@@ -11,7 +11,10 @@
     ]
 
 
-from collections import defaultdict, namedtuple
+from collections import (
+    defaultdict,
+    namedtuple,
+    )
 from operator import attrgetter
 
 from lp.bugs.interfaces.bugtarget import IHasBugs

=== modified file 'lib/lp/bugs/interfaces/personsubscriptioninfo.py'
--- lib/lp/bugs/interfaces/personsubscriptioninfo.py	2011-04-07 18:55:36 +0000
+++ lib/lp/bugs/interfaces/personsubscriptioninfo.py	2011-12-20 00:00:32 +0000
@@ -13,7 +13,6 @@
     ]
 
 
-from canonical.launchpad import _
 from zope.interface import (
     Attribute,
     Interface,
@@ -24,6 +23,8 @@
     Datetime,
     Int,
     )
+
+from canonical.launchpad import _
 from lp.services.fields import (
     BugField,
     PersonChoice,

=== modified file 'lib/lp/bugs/interfaces/tests/test_bugtask.py'
--- lib/lp/bugs/interfaces/tests/test_bugtask.py	2011-10-20 17:46:49 +0000
+++ lib/lp/bugs/interfaces/tests/test_bugtask.py	2011-12-20 00:00:32 +0000
@@ -5,7 +5,6 @@
 
 __metaclass__ = type
 
-from lp.testing import TestCase
 from lp.bugs.interfaces.bugtask import (
     BugTaskStatus,
     BugTaskStatusSearch,
@@ -13,6 +12,7 @@
     get_bugtask_status,
     normalize_bugtask_status,
     )
+from lp.testing import TestCase
 
 
 class TestFunctions(TestCase):

=== modified file 'lib/lp/bugs/interfaces/webservice.py'
--- lib/lp/bugs/interfaces/webservice.py	2011-01-24 20:53:10 +0000
+++ lib/lp/bugs/interfaces/webservice.py	2011-12-20 00:00:32 +0000
@@ -41,9 +41,10 @@
     'UserCannotEditBugTaskStatus',
     ]
 
-from lp.bugs.interfaces.bug import (
-    IBug,
-    )
+# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
+# import bugs.  Break this up into a per-package thing.
+from canonical.launchpad.interfaces import _schema_circular_imports
+from lp.bugs.interfaces.bug import IBug
 from lp.bugs.interfaces.bugactivity import IBugActivity
 from lp.bugs.interfaces.bugattachment import IBugAttachment
 from lp.bugs.interfaces.bugbranch import IBugBranch
@@ -87,7 +88,4 @@
     )
 
 
-# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
-# import bugs.  Break this up into a per-package thing.
-from canonical.launchpad.interfaces import _schema_circular_imports
 _schema_circular_imports

=== modified file 'lib/lp/bugs/mail/bugnotificationbuilder.py'
--- lib/lp/bugs/mail/bugnotificationbuilder.py	2011-12-18 13:45:20 +0000
+++ lib/lp/bugs/mail/bugnotificationbuilder.py	2011-12-20 00:00:32 +0000
@@ -19,8 +19,8 @@
 
 from canonical.config import config
 from canonical.launchpad.helpers import shortlist
+from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.services.identity.interfaces.emailaddress import IEmailAddressSet
-from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.services.mail.sendmail import format_address
 
 

=== modified file 'lib/lp/bugs/mail/handler.py'
--- lib/lp/bugs/mail/handler.py	2011-12-18 22:48:45 +0000
+++ lib/lp/bugs/mail/handler.py	2011-12-20 00:00:32 +0000
@@ -19,7 +19,6 @@
 from zope.interface import implements
 
 from canonical.launchpad.helpers import get_email_template
-from lp.services.identity.interfaces.emailaddress import IEmailAddressSet
 from canonical.launchpad.mailnotification import (
     MailWrapper,
     send_process_error_notification,
@@ -35,6 +34,7 @@
     )
 from lp.bugs.interfaces.bugmessage import IBugMessageSet
 from lp.bugs.mail.commands import BugEmailCommands
+from lp.services.identity.interfaces.emailaddress import IEmailAddressSet
 from lp.services.mail.helpers import (
     ensure_not_weakly_authenticated,
     get_error_message,

=== modified file 'lib/lp/bugs/mail/tests/test_bug_task_assignment.py'
--- lib/lp/bugs/mail/tests/test_bug_task_assignment.py	2011-09-05 13:15:05 +0000
+++ lib/lp/bugs/mail/tests/test_bug_task_assignment.py	2011-12-20 00:00:32 +0000
@@ -10,9 +10,9 @@
 from zope.event import notify
 from zope.interface import providedBy
 
-from lp.bugs.model.bugnotification import BugNotification
 from canonical.launchpad.webapp.interfaces import ILaunchBag
 from canonical.testing.layers import DatabaseFunctionalLayer
+from lp.bugs.model.bugnotification import BugNotification
 from lp.bugs.scripts.bugnotification import construct_email_notifications
 from lp.services.mail import stub
 from lp.testing import TestCaseWithFactory

=== modified file 'lib/lp/bugs/mail/tests/test_bug_task_deletion.py'
--- lib/lp/bugs/mail/tests/test_bug_task_deletion.py	2011-10-19 08:32:33 +0000
+++ lib/lp/bugs/mail/tests/test_bug_task_deletion.py	2011-12-20 00:00:32 +0000
@@ -6,9 +6,9 @@
 import transaction
 from zope.component import getUtility
 
-from lp.bugs.model.bugnotification import BugNotification
 from canonical.launchpad.webapp.interfaces import ILaunchBag
 from canonical.testing.layers import DatabaseFunctionalLayer
+from lp.bugs.model.bugnotification import BugNotification
 from lp.bugs.scripts.bugnotification import construct_email_notifications
 from lp.services.features.testing import FeatureFixture
 from lp.testing import TestCaseWithFactory

=== modified file 'lib/lp/bugs/mail/tests/test_bug_task_modification.py'
--- lib/lp/bugs/mail/tests/test_bug_task_modification.py	2011-08-12 11:37:08 +0000
+++ lib/lp/bugs/mail/tests/test_bug_task_modification.py	2011-12-20 00:00:32 +0000
@@ -10,10 +10,10 @@
 from zope.event import notify
 from zope.interface import providedBy
 
-from lp.bugs.model.bugnotification import BugNotification
 from canonical.launchpad.webapp.interfaces import ILaunchBag
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.bugs.interfaces.bugtask import BugTaskStatus
+from lp.bugs.model.bugnotification import BugNotification
 from lp.bugs.scripts.bugnotification import construct_email_notifications
 from lp.testing import TestCaseWithFactory
 

=== modified file 'lib/lp/bugs/mail/tests/test_bugnotificationbuilder.py'
--- lib/lp/bugs/mail/tests/test_bugnotificationbuilder.py	2011-03-29 05:38:15 +0000
+++ lib/lp/bugs/mail/tests/test_bugnotificationbuilder.py	2011-12-20 00:00:32 +0000
@@ -4,6 +4,7 @@
 """Tests for BugNotificationBuilder email construction."""
 
 from datetime import datetime
+
 import pytz
 
 from canonical.testing.layers import ZopelessDatabaseLayer

=== modified file 'lib/lp/bugs/mail/tests/test_handler.py'
--- lib/lp/bugs/mail/tests/test_handler.py	2011-12-18 13:45:20 +0000
+++ lib/lp/bugs/mail/tests/test_handler.py	2011-12-20 00:00:32 +0000
@@ -18,7 +18,6 @@
 
 from canonical.config import config
 from canonical.database.sqlbase import commit
-from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from canonical.launchpad.webapp.authorization import LaunchpadSecurityPolicy
 from canonical.testing.layers import (
     LaunchpadFunctionalLayer,
@@ -36,6 +35,7 @@
     MaloneHandler,
     )
 from lp.bugs.model.bugnotification import BugNotification
+from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from lp.services.mail import stub
 from lp.testing import (
     celebrity_logged_in,

=== modified file 'lib/lp/bugs/model/apportjob.py'
--- lib/lp/bugs/model/apportjob.py	2011-01-24 20:10:41 +0000
+++ lib/lp/bugs/model/apportjob.py	2011-12-20 00:00:32 +0000
@@ -48,9 +48,9 @@
     FileBugData,
     FileBugDataParser,
     )
+from lp.services.database.stormbase import StormBase
 from lp.services.job.model.job import Job
 from lp.services.job.runner import BaseRunnableJob
-from lp.services.database.stormbase import StormBase
 
 
 class ApportJob(StormBase):

=== modified file 'lib/lp/bugs/model/bug.py'
--- lib/lp/bugs/model/bug.py	2011-12-18 14:29:19 +0000
+++ lib/lp/bugs/model/bug.py	2011-12-20 00:00:32 +0000
@@ -94,9 +94,6 @@
     SQLBase,
     sqlvalues,
     )
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.database.librarian import (
     LibraryFileAlias,
     LibraryFileContent,
@@ -197,9 +194,9 @@
     validate_person,
     validate_public_person,
     )
-from lp.registry.interfaces.role import IPersonRoles
 from lp.registry.interfaces.product import IProduct
 from lp.registry.interfaces.productseries import IProductSeries
+from lp.registry.interfaces.role import IPersonRoles
 from lp.registry.interfaces.series import SeriesStatus
 from lp.registry.interfaces.sourcepackage import ISourcePackage
 from lp.registry.model.person import (
@@ -209,6 +206,7 @@
     )
 from lp.registry.model.pillar import pillar_sort_key
 from lp.registry.model.teammembership import TeamParticipation
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.database.stormbase import StormBase
 from lp.services.features import getFeatureFlag
 from lp.services.fields import DuplicateBug

=== modified file 'lib/lp/bugs/model/bugjob.py'
--- lib/lp/bugs/model/bugjob.py	2011-01-24 20:10:41 +0000
+++ lib/lp/bugs/model/bugjob.py	2011-12-20 00:00:32 +0000
@@ -37,9 +37,9 @@
     IBugJobSource,
     )
 from lp.bugs.model.bug import Bug
+from lp.services.database.stormbase import StormBase
 from lp.services.job.model.job import Job
 from lp.services.job.runner import BaseRunnableJob
-from lp.services.database.stormbase import StormBase
 
 
 class BugJob(StormBase):

=== modified file 'lib/lp/bugs/model/bugmessage.py'
--- lib/lp/bugs/model/bugmessage.py	2011-08-16 15:26:30 +0000
+++ lib/lp/bugs/model/bugmessage.py	2011-12-20 00:00:32 +0000
@@ -20,15 +20,15 @@
     SQLBase,
     sqlvalues,
     )
-from lp.services.messages.model.message import (
-    Message,
-    MessageChunk,
-    )
 from lp.bugs.interfaces.bugmessage import (
     IBugMessage,
     IBugMessageSet,
     )
 from lp.registry.interfaces.person import validate_public_person
+from lp.services.messages.model.message import (
+    Message,
+    MessageChunk,
+    )
 
 
 class BugMessage(SQLBase):

=== modified file 'lib/lp/bugs/model/bugnotification.py'
--- lib/lp/bugs/model/bugnotification.py	2011-08-16 16:12:05 +0000
+++ lib/lp/bugs/model/bugnotification.py	2011-12-20 00:00:32 +0000
@@ -29,18 +29,17 @@
     Join,
     LeftJoin,
     )
-from storm.store import Store
 from storm.locals import (
     Int,
     Reference,
     )
+from storm.store import Store
 from zope.component import getUtility
 from zope.interface import implements
 
 from canonical.config import config
 from canonical.database.datetimecol import UtcDateTimeCol
 from canonical.database.enumcol import EnumCol
-from lp.services.messages.model.message import Message
 from canonical.database.sqlbase import (
     SQLBase,
     sqlvalues,
@@ -61,6 +60,7 @@
 from lp.bugs.model.structuralsubscription import StructuralSubscription
 from lp.registry.interfaces.person import IPersonSet
 from lp.services.database.stormbase import StormBase
+from lp.services.messages.model.message import Message
 
 
 class BugNotification(SQLBase):

=== modified file 'lib/lp/bugs/model/bugsubscriptionfilter.py'
--- lib/lp/bugs/model/bugsubscriptionfilter.py	2011-12-08 22:32:41 +0000
+++ lib/lp/bugs/model/bugsubscriptionfilter.py	2011-12-20 00:00:32 +0000
@@ -9,10 +9,9 @@
     'BugSubscriptionFilterMute',
     ]
 
+from itertools import chain
+
 import pytz
-
-from itertools import chain
-
 from storm.locals import (
     Bool,
     DateTime,

=== modified file 'lib/lp/bugs/model/bugtask.py'
--- lib/lp/bugs/model/bugtask.py	2011-12-18 14:29:19 +0000
+++ lib/lp/bugs/model/bugtask.py	2011-12-20 00:00:32 +0000
@@ -85,9 +85,6 @@
     SQLBase,
     sqlvalues,
     )
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.helpers import shortlist
 from canonical.launchpad.interfaces.lpstorm import IStore
 from canonical.launchpad.searchbuilder import (
@@ -106,6 +103,7 @@
 from lp.app.enums import ServiceUsage
 from lp.app.errors import NotFoundError
 from lp.app.interfaces.launchpad import ILaunchpadCelebrities
+from lp.blueprints.model.specification import Specification
 from lp.bugs.interfaces.bug import IBugSet
 from lp.bugs.interfaces.bugattachment import BugAttachmentType
 from lp.bugs.interfaces.bugnomination import BugNominationStatus
@@ -162,12 +160,12 @@
 from lp.registry.model.pillar import pillar_sort_key
 from lp.registry.model.sourcepackagename import SourcePackageName
 from lp.services import features
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.propertycache import (
     cachedproperty,
     get_property_cache,
     )
 from lp.soyuz.enums import PackagePublishingStatus
-from lp.blueprints.model.specification import Specification
 
 
 debbugsseveritymap = {

=== modified file 'lib/lp/bugs/model/personsubscriptioninfo.py'
--- lib/lp/bugs/model/personsubscriptioninfo.py	2011-12-08 22:32:41 +0000
+++ lib/lp/bugs/model/personsubscriptioninfo.py	2011-12-20 00:00:32 +0000
@@ -11,18 +11,22 @@
 from zope.interface import implements
 from zope.proxy import sameProxiedObjects
 
-from lp.bugs.model.bugsubscription import BugSubscription
-from lp.bugs.model.bug import Bug, BugMute
 from lp.bugs.interfaces.personsubscriptioninfo import (
     IAbstractSubscriptionInfoCollection,
-    IRealSubscriptionInfoCollection,
     IPersonSubscriptions,
     IRealSubscriptionInfo,
+    IRealSubscriptionInfoCollection,
     IVirtualSubscriptionInfo,
     IVirtualSubscriptionInfoCollection,
     )
 from lp.bugs.interfaces.structuralsubscription import (
-    IStructuralSubscriptionTargetHelper)
+    IStructuralSubscriptionTargetHelper,
+    )
+from lp.bugs.model.bug import (
+    Bug,
+    BugMute,
+    )
+from lp.bugs.model.bugsubscription import BugSubscription
 from lp.registry.interfaces.sourcepackage import ISourcePackage
 from lp.registry.model.person import Person
 from lp.registry.model.teammembership import TeamParticipation

=== modified file 'lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py'
--- lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py	2011-03-30 15:20:46 +0000
+++ lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py	2011-12-20 00:00:32 +0000
@@ -7,7 +7,10 @@
 
 from storm.store import Store
 from zope.security.interfaces import Unauthorized
-from zope.security.proxy import ProxyFactory, removeSecurityProxy
+from zope.security.proxy import (
+    ProxyFactory,
+    removeSecurityProxy,
+    )
 
 from canonical.launchpad import searchbuilder
 from canonical.launchpad.interfaces.lpstorm import IStore

=== modified file 'lib/lp/bugs/model/tests/test_bugtask.py'
--- lib/lp/bugs/model/tests/test_bugtask.py	2011-12-12 01:08:21 +0000
+++ lib/lp/bugs/model/tests/test_bugtask.py	2011-12-20 00:00:32 +0000
@@ -4,14 +4,14 @@
 __metaclass__ = type
 
 from datetime import timedelta
-import transaction
 import unittest
 
 from lazr.lifecycle.event import ObjectModifiedEvent
 from lazr.lifecycle.snapshot import Snapshot
 from lazr.restfulclient.errors import Unauthorized
+from testtools.matchers import Equals
 from testtools.testcase import ExpectedException
-from testtools.matchers import Equals
+import transaction
 from zope.component import getUtility
 from zope.event import notify
 from zope.interface import providedBy

=== modified file 'lib/lp/bugs/publisher.py'
--- lib/lp/bugs/publisher.py	2011-12-19 15:09:08 +0000
+++ lib/lp/bugs/publisher.py	2011-12-20 00:00:32 +0000
@@ -18,7 +18,6 @@
     IDefaultBrowserLayer,
     )
 
-
 from canonical.launchpad.webapp.interfaces import ILaunchpadContainer
 from canonical.launchpad.webapp.publication import LaunchpadBrowserPublication
 from canonical.launchpad.webapp.publisher import LaunchpadContainer

=== modified file 'lib/lp/bugs/scripts/bugnotification.py'
--- lib/lp/bugs/scripts/bugnotification.py	2011-09-23 12:26:15 +0000
+++ lib/lp/bugs/scripts/bugnotification.py	2011-12-20 00:00:32 +0000
@@ -23,13 +23,13 @@
 from canonical.launchpad.helpers import get_email_template
 from canonical.launchpad.scripts.logger import log
 from canonical.launchpad.webapp import canonical_url
+from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.interfaces.bugnotification import IBugNotificationSet
 from lp.bugs.mail.bugnotificationbuilder import (
     BugNotificationBuilder,
     get_bugmail_from_address,
     )
-from lp.bugs.enum import BugNotificationLevel
 from lp.bugs.mail.newbug import generate_bug_add_email
-from lp.bugs.interfaces.bugnotification import IBugNotificationSet
 from lp.registry.model.person import get_recipients
 from lp.services.mail.mailwrapper import MailWrapper
 

=== modified file 'lib/lp/bugs/scripts/bugtasktargetnamecaches.py'
--- lib/lp/bugs/scripts/bugtasktargetnamecaches.py	2011-07-21 02:30:50 +0000
+++ lib/lp/bugs/scripts/bugtasktargetnamecaches.py	2011-12-20 00:00:32 +0000
@@ -10,15 +10,15 @@
 
 from zope.interface import implements
 
+from canonical.launchpad.interfaces.looptuner import ITunableLoop
 from canonical.launchpad.interfaces.lpstorm import (
     IMasterStore,
     ISlaveStore,
     )
-from canonical.launchpad.interfaces.looptuner import ITunableLoop
 from canonical.launchpad.utilities.looptuner import LoopTuner
 from lp.bugs.model.bugtask import (
+    bug_target_from_key,
     BugTask,
-    bug_target_from_key,
     )
 from lp.registry.model.distribution import Distribution
 from lp.registry.model.distroseries import DistroSeries
@@ -26,7 +26,6 @@
 from lp.registry.model.productseries import ProductSeries
 from lp.registry.model.sourcepackagename import SourcePackageName
 
-
 # These two tuples must be in the same order. They specify the ID
 # columns to get from BugTask, and the classes that they correspond to.
 target_columns = (

=== modified file 'lib/lp/bugs/scripts/bzremotecomponentfinder.py'
--- lib/lp/bugs/scripts/bzremotecomponentfinder.py	2011-07-13 17:10:48 +0000
+++ lib/lp/bugs/scripts/bzremotecomponentfinder.py	2011-12-20 00:00:32 +0000
@@ -14,17 +14,17 @@
     HTTPError,
     urlopen,
     )
+
 from BeautifulSoup import BeautifulSoup
+from zope.component import getUtility
+
+from canonical.launchpad.interfaces.lpstorm import IStore
 from canonical.launchpad.scripts.logger import log as default_log
-from zope.component import getUtility
 from lp.bugs.interfaces.bugtracker import (
     BugTrackerType,
     IBugTrackerSet,
     )
-from lp.bugs.model.bugtracker import (
-    BugTrackerComponent,
-    )
-from canonical.launchpad.interfaces.lpstorm import IStore
+from lp.bugs.model.bugtracker import BugTrackerComponent
 
 
 def dictFromCSV(line):

=== modified file 'lib/lp/bugs/scripts/checkwatches/tests/test_core.py'
--- lib/lp/bugs/scripts/checkwatches/tests/test_core.py	2011-10-25 04:39:02 +0000
+++ lib/lp/bugs/scripts/checkwatches/tests/test_core.py	2011-12-20 00:00:32 +0000
@@ -29,9 +29,7 @@
     )
 from lp.bugs.interfaces.bugwatch import BugWatchActivityStatus
 from lp.bugs.scripts import checkwatches
-from lp.bugs.scripts.checkwatches.base import (
-    WorkingBase,
-    )
+from lp.bugs.scripts.checkwatches.base import WorkingBase
 from lp.bugs.scripts.checkwatches.core import (
     CheckwatchesMaster,
     LOGIN,

=== modified file 'lib/lp/bugs/scripts/tests/test_bugimport.py'
--- lib/lp/bugs/scripts/tests/test_bugimport.py	2011-12-18 13:45:20 +0000
+++ lib/lp/bugs/scripts/tests/test_bugimport.py	2011-12-20 00:00:32 +0000
@@ -18,7 +18,6 @@
     login,
     logout,
     )
-from lp.services.identity.interfaces.emailaddress import IEmailAddressSet
 from canonical.testing.layers import LaunchpadZopelessLayer
 from lp.bugs.externalbugtracker import ExternalBugTracker
 from lp.bugs.interfaces.bug import (
@@ -47,6 +46,7 @@
     )
 from lp.registry.interfaces.product import IProductSet
 from lp.registry.model.person import generate_nick
+from lp.services.identity.interfaces.emailaddress import IEmailAddressSet
 from lp.testing import (
     run_process,
     TestCase,

=== modified file 'lib/lp/bugs/scripts/tests/test_bugnotification.py'
--- lib/lp/bugs/scripts/tests/test_bugnotification.py	2011-08-15 21:36:39 +0000
+++ lib/lp/bugs/scripts/tests/test_bugnotification.py	2011-12-20 00:00:32 +0000
@@ -4,7 +4,10 @@
 
 __metaclass__ = type
 
-from datetime import datetime, timedelta
+from datetime import (
+    datetime,
+    timedelta,
+    )
 import re
 import unittest
 
@@ -12,7 +15,10 @@
 from storm.store import Store
 from testtools.matchers import Not
 from transaction import commit
-from zope.component import getUtility, getSiteManager
+from zope.component import (
+    getSiteManager,
+    getUtility,
+    )
 from zope.interface import implements
 
 from canonical.config import config
@@ -26,7 +32,6 @@
     get_email_template,
     )
 from canonical.launchpad.interfaces.lpstorm import IStore
-from lp.services.messages.interfaces.message import IMessageSet
 from canonical.testing.layers import LaunchpadZopelessLayer
 from lp.bugs.adapters.bugchange import (
     BranchLinkedToBug,
@@ -62,18 +67,20 @@
 from lp.bugs.model.bugtask import BugTask
 from lp.bugs.scripts.bugnotification import (
     construct_email_notifications,
+    get_activity_key,
     get_email_notifications,
-    get_activity_key,
     notification_batches,
     notification_comment_batches,
     process_deferred_notifications,
     )
 from lp.registry.interfaces.person import IPersonSet
 from lp.registry.interfaces.product import IProductSet
+from lp.services.messages.interfaces.message import IMessageSet
 from lp.services.propertycache import cachedproperty
 from lp.testing import (
     TestCase,
-    TestCaseWithFactory)
+    TestCaseWithFactory,
+    )
 from lp.testing.dbuser import lp_dbuser
 from lp.testing.matchers import Contains
 

=== modified file 'lib/lp/bugs/security.py'
--- lib/lp/bugs/security.py	2011-12-08 22:32:41 +0000
+++ lib/lp/bugs/security.py	2011-12-20 00:00:32 +0000
@@ -9,7 +9,6 @@
 from zope.component import getUtility
 
 from canonical.launchpad.interfaces.launchpad import IHasBug
-from lp.services.messages.interfaces.message import IMessage
 from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.app.security import (
     AnonymousAuthorization,
@@ -29,6 +28,7 @@
 from lp.bugs.interfaces.structuralsubscription import IStructuralSubscription
 from lp.registry.interfaces.role import IHasOwner
 from lp.services.features import getFeatureFlag
+from lp.services.messages.interfaces.message import IMessage
 
 
 class EditBugNominationStatus(AuthorizationBase):

=== modified file 'lib/lp/bugs/subscribers/bug.py'
--- lib/lp/bugs/subscribers/bug.py	2011-10-05 04:26:28 +0000
+++ lib/lp/bugs/subscribers/bug.py	2011-12-20 00:00:32 +0000
@@ -22,8 +22,8 @@
 from canonical.launchpad.webapp.publisher import canonical_url
 from lp.bugs.adapters.bugchange import (
     BugDuplicateChange,
+    BugTaskAssigneeChange,
     BugTaskTargetChange,
-    BugTaskAssigneeChange,
     get_bug_changes,
     )
 from lp.bugs.adapters.bugdelta import BugDelta

=== modified file 'lib/lp/bugs/subscribers/tests/test_bug.py'
--- lib/lp/bugs/subscribers/tests/test_bug.py	2011-04-27 17:14:06 +0000
+++ lib/lp/bugs/subscribers/tests/test_bug.py	2011-12-20 00:00:32 +0000
@@ -4,17 +4,18 @@
 __metaclass__ = type
 
 from storm.store import Store
+from testtools.matchers import Is
 
 from canonical.launchpad.webapp.publisher import canonical_url
 from canonical.testing.layers import ZopelessDatabaseLayer
 from lp.bugs.adapters.bugdelta import BugDelta
 from lp.bugs.enum import BugNotificationLevel
 from lp.bugs.interfaces.bugtask import BugTaskStatus
-from lp.bugs.model.bugtask import BugTaskDelta
 from lp.bugs.model.bugnotification import (
     BugNotification,
     BugNotificationRecipient,
     )
+from lp.bugs.model.bugtask import BugTaskDelta
 from lp.bugs.subscribers.bug import (
     add_bug_change_notifications,
     send_bug_details_to_new_bug_subscribers,
@@ -25,8 +26,6 @@
     TestCaseWithFactory,
     )
 
-from testtools.matchers import Is
-
 
 class BugSubscriberTestCase(TestCaseWithFactory):
 

=== modified file 'lib/lp/bugs/tests/test_bug.py'
--- lib/lp/bugs/tests/test_bug.py	2011-11-22 04:55:07 +0000
+++ lib/lp/bugs/tests/test_bug.py	2011-12-20 00:00:32 +0000
@@ -11,9 +11,8 @@
 from zope.security.proxy import removeSecurityProxy
 
 from canonical.testing.layers import DatabaseFunctionalLayer
-
 from lp.bugs.enum import BugNotificationLevel
-from lp.bugs.interfaces.bug import(
+from lp.bugs.interfaces.bug import (
     CreateBugParams,
     IBugSet,
     )

=== modified file 'lib/lp/bugs/tests/test_bug_messages_webservice.py'
--- lib/lp/bugs/tests/test_bug_messages_webservice.py	2011-11-16 23:46:01 +0000
+++ lib/lp/bugs/tests/test_bug_messages_webservice.py	2011-12-20 00:00:32 +0000
@@ -4,6 +4,7 @@
 """Webservice unit tests related to Launchpad Bug messages."""
 from lp.services.features.testing import FeatureFixture
 
+
 __metaclass__ = type
 
 import transaction

=== modified file 'lib/lp/bugs/tests/test_bugheat.py'
--- lib/lp/bugs/tests/test_bugheat.py	2011-10-27 13:03:04 +0000
+++ lib/lp/bugs/tests/test_bugheat.py	2011-12-20 00:00:32 +0000
@@ -7,16 +7,15 @@
 
 import unittest
 
+from lazr.delegates import delegates
+from storm.store import Store
 from zope.interface import implements
 
-from storm.store import Store
-
-from lazr.delegates import delegates
-
 from canonical.testing.layers import LaunchpadZopelessLayer
 from lp.bugs.interfaces.bugtask import BugTaskStatus
 from lp.registry.interfaces.distributionsourcepackage import (
-    IDistributionSourcePackage)
+    IDistributionSourcePackage,
+    )
 from lp.testing import TestCaseWithFactory
 from lp.testing.factory import LaunchpadObjectFactory
 

=== modified file 'lib/lp/bugs/tests/test_bugnomination.py'
--- lib/lp/bugs/tests/test_bugnomination.py	2011-12-12 04:35:07 +0000
+++ lib/lp/bugs/tests/test_bugnomination.py	2011-12-20 00:00:32 +0000
@@ -8,7 +8,10 @@
 from itertools import izip
 import re
 
-from testtools.content import Content, UTF8_TEXT
+from testtools.content import (
+    Content,
+    UTF8_TEXT,
+    )
 from testtools.matchers import (
     Equals,
     LessThan,

=== modified file 'lib/lp/bugs/tests/test_bugnotification.py'
--- lib/lp/bugs/tests/test_bugnotification.py	2011-08-15 21:36:39 +0000
+++ lib/lp/bugs/tests/test_bugnotification.py	2011-12-20 00:00:32 +0000
@@ -5,23 +5,22 @@
 
 __metaclass__ = type
 
+from datetime import datetime
 from itertools import chain
-from datetime import datetime
-import pytz
-import transaction
 import unittest
 
 from lazr.lifecycle.event import ObjectModifiedEvent
 from lazr.lifecycle.snapshot import Snapshot
+import pytz
 from storm.store import Store
 from testtools.matchers import Not
+import transaction
 from zope.component import getUtility
 from zope.event import notify
 from zope.interface import providedBy
 
 from canonical.config import config
 from canonical.database.sqlbase import sqlvalues
-from lp.services.messages.model.message import MessageSet
 from canonical.launchpad.ftests import login
 from canonical.testing import (
     DatabaseFunctionalLayer,
@@ -41,9 +40,10 @@
     )
 from lp.bugs.model.bugsubscriptionfilter import BugSubscriptionFilterMute
 from lp.services.messages.interfaces.message import IMessageSet
+from lp.services.messages.model.message import MessageSet
 from lp.testing import (
+    person_logged_in,
     TestCaseWithFactory,
-    person_logged_in,
     )
 from lp.testing.factory import LaunchpadObjectFactory
 from lp.testing.matchers import Contains

=== modified file 'lib/lp/bugs/tests/test_bugsubscription.py'
--- lib/lp/bugs/tests/test_bugsubscription.py	2011-06-07 06:24:04 +0000
+++ lib/lp/bugs/tests/test_bugsubscription.py	2011-12-20 00:00:32 +0000
@@ -10,11 +10,9 @@
     LessThan,
     MatchesAny,
     )
-
 from zope.security.interfaces import Unauthorized
 
 from canonical.testing.layers import DatabaseFunctionalLayer
-
 from lp.bugs.enum import BugNotificationLevel
 from lp.registry.interfaces.teammembership import TeamMembershipStatus
 from lp.testing import (

=== modified file 'lib/lp/bugs/tests/test_bugtarget.py'
--- lib/lp/bugs/tests/test_bugtarget.py	2011-09-29 15:34:39 +0000
+++ lib/lp/bugs/tests/test_bugtarget.py	2011-12-20 00:00:32 +0000
@@ -14,11 +14,11 @@
 __all__ = []
 
 import random
-from testtools.matchers import Equals
 import unittest
 
 from storm.expr import LeftJoin
 from storm.store import Store
+from testtools.matchers import Equals
 from zope.component import getUtility
 
 from canonical.launchpad.testing.systemdocs import (

=== modified file 'lib/lp/bugs/tests/test_bzremotecomponentfinder.py'
--- lib/lp/bugs/tests/test_bzremotecomponentfinder.py	2011-07-01 02:51:32 +0000
+++ lib/lp/bugs/tests/test_bzremotecomponentfinder.py	2011-12-20 00:00:32 +0000
@@ -8,13 +8,12 @@
 __all__ = []
 
 import os
+from urllib2 import HTTPError
+
 import transaction
-from urllib2 import HTTPError
 
+from canonical.launchpad.ftests import login
 from canonical.testing import DatabaseFunctionalLayer
-from canonical.launchpad.ftests import (
-    login,
-    )
 from lp.bugs.scripts.bzremotecomponentfinder import (
     BugzillaRemoteComponentFinder,
     BugzillaRemoteComponentScraper,
@@ -22,9 +21,8 @@
     )
 from lp.services.log.logger import BufferLogger
 from lp.testing import TestCaseWithFactory
-from lp.testing.sampledata import (
-    ADMIN_EMAIL,
-    )
+from lp.testing.sampledata import ADMIN_EMAIL
+
 
 def read_test_file(name):
     """Return the contents of the test file named :name:

=== modified file 'lib/lp/bugs/tests/test_doc.py'
--- lib/lp/bugs/tests/test_doc.py	2011-09-28 20:54:34 +0000
+++ lib/lp/bugs/tests/test_doc.py	2011-12-20 00:00:32 +0000
@@ -27,9 +27,7 @@
     LaunchpadZopelessLayer,
     )
 from lp.code.tests.test_doc import branchscannerSetUp
-from lp.services.mail.tests.test_doc import (
-    ProcessMailLayer,
-    )
+from lp.services.mail.tests.test_doc import ProcessMailLayer
 from lp.soyuz.tests.test_doc import (
     lobotomize_stevea,
     uploaderSetUp,

=== modified file 'lib/lp/bugs/tests/test_subscribers.py'
--- lib/lp/bugs/tests/test_subscribers.py	2011-02-07 11:44:51 +0000
+++ lib/lp/bugs/tests/test_subscribers.py	2011-12-20 00:00:32 +0000
@@ -9,7 +9,6 @@
 from lazr.lifecycle.snapshot import Snapshot
 
 from canonical.testing.layers import DatabaseFunctionalLayer
-
 from lp.bugs.interfaces.bug import IBug
 from lp.bugs.subscribers.bugactivity import what_changed
 from lp.testing import (

=== modified file 'lib/lp/bugs/vocabularies.py'
--- lib/lp/bugs/vocabularies.py	2011-12-04 17:54:41 +0000
+++ lib/lp/bugs/vocabularies.py	2011-12-20 00:00:32 +0000
@@ -25,12 +25,10 @@
     CONTAINSSTRING,
     OR,
     )
-
 from storm.expr import (
     And,
     Or,
     )
-
 from zope.component import getUtility
 from zope.interface import implements
 from zope.schema.interfaces import (
@@ -47,13 +45,13 @@
     shortlist,
     )
 from canonical.launchpad.interfaces.lpstorm import IStore
+from canonical.launchpad.webapp.interfaces import ILaunchBag
 from canonical.launchpad.webapp.vocabulary import (
     CountableIterator,
     IHugeVocabulary,
     NamedSQLObjectVocabulary,
     SQLObjectVocabularyBase,
     )
-from canonical.launchpad.webapp.interfaces import ILaunchBag
 from lp.app.browser.stringformatter import FormattersAPI
 from lp.app.enums import ServiceUsage
 from lp.bugs.interfaces.bugtask import IBugTask

=== modified file 'lib/lp/bugs/windmill/tests/test_bug_inline_assignment.py'
--- lib/lp/bugs/windmill/tests/test_bug_inline_assignment.py	2011-06-27 15:25:17 +0000
+++ lib/lp/bugs/windmill/tests/test_bug_inline_assignment.py	2011-12-20 00:00:32 +0000
@@ -12,6 +12,7 @@
     SLEEP,
     )
 
+
 ASSIGN_BUTTON = (u'//*[@id="affected-software"]//tr//td[5]' +
     '//button[contains(@class, "yui3-activator-act")]')
 VISIBLE_PICKER_OVERLAY = (

=== modified file 'lib/lp/buildmaster/interfaces/buildqueue.py'
--- lib/lp/buildmaster/interfaces/buildqueue.py	2011-10-28 10:26:04 +0000
+++ lib/lp/buildmaster/interfaces/buildqueue.py	2011-12-20 00:00:32 +0000
@@ -30,9 +30,7 @@
 from canonical.launchpad import _
 from lp.buildmaster.enums import BuildFarmJobType
 from lp.buildmaster.interfaces.builder import IBuilder
-from lp.buildmaster.interfaces.buildfarmjob import (
-    IBuildFarmJob,
-    )
+from lp.buildmaster.interfaces.buildfarmjob import IBuildFarmJob
 from lp.services.job.interfaces.job import IJob
 from lp.soyuz.interfaces.processor import IProcessor
 

=== modified file 'lib/lp/buildmaster/interfaces/webservice.py'
--- lib/lp/buildmaster/interfaces/webservice.py	2010-11-19 16:13:07 +0000
+++ lib/lp/buildmaster/interfaces/webservice.py	2011-12-20 00:00:32 +0000
@@ -18,3 +18,5 @@
     IBuilder,
     IBuilderSet,
     )
+
+

=== modified file 'lib/lp/buildmaster/security.py'
--- lib/lp/buildmaster/security.py	2011-07-08 16:05:08 +0000
+++ lib/lp/buildmaster/security.py	2011-12-20 00:00:32 +0000
@@ -9,9 +9,7 @@
     ]
 
 from lp.app.security import AnonymousAuthorization
-from lp.buildmaster.interfaces.builder import (
-    IBuilder,
-    )
+from lp.buildmaster.interfaces.builder import IBuilder
 
 
 class ViewBuilder(AnonymousAuthorization):

=== modified file 'lib/lp/buildmaster/tests/mock_slaves.py'
--- lib/lp/buildmaster/tests/mock_slaves.py	2011-11-20 23:37:23 +0000
+++ lib/lp/buildmaster/tests/mock_slaves.py	2011-12-20 00:00:32 +0000
@@ -21,20 +21,17 @@
     'WaitingSlave',
     ]
 
-import fixtures
 import os
 import types
-
 import xmlrpclib
 
+import fixtures
+from lpbuildd.tests.harness import BuilddSlaveTestSetup
 from testtools.content import Content
 from testtools.content_type import UTF8_TEXT
-
 from twisted.internet import defer
 from twisted.web import xmlrpc
 
-from lpbuildd.tests.harness import BuilddSlaveTestSetup
-
 from lp.buildmaster.interfaces.builder import (
     CannotFetchFile,
     CorruptBuildCookie,

=== modified file 'lib/lp/buildmaster/tests/test_webservice.py'
--- lib/lp/buildmaster/tests/test_webservice.py	2011-10-31 15:58:15 +0000
+++ lib/lp/buildmaster/tests/test_webservice.py	2011-12-20 00:00:32 +0000
@@ -5,8 +5,8 @@
 
 __metaclass__ = type
 
+from canonical.launchpad.testing.pages import LaunchpadWebServiceCaller
 from canonical.testing.layers import DatabaseFunctionalLayer
-from canonical.launchpad.testing.pages import LaunchpadWebServiceCaller
 from lp.testing import (
     api_url,
     logout,

=== modified file 'lib/lp/code/adapters/tests/test_branchcollection.py'
--- lib/lp/code/adapters/tests/test_branchcollection.py	2011-05-09 19:38:35 +0000
+++ lib/lp/code/adapters/tests/test_branchcollection.py	2011-12-20 00:00:32 +0000
@@ -6,10 +6,10 @@
 __metaclass__ = type
 
 
+from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.code.interfaces.branchcollection import IBranchCollection
+from lp.registry.model.personproduct import PersonProduct
 from lp.testing import TestCaseWithFactory
-from lp.registry.model.personproduct import PersonProduct
-from canonical.testing.layers import DatabaseFunctionalLayer
 
 
 class TestPersonProduct(TestCaseWithFactory):

=== modified file 'lib/lp/code/browser/branch.py'
--- lib/lp/code/browser/branch.py	2011-12-13 17:45:31 +0000
+++ lib/lp/code/browser/branch.py	2011-12-20 00:00:32 +0000
@@ -109,9 +109,7 @@
     LaunchpadEditFormView,
     LaunchpadFormView,
     )
-from lp.app.browser.lazrjs import (
-    EnumChoiceWidget,
-    )
+from lp.app.browser.lazrjs import EnumChoiceWidget
 from lp.app.errors import NotFoundError
 from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.app.widgets.itemswidgets import LaunchpadRadioWidgetWithDescription

=== modified file 'lib/lp/code/browser/branchlisting.py'
--- lib/lp/code/browser/branchlisting.py	2011-12-18 15:13:07 +0000
+++ lib/lp/code/browser/branchlisting.py	2011-12-20 00:00:32 +0000
@@ -72,13 +72,13 @@
     check_permission,
     precache_permission_for_objects,
     )
+from canonical.launchpad.webapp.batching import TableBatchNavigator
+from canonical.launchpad.webapp.breadcrumb import Breadcrumb
+from canonical.launchpad.webapp.publisher import LaunchpadView
 from lp.app.browser.badge import (
     Badge,
     HasBadgeBase,
     )
-from canonical.launchpad.webapp.batching import TableBatchNavigator
-from canonical.launchpad.webapp.breadcrumb import Breadcrumb
-from canonical.launchpad.webapp.publisher import LaunchpadView
 from lp.app.browser.launchpadform import (
     custom_widget,
     LaunchpadFormView,

=== modified file 'lib/lp/code/browser/codereviewvote.py'
--- lib/lp/code/browser/codereviewvote.py	2010-11-23 23:22:27 +0000
+++ lib/lp/code/browser/codereviewvote.py	2011-12-20 00:00:32 +0000
@@ -9,9 +9,7 @@
 from zope.interface import Interface
 
 from canonical.launchpad import _
-from canonical.launchpad.webapp import (
-    canonical_url,
-    )
+from canonical.launchpad.webapp import canonical_url
 from lp.app.browser.launchpadform import (
     action,
     LaunchpadFormView,

=== modified file 'lib/lp/code/browser/tests/test_branch.py'
--- lib/lp/code/browser/tests/test_branch.py	2011-12-16 06:02:15 +0000
+++ lib/lp/code/browser/tests/test_branch.py	2011-12-20 00:00:32 +0000
@@ -5,12 +5,10 @@
 
 __metaclass__ = type
 
+from datetime import datetime
+from textwrap import dedent
+
 from BeautifulSoup import BeautifulSoup
-from datetime import (
-    datetime,
-    )
-from textwrap import dedent
-
 import pytz
 from zope.publisher.interfaces import NotFound
 from zope.security.proxy import removeSecurityProxy
@@ -18,18 +16,18 @@
 from canonical.config import config
 from canonical.database.constants import UTC_NOW
 from canonical.launchpad.helpers import truncate_text
+from canonical.launchpad.testing.pages import (
+    extract_text,
+    find_tag_by_id,
+    setupBrowser,
+    setupBrowserForUser,
+    )
 from canonical.launchpad.webapp.publisher import canonical_url
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
 from canonical.testing.layers import (
     DatabaseFunctionalLayer,
     LaunchpadFunctionalLayer,
     )
-from canonical.launchpad.testing.pages import (
-    extract_text,
-    find_tag_by_id,
-    setupBrowser,
-    setupBrowserForUser
-    )
 from lp.app.interfaces.headings import IRootContext
 from lp.bugs.interfaces.bugtask import (
     BugTaskStatus,

=== modified file 'lib/lp/code/browser/tests/test_branchmergequeue.py'
--- lib/lp/code/browser/tests/test_branchmergequeue.py	2010-10-28 16:38:03 +0000
+++ lib/lp/code/browser/tests/test_branchmergequeue.py	2011-12-20 00:00:32 +0000
@@ -7,16 +7,17 @@
 
 __metaclass__ = type
 
+import re
+
 from mechanize import LinkNotFoundError
-import re
-
 import soupmatchers
 
 from canonical.launchpad.webapp import canonical_url
-from canonical.testing.layers import (
-    DatabaseFunctionalLayer,
+from canonical.testing.layers import DatabaseFunctionalLayer
+from lp.services.features.model import (
+    FeatureFlag,
+    getFeatureStore,
     )
-from lp.services.features.model import FeatureFlag, getFeatureStore
 from lp.testing import (
     ANONYMOUS,
     BrowserTestCase,

=== modified file 'lib/lp/code/browser/tests/test_product.py'
--- lib/lp/code/browser/tests/test_product.py	2011-12-08 21:15:07 +0000
+++ lib/lp/code/browser/tests/test_product.py	2011-12-20 00:00:32 +0000
@@ -9,6 +9,7 @@
     datetime,
     timedelta,
     )
+
 from mechanize import LinkNotFoundError
 import pytz
 from zope.component import getUtility
@@ -36,8 +37,8 @@
     time_counter,
     )
 from lp.testing.views import (
+    create_initialized_view,
     create_view,
-    create_initialized_view,
     )
 
 

=== modified file 'lib/lp/code/interfaces/codereviewcomment.py'
--- lib/lp/code/interfaces/codereviewcomment.py	2011-05-12 21:33:10 +0000
+++ lib/lp/code/interfaces/codereviewcomment.py	2011-12-20 00:00:32 +0000
@@ -26,10 +26,10 @@
     )
 
 from canonical.launchpad import _
-from lp.services.messages.interfaces.message import IMessage
 from lp.code.enums import CodeReviewVote
 from lp.code.interfaces.branchmergeproposal import IBranchMergeProposal
 from lp.registry.interfaces.person import IPerson
+from lp.services.messages.interfaces.message import IMessage
 
 
 class ICodeReviewComment(Interface):

=== modified file 'lib/lp/code/interfaces/recipebuild.py'
--- lib/lp/code/interfaces/recipebuild.py	2010-11-17 07:34:51 +0000
+++ lib/lp/code/interfaces/recipebuild.py	2011-12-20 00:00:32 +0000
@@ -11,9 +11,7 @@
     'IRecipeBuildRecordSet',
     ]
 
-from zope.interface import (
-    Interface,
-    )
+from zope.interface import Interface
 
 
 class IRecipeBuildRecordSet(Interface):

=== modified file 'lib/lp/code/model/branch.py'
--- lib/lp/code/model/branch.py	2011-12-18 14:29:19 +0000
+++ lib/lp/code/model/branch.py	2011-12-20 00:00:32 +0000
@@ -59,9 +59,6 @@
     sqlvalues,
     )
 from canonical.launchpad import _
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.helpers import shortlist
 from canonical.launchpad.interfaces.launchpad import IPrivacy
 from canonical.launchpad.interfaces.lpstorm import IMasterStore
@@ -147,6 +144,7 @@
     validate_public_person,
     )
 from lp.services.database.bulk import load_related
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.job.interfaces.job import JobStatus
 from lp.services.job.model.job import Job
 from lp.services.mail.notificationrecipientset import NotificationRecipientSet

=== modified file 'lib/lp/code/model/branchcloud.py'
--- lib/lp/code/model/branchcloud.py	2010-08-31 01:11:46 +0000
+++ lib/lp/code/model/branchcloud.py	2011-12-20 00:00:32 +0000
@@ -9,15 +9,25 @@
     ]
 
 
-from datetime import datetime, timedelta
+from datetime import (
+    datetime,
+    timedelta,
+    )
 
 import pytz
-from storm.expr import Alias, Func
-from storm.locals import Count, Desc, Max, Not
+from storm.expr import (
+    Alias,
+    Func,
+    )
+from storm.locals import (
+    Count,
+    Desc,
+    Max,
+    Not,
+    )
 from zope.interface import classProvides
 
 from canonical.launchpad.interfaces.lpstorm import ISlaveStore
-
 from lp.code.interfaces.branch import IBranchCloud
 from lp.code.model.revision import RevisionCache
 from lp.registry.model.product import Product

=== modified file 'lib/lp/code/model/branchcollection.py'
--- lib/lp/code/model/branchcollection.py	2011-12-18 14:29:19 +0000
+++ lib/lp/code/model/branchcollection.py	2011-12-20 00:00:32 +0000
@@ -10,9 +10,7 @@
 
 from collections import defaultdict
 from functools import partial
-from operator import (
-    attrgetter,
-    )
+from operator import attrgetter
 
 from lazr.restful.utils import safe_hasattr
 from storm.expr import (
@@ -34,9 +32,6 @@
 from zope.interface import implements
 
 from canonical.database.sqlbase import quote
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.interfaces.lpstorm import IStore
 from canonical.launchpad.searchbuilder import any
 from canonical.launchpad.webapp.interfaces import (
@@ -83,6 +78,7 @@
     load_referencing,
     load_related,
     )
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.propertycache import get_property_cache
 
 

=== modified file 'lib/lp/code/model/codeimportevent.py'
--- lib/lp/code/model/codeimportevent.py	2011-08-24 21:17:35 +0000
+++ lib/lp/code/model/codeimportevent.py	2011-12-20 00:00:32 +0000
@@ -20,7 +20,10 @@
     )
 from zope.interface import implements
 
-from canonical.database.constants import DEFAULT, UTC_NOW
+from canonical.database.constants import (
+    DEFAULT,
+    UTC_NOW,
+    )
 from canonical.database.datetimecol import UtcDateTimeCol
 from canonical.database.enumcol import EnumCol
 from canonical.database.sqlbase import SQLBase

=== modified file 'lib/lp/code/model/recipebuild.py'
--- lib/lp/code/model/recipebuild.py	2011-12-19 15:09:08 +0000
+++ lib/lp/code/model/recipebuild.py	2011-12-20 00:00:32 +0000
@@ -17,31 +17,27 @@
     )
 
 import pytz
+from storm import Undef
 from storm.expr import (
     Desc,
     Join,
     Max,
     Select,
     )
-from storm import Undef
-
 from zope.interface import implements
 
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.interfaces.lpstorm import ISlaveStore
 from canonical.launchpad.webapp.publisher import canonical_url
-
 from lp.buildmaster.enums import BuildStatus
 from lp.buildmaster.model.buildfarmjob import BuildFarmJob
 from lp.buildmaster.model.packagebuild import PackageBuild
 from lp.code.interfaces.recipebuild import IRecipeBuildRecordSet
+from lp.code.model.sourcepackagerecipe import SourcePackageRecipe
 from lp.code.model.sourcepackagerecipebuild import SourcePackageRecipeBuild
-from lp.code.model.sourcepackagerecipe import SourcePackageRecipe
-from lp.services.database.stormexpr import CountDistinct
 from lp.registry.model.person import Person
 from lp.registry.model.sourcepackagename import SourcePackageName
+from lp.services.database.decoratedresultset import DecoratedResultSet
+from lp.services.database.stormexpr import CountDistinct
 from lp.soyuz.model.archive import Archive
 from lp.soyuz.model.binarypackagebuild import BinaryPackageBuild
 from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease

=== modified file 'lib/lp/code/model/revision.py'
--- lib/lp/code/model/revision.py	2011-12-18 13:55:35 +0000
+++ lib/lp/code/model/revision.py	2011-12-20 00:00:32 +0000
@@ -60,11 +60,10 @@
     sqlvalues,
     )
 from canonical.launchpad.helpers import shortlist
-from lp.services.identity.interfaces.emailaddress import (
-    EmailAddressStatus,
-    IEmailAddressSet,
+from canonical.launchpad.interfaces.lpstorm import (
+    IMasterStore,
+    IStore,
     )
-from canonical.launchpad.interfaces.lpstorm import IMasterStore, IStore
 from canonical.launchpad.webapp.interfaces import (
     DEFAULT_FLAVOR,
     IStoreSelector,
@@ -82,6 +81,10 @@
 from lp.registry.interfaces.product import IProduct
 from lp.registry.interfaces.projectgroup import IProjectGroup
 from lp.registry.model.person import ValidPersonCache
+from lp.services.identity.interfaces.emailaddress import (
+    EmailAddressStatus,
+    IEmailAddressSet,
+    )
 
 
 class Revision(SQLBase):

=== modified file 'lib/lp/code/model/sourcepackagerecipebuild.py'
--- lib/lp/code/model/sourcepackagerecipebuild.py	2011-12-18 14:29:19 +0000
+++ lib/lp/code/model/sourcepackagerecipebuild.py	2011-12-20 00:00:32 +0000
@@ -35,9 +35,6 @@
 
 from canonical.database.constants import UTC_NOW
 from canonical.launchpad.browser.librarian import ProxiedLibraryFileAlias
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.interfaces.lpstorm import (
     IMasterStore,
     IStore,
@@ -70,6 +67,7 @@
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.registry.model.person import Person
 from lp.services.database.bulk import load_related
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.job.model.job import Job
 from lp.soyuz.interfaces.archive import CannotUploadToArchive
 from lp.soyuz.model.archive import Archive

=== modified file 'lib/lp/code/model/tests/test_branchcloud.py'
--- lib/lp/code/model/tests/test_branchcloud.py	2011-08-12 11:37:08 +0000
+++ lib/lp/code/model/tests/test_branchcloud.py	2011-12-20 00:00:32 +0000
@@ -5,11 +5,14 @@
 
 __metaclass__ = type
 
-from datetime import datetime, timedelta
-import transaction
+from datetime import (
+    datetime,
+    timedelta,
+    )
 
 import pytz
 from storm.locals import Store
+import transaction
 from zope.component import getUtility
 
 from canonical.launchpad.testing.databasehelpers import (
@@ -19,7 +22,10 @@
 from lp.code.interfaces.branch import IBranchCloud
 from lp.code.model.revision import RevisionCache
 from lp.code.tests.helpers import make_project_branch_with_revisions
-from lp.testing import TestCaseWithFactory, time_counter
+from lp.testing import (
+    TestCaseWithFactory,
+    time_counter,
+    )
 
 
 class TestBranchCloud(TestCaseWithFactory):

=== modified file 'lib/lp/code/model/tests/test_branchjob.py'
--- lib/lp/code/model/tests/test_branchjob.py	2011-12-18 13:45:20 +0000
+++ lib/lp/code/model/tests/test_branchjob.py	2011-12-20 00:00:32 +0000
@@ -30,7 +30,6 @@
 
 from canonical.config import config
 from canonical.database.constants import UTC_NOW
-from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from canonical.launchpad.interfaces.lpstorm import IMasterStore
 from canonical.launchpad.testing.librarianhelpers import (
     get_newest_librarian_file,
@@ -75,6 +74,7 @@
 from lp.code.model.revision import RevisionSet
 from lp.codehosting.vfs import branch_id_to_path
 from lp.scripts.helpers import TransactionFreeOperation
+from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from lp.services.job.interfaces.job import JobStatus
 from lp.services.job.model.job import Job
 from lp.services.job.runner import JobRunner

=== modified file 'lib/lp/code/model/tests/test_branchmergeproposaljobs.py'
--- lib/lp/code/model/tests/test_branchmergeproposaljobs.py	2011-11-02 03:03:33 +0000
+++ lib/lp/code/model/tests/test_branchmergeproposaljobs.py	2011-12-20 00:00:32 +0000
@@ -16,14 +16,11 @@
 from sqlobject import SQLObjectNotFound
 from storm.locals import Select
 from storm.store import Store
+from testtools.matchers import Equals
 import transaction
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy
 
-from testtools.matchers import (
-    Equals,
-    )
-
 from canonical.config import config
 from canonical.launchpad.webapp.testing import verifyObject
 from canonical.testing.layers import LaunchpadZopelessLayer

=== modified file 'lib/lp/code/model/tests/test_branchmergequeue.py'
--- lib/lp/code/model/tests/test_branchmergequeue.py	2010-10-25 14:51:56 +0000
+++ lib/lp/code/model/tests/test_branchmergequeue.py	2011-12-20 00:00:32 +0000
@@ -18,8 +18,8 @@
 from lp.code.model.branchmergequeue import BranchMergeQueue
 from lp.testing import (
     ANONYMOUS,
+    launchpadlib_for,
     person_logged_in,
-    launchpadlib_for,
     TestCaseWithFactory,
     ws_object,
     )

=== modified file 'lib/lp/code/model/tests/test_branchvisibility.py'
--- lib/lp/code/model/tests/test_branchvisibility.py	2011-08-29 07:55:48 +0000
+++ lib/lp/code/model/tests/test_branchvisibility.py	2011-12-20 00:00:32 +0000
@@ -25,12 +25,11 @@
     )
 from canonical.launchpad.webapp.interaction import ANONYMOUS
 from canonical.testing.layers import DatabaseFunctionalLayer
-
 from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.app.interfaces.security import IAuthorization
 from lp.code.enums import (
+    BranchSubscriptionDiffSize,
     BranchSubscriptionNotificationLevel,
-    BranchSubscriptionDiffSize,
     CodeReviewNotificationLevel,
     )
 from lp.code.interfaces.branch import IBranchSet

=== modified file 'lib/lp/code/model/tests/test_codeimportresult.py'
--- lib/lp/code/model/tests/test_codeimportresult.py	2011-06-30 10:41:07 +0000
+++ lib/lp/code/model/tests/test_codeimportresult.py	2011-12-20 00:00:32 +0000
@@ -12,7 +12,6 @@
 
 from canonical.testing.layers import LaunchpadFunctionalLayer
 from lp.code.interfaces.codeimportresult import ICodeImportResult
-
 from lp.testing import TestCaseWithFactory
 
 

=== modified file 'lib/lp/code/model/tests/test_codereviewcomment.py'
--- lib/lp/code/model/tests/test_codereviewcomment.py	2011-08-12 11:37:08 +0000
+++ lib/lp/code/model/tests/test_codereviewcomment.py	2011-12-20 00:00:32 +0000
@@ -5,7 +5,6 @@
 
 from textwrap import dedent
 
-from lp.services.messages.model.message import MessageSet
 from canonical.testing.layers import (
     DatabaseFunctionalLayer,
     LaunchpadFunctionalLayer,
@@ -13,6 +12,7 @@
 from lp.code.enums import CodeReviewVote
 from lp.code.event.branchmergeproposal import NewCodeReviewCommentEvent
 from lp.code.model.codereviewcomment import quote_text_as_email
+from lp.services.messages.model.message import MessageSet
 from lp.testing import (
     TestCase,
     TestCaseWithFactory,

=== modified file 'lib/lp/code/model/tests/test_hasmergeproposals.py'
--- lib/lp/code/model/tests/test_hasmergeproposals.py	2011-08-12 11:37:08 +0000
+++ lib/lp/code/model/tests/test_hasmergeproposals.py	2011-12-20 00:00:32 +0000
@@ -6,6 +6,7 @@
 __metaclass__ = type
 
 from zope.interface.verify import verifyObject
+
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.code.interfaces.hasbranches import IHasMergeProposals
 from lp.registry.model.personproduct import PersonProduct

=== modified file 'lib/lp/code/model/tests/test_recipebuild.py'
--- lib/lp/code/model/tests/test_recipebuild.py	2011-03-01 03:30:19 +0000
+++ lib/lp/code/model/tests/test_recipebuild.py	2011-12-20 00:00:32 +0000
@@ -8,7 +8,6 @@
 from zope.component import getUtility
 
 from canonical.testing.layers import DatabaseFunctionalLayer
-
 from lp.code.interfaces.recipebuild import IRecipeBuildRecordSet
 from lp.testing import TestCaseWithFactory
 

=== modified file 'lib/lp/code/model/tests/test_recipebuilder.py'
--- lib/lp/code/model/tests/test_recipebuilder.py	2011-08-12 11:37:08 +0000
+++ lib/lp/code/model/tests/test_recipebuilder.py	2011-12-20 00:00:32 +0000
@@ -8,7 +8,6 @@
 __metaclass__ = type
 
 from textwrap import dedent
-import transaction
 
 from testtools import run_test_with
 from testtools.deferredruntest import (
@@ -16,12 +15,11 @@
     AsynchronousDeferredRunTest,
     )
 from testtools.matchers import StartsWith
+import transaction
 from twisted.internet import defer
 from zope.security.proxy import removeSecurityProxy
 
-from canonical.testing.layers import (
-    LaunchpadZopelessLayer,
-    )
+from canonical.testing.layers import LaunchpadZopelessLayer
 from lp.buildmaster.enums import BuildFarmJobType
 from lp.buildmaster.interfaces.builder import CannotBuild
 from lp.buildmaster.interfaces.buildfarmjobbehavior import (

=== modified file 'lib/lp/code/model/tests/test_revision.py'
--- lib/lp/code/model/tests/test_revision.py	2011-12-18 13:45:20 +0000
+++ lib/lp/code/model/tests/test_revision.py	2011-12-20 00:00:32 +0000
@@ -23,7 +23,6 @@
     login,
     logout,
     )
-from lp.services.identity.interfaces.account import AccountStatus
 from canonical.launchpad.interfaces.lpstorm import IMasterObject
 from canonical.launchpad.webapp.interfaces import (
     DEFAULT_FLAVOR,
@@ -40,6 +39,7 @@
     )
 from lp.registry.model.karma import Karma
 from lp.scripts.garbo import RevisionAuthorEmailLinker
+from lp.services.identity.interfaces.account import AccountStatus
 from lp.services.log.logger import DevNullLogger
 from lp.testing import (
     TestCaseWithFactory,

=== modified file 'lib/lp/code/model/tests/test_revisionauthor.py'
--- lib/lp/code/model/tests/test_revisionauthor.py	2011-12-18 13:55:35 +0000
+++ lib/lp/code/model/tests/test_revisionauthor.py	2011-12-20 00:00:32 +0000
@@ -9,14 +9,14 @@
 from zope.component import getUtility
 
 from canonical.config import config
-from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
-from lp.scripts.garbo import RevisionAuthorEmailLinker
 from canonical.testing.layers import LaunchpadZopelessLayer
 from lp.code.model.revision import (
     RevisionAuthor,
     RevisionSet,
     )
 from lp.registry.interfaces.person import IPersonSet
+from lp.scripts.garbo import RevisionAuthorEmailLinker
+from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from lp.services.log.logger import DevNullLogger
 from lp.testing import TestCase
 from lp.testing.factory import LaunchpadObjectFactory

=== modified file 'lib/lp/code/scripts/tests/test_revisionkarma.py'
--- lib/lp/code/scripts/tests/test_revisionkarma.py	2011-12-18 13:55:35 +0000
+++ lib/lp/code/scripts/tests/test_revisionkarma.py	2011-12-20 00:00:32 +0000
@@ -9,12 +9,12 @@
 import transaction
 
 from canonical.config import config
-from lp.services.identity.model.emailaddress import EmailAddressSet
-from lp.scripts.garbo import RevisionAuthorEmailLinker
 from canonical.testing.layers import LaunchpadZopelessLayer
 from lp.code.model.revision import RevisionSet
 from lp.code.scripts.revisionkarma import RevisionKarmaAllocator
 from lp.registry.model.karma import Karma
+from lp.scripts.garbo import RevisionAuthorEmailLinker
+from lp.services.identity.model.emailaddress import EmailAddressSet
 from lp.services.log.logger import DevNullLogger
 from lp.testing import TestCaseWithFactory
 

=== modified file 'lib/lp/code/tests/test_helpers.py'
--- lib/lp/code/tests/test_helpers.py	2011-03-03 01:13:47 +0000
+++ lib/lp/code/tests/test_helpers.py	2011-12-20 00:00:32 +0000
@@ -5,13 +5,15 @@
 
 __metaclass__ = type
 
-from datetime import datetime, timedelta
+from datetime import (
+    datetime,
+    timedelta,
+    )
+
 import pytz
-
 from zope.component import getUtility
 
 from canonical.testing.layers import DatabaseFunctionalLayer
-
 from lp.code.interfaces.branchcollection import IAllBranches
 from lp.code.tests.helpers import make_project_cloud_data
 from lp.registry.interfaces.product import IProductSet

=== modified file 'lib/lp/code/vocabularies/branch.py'
--- lib/lp/code/vocabularies/branch.py	2011-08-10 10:11:16 +0000
+++ lib/lp/code/vocabularies/branch.py	2011-12-20 00:00:32 +0000
@@ -22,7 +22,6 @@
     IHugeVocabulary,
     SQLObjectVocabularyBase,
     )
-
 from lp.code.enums import BranchType
 from lp.code.interfaces.branch import IBranch
 from lp.code.interfaces.branchcollection import IAllBranches

=== modified file 'lib/lp/code/vocabularies/tests/test_branch_vocabularies.py'
--- lib/lp/code/vocabularies/tests/test_branch_vocabularies.py	2011-08-12 11:37:08 +0000
+++ lib/lp/code/vocabularies/tests/test_branch_vocabularies.py	2011-12-20 00:00:32 +0000
@@ -14,12 +14,12 @@
     login,
     logout,
     )
+from canonical.testing.layers import DatabaseFunctionalLayer
+from lp.code.interfaces.branchlookup import IBranchLookup
 from lp.code.vocabularies.branch import (
     BranchRestrictedOnProductVocabulary,
     BranchVocabulary,
     )
-from canonical.testing.layers import DatabaseFunctionalLayer
-from lp.code.interfaces.branchlookup import IBranchLookup
 from lp.registry.interfaces.product import IProductSet
 from lp.testing.factory import LaunchpadObjectFactory
 

=== modified file 'lib/lp/code/windmill/tests/test_branch_status.py'
--- lib/lp/code/windmill/tests/test_branch_status.py	2011-03-29 05:59:29 +0000
+++ lib/lp/code/windmill/tests/test_branch_status.py	2011-12-20 00:00:32 +0000
@@ -6,10 +6,9 @@
 __metaclass__ = type
 __all__ = []
 
+from storm.store import Store
 import transaction
 
-from storm.store import Store
-
 from lp.code.enums import BranchLifecycleStatus
 from lp.code.model.branch import Branch
 from lp.code.windmill.testing import CodeWindmillLayer

=== modified file 'lib/lp/code/windmill/tests/test_branchmergeproposal_review.py'
--- lib/lp/code/windmill/tests/test_branchmergeproposal_review.py	2011-03-29 05:59:29 +0000
+++ lib/lp/code/windmill/tests/test_branchmergeproposal_review.py	2011-12-20 00:00:32 +0000
@@ -19,9 +19,7 @@
     constants,
     lpuser,
     )
-from lp.testing.windmill.widgets import (
-    search_and_select_picker_widget,
-    )
+from lp.testing.windmill.widgets import search_and_select_picker_widget
 
 
 WAIT_PAGELOAD = u'30000'

=== modified file 'lib/lp/code/windmill/tests/test_recipe_index.py'
--- lib/lp/code/windmill/tests/test_recipe_index.py	2011-06-27 15:13:24 +0000
+++ lib/lp/code/windmill/tests/test_recipe_index.py	2011-12-20 00:00:32 +0000
@@ -6,10 +6,9 @@
 __metaclass__ = type
 __all__ = []
 
+from storm.store import Store
 import transaction
 
-from storm.store import Store
-
 from lp.code.model.sourcepackagerecipe import SourcePackageRecipe
 from lp.code.windmill.testing import CodeWindmillLayer
 from lp.testing import WindmillTestCase

=== modified file 'lib/lp/code/windmill/tests/test_recipe_request_build.py'
--- lib/lp/code/windmill/tests/test_recipe_request_build.py	2011-03-29 05:59:29 +0000
+++ lib/lp/code/windmill/tests/test_recipe_request_build.py	2011-12-20 00:00:32 +0000
@@ -10,15 +10,18 @@
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy
 
-from lp.testing.windmill.constants import (
-    FOR_ELEMENT,
-    SLEEP,
-    )
 from lp.app.browser.tales import PPAFormatterAPI
 from lp.code.windmill.testing import CodeWindmillLayer
 from lp.registry.interfaces.distribution import IDistributionSet
 from lp.soyuz.model.processor import ProcessorFamily
-from lp.testing import WindmillTestCase, quote_jquery_expression
+from lp.testing import (
+    quote_jquery_expression,
+    WindmillTestCase,
+    )
+from lp.testing.windmill.constants import (
+    FOR_ELEMENT,
+    SLEEP,
+    )
 
 
 class TestRecipeBuild(WindmillTestCase):

=== modified file 'lib/lp/code/xmlrpc/codehosting.py'
--- lib/lp/code/xmlrpc/codehosting.py	2011-08-11 21:24:28 +0000
+++ lib/lp/code/xmlrpc/codehosting.py	2011-12-20 00:00:32 +0000
@@ -42,8 +42,8 @@
     NoLinkedBranch,
     UnknownBranchTypeError,
     )
+from lp.code.interfaces import branchpuller
 from lp.code.interfaces.branch import get_db_branch_info
-from lp.code.interfaces import branchpuller
 from lp.code.interfaces.branchlookup import (
     IBranchLookup,
     ILinkedBranchTraverser,

=== modified file 'lib/lp/code/xmlrpc/tests/test_branch.py'
--- lib/lp/code/xmlrpc/tests/test_branch.py	2011-08-29 07:55:48 +0000
+++ lib/lp/code/xmlrpc/tests/test_branch.py	2011-12-20 00:00:32 +0000
@@ -19,7 +19,10 @@
 from lp.code.interfaces.linkedbranch import ICanHasLinkedBranch
 from lp.code.xmlrpc.branch import PublicCodehostingAPI
 from lp.services.xmlrpc import LaunchpadFault
-from lp.testing import person_logged_in, TestCaseWithFactory
+from lp.testing import (
+    person_logged_in,
+    TestCaseWithFactory,
+    )
 
 
 NON_ASCII_NAME = u'nam\N{LATIN SMALL LETTER E WITH ACUTE}'

=== modified file 'lib/lp/codehosting/codeimport/tests/test_workermonitor.py'
--- lib/lp/codehosting/codeimport/tests/test_workermonitor.py	2011-12-16 04:39:41 +0000
+++ lib/lp/codehosting/codeimport/tests/test_workermonitor.py	2011-12-20 00:00:32 +0000
@@ -34,8 +34,8 @@
 from zope.component import getUtility
 
 from canonical.config import config
+from canonical.launchpad.webapp import errorlog
 from canonical.launchpad.xmlrpc.faults import NoSuchCodeImportJob
-from canonical.launchpad.webapp import errorlog
 from canonical.testing.layers import (
     LaunchpadZopelessLayer,
     ZopelessAppServerLayer,

=== modified file 'lib/lp/codehosting/codeimport/uifactory.py'
--- lib/lp/codehosting/codeimport/uifactory.py	2011-09-05 23:17:11 +0000
+++ lib/lp/codehosting/codeimport/uifactory.py	2011-12-20 00:00:32 +0000
@@ -11,9 +11,7 @@
 import time
 
 from bzrlib.ui import NoninteractiveUIFactory
-from bzrlib.ui.text import (
-    TextProgressView,
-    )
+from bzrlib.ui.text import TextProgressView
 
 
 class LoggingUIFactory(NoninteractiveUIFactory):

=== modified file 'lib/lp/codehosting/inmemory.py'
--- lib/lp/codehosting/inmemory.py	2011-12-08 22:41:00 +0000
+++ lib/lp/codehosting/inmemory.py	2011-12-20 00:00:32 +0000
@@ -25,9 +25,7 @@
 
 from canonical.database.constants import UTC_NOW
 from canonical.launchpad.xmlrpc import faults
-from lp.app.validators import (
-    LaunchpadValidationError,
-    )
+from lp.app.validators import LaunchpadValidationError
 from lp.app.validators.name import valid_name
 from lp.code.bzr import (
     BranchFormat,

=== modified file 'lib/lp/codehosting/puller/tests/__init__.py'
--- lib/lp/codehosting/puller/tests/__init__.py	2011-10-28 02:51:42 +0000
+++ lib/lp/codehosting/puller/tests/__init__.py	2011-12-20 00:00:32 +0000
@@ -12,8 +12,8 @@
 
 from bzrlib import urlutils
 from bzrlib.tests import TestCaseWithTransport
-from bzrlib.tests.http_server import HttpServer
 from bzrlib.tests.http_server import (
+    HttpServer,
     TestingHTTPServer,
     TestingThreadingHTTPServer,
     )
@@ -25,8 +25,8 @@
     PullerWorker,
     PullerWorkerProtocol,
     )
+from lp.codehosting.safe_open import AcceptAnythingPolicy
 from lp.codehosting.tests.helpers import LoomTestMixin
-from lp.codehosting.safe_open import AcceptAnythingPolicy
 from lp.codehosting.vfs import branch_id_to_path
 from lp.testing import TestCaseWithFactory
 

=== modified file 'lib/lp/codehosting/puller/tests/test_acceptance.py'
--- lib/lp/codehosting/puller/tests/test_acceptance.py	2011-12-09 14:45:21 +0000
+++ lib/lp/codehosting/puller/tests/test_acceptance.py	2011-12-20 00:00:32 +0000
@@ -7,7 +7,6 @@
 __all__ = []
 
 
-from fixtures import TempDir
 import os
 from subprocess import (
     PIPE,
@@ -23,6 +22,7 @@
     local_path_from_url,
     )
 from bzrlib.workingtree import WorkingTree
+from fixtures import TempDir
 import transaction
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy

=== modified file 'lib/lp/codehosting/puller/worker.py'
--- lib/lp/codehosting/puller/worker.py	2011-12-15 10:09:59 +0000
+++ lib/lp/codehosting/puller/worker.py	2011-12-20 00:00:32 +0000
@@ -9,6 +9,8 @@
 import urllib2
 
 import lp.codehosting  # Needed to load bzr plugins.
+
+
 lp  # squelch lint.sh
 
 from bzrlib import (

=== modified file 'lib/lp/codehosting/safe_open.py'
--- lib/lp/codehosting/safe_open.py	2011-12-15 10:09:59 +0000
+++ lib/lp/codehosting/safe_open.py	2011-12-20 00:00:32 +0000
@@ -8,8 +8,8 @@
 import threading
 
 from bzrlib import (
+    errors,
     trace,
-    errors,
     urlutils,
     )
 from bzrlib.branch import Branch
@@ -17,11 +17,11 @@
     BzrProber,
     RemoteBzrProber,
     )
-from lazr.uri import URI
 from bzrlib.transport import (
     do_catching_redirections,
     get_transport,
     )
+from lazr.uri import URI
 
 
 __all__ = [

=== modified file 'lib/lp/codehosting/scanner/bzrsync.py'
--- lib/lp/codehosting/scanner/bzrsync.py	2011-12-16 04:39:41 +0000
+++ lib/lp/codehosting/scanner/bzrsync.py	2011-12-20 00:00:32 +0000
@@ -19,16 +19,15 @@
 from bzrlib.graph import DictParentsProvider
 from bzrlib.revision import NULL_REVISION
 import pytz
+from storm.locals import Store
 import transaction
-from storm.locals import Store
 from zope.component import getUtility
 from zope.event import notify
 
 from canonical.config import config
-
 from lp.code.interfaces.branchjob import IRosettaUploadJobSource
 from lp.code.interfaces.revision import IRevisionSet
-from lp.code.model.branchrevision import (BranchRevision)
+from lp.code.model.branchrevision import BranchRevision
 from lp.code.model.revision import Revision
 from lp.codehosting.scanner import events
 from lp.services.utils import iter_list_chunks

=== modified file 'lib/lp/codehosting/sshserver/session.py'
--- lib/lp/codehosting/sshserver/session.py	2011-12-12 14:12:42 +0000
+++ lib/lp/codehosting/sshserver/session.py	2011-12-20 00:00:32 +0000
@@ -14,15 +14,14 @@
 import sys
 import urlparse
 
-from zope.event import notify
-from zope.interface import implements
-
 from twisted.internet import (
     error,
     interfaces,
     process,
     )
 from twisted.python import log
+from zope.event import notify
+from zope.interface import implements
 
 from canonical.config import config
 from lp.codehosting import get_bzr_path

=== modified file 'lib/lp/codehosting/sshserver/tests/test_session.py'
--- lib/lp/codehosting/sshserver/tests/test_session.py	2011-12-12 00:33:22 +0000
+++ lib/lp/codehosting/sshserver/tests/test_session.py	2011-12-20 00:00:32 +0000
@@ -19,12 +19,12 @@
     )
 from lp.codehosting.sshserver.daemon import CodehostingAvatar
 from lp.codehosting.sshserver.session import (
+    _WaitForExit,
     ExecOnlySession,
     ForbiddenCommand,
     ForkingRestrictedExecOnlySession,
+    lookup_command_template,
     RestrictedExecOnlySession,
-    _WaitForExit,
-    lookup_command_template,
     )
 from lp.codehosting.tests.helpers import AvatarTestCase
 from lp.testing import TestCase

=== modified file 'lib/lp/codehosting/tests/helpers.py'
--- lib/lp/codehosting/tests/helpers.py	2010-10-30 23:27:50 +0000
+++ lib/lp/codehosting/tests/helpers.py	2011-12-20 00:00:32 +0000
@@ -26,11 +26,7 @@
     TestNotApplicable,
     TestSkipped,
     )
-
-from testtools.deferredruntest import (
-    AsynchronousDeferredRunTest,
-    )
-
+from testtools.deferredruntest import AsynchronousDeferredRunTest
 from twisted.internet import (
     defer,
     threads,

=== modified file 'lib/lp/codehosting/tests/test_lpserve.py'
--- lib/lp/codehosting/tests/test_lpserve.py	2011-10-27 05:40:56 +0000
+++ lib/lp/codehosting/tests/test_lpserve.py	2011-12-20 00:00:32 +0000
@@ -5,12 +5,10 @@
 
 __metaclass__ = type
 
-from bzrlib import (
-    errors,
-    )
+from bzrlib import errors
+from bzrlib.plugins.lpserve.test_lpserve import TestCaseWithSubprocess
 from bzrlib.smart import medium
 from bzrlib.transport import remote
-from bzrlib.plugins.lpserve.test_lpserve import TestCaseWithSubprocess
 
 from canonical.testing.layers import LaunchpadLayer
 from lp.testing.fixture import CaptureOops

=== modified file 'lib/lp/codehosting/tests/test_sftp.py'
--- lib/lp/codehosting/tests/test_sftp.py	2010-10-30 22:47:37 +0000
+++ lib/lp/codehosting/tests/test_sftp.py	2011-12-20 00:00:32 +0000
@@ -13,12 +13,10 @@
 from bzrlib.tests import TestCaseInTempDir
 from bzrlib.transport import get_transport
 from bzrlib.transport.memory import MemoryTransport
-
 from testtools.deferredruntest import (
     assert_fails_with,
     AsynchronousDeferredRunTest,
     )
-
 from twisted.conch.interfaces import ISFTPServer
 from twisted.conch.ls import lsLine
 from twisted.conch.ssh import filetransfer

=== modified file 'lib/lp/codehosting/vfs/__init__.py'
--- lib/lp/codehosting/vfs/__init__.py	2011-08-06 17:37:47 +0000
+++ lib/lp/codehosting/vfs/__init__.py	2011-12-20 00:00:32 +0000
@@ -21,8 +21,6 @@
     get_rw_server,
     LaunchpadServer,
     )
-from lp.codehosting.vfs.branchfsclient import (
-    BranchFileSystemClient,
-    )
+from lp.codehosting.vfs.branchfsclient import BranchFileSystemClient
 
 

=== modified file 'lib/lp/codehosting/vfs/branchfs.py'
--- lib/lp/codehosting/vfs/branchfs.py	2011-08-16 20:38:35 +0000
+++ lib/lp/codehosting/vfs/branchfs.py	2011-12-20 00:00:32 +0000
@@ -100,9 +100,7 @@
     get_branch_info,
     get_stacked_on_url,
     )
-from lp.codehosting.vfs.branchfsclient import (
-    BranchFileSystemClient,
-    )
+from lp.codehosting.vfs.branchfsclient import BranchFileSystemClient
 from lp.codehosting.vfs.transport import (
     AsyncVirtualServer,
     AsyncVirtualTransport,
@@ -116,7 +114,6 @@
     trap_fault,
     )
 
-
 # The directories allowed directly beneath a branch directory. These are the
 # directories that Bazaar creates as part of regular operation. We support
 # only two numbered backups to avoid indefinite space usage.

=== modified file 'lib/lp/codehosting/vfs/tests/test_branchfs.py'
--- lib/lp/codehosting/vfs/tests/test_branchfs.py	2011-10-28 02:51:42 +0000
+++ lib/lp/codehosting/vfs/tests/test_branchfs.py	2011-12-20 00:00:32 +0000
@@ -10,9 +10,9 @@
 import codecs
 import os
 import re
+from StringIO import StringIO
 import sys
 import xmlrpclib
-from StringIO import StringIO
 
 from bzrlib import errors
 from bzrlib.bzrdir import (
@@ -40,18 +40,14 @@
     escape,
     local_path_to_url,
     )
-
 from testtools.deferredruntest import (
     assert_fails_with,
     AsynchronousDeferredRunTest,
     )
-
 from twisted.internet import defer
 
 from canonical.launchpad.webapp import errorlog
-from canonical.testing.layers import (
-    ZopelessDatabaseLayer,
-    )
+from canonical.testing.layers import ZopelessDatabaseLayer
 from lp.code.enums import BranchType
 from lp.code.interfaces.codehosting import (
     branch_id_alias,

=== modified file 'lib/lp/codehosting/vfs/tests/test_branchfsclient.py'
--- lib/lp/codehosting/vfs/tests/test_branchfsclient.py	2010-10-30 22:53:08 +0000
+++ lib/lp/codehosting/vfs/tests/test_branchfsclient.py	2011-12-20 00:00:32 +0000
@@ -7,9 +7,7 @@
 
 __metaclass__ = type
 
-from testtools.deferredruntest import (
-    AsynchronousDeferredRunTest,
-    )
+from testtools.deferredruntest import AsynchronousDeferredRunTest
 
 from lp.code.interfaces.codehosting import BRANCH_TRANSPORT
 from lp.codehosting.inmemory import (

=== modified file 'lib/lp/hardwaredb/interfaces/webservice.py'
--- lib/lp/hardwaredb/interfaces/webservice.py	2010-11-09 16:25:22 +0000
+++ lib/lp/hardwaredb/interfaces/webservice.py	2011-12-20 00:00:32 +0000
@@ -23,6 +23,9 @@
     'ParameterError',
     ]
 
+# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
+# import bugs.  Break this up into a per-package thing.
+from canonical.launchpad.interfaces import _schema_circular_imports
 from lp.hardwaredb.interfaces.hwdb import (
     IHWDBApplication,
     IHWDevice,
@@ -36,7 +39,6 @@
     IllegalQuery,
     ParameterError,
     )
-# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
-# import bugs.  Break this up into a per-package thing.
-from canonical.launchpad.interfaces import _schema_circular_imports
+
+
 _schema_circular_imports

=== modified file 'lib/lp/hardwaredb/scripts/hwdbsubmissions.py'
--- lib/lp/hardwaredb/scripts/hwdbsubmissions.py	2011-12-19 13:55:28 +0000
+++ lib/lp/hardwaredb/scripts/hwdbsubmissions.py	2011-12-20 00:00:32 +0000
@@ -17,25 +17,31 @@
 
 import bz2
 from cStringIO import StringIO
-
-import xml.etree.cElementTree as etree
-from datetime import datetime, timedelta
+from datetime import (
+    datetime,
+    timedelta,
+    )
 from logging import getLogger
 import os
 import re
 import sys
+import xml.etree.cElementTree as etree
 
 import pytz
-
 from zope.component import getUtility
 from zope.interface import implements
 from zope.security.proxy import removeSecurityProxy
 
+from canonical.config import config
+from canonical.launchpad.interfaces.looptuner import ITunableLoop
+from canonical.launchpad.utilities.looptuner import LoopTuner
+from canonical.launchpad.webapp.errorlog import (
+    ErrorReportingUtility,
+    ScriptRequest,
+    )
 from canonical.lazr.xml import RelaxNGValidator
-
-from lp.services.propertycache import cachedproperty
-from canonical.config import config
 from canonical.librarian.interfaces import LibrarianServerError
+from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.hardwaredb.interfaces.hwdb import (
     HWBus,
     HWSubmissionProcessingStatus,
@@ -48,15 +54,10 @@
     IHWVendorNameSet,
     )
 from lp.hardwaredb.model.hwdb import HWSubmission
-from lp.app.interfaces.launchpad import ILaunchpadCelebrities
-from canonical.launchpad.interfaces.looptuner import ITunableLoop
-from canonical.launchpad.utilities.looptuner import LoopTuner
-from canonical.launchpad.webapp.errorlog import (
-    ErrorReportingUtility,
-    ScriptRequest,
-    )
+from lp.services.propertycache import cachedproperty
 from lp.services.scripts.base import disable_oops_handler
 
+
 _relax_ng_files = {
     '1.0': 'hardware-1_0.rng', }
 

=== modified file 'lib/lp/hardwaredb/scripts/tests/test_hwdb_submission_parser.py'
--- lib/lp/hardwaredb/scripts/tests/test_hwdb_submission_parser.py	2011-12-19 13:55:28 +0000
+++ lib/lp/hardwaredb/scripts/tests/test_hwdb_submission_parser.py	2011-12-20 00:00:32 +0000
@@ -4,24 +4,25 @@
 """Tests of the HWDB submissions parser."""
 
 from cStringIO import StringIO
-
-
-import xml.etree.cElementTree as etree
 from datetime import datetime
 import logging
 import os
 from textwrap import dedent
+import xml.etree.cElementTree as etree
 
 import pytz
-
 from zope.testing.loghandler import Handler
 
 from canonical.config import config
-from lp.hardwaredb.scripts.hwdbsubmissions import (SubmissionParser,
-    ROOT_UDI)
 from canonical.testing.layers import BaseLayer
-
-from lp.testing import TestCase, validate_mock_class
+from lp.hardwaredb.scripts.hwdbsubmissions import (
+    ROOT_UDI,
+    SubmissionParser,
+    )
+from lp.testing import (
+    TestCase,
+    validate_mock_class,
+    )
 
 
 class SubmissionParserTestParseSoftware(SubmissionParser):

=== modified file 'lib/lp/hardwaredb/scripts/tests/test_hwdbsubmissions.py'
--- lib/lp/hardwaredb/scripts/tests/test_hwdbsubmissions.py	2011-09-13 16:39:36 +0000
+++ lib/lp/hardwaredb/scripts/tests/test_hwdbsubmissions.py	2011-12-20 00:00:32 +0000
@@ -5,8 +5,10 @@
 
 __metaclass__ = type
 
+from tempfile import mktemp
+
 from storm.store import Store
-from tempfile import mktemp
+import transaction
 
 from canonical.launchpad.ftests.script import run_script
 from canonical.testing.layers import LaunchpadScriptLayer
@@ -17,7 +19,6 @@
     )
 from lp.testing import TestCaseWithFactory
 from lp.testing.matchers import Contains
-import transaction
 
 
 class TestProcessingLoops(TestCaseWithFactory):

=== modified file 'lib/lp/poppy/tests/test_poppy.py'
--- lib/lp/poppy/tests/test_poppy.py	2011-10-19 12:12:20 +0000
+++ lib/lp/poppy/tests/test_poppy.py	2011-12-20 00:00:32 +0000
@@ -33,10 +33,8 @@
     ZopelessAppServerLayer,
     ZopelessDatabaseLayer,
     )
-from lp.registry.interfaces.ssh import (
-    ISSHKeySet,
-    )
 from lp.poppy.hooks import Hooks
+from lp.registry.interfaces.ssh import ISSHKeySet
 from lp.testing import TestCaseWithFactory
 from lp.testing.keyserver import KeyServerTac
 

=== modified file 'lib/lp/registry/adapters.py'
--- lib/lp/registry/adapters.py	2011-09-14 23:03:52 +0000
+++ lib/lp/registry/adapters.py	2011-12-20 00:00:32 +0000
@@ -18,9 +18,7 @@
 from zope.interface import implements
 
 from canonical.launchpad.webapp.interfaces import ILaunchpadPrincipal
-from lp.archivepublisher.interfaces.publisherconfig import (
-    IPublisherConfigSet,
-    )
+from lp.archivepublisher.interfaces.publisherconfig import IPublisherConfigSet
 from lp.registry.interfaces.poll import (
     IPollSet,
     IPollSubset,

=== modified file 'lib/lp/registry/browser/distribution.py'
--- lib/lp/registry/browser/distribution.py	2011-12-18 14:29:19 +0000
+++ lib/lp/registry/browser/distribution.py	2011-12-20 00:00:32 +0000
@@ -41,6 +41,7 @@
 from collections import defaultdict
 import datetime
 
+from lazr.restful.utils import smartquote
 from zope.app.form.browser.boolwidgets import CheckBoxWidget
 from zope.component import getUtility
 from zope.event import notify
@@ -50,12 +51,7 @@
 from zope.schema import Bool
 from zope.security.interfaces import Unauthorized
 
-from lazr.restful.utils import smartquote
-
 from canonical.launchpad.browser.feeds import FeedsMixin
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.helpers import english_list
 from canonical.launchpad.webapp import (
     ApplicationMenu,
@@ -123,6 +119,7 @@
     MirrorSpeed,
     )
 from lp.registry.interfaces.series import SeriesStatus
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.geoip.helpers import (
     ipaddress_from_request,
     request_country,

=== modified file 'lib/lp/registry/browser/distributionsourcepackage.py'
--- lib/lp/registry/browser/distributionsourcepackage.py	2011-09-18 18:54:12 +0000
+++ lib/lp/registry/browser/distributionsourcepackage.py	2011-12-20 00:00:32 +0000
@@ -58,11 +58,11 @@
     QuestionTargetTraversalMixin,
     )
 from lp.answers.enums import QuestionStatus
-from lp.app.browser.tales import CustomizableFormatter
 from lp.app.browser.stringformatter import (
     extract_bug_numbers,
     extract_email_addresses,
     )
+from lp.app.browser.tales import CustomizableFormatter
 from lp.app.enums import ServiceUsage
 from lp.app.interfaces.launchpad import IServiceUsage
 from lp.bugs.browser.bugtask import BugTargetTraversalMixin

=== modified file 'lib/lp/registry/browser/milestone.py'
--- lib/lp/registry/browser/milestone.py	2011-12-14 17:15:35 +0000
+++ lib/lp/registry/browser/milestone.py	2011-12-20 00:00:32 +0000
@@ -62,10 +62,10 @@
     )
 from lp.bugs.interfaces.bugtask import IBugTaskSet
 from lp.registry.browser import (
+    add_subscribe_link,
     get_status_counts,
     RegistryDeleteViewMixin,
     )
-from lp.registry.browser import add_subscribe_link
 from lp.registry.browser.product import ProductDownloadFileMixin
 from lp.registry.interfaces.distroseries import IDistroSeries
 from lp.registry.interfaces.milestone import (

=== modified file 'lib/lp/registry/browser/peoplemerge.py'
--- lib/lp/registry/browser/peoplemerge.py	2011-12-18 13:45:20 +0000
+++ lib/lp/registry/browser/peoplemerge.py	2011-12-20 00:00:32 +0000
@@ -20,10 +20,6 @@
 
 from canonical.launchpad import _
 from canonical.launchpad.interfaces.authtoken import LoginTokenType
-from lp.services.identity.interfaces.emailaddress import (
-    EmailAddressStatus,
-    IEmailAddressSet,
-    )
 from canonical.launchpad.interfaces.logintoken import ILoginTokenSet
 from canonical.launchpad.interfaces.lpstorm import IMasterObject
 from canonical.launchpad.webapp import (
@@ -46,6 +42,10 @@
     IPersonSet,
     IRequestPeopleMerge,
     )
+from lp.services.identity.interfaces.emailaddress import (
+    EmailAddressStatus,
+    IEmailAddressSet,
+    )
 from lp.services.propertycache import cachedproperty
 from lp.soyuz.enums import ArchiveStatus
 from lp.soyuz.interfaces.archive import IArchiveSet

=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py	2011-12-18 23:42:00 +0000
+++ lib/lp/registry/browser/person.py	2011-12-20 00:00:32 +0000
@@ -133,16 +133,7 @@
     helpers,
     )
 from canonical.launchpad.browser.feeds import FeedsMixin
-from lp.services.identity.interfaces.account import (
-    AccountStatus,
-    IAccount,
-    )
 from canonical.launchpad.interfaces.authtoken import LoginTokenType
-from lp.services.identity.interfaces.emailaddress import (
-    EmailAddressStatus,
-    IEmailAddress,
-    IEmailAddressSet,
-    )
 from canonical.launchpad.interfaces.launchpad import (
     INotificationRecipientSet,
     UnknownRecipientError,
@@ -267,6 +258,15 @@
     GPGKeyNotFoundError,
     IGPGHandler,
     )
+from lp.services.identity.interfaces.account import (
+    AccountStatus,
+    IAccount,
+    )
+from lp.services.identity.interfaces.emailaddress import (
+    EmailAddressStatus,
+    IEmailAddress,
+    IEmailAddressSet,
+    )
 from lp.services.messages.interfaces.message import (
     IDirectEmailAuthorization,
     QuotaReachedError,

=== modified file 'lib/lp/registry/browser/product.py'
--- lib/lp/registry/browser/product.py	2011-12-19 20:08:42 +0000
+++ lib/lp/registry/browser/product.py	2011-12-20 00:00:32 +0000
@@ -84,13 +84,6 @@
     helpers,
     )
 from canonical.launchpad.browser.feeds import FeedsMixin
-from lp.app.browser.multistep import (
-    MultiStepView,
-    StepView,
-    )
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
 from canonical.launchpad.webapp import (
     ApplicationMenu,
@@ -131,6 +124,10 @@
     InlinePersonEditPickerWidget,
     TextLineEditorWidget,
     )
+from lp.app.browser.multistep import (
+    MultiStepView,
+    StepView,
+    )
 from lp.app.browser.stringformatter import FormattersAPI
 from lp.app.browser.tales import (
     format_link,
@@ -197,6 +194,7 @@
 from lp.registry.interfaces.productseries import IProductSeries
 from lp.registry.interfaces.series import SeriesStatus
 from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.fields import (
     PillarAliases,
     PublicPersonChoice,

=== modified file 'lib/lp/registry/browser/project.py'
--- lib/lp/registry/browser/project.py	2011-12-09 19:01:07 +0000
+++ lib/lp/registry/browser/project.py	2011-12-20 00:00:32 +0000
@@ -76,6 +76,11 @@
 from lp.blueprints.browser.specificationtarget import (
     HasSpecificationsMenuMixin,
     )
+from lp.bugs.browser.structuralsubscription import (
+    expose_structural_subscription_data_to_js,
+    StructuralSubscriptionMenuMixin,
+    StructuralSubscriptionTargetTraversalMixin,
+    )
 from lp.registry.browser import (
     add_subscribe_link,
     BaseRdfView,
@@ -92,11 +97,6 @@
     ProjectAddStepOne,
     ProjectAddStepTwo,
     )
-from lp.bugs.browser.structuralsubscription import (
-    expose_structural_subscription_data_to_js,
-    StructuralSubscriptionMenuMixin,
-    StructuralSubscriptionTargetTraversalMixin,
-    )
 from lp.registry.interfaces.product import IProductSet
 from lp.registry.interfaces.projectgroup import (
     IProjectGroup,

=== modified file 'lib/lp/registry/browser/sourcepackage.py'
--- lib/lp/registry/browser/sourcepackage.py	2011-12-18 14:17:16 +0000
+++ lib/lp/registry/browser/sourcepackage.py	2011-12-20 00:00:32 +0000
@@ -59,10 +59,6 @@
     _,
     helpers,
     )
-from lp.app.browser.multistep import (
-    MultiStepView,
-    StepView,
-    )
 from canonical.launchpad.webapp import (
     ApplicationMenu,
     canonical_url,
@@ -81,6 +77,10 @@
     LaunchpadFormView,
     ReturnToReferrerMixin,
     )
+from lp.app.browser.multistep import (
+    MultiStepView,
+    StepView,
+    )
 from lp.app.browser.tales import CustomizableFormatter
 from lp.app.enums import ServiceUsage
 from lp.app.widgets.itemswidgets import LaunchpadRadioWidget

=== modified file 'lib/lp/registry/browser/team.py'
--- lib/lp/registry/browser/team.py	2011-12-18 23:42:00 +0000
+++ lib/lp/registry/browser/team.py	2011-12-20 00:00:32 +0000
@@ -42,8 +42,8 @@
 import math
 from urllib import unquote
 
+from lazr.restful.utils import smartquote
 import pytz
-from lazr.restful.utils import smartquote
 from z3c.ptcompat import ViewPageTemplateFile
 from zope.app.form.browser import TextAreaWidget
 from zope.component import getUtility
@@ -55,7 +55,6 @@
     Interface,
     )
 from zope.publisher.interfaces.browser import IBrowserPublisher
-from zope.security.interfaces import Unauthorized
 from zope.schema import (
     Bool,
     Choice,
@@ -67,13 +66,12 @@
     SimpleTerm,
     SimpleVocabulary,
     )
+from zope.security.interfaces import Unauthorized
 
 from canonical.config import config
 from canonical.launchpad import _
 from canonical.launchpad.interfaces.authtoken import LoginTokenType
-from lp.services.identity.interfaces.emailaddress import IEmailAddressSet
 from canonical.launchpad.interfaces.logintoken import ILoginTokenSet
-from lp.app.validators.validation import validate_new_team_email
 from canonical.launchpad.webapp import (
     ApplicationMenu,
     canonical_url,
@@ -89,14 +87,14 @@
     )
 from canonical.launchpad.webapp.batching import (
     ActiveBatchNavigator,
+    BatchNavigator,
     InactiveBatchNavigator,
     )
 from canonical.launchpad.webapp.breadcrumb import Breadcrumb
-from lp.app.browser.badge import HasBadgeBase
-from canonical.launchpad.webapp.batching import BatchNavigator
 from canonical.launchpad.webapp.interfaces import ILaunchBag
 from canonical.launchpad.webapp.menu import structured
 from canonical.lazr.interfaces import IObjectPrivacy
+from lp.app.browser.badge import HasBadgeBase
 from lp.app.browser.launchpadform import (
     action,
     custom_widget,
@@ -105,6 +103,7 @@
 from lp.app.browser.tales import PersonFormatterAPI
 from lp.app.errors import UnexpectedFormData
 from lp.app.validators import LaunchpadValidationError
+from lp.app.validators.validation import validate_new_team_email
 from lp.app.widgets.itemswidgets import (
     LabeledMultiCheckBoxWidget,
     LaunchpadRadioWidget,
@@ -123,11 +122,11 @@
     PersonRenameFormMixin,
     PPANavigationMenuMixIn,
     )
-from lp.registry.errors import TeamSubscriptionPolicyError
 from lp.registry.browser.teamjoin import (
     TeamJoinMixin,
     userIsActiveTeamMember,
     )
+from lp.registry.errors import TeamSubscriptionPolicyError
 from lp.registry.interfaces.mailinglist import (
     IMailingList,
     IMailingListSet,
@@ -143,9 +142,9 @@
     ImmutableVisibilityError,
     IPersonSet,
     ITeam,
-    ITeamReassignment,
     ITeamContactAddressForm,
     ITeamCreation,
+    ITeamReassignment,
     OPEN_TEAM_POLICY,
     PersonVisibility,
     PRIVATE_TEAM_PREFIX,
@@ -162,6 +161,7 @@
     TeamMembershipStatus,
     )
 from lp.services.fields import PublicPersonChoice
+from lp.services.identity.interfaces.emailaddress import IEmailAddressSet
 from lp.services.propertycache import cachedproperty
 
 

=== modified file 'lib/lp/registry/browser/tests/test_person_view.py'
--- lib/lp/registry/browser/tests/test_person_view.py	2011-12-18 13:45:20 +0000
+++ lib/lp/registry/browser/tests/test_person_view.py	2011-12-20 00:00:32 +0000
@@ -14,7 +14,6 @@
     LessThan,
     Not,
     )
-
 import transaction
 from zope.component import getUtility
 
@@ -23,7 +22,6 @@
     ANONYMOUS,
     login,
     )
-from lp.services.identity.interfaces.account import AccountStatus
 from canonical.launchpad.interfaces.authtoken import LoginTokenType
 from canonical.launchpad.interfaces.logintoken import ILoginTokenSet
 from canonical.launchpad.testing.pages import (
@@ -62,6 +60,7 @@
 from lp.registry.model.karma import KarmaCategory
 from lp.registry.model.milestone import milestone_sort_key
 from lp.registry.model.person import Person
+from lp.services.identity.interfaces.account import AccountStatus
 from lp.soyuz.enums import (
     ArchivePurpose,
     ArchiveStatus,

=== modified file 'lib/lp/registry/browser/tests/test_poll.py'
--- lib/lp/registry/browser/tests/test_poll.py	2011-01-05 19:18:57 +0000
+++ lib/lp/registry/browser/tests/test_poll.py	2011-12-20 00:00:32 +0000
@@ -6,6 +6,7 @@
 __metaclass__ = type
 
 import os
+
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.registry.interfaces.poll import PollAlgorithm
 from lp.testing import TestCaseWithFactory

=== modified file 'lib/lp/registry/browser/tests/test_product.py'
--- lib/lp/registry/browser/tests/test_product.py	2011-12-01 02:22:36 +0000
+++ lib/lp/registry/browser/tests/test_product.py	2011-12-20 00:00:32 +0000
@@ -18,8 +18,8 @@
 from lp.app.enums import ServiceUsage
 from lp.registry.browser.product import ProductLicenseMixin
 from lp.registry.interfaces.product import (
+    IProductSet,
     License,
-    IProductSet,
     )
 from lp.testing import (
     login_celebrity,
@@ -27,9 +27,7 @@
     person_logged_in,
     TestCaseWithFactory,
     )
-from lp.testing.fixture import (
-    DemoMode,
-    )
+from lp.testing.fixture import DemoMode
 from lp.testing.mail_helpers import pop_notifications
 from lp.testing.service_usage_helpers import set_service_usage
 from lp.testing.views import (

=== modified file 'lib/lp/registry/browser/tests/test_projectgroup.py'
--- lib/lp/registry/browser/tests/test_projectgroup.py	2011-01-04 15:20:04 +0000
+++ lib/lp/registry/browser/tests/test_projectgroup.py	2011-12-20 00:00:32 +0000
@@ -5,9 +5,10 @@
 
 __metaclass__ = type
 
+from testtools.matchers import Not
 from zope.component import getUtility
 from zope.security.interfaces import Unauthorized
-from testtools.matchers import Not
+
 from canonical.launchpad.webapp import canonical_url
 from canonical.launchpad.webapp.interfaces import ILaunchBag
 from canonical.testing.layers import DatabaseFunctionalLayer

=== modified file 'lib/lp/registry/browser/tests/test_rdf.py'
--- lib/lp/registry/browser/tests/test_rdf.py	2010-09-28 13:28:55 +0000
+++ lib/lp/registry/browser/tests/test_rdf.py	2011-12-20 00:00:32 +0000
@@ -6,6 +6,7 @@
 __metaclass__ = type
 
 from zope.component import getUtility
+
 from canonical.launchpad.webapp.interfaces import (
     ILaunchpadApplication,
     ILaunchpadRoot,

=== modified file 'lib/lp/registry/browser/tests/test_subscription_links.py'
--- lib/lp/registry/browser/tests/test_subscription_links.py	2011-12-06 04:16:13 +0000
+++ lib/lp/registry/browser/tests/test_subscription_links.py	2011-12-20 00:00:32 +0000
@@ -7,31 +7,29 @@
 
 import re
 import unittest
+
+from BeautifulSoup import BeautifulSoup
 from zope.component import getUtility
-from BeautifulSoup import BeautifulSoup
 
+from canonical.launchpad.testing.pages import first_tag_by_class
 from canonical.launchpad.webapp.interaction import ANONYMOUS
 from canonical.launchpad.webapp.interfaces import ILaunchBag
 from canonical.launchpad.webapp.publisher import canonical_url
-from canonical.launchpad.testing.pages import first_tag_by_class
 from canonical.testing.layers import DatabaseFunctionalLayer
-
 from lp.bugs.browser.structuralsubscription import (
     StructuralSubscriptionMenuMixin,
     )
 from lp.registry.interfaces.person import IPersonSet
 from lp.registry.model.milestone import ProjectMilestone
 from lp.testing import (
+    BrowserTestCase,
     celebrity_logged_in,
     extract_lp_cache,
     person_logged_in,
-    BrowserTestCase,
     TestCaseWithFactory,
     )
 from lp.testing.sampledata import ADMIN_EMAIL
-from lp.testing.views import (
-    create_initialized_view,
-    )
+from lp.testing.views import create_initialized_view
 
 
 class _TestResultsMixin:

=== modified file 'lib/lp/registry/browser/tests/test_team.py'
--- lib/lp/registry/browser/tests/test_team.py	2011-12-16 19:22:57 +0000
+++ lib/lp/registry/browser/tests/test_team.py	2011-12-20 00:00:32 +0000
@@ -21,8 +21,8 @@
     )
 from lp.testing import (
     login_person,
+    person_logged_in,
     TestCaseWithFactory,
-    person_logged_in,
     )
 from lp.testing.matchers import IsConfiguredBatchNavigator
 from lp.testing.menu import check_menu_links

=== modified file 'lib/lp/registry/browser/tests/test_teammembership.py'
--- lib/lp/registry/browser/tests/test_teammembership.py	2011-01-11 20:45:04 +0000
+++ lib/lp/registry/browser/tests/test_teammembership.py	2011-12-20 00:00:32 +0000
@@ -7,7 +7,6 @@
 from zope.component import getUtility
 
 from canonical.testing.layers import DatabaseFunctionalLayer
-from lp.testing.matchers import HasQueryCount
 from lp.registry.interfaces.teammembership import (
     ITeamMembershipSet,
     TeamMembershipStatus,
@@ -17,6 +16,7 @@
     StormStatementRecorder,
     TestCaseWithFactory,
     )
+from lp.testing.matchers import HasQueryCount
 from lp.testing.views import create_view
 
 

=== modified file 'lib/lp/registry/interfaces/distroseriesdifferencecomment.py'
--- lib/lp/registry/interfaces/distroseriesdifferencecomment.py	2011-07-05 10:47:28 +0000
+++ lib/lp/registry/interfaces/distroseriesdifferencecomment.py	2011-12-20 00:00:32 +0000
@@ -24,10 +24,10 @@
     )
 
 from canonical.launchpad import _
-from lp.services.messages.interfaces.message import IMessage
 from lp.registry.interfaces.distroseriesdifference import (
     IDistroSeriesDifference,
     )
+from lp.services.messages.interfaces.message import IMessage
 
 
 class IDistroSeriesDifferenceComment(Interface):

=== modified file 'lib/lp/registry/interfaces/mailinglist.py'
--- lib/lp/registry/interfaces/mailinglist.py	2011-12-18 13:55:35 +0000
+++ lib/lp/registry/interfaces/mailinglist.py	2011-12-20 00:00:32 +0000
@@ -30,6 +30,7 @@
     DBEnumeratedType,
     DBItem,
     )
+from lazr.lifecycle.interfaces import IObjectCreatedEvent
 from zope.interface import (
     Attribute,
     Interface,
@@ -44,15 +45,13 @@
     TextLine,
     )
 
-from lazr.lifecycle.interfaces import IObjectCreatedEvent
-
 from canonical.launchpad import _
-from lp.services.identity.interfaces.emailaddress import IEmailAddress
 from canonical.launchpad.interfaces.librarian import ILibraryFileAlias
-from lp.services.messages.interfaces.message import IMessage
 from canonical.launchpad.webapp.interfaces import ILaunchpadApplication
 from lp.registry.interfaces.person import IPerson
 from lp.services.fields import PublicPersonChoice
+from lp.services.identity.interfaces.emailaddress import IEmailAddress
+from lp.services.messages.interfaces.message import IMessage
 
 
 class IMailingListApplication(ILaunchpadApplication):

=== modified file 'lib/lp/registry/interfaces/nameblacklist.py'
--- lib/lp/registry/interfaces/nameblacklist.py	2011-01-07 18:26:31 +0000
+++ lib/lp/registry/interfaces/nameblacklist.py	2011-12-20 00:00:32 +0000
@@ -12,8 +12,8 @@
 
 from zope.interface import Interface
 from zope.schema import (
+    Choice,
     Int,
-    Choice,
     Text,
     TextLine,
     )

=== modified file 'lib/lp/registry/interfaces/oopsreferences.py'
--- lib/lp/registry/interfaces/oopsreferences.py	2011-11-11 02:07:17 +0000
+++ lib/lp/registry/interfaces/oopsreferences.py	2011-12-20 00:00:32 +0000
@@ -15,12 +15,8 @@
     operation_for_version,
     operation_parameters,
     )
-from zope.interface import (
-    Interface,
-    )
-from zope.schema import (
-    Datetime
-    )
+from zope.interface import Interface
+from zope.schema import Datetime
 
 from canonical.launchpad import _
 

=== modified file 'lib/lp/registry/interfaces/person.py'
--- lib/lp/registry/interfaces/person.py	2011-12-18 23:42:00 +0000
+++ lib/lp/registry/interfaces/person.py	2011-12-20 00:00:32 +0000
@@ -93,18 +93,12 @@
 
 from canonical.database.sqlbase import block_implicit_flushes
 from canonical.launchpad import _
-from lp.services.identity.interfaces.account import (
-    AccountStatus,
-    IAccount,
-    )
-from lp.services.identity.interfaces.emailaddress import IEmailAddress
 from canonical.launchpad.interfaces.launchpad import (
     IHasIcon,
     IHasLogo,
     IHasMugshot,
     IPrivacy,
     )
-from lp.app.validators.validation import validate_new_team_email
 from canonical.launchpad.webapp.authorization import check_permission
 from canonical.launchpad.webapp.interfaces import ILaunchpadApplication
 from lp.answers.interfaces.questionsperson import IQuestionsPerson
@@ -113,6 +107,7 @@
 from lp.app.validators import LaunchpadValidationError
 from lp.app.validators.email import email_validator
 from lp.app.validators.name import name_validator
+from lp.app.validators.validation import validate_new_team_email
 from lp.blueprints.interfaces.specificationtarget import IHasSpecifications
 from lp.bugs.interfaces.bugtarget import IHasBugs
 from lp.code.interfaces.hasbranches import (
@@ -148,8 +143,8 @@
 from lp.services.fields import (
     BlacklistableContentNameField,
     IconImageUpload,
+    is_public_person,
     is_public_person_or_closed_team,
-    is_public_person,
     LogoImageUpload,
     MugshotImageUpload,
     PasswordField,
@@ -157,6 +152,11 @@
     PublicPersonChoice,
     StrippedTextLine,
     )
+from lp.services.identity.interfaces.account import (
+    AccountStatus,
+    IAccount,
+    )
+from lp.services.identity.interfaces.emailaddress import IEmailAddress
 from lp.services.worlddata.interfaces.language import ILanguage
 from lp.translations.interfaces.hastranslationimports import (
     IHasTranslationImports,

=== modified file 'lib/lp/registry/interfaces/personproduct.py'
--- lib/lp/registry/interfaces/personproduct.py	2011-05-09 19:09:44 +0000
+++ lib/lp/registry/interfaces/personproduct.py	2011-12-20 00:00:32 +0000
@@ -13,9 +13,7 @@
 
 from lazr.restful.fields import Reference
 from zope.interface import Interface
-from zope.schema import (
-    TextLine,
-)
+from zope.schema import TextLine
 
 from lp.code.interfaces.hasbranches import IHasMergeProposals
 from lp.registry.interfaces.person import IPerson

=== modified file 'lib/lp/registry/interfaces/role.py'
--- lib/lp/registry/interfaces/role.py	2011-12-13 17:45:31 +0000
+++ lib/lp/registry/interfaces/role.py	2011-12-20 00:00:32 +0000
@@ -22,6 +22,7 @@
     Bool,
     Choice,
     )
+
 from canonical.launchpad import _
 
 

=== modified file 'lib/lp/registry/interfaces/sourcepackage.py'
--- lib/lp/registry/interfaces/sourcepackage.py	2011-12-16 21:20:46 +0000
+++ lib/lp/registry/interfaces/sourcepackage.py	2011-12-20 00:00:32 +0000
@@ -63,12 +63,12 @@
     IHasOwner,
     )
 from lp.soyuz.interfaces.component import IComponent
+from lp.translations.interfaces.hastranslationimports import (
+    IHasTranslationImports,
+    )
 from lp.translations.interfaces.hastranslationtemplates import (
     IHasTranslationTemplates,
     )
-from lp.translations.interfaces.hastranslationimports import (
-    IHasTranslationImports,
-    )
 
 
 class ISourcePackagePublic(IBugTarget, IHasBranches, IHasMergeProposals,

=== modified file 'lib/lp/registry/interfaces/webservice.py'
--- lib/lp/registry/interfaces/webservice.py	2011-01-21 08:12:29 +0000
+++ lib/lp/registry/interfaces/webservice.py	2011-12-20 00:00:32 +0000
@@ -38,6 +38,9 @@
     'IWikiName',
     ]
 
+# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
+# import bugs.  Break this up into a per-package thing.
+from canonical.launchpad.interfaces import _schema_circular_imports
 from lp.registry.interfaces.commercialsubscription import (
     ICommercialSubscription,
     )
@@ -96,7 +99,6 @@
 from lp.registry.interfaces.ssh import ISSHKey
 from lp.registry.interfaces.teammembership import ITeamMembership
 from lp.registry.interfaces.wikiname import IWikiName
-# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
-# import bugs.  Break this up into a per-package thing.
-from canonical.launchpad.interfaces import _schema_circular_imports
+
+
 _schema_circular_imports

=== modified file 'lib/lp/registry/model/accesspolicy.py'
--- lib/lp/registry/model/accesspolicy.py	2011-11-21 22:57:01 +0000
+++ lib/lp/registry/model/accesspolicy.py	2011-12-20 00:00:32 +0000
@@ -11,8 +11,8 @@
     ]
 
 from storm.properties import (
+    DateTime,
     Int,
-    DateTime,
     )
 from storm.references import Reference
 from zope.interface import implements

=== modified file 'lib/lp/registry/model/distribution.py'
--- lib/lp/registry/model/distribution.py	2011-12-18 14:29:19 +0000
+++ lib/lp/registry/model/distribution.py	2011-12-20 00:00:32 +0000
@@ -10,8 +10,11 @@
     'DistributionSet',
     ]
 
-from operator import attrgetter, itemgetter
 import itertools
+from operator import (
+    attrgetter,
+    itemgetter,
+    )
 
 from sqlobject import (
     BoolCol,
@@ -30,9 +33,7 @@
     Or,
     SQL,
     )
-from storm.store import (
-    Store,
-    )
+from storm.store import Store
 from zope.component import getUtility
 from zope.interface import (
     alsoProvides,
@@ -50,9 +51,6 @@
     SQLBase,
     sqlvalues,
     )
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.helpers import shortlist
 from canonical.launchpad.interfaces.launchpad import (
     IHasIcon,
@@ -132,8 +130,8 @@
 from lp.registry.interfaces.oopsreferences import IHasOOPSReferences
 from lp.registry.interfaces.packaging import PackagingType
 from lp.registry.interfaces.person import (
+    validate_person,
     validate_person_or_closed_team,
-    validate_person,
     validate_public_person,
     )
 from lp.registry.interfaces.pillar import IPillarNameSet
@@ -160,6 +158,7 @@
 from lp.registry.model.oopsreferences import referenced_oops
 from lp.registry.model.pillar import HasAliasMixin
 from lp.registry.model.sourcepackagename import SourcePackageName
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.propertycache import (
     cachedproperty,
     get_property_cache,

=== modified file 'lib/lp/registry/model/distroseries.py'
--- lib/lp/registry/model/distroseries.py	2011-12-18 14:29:19 +0000
+++ lib/lp/registry/model/distroseries.py	2011-12-20 00:00:32 +0000
@@ -55,9 +55,6 @@
     SQLBase,
     sqlvalues,
     )
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.database.librarian import LibraryFileAlias
 from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
 from canonical.launchpad.interfaces.lpstorm import IStore
@@ -127,6 +124,7 @@
 from lp.registry.model.series import SeriesMixin
 from lp.registry.model.sourcepackage import SourcePackage
 from lp.registry.model.sourcepackagename import SourcePackageName
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.mail.signedmessage import signed_message_from_string
 from lp.services.propertycache import (
     cachedproperty,

=== modified file 'lib/lp/registry/model/distroseriesdifference.py'
--- lib/lp/registry/model/distroseriesdifference.py	2011-12-18 14:29:19 +0000
+++ lib/lp/registry/model/distroseriesdifference.py	2011-12-20 00:00:32 +0000
@@ -40,9 +40,6 @@
     )
 
 from canonical.database.enumcol import DBEnum
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.interfaces.lpstorm import (
     IMasterStore,
     IStore,
@@ -75,6 +72,7 @@
 from lp.registry.model.sourcepackagename import SourcePackageName
 from lp.registry.model.teammembership import TeamParticipation
 from lp.services.database import bulk
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.database.stormbase import StormBase
 from lp.services.messages.model.message import (
     Message,

=== modified file 'lib/lp/registry/model/distroseriesdifferencecomment.py'
--- lib/lp/registry/model/distroseriesdifferencecomment.py	2011-07-06 11:21:26 +0000
+++ lib/lp/registry/model/distroseriesdifferencecomment.py	2011-12-20 00:00:32 +0000
@@ -22,7 +22,6 @@
     implements,
     )
 
-from lp.services.messages.model.message import Message, MessageChunk
 from canonical.launchpad.interfaces.lpstorm import (
     IMasterStore,
     IStore,
@@ -32,6 +31,10 @@
     IDistroSeriesDifferenceCommentSource,
     )
 from lp.registry.model.sourcepackagename import SourcePackageName
+from lp.services.messages.model.message import (
+    Message,
+    MessageChunk,
+    )
 
 
 class DistroSeriesDifferenceComment(Storm):

=== modified file 'lib/lp/registry/model/karma.py'
--- lib/lp/registry/model/karma.py	2011-05-27 21:53:34 +0000
+++ lib/lp/registry/model/karma.py	2011-12-20 00:00:32 +0000
@@ -16,7 +16,6 @@
     'KarmaContextMixin',
     ]
 
-from storm.expr import Desc
 from sqlobject import (
     ForeignKey,
     IntCol,
@@ -25,6 +24,7 @@
     StringCol,
     )
 from sqlobject.sqlbuilder import AND
+from storm.expr import Desc
 from zope.interface import implements
 
 from canonical.database.constants import UTC_NOW

=== modified file 'lib/lp/registry/model/mailinglist.py'
--- lib/lp/registry/model/mailinglist.py	2011-12-18 14:29:19 +0000
+++ lib/lp/registry/model/mailinglist.py	2011-12-20 00:00:32 +0000
@@ -16,7 +16,6 @@
 
 
 import collections
-
 from email import message_from_string
 from email.Header import (
     decode_header,
@@ -66,17 +65,6 @@
     sqlvalues,
     )
 from canonical.launchpad import _
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
-from lp.services.identity.model.account import Account
-from lp.services.identity.model.emailaddress import EmailAddress
-from lp.services.messages.model.message import Message
-from lp.services.identity.interfaces.account import AccountStatus
-from lp.services.identity.interfaces.emailaddress import (
-    EmailAddressStatus,
-    IEmailAddressSet,
-    )
 from canonical.launchpad.interfaces.lpstorm import (
     IMasterStore,
     IStore,
@@ -100,6 +88,15 @@
 from lp.registry.interfaces.person import validate_public_person
 from lp.registry.model.person import Person
 from lp.registry.model.teammembership import TeamParticipation
+from lp.services.database.decoratedresultset import DecoratedResultSet
+from lp.services.identity.interfaces.account import AccountStatus
+from lp.services.identity.interfaces.emailaddress import (
+    EmailAddressStatus,
+    IEmailAddressSet,
+    )
+from lp.services.identity.model.account import Account
+from lp.services.identity.model.emailaddress import EmailAddress
+from lp.services.messages.model.message import Message
 from lp.services.propertycache import cachedproperty
 
 

=== modified file 'lib/lp/registry/model/person.py'
--- lib/lp/registry/model/person.py	2011-12-18 14:29:19 +0000
+++ lib/lp/registry/model/person.py	2011-12-20 00:00:32 +0000
@@ -118,17 +118,6 @@
     sqlvalues,
     )
 from canonical.launchpad import _
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
-from lp.services.identity.model.account import (
-    Account,
-    AccountPassword,
-    )
-from lp.services.identity.model.emailaddress import (
-    EmailAddress,
-    HasOwnerMixin,
-    )
 from canonical.launchpad.database.librarian import LibraryFileAlias
 from canonical.launchpad.database.logintoken import LoginToken
 from canonical.launchpad.helpers import (
@@ -137,21 +126,7 @@
     get_email_template,
     shortlist,
     )
-from lp.services.identity.interfaces.account import (
-    AccountCreationRationale,
-    AccountStatus,
-    AccountSuspendedError,
-    IAccount,
-    IAccountSet,
-    INACTIVE_ACCOUNT_STATUSES,
-    )
 from canonical.launchpad.interfaces.authtoken import LoginTokenType
-from lp.services.identity.interfaces.emailaddress import (
-    EmailAddressStatus,
-    IEmailAddress,
-    IEmailAddressSet,
-    InvalidEmailAddress,
-    )
 from canonical.launchpad.interfaces.launchpad import (
     IHasIcon,
     IHasLogo,
@@ -281,6 +256,29 @@
     TeamMembershipSet,
     TeamParticipation,
     )
+from lp.services.database.decoratedresultset import DecoratedResultSet
+from lp.services.identity.interfaces.account import (
+    AccountCreationRationale,
+    AccountStatus,
+    AccountSuspendedError,
+    IAccount,
+    IAccountSet,
+    INACTIVE_ACCOUNT_STATUSES,
+    )
+from lp.services.identity.interfaces.emailaddress import (
+    EmailAddressStatus,
+    IEmailAddress,
+    IEmailAddressSet,
+    InvalidEmailAddress,
+    )
+from lp.services.identity.model.account import (
+    Account,
+    AccountPassword,
+    )
+from lp.services.identity.model.emailaddress import (
+    EmailAddress,
+    HasOwnerMixin,
+    )
 from lp.services.oauth.model import (
     OAuthAccessToken,
     OAuthRequestToken,

=== modified file 'lib/lp/registry/model/personnotification.py'
--- lib/lp/registry/model/personnotification.py	2011-05-19 04:18:07 +0000
+++ lib/lp/registry/model/personnotification.py	2011-12-20 00:00:32 +0000
@@ -29,11 +29,11 @@
     IPersonNotification,
     IPersonNotificationSet,
     )
-from lp.services.propertycache import cachedproperty
 from lp.services.mail.sendmail import (
     format_address,
     simple_sendmail,
     )
+from lp.services.propertycache import cachedproperty
 
 
 class PersonNotification(SQLBase):

=== modified file 'lib/lp/registry/model/personproduct.py'
--- lib/lp/registry/model/personproduct.py	2011-05-09 19:09:44 +0000
+++ lib/lp/registry/model/personproduct.py	2011-12-20 00:00:32 +0000
@@ -13,9 +13,7 @@
     implements,
     )
 
-from lp.code.model.hasbranches import (
-    HasMergeProposalsMixin,
-    )
+from lp.code.model.hasbranches import HasMergeProposalsMixin
 from lp.registry.interfaces.personproduct import (
     IPersonProduct,
     IPersonProductFactory,

=== modified file 'lib/lp/registry/model/persontransferjob.py'
--- lib/lp/registry/model/persontransferjob.py	2011-12-18 14:29:19 +0000
+++ lib/lp/registry/model/persontransferjob.py	2011-12-20 00:00:32 +0000
@@ -28,9 +28,6 @@
 
 from canonical.config import config
 from canonical.database.enumcol import EnumCol
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.helpers import (
     get_contact_email_addresses,
     get_email_template,
@@ -59,6 +56,7 @@
     )
 from lp.registry.interfaces.teammembership import TeamMembershipStatus
 from lp.registry.model.person import Person
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.database.stormbase import StormBase
 from lp.services.job.model.job import Job
 from lp.services.job.runner import BaseRunnableJob

=== modified file 'lib/lp/registry/model/product.py'
--- lib/lp/registry/model/product.py	2011-12-19 15:09:08 +0000
+++ lib/lp/registry/model/product.py	2011-12-20 00:00:32 +0000
@@ -62,9 +62,6 @@
     SQLBase,
     sqlvalues,
     )
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.interfaces.launchpad import (
     IHasIcon,
     IHasLogo,
@@ -172,6 +169,7 @@
 from lp.registry.model.series import ACTIVE_STATUSES
 from lp.registry.model.sourcepackagename import SourcePackageName
 from lp.services.database import bulk
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.propertycache import (
     cachedproperty,
     get_property_cache,

=== modified file 'lib/lp/registry/model/productseries.py'
--- lib/lp/registry/model/productseries.py	2011-12-18 14:29:19 +0000
+++ lib/lp/registry/model/productseries.py	2011-12-20 00:00:32 +0000
@@ -40,9 +40,6 @@
     SQLBase,
     sqlvalues,
     )
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.webapp.publisher import canonical_url
 from canonical.launchpad.webapp.sorting import sorted_dotted_numbers
 from lp.app.enums import service_uses_launchpad
@@ -92,6 +89,7 @@
 from lp.registry.model.packaging import Packaging
 from lp.registry.model.productrelease import ProductRelease
 from lp.registry.model.series import SeriesMixin
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.worlddata.model.language import Language
 from lp.translations.interfaces.translations import (
     TranslationsBranchImportMode,

=== modified file 'lib/lp/registry/model/projectgroup.py'
--- lib/lp/registry/model/projectgroup.py	2011-11-04 03:08:49 +0000
+++ lib/lp/registry/model/projectgroup.py	2011-12-20 00:00:32 +0000
@@ -68,9 +68,7 @@
 from lp.blueprints.model.sprint import HasSprintsMixin
 from lp.bugs.interfaces.bugsummary import IBugSummaryDimension
 from lp.bugs.interfaces.bugtarget import IHasBugHeat
-from lp.bugs.model.bug import (
-    get_bug_tags,
-    )
+from lp.bugs.model.bug import get_bug_tags
 from lp.bugs.model.bugtarget import (
     BugTargetBase,
     HasBugHeatMixin,

=== modified file 'lib/lp/registry/model/sourcepackage.py'
--- lib/lp/registry/model/sourcepackage.py	2011-12-16 21:20:46 +0000
+++ lib/lp/registry/model/sourcepackage.py	2011-12-20 00:00:32 +0000
@@ -49,16 +49,16 @@
     HasBugHeatMixin,
     )
 from lp.buildmaster.enums import BuildStatus
-from lp.code.model.seriessourcepackagebranch import (
-    SeriesSourcePackageBranchSet,
-    )
 from lp.code.model.branch import Branch
 from lp.code.model.hasbranches import (
     HasBranchesMixin,
     HasCodeImportsMixin,
     HasMergeProposalsMixin,
     )
-from lp.code.model.seriessourcepackagebranch import SeriesSourcePackageBranch
+from lp.code.model.seriessourcepackagebranch import (
+    SeriesSourcePackageBranch,
+    SeriesSourcePackageBranchSet,
+    )
 from lp.registry.interfaces.distribution import NoPartnerArchive
 from lp.registry.interfaces.packaging import PackagingType
 from lp.registry.interfaces.pocket import PackagePublishingPocket
@@ -74,9 +74,7 @@
     PackagePublishingStatus,
     PackageUploadCustomFormat,
     )
-from lp.soyuz.interfaces.archive import (
-    IArchiveSet,
-    )
+from lp.soyuz.interfaces.archive import IArchiveSet
 from lp.soyuz.interfaces.buildrecords import IHasBuildRecords
 from lp.soyuz.model.binarypackagebuild import (
     BinaryPackageBuild,

=== modified file 'lib/lp/registry/scripts/entitlement.py'
--- lib/lp/registry/scripts/entitlement.py	2011-12-19 15:09:08 +0000
+++ lib/lp/registry/scripts/entitlement.py	2011-12-20 00:00:32 +0000
@@ -25,10 +25,6 @@
 import pytz
 from zope.component import getUtility
 
-from lp.services.unicode_csv import (
-    UnicodeDictReader,
-    UnicodeDictWriter,
-    )
 from lp.app.errors import NotFoundError
 from lp.registry.interfaces.entitlement import (
     EntitlementState,
@@ -36,6 +32,10 @@
     IEntitlementSet,
     )
 from lp.registry.interfaces.person import IPersonSet
+from lp.services.unicode_csv import (
+    UnicodeDictReader,
+    UnicodeDictWriter,
+    )
 
 
 COMMENT = '#'

=== modified file 'lib/lp/registry/scripts/mlistimport.py'
--- lib/lp/registry/scripts/mlistimport.py	2011-12-19 14:44:07 +0000
+++ lib/lp/registry/scripts/mlistimport.py	2011-12-20 00:00:32 +0000
@@ -14,10 +14,6 @@
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy
 
-from lp.services.identity.interfaces.emailaddress import (
-    EmailAddressStatus,
-    IEmailAddressSet,
-    )
 from lp.registry.interfaces.mailinglist import (
     CannotSubscribe,
     IMailingListSet,
@@ -25,6 +21,10 @@
     )
 from lp.registry.interfaces.person import IPersonSet
 from lp.registry.interfaces.teammembership import TeamMembershipStatus
+from lp.services.identity.interfaces.emailaddress import (
+    EmailAddressStatus,
+    IEmailAddressSet,
+    )
 from lp.services.log.logger import BufferLogger
 
 

=== modified file 'lib/lp/registry/tests/test_commercialprojects_vocabularies.py'
--- lib/lp/registry/tests/test_commercialprojects_vocabularies.py	2011-12-18 13:55:35 +0000
+++ lib/lp/registry/tests/test_commercialprojects_vocabularies.py	2011-12-20 00:00:32 +0000
@@ -15,13 +15,13 @@
     login,
     logout,
     )
-from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from canonical.testing.layers import LaunchpadFunctionalLayer
 from lp.registry.interfaces.product import (
     IProductSet,
     License,
     )
 from lp.registry.vocabularies import CommercialProjectsVocabulary
+from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from lp.testing.factory import LaunchpadObjectFactory
 
 

=== modified file 'lib/lp/registry/tests/test_distribution.py'
--- lib/lp/registry/tests/test_distribution.py	2011-11-15 06:12:39 +0000
+++ lib/lp/registry/tests/test_distribution.py	2011-12-20 00:00:32 +0000
@@ -36,16 +36,16 @@
     NoSuchDistroSeries,
     OpenTeamLinkageError,
     )
-from lp.registry.interfaces.person import (
-    CLOSED_TEAM_POLICY,
-    OPEN_TEAM_POLICY,
-    )
 from lp.registry.interfaces.distribution import (
     IDistribution,
     IDistributionSet,
     )
 from lp.registry.interfaces.oopsreferences import IHasOOPSReferences
-from lp.registry.interfaces.person import IPersonSet
+from lp.registry.interfaces.person import (
+    CLOSED_TEAM_POLICY,
+    IPersonSet,
+    OPEN_TEAM_POLICY,
+    )
 from lp.registry.interfaces.series import SeriesStatus
 from lp.registry.tests.test_distroseries import (
     TestDistroSeriesCurrentSourceReleases,

=== modified file 'lib/lp/registry/tests/test_distroseries.py'
--- lib/lp/registry/tests/test_distroseries.py	2011-07-07 20:07:51 +0000
+++ lib/lp/registry/tests/test_distroseries.py	2011-12-20 00:00:32 +0000
@@ -5,9 +5,8 @@
 
 __metaclass__ = type
 
-from datetime import (
-    timedelta,
-)
+from datetime import timedelta
+
 import transaction
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy

=== modified file 'lib/lp/registry/tests/test_distroseriesdifferencecomment.py'
--- lib/lp/registry/tests/test_distroseriesdifferencecomment.py	2011-07-04 16:01:40 +0000
+++ lib/lp/registry/tests/test_distroseriesdifferencecomment.py	2011-12-20 00:00:32 +0000
@@ -7,6 +7,7 @@
 
 from datetime import timedelta
 from random import randint
+
 from storm.store import Store
 from zope.component import getUtility
 

=== modified file 'lib/lp/registry/tests/test_mailinglist.py'
--- lib/lp/registry/tests/test_mailinglist.py	2011-05-12 21:33:10 +0000
+++ lib/lp/registry/tests/test_mailinglist.py	2011-12-20 00:00:32 +0000
@@ -8,16 +8,16 @@
 
 from zope.component import getUtility
 
-from lp.services.messages.interfaces.message import IMessageSet
 from canonical.testing.layers import (
     DatabaseFunctionalLayer,
     LaunchpadFunctionalLayer,
     )
+from lp.registry.interfaces.mailinglist import IMailingListSet
 from lp.registry.interfaces.mailinglistsubscription import (
     MailingListAutoSubscribePolicy,
     )
 from lp.registry.interfaces.person import TeamSubscriptionPolicy
-from lp.registry.interfaces.mailinglist import IMailingListSet
+from lp.services.messages.interfaces.message import IMessageSet
 from lp.testing import (
     login_celebrity,
     person_logged_in,

=== modified file 'lib/lp/registry/tests/test_mailinglistapi.py'
--- lib/lp/registry/tests/test_mailinglistapi.py	2011-12-18 13:55:35 +0000
+++ lib/lp/registry/tests/test_mailinglistapi.py	2011-12-20 00:00:32 +0000
@@ -10,7 +10,6 @@
 import transaction
 
 from canonical.config import config
-from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.registry.tests.mailinglists_helper import new_team
 from lp.registry.xmlrpc.mailinglist import (
@@ -18,6 +17,7 @@
     ENABLED,
     MailingListAPIView,
     )
+from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from lp.testing import (
     person_logged_in,
     TestCaseWithFactory,

=== modified file 'lib/lp/registry/tests/test_membership_notification_job.py'
--- lib/lp/registry/tests/test_membership_notification_job.py	2011-04-21 03:01:56 +0000
+++ lib/lp/registry/tests/test_membership_notification_job.py	2011-12-20 00:00:32 +0000
@@ -8,7 +8,6 @@
 from testtools.content import Content
 from testtools.content_type import UTF8_TEXT
 import transaction
-
 from zope.component import getUtility
 
 from canonical.testing import DatabaseFunctionalLayer

=== modified file 'lib/lp/registry/tests/test_mlists.py'
--- lib/lp/registry/tests/test_mlists.py	2011-12-19 14:44:07 +0000
+++ lib/lp/registry/tests/test_mlists.py	2011-12-20 00:00:32 +0000
@@ -22,8 +22,6 @@
     login,
     login_person,
     )
-from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
-from lp.registry.scripts.mlistimport import Importer
 from canonical.testing.layers import (
     AppServerLayer,
     BaseLayer,
@@ -34,6 +32,8 @@
     PersonVisibility,
     TeamSubscriptionPolicy,
     )
+from lp.registry.scripts.mlistimport import Importer
+from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from lp.services.log.logger import BufferLogger
 from lp.testing.factory import LaunchpadObjectFactory
 

=== modified file 'lib/lp/registry/tests/test_oopsreferences.py'
--- lib/lp/registry/tests/test_oopsreferences.py	2011-11-10 12:24:50 +0000
+++ lib/lp/registry/tests/test_oopsreferences.py	2011-12-20 00:00:32 +0000
@@ -19,7 +19,10 @@
     Message,
     MessageSet,
     )
-from lp.testing import TestCaseWithFactory, person_logged_in
+from lp.testing import (
+    person_logged_in,
+    TestCaseWithFactory,
+    )
 
 
 class TestOopsReferences(TestCaseWithFactory):

=== modified file 'lib/lp/registry/tests/test_person.py'
--- lib/lp/registry/tests/test_person.py	2011-12-18 13:45:20 +0000
+++ lib/lp/registry/tests/test_person.py	2011-12-20 00:00:32 +0000
@@ -20,18 +20,6 @@
 
 from canonical.config import config
 from canonical.database.sqlbase import cursor
-from lp.services.identity.model.account import Account
-from lp.services.identity.model.emailaddress import EmailAddress
-from lp.services.identity.interfaces.account import (
-    AccountCreationRationale,
-    AccountStatus,
-    )
-from lp.services.identity.interfaces.emailaddress import (
-    EmailAddressAlreadyTaken,
-    EmailAddressStatus,
-    IEmailAddressSet,
-    InvalidEmailAddress,
-    )
 from canonical.launchpad.interfaces.lpstorm import (
     IMasterStore,
     IStore,
@@ -70,6 +58,18 @@
     get_recipients,
     Person,
     )
+from lp.services.identity.interfaces.account import (
+    AccountCreationRationale,
+    AccountStatus,
+    )
+from lp.services.identity.interfaces.emailaddress import (
+    EmailAddressAlreadyTaken,
+    EmailAddressStatus,
+    IEmailAddressSet,
+    InvalidEmailAddress,
+    )
+from lp.services.identity.model.account import Account
+from lp.services.identity.model.emailaddress import EmailAddress
 from lp.services.openid.model.openididentifier import OpenIdIdentifier
 from lp.services.propertycache import clear_property_cache
 from lp.soyuz.enums import (

=== modified file 'lib/lp/registry/tests/test_person_merge_job.py'
--- lib/lp/registry/tests/test_person_merge_job.py	2011-12-18 13:45:20 +0000
+++ lib/lp/registry/tests/test_person_merge_job.py	2011-12-20 00:00:32 +0000
@@ -16,20 +16,20 @@
     IMasterObject,
     IStore,
     )
-from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from canonical.launchpad.scripts import log
 from canonical.testing import DatabaseFunctionalLayer
 from lp.registry.interfaces.persontransferjob import (
     IPersonMergeJob,
     IPersonMergeJobSource,
     )
+from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from lp.services.job.interfaces.job import JobStatus
 from lp.services.job.model.job import Job
 from lp.services.log.logger import BufferLogger
 from lp.services.mail.sendmail import format_address_for_person
 from lp.testing import (
+    person_logged_in,
     run_script,
-    person_logged_in,
     TestCaseWithFactory,
     )
 

=== modified file 'lib/lp/registry/tests/test_person_vocabularies.py'
--- lib/lp/registry/tests/test_person_vocabularies.py	2011-12-14 03:06:38 +0000
+++ lib/lp/registry/tests/test_person_vocabularies.py	2011-12-20 00:00:32 +0000
@@ -18,13 +18,13 @@
     LaunchpadZopelessLayer,
     )
 from lp.registry.interfaces.irc import IIrcIDSet
+from lp.registry.interfaces.karma import IKarmaCacheManager
 from lp.registry.interfaces.person import (
+    CLOSED_TEAM_POLICY,
+    OPEN_TEAM_POLICY,
     PersonVisibility,
     TeamSubscriptionPolicy,
-    CLOSED_TEAM_POLICY,
-    OPEN_TEAM_POLICY,
     )
-from lp.registry.interfaces.karma import IKarmaCacheManager
 from lp.registry.vocabularies import ValidPersonOrTeamVocabulary
 from lp.testing import (
     StormStatementRecorder,

=== modified file 'lib/lp/registry/tests/test_personset.py'
--- lib/lp/registry/tests/test_personset.py	2011-12-18 13:55:35 +0000
+++ lib/lp/registry/tests/test_personset.py	2011-12-20 00:00:32 +0000
@@ -10,10 +10,6 @@
 from zope.security.proxy import removeSecurityProxy
 
 from canonical.database.sqlbase import cursor
-from lp.services.identity.interfaces.account import (
-    AccountStatus,
-    AccountSuspendedError,
-    )
 from canonical.launchpad.testing.databasehelpers import (
     remove_all_sample_data_branches,
     )
@@ -26,6 +22,10 @@
     PersonCreationRationale,
     )
 from lp.registry.model.person import PersonSet
+from lp.services.identity.interfaces.account import (
+    AccountStatus,
+    AccountSuspendedError,
+    )
 from lp.testing import (
     person_logged_in,
     TestCaseWithFactory,

=== modified file 'lib/lp/registry/tests/test_pillar_vocabularies.py'
--- lib/lp/registry/tests/test_pillar_vocabularies.py	2011-10-21 00:06:01 +0000
+++ lib/lp/registry/tests/test_pillar_vocabularies.py	2011-12-20 00:00:32 +0000
@@ -7,8 +7,8 @@
 
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.registry.vocabularies import (
+    DistributionOrProductOrProjectGroupVocabulary,
     DistributionOrProductVocabulary,
-    DistributionOrProductOrProjectGroupVocabulary,
     PillarVocabularyBase,
     )
 from lp.testing import (

=== modified file 'lib/lp/registry/tests/test_product.py'
--- lib/lp/registry/tests/test_product.py	2011-11-15 06:12:39 +0000
+++ lib/lp/registry/tests/test_product.py	2011-12-20 00:00:32 +0000
@@ -37,14 +37,14 @@
 from lp.bugs.interfaces.bugtarget import IHasBugHeat
 from lp.registry.errors import OpenTeamLinkageError
 from lp.registry.interfaces.oopsreferences import IHasOOPSReferences
+from lp.registry.interfaces.person import (
+    CLOSED_TEAM_POLICY,
+    OPEN_TEAM_POLICY,
+    )
 from lp.registry.interfaces.product import (
     IProduct,
     License,
     )
-from lp.registry.interfaces.person import (
-    CLOSED_TEAM_POLICY,
-    OPEN_TEAM_POLICY,
-    )
 from lp.registry.interfaces.series import SeriesStatus
 from lp.registry.model.commercialsubscription import CommercialSubscription
 from lp.registry.model.product import (

=== modified file 'lib/lp/registry/tests/test_project_milestone.py'
--- lib/lp/registry/tests/test_project_milestone.py	2011-10-25 04:43:25 +0000
+++ lib/lp/registry/tests/test_project_milestone.py	2011-12-20 00:00:32 +0000
@@ -8,19 +8,16 @@
 from datetime import datetime
 import unittest
 
+from lazr.restfulclient.errors import ClientError
+import pytz
 from storm.store import Store
 from zope.component import getUtility
-import pytz
 
-from canonical.launchpad.ftests import (
-    login,
-    )
+from canonical.launchpad.ftests import login
 from canonical.testing.layers import (
+    DatabaseFunctionalLayer,
     LaunchpadFunctionalLayer,
-    DatabaseFunctionalLayer,
     )
-from lazr.restfulclient.errors import ClientError
-
 from lp.blueprints.enums import (
     SpecificationDefinitionStatus,
     SpecificationPriority,

=== modified file 'lib/lp/registry/tests/test_service_usage.py'
--- lib/lp/registry/tests/test_service_usage.py	2011-10-07 16:20:20 +0000
+++ lib/lp/registry/tests/test_service_usage.py	2011-12-20 00:00:32 +0000
@@ -4,7 +4,6 @@
 __metaclass__ = type
 
 from canonical.testing.layers import DatabaseFunctionalLayer
-
 from lp.app.enums import ServiceUsage
 from lp.code.enums import BranchType
 from lp.testing import (

=== modified file 'lib/lp/registry/tests/test_team.py'
--- lib/lp/registry/tests/test_team.py	2011-12-18 13:55:35 +0000
+++ lib/lp/registry/tests/test_team.py	2011-12-20 00:00:32 +0000
@@ -10,8 +10,6 @@
 from zope.interface.exceptions import Invalid
 from zope.security.proxy import removeSecurityProxy
 
-from lp.services.identity.model.emailaddress import EmailAddress
-from lp.services.identity.interfaces.emailaddress import IEmailAddressSet
 from canonical.launchpad.interfaces.lpstorm import IMasterStore
 from canonical.testing.layers import (
     DatabaseFunctionalLayer,
@@ -34,6 +32,8 @@
     )
 from lp.registry.interfaces.teammembership import TeamMembershipStatus
 from lp.registry.model.persontransferjob import PersonTransferJob
+from lp.services.identity.interfaces.emailaddress import IEmailAddressSet
+from lp.services.identity.model.emailaddress import EmailAddress
 from lp.soyuz.enums import ArchiveStatus
 from lp.testing import (
     login_celebrity,

=== modified file 'lib/lp/registry/tests/test_teammembership_webservice.py'
--- lib/lp/registry/tests/test_teammembership_webservice.py	2011-08-12 11:37:08 +0000
+++ lib/lp/registry/tests/test_teammembership_webservice.py	2011-12-20 00:00:32 +0000
@@ -3,17 +3,17 @@
 
 __metaclass__ = type
 
+from lazr.restfulclient.errors import HTTPError
 from zope.component import getUtility
 
 from canonical.testing.layers import DatabaseFunctionalLayer
-from lazr.restfulclient.errors import HTTPError
 from lp.registry.interfaces.teammembership import (
     ITeamMembershipSet,
     TeamMembershipStatus,
     )
 from lp.testing import (
+    launchpadlib_for,
     TestCaseWithFactory,
-    launchpadlib_for,
     )
 
 

=== modified file 'lib/lp/registry/tests/test_xmlrpc.py'
--- lib/lp/registry/tests/test_xmlrpc.py	2011-12-18 13:55:35 +0000
+++ lib/lp/registry/tests/test_xmlrpc.py	2011-12-20 00:00:32 +0000
@@ -10,7 +10,6 @@
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy
 
-from lp.services.identity.interfaces.account import AccountStatus
 from canonical.launchpad.interfaces.launchpad import IPrivateApplication
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
 from canonical.testing.layers import LaunchpadFunctionalLayer
@@ -21,6 +20,7 @@
     PersonCreationRationale,
     )
 from lp.registry.xmlrpc.softwarecenteragent import SoftwareCenterAgentAPI
+from lp.services.identity.interfaces.account import AccountStatus
 from lp.testing import TestCaseWithFactory
 from lp.testing.xmlrpc import XMLRPCTestTransport
 

=== modified file 'lib/lp/registry/vocabularies.py'
--- lib/lp/registry/vocabularies.py	2011-12-18 14:29:19 +0000
+++ lib/lp/registry/vocabularies.py	2011-12-20 00:00:32 +0000
@@ -103,15 +103,10 @@
     SQLBase,
     sqlvalues,
     )
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
-from lp.services.identity.model.emailaddress import EmailAddress
 from canonical.launchpad.helpers import (
     ensure_unicode,
     shortlist,
     )
-from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from canonical.launchpad.interfaces.lpstorm import IStore
 from canonical.launchpad.webapp.authorization import check_permission
 from canonical.launchpad.webapp.interfaces import (
@@ -197,6 +192,9 @@
 from lp.registry.model.sourcepackagename import SourcePackageName
 from lp.registry.model.teammembership import TeamParticipation
 from lp.services.database import bulk
+from lp.services.database.decoratedresultset import DecoratedResultSet
+from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
+from lp.services.identity.model.emailaddress import EmailAddress
 from lp.services.propertycache import (
     cachedproperty,
     get_property_cache,

=== modified file 'lib/lp/registry/windmill/tests/test_distroseriesdifference_expander.py'
--- lib/lp/registry/windmill/tests/test_distroseriesdifference_expander.py	2011-05-24 10:08:33 +0000
+++ lib/lp/registry/windmill/tests/test_distroseriesdifference_expander.py	2011-12-20 00:00:32 +0000
@@ -1,15 +1,19 @@
 # Copyright 2010 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
+import transaction
 from zope.component import getUtility
 
-import transaction
-
 from canonical.launchpad.webapp.publisher import canonical_url
 from lp.registry.enum import DistroSeriesDifferenceStatus
-from lp.registry.interfaces.distroseriesdifference import IDistroSeriesDifferenceSource
+from lp.registry.interfaces.distroseriesdifference import (
+    IDistroSeriesDifferenceSource,
+    )
 from lp.registry.windmill.testing import RegistryWindmillLayer
-from lp.services.features.model import FeatureFlag, getFeatureStore
+from lp.services.features.model import (
+    FeatureFlag,
+    getFeatureStore,
+    )
 from lp.testing import WindmillTestCase
 from lp.testing.windmill import (
     constants,

=== modified file 'lib/lp/registry/windmill/tests/test_team_index.py'
--- lib/lp/registry/windmill/tests/test_team_index.py	2011-03-29 05:59:29 +0000
+++ lib/lp/registry/windmill/tests/test_team_index.py	2011-12-20 00:00:32 +0000
@@ -9,9 +9,7 @@
 from lp.registry.windmill.testing import RegistryWindmillLayer
 from lp.testing import WindmillTestCase
 from lp.testing.windmill import lpuser
-from lp.testing.windmill.widgets import (
-    search_and_select_picker_widget,
-    )
+from lp.testing.windmill.widgets import search_and_select_picker_widget
 
 
 class TestTeamIndex(WindmillTestCase):

=== modified file 'lib/lp/registry/xmlrpc/mailinglist.py'
--- lib/lp/registry/xmlrpc/mailinglist.py	2011-12-18 13:55:35 +0000
+++ lib/lp/registry/xmlrpc/mailinglist.py	2011-12-20 00:00:32 +0000
@@ -16,12 +16,6 @@
 from zope.security.proxy import removeSecurityProxy
 
 from canonical.config import config
-from lp.services.encoding import escape_nonascii_uniquely
-from lp.services.identity.interfaces.emailaddress import (
-    EmailAddressStatus,
-    IEmailAddressSet,
-    )
-from lp.services.messages.interfaces.message import IMessageSet
 from canonical.launchpad.webapp import LaunchpadXMLRPCView
 from canonical.launchpad.xmlrpc import faults
 from lp.registry.interfaces.mailinglist import (
@@ -36,6 +30,12 @@
     PersonalStanding,
     PersonVisibility,
     )
+from lp.services.encoding import escape_nonascii_uniquely
+from lp.services.identity.interfaces.emailaddress import (
+    EmailAddressStatus,
+    IEmailAddressSet,
+    )
+from lp.services.messages.interfaces.message import IMessageSet
 
 # Not all developers will have built the Mailman instance (via
 # 'make mailman_instance').  In that case, this import will fail, but in that

=== modified file 'lib/lp/registry/xmlrpc/softwarecenteragent.py'
--- lib/lp/registry/xmlrpc/softwarecenteragent.py	2011-12-18 13:55:35 +0000
+++ lib/lp/registry/xmlrpc/softwarecenteragent.py	2011-12-20 00:00:32 +0000
@@ -12,7 +12,6 @@
 from zope.component import getUtility
 from zope.interface import implements
 
-from lp.services.identity.interfaces.account import AccountSuspendedError
 from canonical.launchpad.webapp import LaunchpadXMLRPCView
 from canonical.launchpad.xmlrpc import faults
 from lp.registry.interfaces.person import (
@@ -21,6 +20,7 @@
     ISoftwareCenterAgentApplication,
     PersonCreationRationale,
     )
+from lp.services.identity.interfaces.account import AccountSuspendedError
 
 
 class SoftwareCenterAgentAPI(LaunchpadXMLRPCView):

=== modified file 'lib/lp/scripts/garbo.py'
--- lib/lp/scripts/garbo.py	2011-12-18 13:45:20 +0000
+++ lib/lp/scripts/garbo.py	2011-12-20 00:00:32 +0000
@@ -43,11 +43,8 @@
     session_store,
     sqlvalues,
     )
-from lp.services.identity.model.emailaddress import EmailAddress
 from canonical.launchpad.database.librarian import TimeLimitedToken
 from canonical.launchpad.database.logintoken import LoginToken
-from lp.services.identity.interfaces.account import AccountStatus
-from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from canonical.launchpad.interfaces.lpstorm import IMasterStore
 from canonical.launchpad.utilities.looptuner import TunableLoop
 from canonical.launchpad.webapp.interfaces import (
@@ -74,6 +71,9 @@
     )
 from lp.hardwaredb.model.hwdb import HWSubmission
 from lp.registry.model.person import Person
+from lp.services.identity.interfaces.account import AccountStatus
+from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
+from lp.services.identity.model.emailaddress import EmailAddress
 from lp.services.job.model.job import Job
 from lp.services.log.logger import PrefixFilter
 from lp.services.oauth.model import OAuthNonce

=== modified file 'lib/lp/scripts/tests/test_garbo.py'
--- lib/lp/scripts/tests/test_garbo.py	2011-12-18 13:45:20 +0000
+++ lib/lp/scripts/tests/test_garbo.py	2011-12-20 00:00:32 +0000
@@ -44,9 +44,7 @@
     )
 from canonical.launchpad.database.librarian import TimeLimitedToken
 from canonical.launchpad.database.logintoken import LoginToken
-from lp.services.identity.interfaces.account import AccountStatus
 from canonical.launchpad.interfaces.authtoken import LoginTokenType
-from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from canonical.launchpad.interfaces.lpstorm import IMasterStore
 from canonical.launchpad.scripts.tests import run_script
 from canonical.launchpad.webapp.interfaces import (
@@ -92,6 +90,8 @@
     OpenIDConsumerAssociationPruner,
     UnusedSessionPruner,
     )
+from lp.services.identity.interfaces.account import AccountStatus
+from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from lp.services.job.model.job import Job
 from lp.services.log.logger import NullHandler
 from lp.services.messages.model.message import Message

=== modified file 'lib/lp/scripts/tests/test_helpers.py'
--- lib/lp/scripts/tests/test_helpers.py	2011-05-11 14:01:30 +0000
+++ lib/lp/scripts/tests/test_helpers.py	2011-12-20 00:00:32 +0000
@@ -8,8 +8,8 @@
 from testtools.testcase import ExpectedException
 import transaction
 
+from lp.scripts.helpers import TransactionFreeOperation
 from lp.testing import TestCase
-from lp.scripts.helpers import TransactionFreeOperation
 
 
 class TestTransactionFreeOperation(TestCase):

=== modified file 'lib/lp/scripts/utilities/importfascist.py'
--- lib/lp/scripts/utilities/importfascist.py	2011-12-04 17:54:41 +0000
+++ lib/lp/scripts/utilities/importfascist.py	2011-12-20 00:00:32 +0000
@@ -1,13 +1,12 @@
 # Copyright 2009 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
+import __builtin__
 import atexit
 import itertools
 from operator import attrgetter
 import types
 
-import __builtin__
-
 
 original_import = __builtin__.__import__
 database_root = 'canonical.launchpad.database'

=== modified file 'lib/lp/scripts/utilities/js/combo.py'
--- lib/lp/scripts/utilities/js/combo.py	2011-06-30 10:25:29 +0000
+++ lib/lp/scripts/utilities/js/combo.py	2011-12-20 00:00:32 +0000
@@ -1,8 +1,11 @@
+import cgi
 import os
-import cgi
 import urlparse
 
-from jsbuild import CSSComboFile, JSComboFile
+from jsbuild import (
+    CSSComboFile,
+    JSComboFile,
+    )
 
 
 def parse_url(url):

=== modified file 'lib/lp/scripts/utilities/js/jsbuild.py'
--- lib/lp/scripts/utilities/js/jsbuild.py	2011-08-30 15:06:11 +0000
+++ lib/lp/scripts/utilities/js/jsbuild.py	2011-12-20 00:00:32 +0000
@@ -6,15 +6,15 @@
     'JSComboFile',
     ]
 
+from glob import glob
 import optparse
 import os
 import re
 import sys
 
-from glob import glob
-
 import cssutils
 
+
 HERE = os.path.dirname(__file__)
 BUILD_DIR = os.path.normpath(os.path.join(
     HERE, os.pardir, os.pardir, os.pardir, 'build'))

=== modified file 'lib/lp/scripts/utilities/js/jsmin.py'
--- lib/lp/scripts/utilities/js/jsmin.py	2011-06-30 10:25:29 +0000
+++ lib/lp/scripts/utilities/js/jsmin.py	2011-12-20 00:00:32 +0000
@@ -32,6 +32,7 @@
 
 from StringIO import StringIO
 
+
 def jsmin(js):
     ins = StringIO(js)
     outs = StringIO()

=== modified file 'lib/lp/scripts/utilities/js/tests/test_combo.py'
--- lib/lp/scripts/utilities/js/tests/test_combo.py	2011-07-07 01:36:01 +0000
+++ lib/lp/scripts/utilities/js/tests/test_combo.py	2011-12-20 00:00:32 +0000
@@ -4,7 +4,11 @@
 
 from paste.fixture import TestApp
 
-from lp.scripts.utilities.js.combo import parse_url, combine_files, combo_app
+from lp.scripts.utilities.js.combo import (
+    combine_files,
+    combo_app,
+    parse_url,
+    )
 from lp.testing import TestCase
 
 

=== modified file 'lib/lp/scripts/utilities/killservice.py'
--- lib/lp/scripts/utilities/killservice.py	2010-09-17 20:46:58 +0000
+++ lib/lp/scripts/utilities/killservice.py	2011-12-20 00:00:32 +0000
@@ -17,7 +17,6 @@
 import time
 
 from canonical.config import config
-from lp.services.mailman.runmailman import stop_mailman
 from canonical.launchpad.scripts import (
     logger,
     logger_options,
@@ -27,6 +26,7 @@
     pidfile_path,
     remove_pidfile,
     )
+from lp.services.mailman.runmailman import stop_mailman
 
 
 def main():

=== modified file 'lib/lp/services/apachelogparser/tests/test_apachelogparser.py'
--- lib/lp/services/apachelogparser/tests/test_apachelogparser.py	2011-12-19 15:09:08 +0000
+++ lib/lp/services/apachelogparser/tests/test_apachelogparser.py	2011-12-20 00:00:32 +0000
@@ -3,15 +3,14 @@
 
 from datetime import datetime
 import gzip
+from operator import itemgetter
 import os
 from StringIO import StringIO
 import tempfile
-from operator import itemgetter
 
 from zope.component import getUtility
 
 from canonical.config import config
-from lp.services.apachelogparser.librarian_apache_log_parser import DBUSER
 from canonical.launchpad.webapp.interfaces import (
     DEFAULT_FLAVOR,
     IStoreSelector,
@@ -30,6 +29,7 @@
     get_method_and_path,
     parse_file,
     )
+from lp.services.apachelogparser.librarian_apache_log_parser import DBUSER
 from lp.services.apachelogparser.model.parsedapachelog import ParsedApacheLog
 from lp.services.log.logger import BufferLogger
 from lp.testing import TestCase

=== modified file 'lib/lp/services/apachelogparser/tests/test_librarian_apache_log_parser.py'
--- lib/lp/services/apachelogparser/tests/test_librarian_apache_log_parser.py	2011-12-19 15:09:08 +0000
+++ lib/lp/services/apachelogparser/tests/test_librarian_apache_log_parser.py	2011-12-20 00:00:32 +0000
@@ -13,9 +13,6 @@
     login,
     )
 from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
-from lp.services.apachelogparser.librarian_apache_log_parser import (
-    get_library_file_id,
-    )
 from canonical.testing.layers import (
     DatabaseFunctionalLayer,
     ZopelessLayer,
@@ -24,6 +21,9 @@
     get_method_and_path,
     parse_file,
     )
+from lp.services.apachelogparser.librarian_apache_log_parser import (
+    get_library_file_id,
+    )
 from lp.services.log.logger import BufferLogger
 from lp.testing import TestCase
 

=== modified file 'lib/lp/services/command_spawner.py'
--- lib/lp/services/command_spawner.py	2011-04-21 14:14:00 +0000
+++ lib/lp/services/command_spawner.py	2011-12-20 00:00:32 +0000
@@ -12,9 +12,9 @@
 
 import errno
 from fcntl import (
-    fcntl,
     F_GETFL,
     F_SETFL,
+    fcntl,
     )
 from os import O_NONBLOCK
 import select

=== modified file 'lib/lp/services/database/__init__.py'
--- lib/lp/services/database/__init__.py	2010-09-24 15:21:05 +0000
+++ lib/lp/services/database/__init__.py	2011-12-20 00:00:32 +0000
@@ -10,13 +10,14 @@
     ]
 
 from psycopg2.extensions import TransactionRollbackError
-from storm.exceptions import DisconnectionError, IntegrityError
+from storm.exceptions import (
+    DisconnectionError,
+    IntegrityError,
+    )
 import transaction
 from twisted.python.util import mergeFunctionMetadata
 
-from canonical.database.sqlbase import (
-    reset_store,
-    )
+from canonical.database.sqlbase import reset_store
 
 
 RETRY_ATTEMPTS = 3

=== modified file 'lib/lp/services/database/tests/test_doc.py'
--- lib/lp/services/database/tests/test_doc.py	2011-12-18 17:15:11 +0000
+++ lib/lp/services/database/tests/test_doc.py	2011-12-20 00:00:32 +0000
@@ -7,9 +7,7 @@
 
 import os
 
-from canonical.testing.layers import (
-    DatabaseFunctionalLayer,
-    )
+from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.services.testing import build_test_suite
 
 

=== modified file 'lib/lp/services/database/tests/test_transaction_decorators.py'
--- lib/lp/services/database/tests/test_transaction_decorators.py	2011-08-12 11:19:40 +0000
+++ lib/lp/services/database/tests/test_transaction_decorators.py	2011-12-20 00:00:32 +0000
@@ -6,15 +6,18 @@
 import transaction
 from zope.component import getUtility
 
-from lp.services.database import (
-    read_transaction,
-    write_transaction,
-    )
 from canonical.launchpad.database.librarian import LibraryFileContent
 from canonical.launchpad.webapp.interfaces import (
-        IStoreSelector, MAIN_STORE, DEFAULT_FLAVOR)
+    DEFAULT_FLAVOR,
+    IStoreSelector,
+    MAIN_STORE,
+    )
 from canonical.librarian import db
 from canonical.testing.layers import LaunchpadZopelessLayer
+from lp.services.database import (
+    read_transaction,
+    write_transaction,
+    )
 
 
 class TestTransactionDecorators(unittest.TestCase):

=== modified file 'lib/lp/services/encoding.py'
--- lib/lp/services/encoding.py	2011-04-07 04:58:20 +0000
+++ lib/lp/services/encoding.py	2011-12-20 00:00:32 +0000
@@ -11,10 +11,11 @@
     'is_ascii_only',
     ]
 
+import codecs
+from cStringIO import StringIO
 import re
-import codecs
 import unicodedata
-from cStringIO import StringIO
+
 
 _boms = [
     (codecs.BOM_UTF16_BE, 'utf_16_be'),

=== modified file 'lib/lp/services/features/browser/info.py'
--- lib/lp/services/features/browser/info.py	2011-11-02 16:05:58 +0000
+++ lib/lp/services/features/browser/info.py	2011-12-20 00:00:32 +0000
@@ -23,7 +23,6 @@
     )
 from lp.services.utils import docstring_dedent
 
-
 # Named tuples to use when passing flag and scope data to the template.
 Flag = namedtuple(
     'Flag', ('name', 'domain', 'description', 'default', 'title', 'link'))

=== modified file 'lib/lp/services/features/browser/tests/test_changelog.py'
--- lib/lp/services/features/browser/tests/test_changelog.py	2011-07-13 06:08:16 +0000
+++ lib/lp/services/features/browser/tests/test_changelog.py	2011-12-20 00:00:32 +0000
@@ -8,10 +8,10 @@
 
 from zope.component import getUtility
 
+from canonical.launchpad.testing.pages import find_tag_by_id
 from canonical.launchpad.webapp.authorization import check_permission
 from canonical.launchpad.webapp.interfaces import ILaunchpadRoot
 from canonical.testing.layers import DatabaseFunctionalLayer
-from canonical.launchpad.testing.pages import find_tag_by_id
 from lp.services.features.changelog import ChangeLog
 from lp.testing import (
     login_celebrity,

=== modified file 'lib/lp/services/features/model.py'
--- lib/lp/services/features/model.py	2011-02-18 21:51:56 +0000
+++ lib/lp/services/features/model.py	2011-12-20 00:00:32 +0000
@@ -12,7 +12,6 @@
 from datetime import datetime
 
 import pytz
-
 from storm.locals import (
     DateTime,
     Int,

=== modified file 'lib/lp/services/features/rulesource.py'
--- lib/lp/services/features/rulesource.py	2011-10-17 10:38:53 +0000
+++ lib/lp/services/features/rulesource.py	2011-12-20 00:00:32 +0000
@@ -12,11 +12,11 @@
 
 __metaclass__ = type
 
-import re
 from collections import (
     defaultdict,
     namedtuple,
     )
+import re
 
 from storm.locals import Desc
 
@@ -26,7 +26,6 @@
     getFeatureStore,
     )
 
-
 # A convenient mapping for a feature flag rule in the database.
 Rule = namedtuple("Rule", "flag scope priority value")
 

=== modified file 'lib/lp/services/features/scopes.py'
--- lib/lp/services/features/scopes.py	2011-12-08 02:44:36 +0000
+++ lib/lp/services/features/scopes.py	2011-12-20 00:00:32 +0000
@@ -25,9 +25,9 @@
 
 import re
 
+import canonical.config
 from lp.registry.interfaces.person import IPerson
 from lp.services.propertycache import cachedproperty
-import canonical.config
 
 
 undocumented_scopes = set()

=== modified file 'lib/lp/services/features/testing.py'
--- lib/lp/services/features/testing.py	2011-12-08 04:08:08 +0000
+++ lib/lp/services/features/testing.py	2011-12-20 00:00:32 +0000
@@ -8,7 +8,6 @@
 
 
 from fixtures import Fixture
-
 from lazr.restful.utils import get_current_browser_request
 
 from lp.services.features import (
@@ -20,9 +19,7 @@
     Rule,
     StormFeatureRuleSource,
     )
-from lp.services.features.scopes import (
-    ScopesFromRequest,
-    )
+from lp.services.features.scopes import ScopesFromRequest
 
 
 class FeatureFixture(Fixture):

=== modified file 'lib/lp/services/features/tests/test_changelog.py'
--- lib/lp/services/features/tests/test_changelog.py	2011-02-18 21:51:56 +0000
+++ lib/lp/services/features/tests/test_changelog.py	2011-12-20 00:00:32 +0000
@@ -11,8 +11,8 @@
 import pytz
 
 from canonical.testing.layers import DatabaseFunctionalLayer
+from lp.services.features.changelog import ChangeLog
 from lp.services.features.model import FeatureFlagChangelogEntry
-from lp.services.features.changelog import ChangeLog
 from lp.testing import TestCaseWithFactory
 
 

=== modified file 'lib/lp/services/features/tests/test_scopes.py'
--- lib/lp/services/features/tests/test_scopes.py	2011-12-08 04:22:00 +0000
+++ lib/lp/services/features/tests/test_scopes.py	2011-12-20 00:00:32 +0000
@@ -6,15 +6,7 @@
 __metaclass__ = type
 
 from canonical.testing.layers import DatabaseFunctionalLayer
-
-from lp.testing import (
-    person_logged_in,
-    TestCase,
-    TestCaseWithFactory,
-    )
-from lp.services.features import (
-    getFeatureFlag,
-    )
+from lp.services.features import getFeatureFlag
 from lp.services.features.scopes import (
     BaseScope,
     MultiScopeHandler,
@@ -22,8 +14,11 @@
     ScriptScope,
     UserSliceScope,
     )
-from lp.services.features.testing import (
-    FeatureFixture,
+from lp.services.features.testing import FeatureFixture
+from lp.testing import (
+    person_logged_in,
+    TestCase,
+    TestCaseWithFactory,
     )
 
 

=== modified file 'lib/lp/services/features/tests/test_webapp.py'
--- lib/lp/services/features/tests/test_webapp.py	2011-12-08 06:33:40 +0000
+++ lib/lp/services/features/tests/test_webapp.py	2011-12-20 00:00:32 +0000
@@ -8,13 +8,12 @@
 from textwrap import dedent
 
 from canonical.config import config
+from canonical.launchpad.webapp.errorlog import globalErrorUtility
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
-from canonical.launchpad.webapp.errorlog import globalErrorUtility
 from canonical.testing import layers
-
 from lp.services.features import (
+    getFeatureFlag,
     webapp,
-    getFeatureFlag,
     )
 from lp.services.features.testing import FeatureFixture
 from lp.testing import (

=== modified file 'lib/lp/services/features/tests/test_xmlrpc.py'
--- lib/lp/services/features/tests/test_xmlrpc.py	2011-10-06 22:29:45 +0000
+++ lib/lp/services/features/tests/test_xmlrpc.py	2011-12-20 00:00:32 +0000
@@ -7,8 +7,8 @@
 
 import xmlrpclib
 
+from canonical.config import config
 from canonical.testing.layers import DatabaseFunctionalLayer
-from canonical.config import config
 from lp.services import features
 from lp.services.features.flags import FeatureController
 from lp.services.features.rulesource import StormFeatureRuleSource

=== modified file 'lib/lp/services/fields/tests/test_doc.py'
--- lib/lp/services/fields/tests/test_doc.py	2011-12-18 21:51:22 +0000
+++ lib/lp/services/fields/tests/test_doc.py	2011-12-20 00:00:32 +0000
@@ -7,9 +7,7 @@
 
 import os
 
-from canonical.testing.layers import (
-    DatabaseFunctionalLayer,
-    )
+from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.services.testing import build_test_suite
 
 

=== modified file 'lib/lp/services/fields/tests/test_fields.py'
--- lib/lp/services/fields/tests/test_fields.py	2011-11-07 00:17:47 +0000
+++ lib/lp/services/fields/tests/test_fields.py	2011-12-20 00:00:32 +0000
@@ -25,8 +25,9 @@
     BaseImageUpload,
     BlacklistableContentNameField,
     FormattableDate,
+    is_public_person_or_closed_team,
     StrippableText,
-    is_public_person_or_closed_team)
+    )
 from lp.testing import (
     login_person,
     TestCase,

=== modified file 'lib/lp/services/geoip/tests/test_doc.py'
--- lib/lp/services/geoip/tests/test_doc.py	2010-10-25 05:33:20 +0000
+++ lib/lp/services/geoip/tests/test_doc.py	2011-12-20 00:00:32 +0000
@@ -5,8 +5,8 @@
 
 __metaclass__ = type
 
+from doctest import DocTestSuite
 import os
-from doctest import DocTestSuite
 
 from canonical.testing.layers import LaunchpadFunctionalLayer
 from lp.services.testing import build_test_suite

=== modified file 'lib/lp/services/geoip/tests/test_request_country.py'
--- lib/lp/services/geoip/tests/test_request_country.py	2011-08-12 11:19:40 +0000
+++ lib/lp/services/geoip/tests/test_request_country.py	2011-12-20 00:00:32 +0000
@@ -11,8 +11,8 @@
     login,
     logout,
     )
+from canonical.testing.layers import LaunchpadFunctionalLayer
 from lp.services.geoip.helpers import request_country
-from canonical.testing.layers import LaunchpadFunctionalLayer
 
 
 class RequestCountryTestCase(unittest.TestCase):

=== modified file 'lib/lp/services/googlesearch/__init__.py'
--- lib/lp/services/googlesearch/__init__.py	2011-05-19 19:10:00 +0000
+++ lib/lp/services/googlesearch/__init__.py	2011-12-20 00:00:32 +0000
@@ -13,19 +13,20 @@
     'PageMatches',
     ]
 
-import xml.etree.cElementTree as ET
 import urllib
 import urllib2
 from urlparse import (
+    parse_qsl,
     urlunparse,
-    parse_qsl,
     )
+import xml.etree.cElementTree as ET
 
 from lazr.restful.utils import get_current_browser_request
 from lazr.uri import URI
 from zope.interface import implements
 
 from canonical.config import config
+from canonical.launchpad.webapp import urlparse
 from canonical.lazr.timeout import TimeoutError
 from lp.services.googlesearch.interfaces import (
     GoogleResponseError,
@@ -34,7 +35,6 @@
     ISearchResults,
     ISearchService,
     )
-from canonical.launchpad.webapp import urlparse
 from lp.services.timeline.requesttimeline import get_request_timeline
 
 

=== modified file 'lib/lp/services/googlesearch/googletestservice.py'
--- lib/lp/services/googlesearch/googletestservice.py	2011-03-04 17:05:09 +0000
+++ lib/lp/services/googlesearch/googletestservice.py	2011-12-20 00:00:32 +0000
@@ -28,7 +28,6 @@
     make_pidfile,
     pidfile_path,
     )
-
 from lp.services.osutils import ensure_directory_exists
 
 # Set up basic logging.

=== modified file 'lib/lp/services/identity/interfaces/account.py'
--- lib/lp/services/identity/interfaces/account.py	2011-12-18 13:45:20 +0000
+++ lib/lp/services/identity/interfaces/account.py	2011-12-20 00:00:32 +0000
@@ -27,7 +27,10 @@
     CollectionField,
     Reference,
     )
-from zope.interface import Attribute, Interface
+from zope.interface import (
+    Attribute,
+    Interface,
+    )
 from zope.schema import (
     Bool,
     Choice,

=== modified file 'lib/lp/services/identity/interfaces/emailaddress.py'
--- lib/lp/services/identity/interfaces/emailaddress.py	2011-12-18 13:45:20 +0000
+++ lib/lp/services/identity/interfaces/emailaddress.py	2011-12-20 00:00:32 +0000
@@ -31,8 +31,8 @@
     )
 
 from canonical.launchpad import _
+from lp.registry.interfaces.role import IHasOwner
 from lp.services.identity.interfaces.account import IAccount
-from lp.registry.interfaces.role import IHasOwner
 
 
 class InvalidEmailAddress(Exception):

=== modified file 'lib/lp/services/identity/model/account.py'
--- lib/lp/services/identity/model/account.py	2011-12-18 13:55:35 +0000
+++ lib/lp/services/identity/model/account.py	2011-12-20 00:00:32 +0000
@@ -24,7 +24,7 @@
 from canonical.database.datetimecol import UtcDateTimeCol
 from canonical.database.enumcol import EnumCol
 from canonical.database.sqlbase import SQLBase
-from lp.services.identity.model.emailaddress import EmailAddress
+from canonical.launchpad.interfaces.launchpad import IPasswordEncryptor
 from canonical.launchpad.interfaces.lpstorm import (
     IMasterObject,
     IMasterStore,
@@ -41,7 +41,7 @@
     IEmailAddress,
     IEmailAddressSet,
     )
-from canonical.launchpad.interfaces.launchpad import IPasswordEncryptor
+from lp.services.identity.model.emailaddress import EmailAddress
 from lp.services.openid.model.openididentifier import OpenIdIdentifier
 
 

=== modified file 'lib/lp/services/identity/model/emailaddress.py'
--- lib/lp/services/identity/model/emailaddress.py	2011-12-18 13:55:35 +0000
+++ lib/lp/services/identity/model/emailaddress.py	2011-12-20 00:00:32 +0000
@@ -27,6 +27,7 @@
     SQLBase,
     sqlvalues,
     )
+from lp.app.validators.email import valid_email
 from lp.services.identity.interfaces.emailaddress import (
     EmailAddressAlreadyTaken,
     EmailAddressStatus,
@@ -34,7 +35,6 @@
     IEmailAddressSet,
     InvalidEmailAddress,
     )
-from lp.app.validators.email import valid_email
 
 
 class HasOwnerMixin:

=== modified file 'lib/lp/services/identity/tests/test_doc.py'
--- lib/lp/services/identity/tests/test_doc.py	2011-12-18 13:55:35 +0000
+++ lib/lp/services/identity/tests/test_doc.py	2011-12-20 00:00:32 +0000
@@ -10,7 +10,8 @@
 from canonical.launchpad.testing.systemdocs import (
     LayeredDocFileSuite,
     setUp,
-    tearDown)
+    tearDown,
+    )
 from canonical.testing import (
     DatabaseFunctionalLayer,
     LaunchpadZopelessLayer,

=== modified file 'lib/lp/services/log/loglevels.py'
--- lib/lp/services/log/loglevels.py	2011-04-05 12:41:25 +0000
+++ lib/lp/services/log/loglevels.py	2011-12-20 00:00:32 +0000
@@ -28,7 +28,6 @@
 
 import logging
 
-
 # Reexport standard log levels.
 DEBUG = logging.DEBUG
 INFO = logging.INFO

=== modified file 'lib/lp/services/mail/incoming.py'
--- lib/lp/services/mail/incoming.py	2011-12-18 13:45:20 +0000
+++ lib/lp/services/mail/incoming.py	2011-12-20 00:00:32 +0000
@@ -26,7 +26,6 @@
     directlyProvides,
     )
 
-from lp.services.identity.interfaces.account import AccountStatus
 from canonical.launchpad.mailnotification import (
     send_process_error_notification,
     )
@@ -46,6 +45,7 @@
     GPGVerificationError,
     IGPGHandler,
     )
+from lp.services.identity.interfaces.account import AccountStatus
 from lp.services.mail.handlers import mail_handlers
 from lp.services.mail.helpers import (
     ensure_sane_signature_timestamp,

=== modified file 'lib/lp/services/mail/tests/test_doc.py'
--- lib/lp/services/mail/tests/test_doc.py	2011-08-12 18:51:32 +0000
+++ lib/lp/services/mail/tests/test_doc.py	2011-12-20 00:00:32 +0000
@@ -10,12 +10,12 @@
 from zope.security.management import setSecurityPolicy
 
 from canonical.config import config
-from canonical.launchpad.webapp.authorization import LaunchpadSecurityPolicy
 from canonical.launchpad.testing.systemdocs import (
     LayeredDocFileSuite,
     setUp,
     tearDown,
     )
+from canonical.launchpad.webapp.authorization import LaunchpadSecurityPolicy
 from canonical.testing.layers import (
     DatabaseFunctionalLayer,
     LaunchpadZopelessLayer,

=== modified file 'lib/lp/services/mail/tests/test_sendmail.py'
--- lib/lp/services/mail/tests/test_sendmail.py	2011-11-23 07:29:09 +0000
+++ lib/lp/services/mail/tests/test_sendmail.py	2011-12-20 00:00:32 +0000
@@ -14,13 +14,12 @@
 from lp.services.encoding import is_ascii_only
 from lp.services.mail import sendmail
 from lp.services.mail.sendmail import MailController
+from lp.testing import TestCase
 from lp.testing.fixture import (
     CaptureTimeline,
     ZopeUtilityFixture,
     )
 
-from lp.testing import TestCase
-
 
 class TestMailController(TestCase):
 

=== modified file 'lib/lp/services/mailman/monkeypatches/lphandler.py'
--- lib/lp/services/mailman/monkeypatches/lphandler.py	2011-01-18 02:42:08 +0000
+++ lib/lp/services/mailman/monkeypatches/lphandler.py	2011-12-20 00:00:32 +0000
@@ -5,13 +5,13 @@
 
 
 import hashlib
-from Mailman.Queue import XMLRPCRunner
 
 from Mailman import (
     Errors,
     mm_cfg,
     )
 from Mailman.Logging.Syslog import syslog
+from Mailman.Queue import XMLRPCRunner
 
 
 def process(mlist, msg, msgdata):

=== modified file 'lib/lp/services/mailman/monkeypatches/lpmoderate.py'
--- lib/lp/services/mailman/monkeypatches/lpmoderate.py	2010-09-20 01:06:20 +0000
+++ lib/lp/services/mailman/monkeypatches/lpmoderate.py	2011-12-20 00:00:32 +0000
@@ -12,8 +12,8 @@
 import xmlrpclib
 
 from Mailman import Errors
+from Mailman.Logging.Syslog import syslog
 from Mailman.Queue import XMLRPCRunner
-from Mailman.Logging.Syslog import syslog
 
 
 def process(mlist, msg, msgdata):

=== modified file 'lib/lp/services/mailman/testing/__init__.py'
--- lib/lp/services/mailman/testing/__init__.py	2011-04-08 19:40:59 +0000
+++ lib/lp/services/mailman/testing/__init__.py	2011-12-20 00:00:32 +0000
@@ -17,14 +17,12 @@
     Message,
     mm_cfg,
     )
+from Mailman.Logging.Syslog import syslog
 from Mailman.Queue import XMLRPCRunner
-from Mailman.Logging.Syslog import syslog
 from Mailman.Queue.sbcache import get_switchboard
-
 from zope.security.proxy import removeSecurityProxy
 
 from canonical.testing.layers import DatabaseFunctionalLayer
-
 from lp.registry.tests.mailinglists_helper import MailingListXMLRPCTestProxy
 from lp.testing import TestCaseWithFactory
 

=== modified file 'lib/lp/services/mailman/testing/layers.py'
--- lib/lp/services/mailman/testing/layers.py	2010-09-17 20:46:58 +0000
+++ lib/lp/services/mailman/testing/layers.py	2011-12-20 00:00:32 +0000
@@ -12,14 +12,14 @@
 import atexit
 import os
 
+from canonical.testing.layers import (
+    AppServerLayer,
+    LayerProcessController,
+    )
 from lp.services.mailman.runmailman import (
     start_mailman,
     stop_mailman,
     )
-from canonical.testing.layers import (
-    AppServerLayer,
-    LayerProcessController,
-    )
 from lp.services.mailman.testing import logwatcher
 
 

=== modified file 'lib/lp/services/mailman/tests/test_lpsize.py'
--- lib/lp/services/mailman/tests/test_lpsize.py	2010-12-14 14:57:34 +0000
+++ lib/lp/services/mailman/tests/test_lpsize.py	2011-12-20 00:00:32 +0000
@@ -10,10 +10,9 @@
 
 from email.mime.application import MIMEApplication
 
-from zope.security.proxy import removeSecurityProxy
-
 from Mailman import Errors
 from Mailman.Handlers import LPSize
+from zope.security.proxy import removeSecurityProxy
 
 from canonical.config import config
 from canonical.testing import (

=== modified file 'lib/lp/services/mailman/tests/test_mlist_sync.py'
--- lib/lp/services/mailman/tests/test_mlist_sync.py	2011-12-18 13:45:20 +0000
+++ lib/lp/services/mailman/tests/test_mlist_sync.py	2011-12-20 00:00:32 +0000
@@ -8,19 +8,22 @@
 from contextlib import contextmanager
 import os
 import shutil
+from subprocess import (
+    PIPE,
+    Popen,
+    )
 import sys
 import tempfile
-from transaction import commit
-from subprocess import Popen, PIPE
 
 from Mailman import mm_cfg
 from Mailman.MailList import MailList
 from Mailman.Utils import list_names
+from transaction import commit
 
 from canonical.config import config
-from lp.services.identity.model.emailaddress import EmailAddressSet
 from canonical.launchpad.interfaces.lpstorm import IStore
 from canonical.testing.layers import DatabaseFunctionalLayer
+from lp.services.identity.model.emailaddress import EmailAddressSet
 from lp.services.mailman.testing import MailmanTestCase
 from lp.testing import person_logged_in
 

=== modified file 'lib/lp/services/mailman/tests/test_xmlrpcrunner.py'
--- lib/lp/services/mailman/tests/test_xmlrpcrunner.py	2011-07-27 15:25:32 +0000
+++ lib/lp/services/mailman/tests/test_xmlrpcrunner.py	2011-12-20 00:00:32 +0000
@@ -9,9 +9,11 @@
 from datetime import datetime
 import socket
 
-from Mailman import Errors
+from Mailman import (
+    Errors,
+    mm_cfg,
+    )
 from Mailman.Logging.Syslog import syslog
-from Mailman import mm_cfg
 from Mailman.Queue.XMLRPCRunner import (
     handle_proxy_error,
     XMLRPCRunner,
@@ -26,9 +28,9 @@
     get_mailing_list_api_proxy,
     )
 from lp.services.mailman.testing import (
-     get_mailing_list_api_test_proxy,
-     MailmanTestCase,
-     )
+    get_mailing_list_api_test_proxy,
+    MailmanTestCase,
+    )
 from lp.services.xmlrpc import Transport
 from lp.testing import TestCase
 

=== modified file 'lib/lp/services/memcache/tales.py'
--- lib/lp/services/memcache/tales.py	2011-02-17 16:15:50 +0000
+++ lib/lp/services/memcache/tales.py	2011-12-20 00:00:32 +0000
@@ -28,8 +28,8 @@
 from zope.tales.interfaces import ITALESExpression
 
 from canonical.config import config
+from canonical.launchpad.webapp.interfaces import ILaunchBag
 from lp.app import versioninfo
-from canonical.launchpad.webapp.interfaces import ILaunchBag
 from lp.services.memcache.interfaces import IMemcacheClient
 from lp.services.utils import compress_hash
 

=== modified file 'lib/lp/services/messages/browser/message.py'
--- lib/lp/services/messages/browser/message.py	2011-12-18 14:14:46 +0000
+++ lib/lp/services/messages/browser/message.py	2011-12-20 00:00:32 +0000
@@ -7,8 +7,8 @@
 
 from zope.interface import implements
 
+from canonical.launchpad.webapp.interfaces import ICanonicalUrlData
 from lp.services.messages.interfaces.message import IIndexedMessage
-from canonical.launchpad.webapp.interfaces import ICanonicalUrlData
 
 
 class QuestionMessageCanonicalUrlData:

=== modified file 'lib/lp/services/messages/tests/test_message.py'
--- lib/lp/services/messages/tests/test_message.py	2011-08-16 13:35:41 +0000
+++ lib/lp/services/messages/tests/test_message.py	2011-12-20 00:00:32 +0000
@@ -21,14 +21,14 @@
 from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
 from canonical.launchpad.webapp.testing import verifyObject
 from canonical.testing.layers import LaunchpadFunctionalLayer
+from lp.services.job.model.job import Job
+from lp.services.mail.sendmail import MailController
 from lp.services.messages.interfaces.message import IMessageJob
 from lp.services.messages.model.message import (
     MessageJob,
     MessageJobAction,
     MessageSet,
     )
-from lp.services.job.model.job import Job
-from lp.services.mail.sendmail import MailController
 from lp.testing import (
     TestCase,
     TestCaseWithFactory,

=== modified file 'lib/lp/services/oauth/interfaces.py'
--- lib/lp/services/oauth/interfaces.py	2011-12-08 05:13:31 +0000
+++ lib/lp/services/oauth/interfaces.py	2011-12-20 00:00:32 +0000
@@ -24,6 +24,8 @@
     ]
 
 import httplib
+
+from lazr.restful.declarations import error_status
 from zope.interface import (
     Attribute,
     Interface,
@@ -36,8 +38,6 @@
     TextLine,
     )
 
-from lazr.restful.declarations import error_status
-
 from canonical.launchpad import _
 from canonical.launchpad.webapp.interfaces import (
     AccessLevel,

=== modified file 'lib/lp/services/oauth/tests/test_tokens.py'
--- lib/lp/services/oauth/tests/test_tokens.py	2011-12-09 12:51:40 +0000
+++ lib/lp/services/oauth/tests/test_tokens.py	2011-12-20 00:00:32 +0000
@@ -17,9 +17,7 @@
 from zope.proxy import sameProxiedObjects
 from zope.security.interfaces import Unauthorized
 
-from canonical.launchpad.ftests import (
-    login_person,
-    )
+from canonical.launchpad.ftests import login_person
 from canonical.launchpad.webapp.interfaces import (
     AccessLevel,
     OAuthPermission,

=== modified file 'lib/lp/services/openid/adapters/openid.py'
--- lib/lp/services/openid/adapters/openid.py	2011-12-18 13:55:35 +0000
+++ lib/lp/services/openid/adapters/openid.py	2011-12-20 00:00:32 +0000
@@ -20,10 +20,10 @@
     )
 from zope.security.proxy import removeSecurityProxy
 
-from lp.services.identity.interfaces.account import IAccount
 from canonical.launchpad.interfaces.lpstorm import IStore
 from canonical.launchpad.webapp.vhosts import allvhosts
 from lp.registry.interfaces.person import IPerson
+from lp.services.identity.interfaces.account import IAccount
 from lp.services.openid.interfaces.openid import IOpenIDPersistentIdentity
 from lp.services.openid.model.openididentifier import OpenIdIdentifier
 

=== modified file 'lib/lp/services/openid/interfaces/openididentifier.py'
--- lib/lp/services/openid/interfaces/openididentifier.py	2011-12-18 13:55:35 +0000
+++ lib/lp/services/openid/interfaces/openididentifier.py	2011-12-20 00:00:32 +0000
@@ -16,6 +16,7 @@
 from canonical.launchpad import _
 from lp.services.identity.interfaces.account import IAccount
 
+
 class IOpenIdIdentifier(Interface):
     """An OpenId Identifier that can be used to log into an Account"""
     account = Object(schema=IAccount, required=True)

=== modified file 'lib/lp/services/openid/model/openididentifier.py'
--- lib/lp/services/openid/model/openididentifier.py	2010-09-03 07:02:48 +0000
+++ lib/lp/services/openid/model/openididentifier.py	2011-12-20 00:00:32 +0000
@@ -6,7 +6,12 @@
 __metaclass__ = type
 __all__ = ['OpenIdIdentifier']
 
-from storm.locals import Int, Reference, Storm, Unicode
+from storm.locals import (
+    Int,
+    Reference,
+    Storm,
+    Unicode,
+    )
 
 from canonical.database.constants import UTC_NOW
 from canonical.database.datetimecol import UtcDateTimeCol

=== modified file 'lib/lp/services/profile/mem.py'
--- lib/lp/services/profile/mem.py	2011-02-17 16:58:57 +0000
+++ lib/lp/services/profile/mem.py	2011-12-20 00:00:32 +0000
@@ -36,9 +36,9 @@
 import gc
 import os
 import sys
-import types
 import threading
 import time
+import types
 
 
 _proc_status = '/proc/%d/status' % os.getpid()

=== modified file 'lib/lp/services/profile/profile.py'
--- lib/lp/services/profile/profile.py	2011-11-16 06:34:23 +0000
+++ lib/lp/services/profile/profile.py	2011-12-20 00:00:32 +0000
@@ -41,11 +41,11 @@
     DisallowedStore,
     IStartRequestEvent,
     )
+from lp.services.features import getFeatureFlag
 from lp.services.profile.mem import (
     memory,
     resident,
     )
-from lp.services.features import getFeatureFlag
 
 
 class ProfilingOops(Exception):

=== modified file 'lib/lp/services/profile/tests.py'
--- lib/lp/services/profile/tests.py	2011-12-19 15:09:08 +0000
+++ lib/lp/services/profile/tests.py	2011-12-20 00:00:32 +0000
@@ -20,7 +20,6 @@
     )
 from zope.component import getSiteManager
 
-from canonical.testing.layers import LaunchpadFunctionalLayer
 from canonical.launchpad.testing.systemdocs import (
     LayeredDocFileSuite,
     setUp,
@@ -28,14 +27,16 @@
     )
 import canonical.launchpad.webapp.adapter as da
 from canonical.launchpad.webapp.errorlog import ErrorReportingUtility
+from canonical.launchpad.webapp.interfaces import StartRequestEvent
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
-from canonical.launchpad.webapp.interfaces import StartRequestEvent
 from canonical.testing import layers
+from canonical.testing.layers import LaunchpadFunctionalLayer
 from lp.services.features.testing import FeatureFixture
 from lp.services.profile import profile
 from lp.testing import (
     TestCase,
-    TestCaseWithFactory)
+    TestCaseWithFactory,
+    )
 
 
 EXAMPLE_HTML_START = '''\

=== modified file 'lib/lp/services/scripts/tests/cronscript-crash.py'
--- lib/lp/services/scripts/tests/cronscript-crash.py	2011-10-17 01:41:58 +0000
+++ lib/lp/services/scripts/tests/cronscript-crash.py	2011-12-20 00:00:32 +0000
@@ -9,10 +9,9 @@
 
 import _pythonpath
 
+from canonical.launchpad.webapp.errorlog import globalErrorUtility
 from lp.services.scripts.base import LaunchpadCronScript
 
-from canonical.launchpad.webapp.errorlog import globalErrorUtility
-
 
 class CrashScript(LaunchpadCronScript):
 

=== modified file 'lib/lp/services/scripts/tests/test_doc.py'
--- lib/lp/services/scripts/tests/test_doc.py	2010-10-04 19:50:45 +0000
+++ lib/lp/services/scripts/tests/test_doc.py	2011-12-20 00:00:32 +0000
@@ -12,7 +12,10 @@
     setUp,
     tearDown,
     )
-from canonical.testing.layers import DatabaseLayer, LaunchpadZopelessLayer
+from canonical.testing.layers import (
+    DatabaseLayer,
+    LaunchpadZopelessLayer,
+    )
 from lp.services.testing import build_test_suite
 
 

=== modified file 'lib/lp/services/sshserver/tests/test_auth.py'
--- lib/lp/services/sshserver/tests/test_auth.py	2010-11-09 00:14:40 +0000
+++ lib/lp/services/sshserver/tests/test_auth.py	2011-12-20 00:00:32 +0000
@@ -5,10 +5,9 @@
 
 from testtools.deferredruntest import (
     assert_fails_with,
+    AsynchronousDeferredRunTest,
     flush_logged_errors,
-    AsynchronousDeferredRunTest,
     )
-
 from twisted.conch.checkers import SSHPublicKeyDatabase
 from twisted.conch.error import ConchError
 from twisted.conch.ssh import userauth

=== modified file 'lib/lp/services/stacktrace.py'
--- lib/lp/services/stacktrace.py	2011-08-25 17:52:20 +0000
+++ lib/lp/services/stacktrace.py	2011-12-20 00:00:32 +0000
@@ -19,6 +19,7 @@
 import sys
 import traceback
 
+
 DEBUG_EXCEPTION_FORMATTER = False
 EXPLOSIVE_ERRORS = (SystemExit, MemoryError, KeyboardInterrupt)
 

=== modified file 'lib/lp/services/tests/test_command_spawner.py'
--- lib/lp/services/tests/test_command_spawner.py	2011-04-06 03:21:09 +0000
+++ lib/lp/services/tests/test_command_spawner.py	2011-12-20 00:00:32 +0000
@@ -10,24 +10,25 @@
     timedelta,
     )
 from fcntl import (
+    F_GETFL,
     fcntl,
-    F_GETFL,
     )
 from os import (
     fdopen,
     O_NONBLOCK,
     pipe,
     )
+
 from pytz import utc
 from testtools.matchers import LessThan
 
-from lp.testing import TestCase
-from lp.testing.fakemethod import FakeMethod
 from lp.services.command_spawner import (
     CommandSpawner,
     OutputLineHandler,
     ReturnCodeReceiver,
     )
+from lp.testing import TestCase
+from lp.testing.fakemethod import FakeMethod
 
 
 def make_pipe():

=== modified file 'lib/lp/services/tests/test_encoding.py'
--- lib/lp/services/tests/test_encoding.py	2011-02-17 17:02:54 +0000
+++ lib/lp/services/tests/test_encoding.py	2011-12-20 00:00:32 +0000
@@ -1,10 +1,14 @@
 # Copyright 2009 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
-from doctest import DocTestSuite, ELLIPSIS
+from doctest import (
+    DocTestSuite,
+    ELLIPSIS,
+    )
 
 import lp.services.encoding
 
+
 def test_suite():
     suite = DocTestSuite(lp.services.encoding, optionflags=ELLIPSIS)
     return suite

=== modified file 'lib/lp/services/tests/test_utils.py'
--- lib/lp/services/tests/test_utils.py	2011-11-09 14:18:29 +0000
+++ lib/lp/services/tests/test_utils.py	2011-12-20 00:00:32 +0000
@@ -30,8 +30,8 @@
     docstring_dedent,
     file_exists,
     iter_split,
+    load_bz2_pickle,
     obfuscate_structure,
-    load_bz2_pickle,
     run_capturing_output,
     save_bz2_pickle,
     traceback_info,

=== modified file 'lib/lp/services/timeline/tests/test_requesttimeline.py'
--- lib/lp/services/timeline/tests/test_requesttimeline.py	2011-08-10 01:00:53 +0000
+++ lib/lp/services/timeline/tests/test_requesttimeline.py	2011-12-20 00:00:32 +0000
@@ -6,7 +6,10 @@
 __metaclass__ = type
 
 import testtools
-from timeline.timeline import OverlappingActionError, Timeline
+from timeline.timeline import (
+    OverlappingActionError,
+    Timeline,
+    )
 from zope.publisher.browser import TestRequest
 
 from canonical.launchpad import webapp

=== modified file 'lib/lp/services/twistedsupport/gracefulshutdown.py'
--- lib/lp/services/twistedsupport/gracefulshutdown.py	2011-02-03 04:25:47 +0000
+++ lib/lp/services/twistedsupport/gracefulshutdown.py	2011-12-20 00:00:32 +0000
@@ -12,15 +12,21 @@
     ]
 
 
-from twisted.application import service, strports
-from twisted.protocols.policies import WrappingFactory
+from twisted.application import (
+    service,
+    strports,
+    )
 from twisted.internet.defer import (
     Deferred,
     gatherResults,
     inlineCallbacks,
     maybeDeferred,
     )
-from twisted.web import resource, server
+from twisted.protocols.policies import WrappingFactory
+from twisted.web import (
+    resource,
+    server,
+    )
 from zope.interface import implements
 
 

=== modified file 'lib/lp/services/twistedsupport/tests/test_gracefulshutdown.py'
--- lib/lp/services/twistedsupport/tests/test_gracefulshutdown.py	2011-02-03 04:25:47 +0000
+++ lib/lp/services/twistedsupport/tests/test_gracefulshutdown.py	2011-12-20 00:00:32 +0000
@@ -13,10 +13,9 @@
     )
 from twisted.web import http
 
+from lp.services.twistedsupport import gracefulshutdown
 from lp.testing import TestCase
 
-from lp.services.twistedsupport import gracefulshutdown
-
 
 class TestConnTrackingFactoryWrapper(TestCase):
 

=== modified file 'lib/lp/services/twistedsupport/tests/test_processmonitor.py'
--- lib/lp/services/twistedsupport/tests/test_processmonitor.py	2010-10-30 23:21:47 +0000
+++ lib/lp/services/twistedsupport/tests/test_processmonitor.py	2011-12-20 00:00:32 +0000
@@ -12,7 +12,6 @@
     AsynchronousDeferredRunTest,
     flush_logged_errors,
     )
-
 from twisted.internet import (
     defer,
     error,

=== modified file 'lib/lp/services/twistedsupport/tests/test_twistedsupport.py'
--- lib/lp/services/twistedsupport/tests/test_twistedsupport.py	2010-10-30 23:17:24 +0000
+++ lib/lp/services/twistedsupport/tests/test_twistedsupport.py	2011-12-20 00:00:32 +0000
@@ -9,7 +9,6 @@
     assert_fails_with,
     AsynchronousDeferredRunTest,
     )
-
 from twisted.internet import defer
 from twisted.internet.task import Clock
 

=== modified file 'lib/lp/services/webservice/tests/test_json.py'
--- lib/lp/services/webservice/tests/test_json.py	2011-07-14 21:49:37 +0000
+++ lib/lp/services/webservice/tests/test_json.py	2011-12-20 00:00:32 +0000
@@ -7,8 +7,9 @@
 
 from datetime import timedelta
 
+from lazr.restful.interfaces import IJSONPublishable
+
 from canonical.testing.layers import FunctionalLayer
-from lazr.restful.interfaces import IJSONPublishable
 from lp.services.webservice.json import StrJSONSerializer
 from lp.testing import TestCase
 

=== modified file 'lib/lp/services/worlddata/interfaces/webservice.py'
--- lib/lp/services/worlddata/interfaces/webservice.py	2010-11-09 16:25:22 +0000
+++ lib/lp/services/worlddata/interfaces/webservice.py	2011-12-20 00:00:32 +0000
@@ -16,6 +16,9 @@
      'ILanguageSet',
      ]
 
+# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
+# import bugs.  Break this up into a per-package thing.
+from canonical.launchpad.interfaces import _schema_circular_imports
 from lp.services.worlddata.interfaces.country import (
     ICountry,
     ICountrySet,
@@ -24,7 +27,6 @@
     ILanguage,
     ILanguageSet,
     )
-# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
-# import bugs.  Break this up into a per-package thing.
-from canonical.launchpad.interfaces import _schema_circular_imports
+
+
 _schema_circular_imports

=== modified file 'lib/lp/services/worlddata/model/language.py'
--- lib/lp/services/worlddata/model/language.py	2011-12-19 15:09:08 +0000
+++ lib/lp/services/worlddata/model/language.py	2011-12-20 00:00:32 +0000
@@ -30,9 +30,6 @@
 
 from canonical.database.enumcol import EnumCol
 from canonical.database.sqlbase import SQLBase
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.helpers import ensure_unicode
 from canonical.launchpad.interfaces.lpstorm import (
     ISlaveStore,
@@ -43,6 +40,7 @@
     KarmaCache,
     KarmaCategory,
     )
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.propertycache import (
     cachedproperty,
     get_property_cache,
@@ -52,10 +50,11 @@
     ILanguageSet,
     TextDirection,
     )
-
 # XXX: JonathanLange 2010-11-10 bug=673796: It turns out this module is
 # unusable without spokenin being imported first. So, import spokenin.
 from lp.services.worlddata.model.spokenin import SpokenIn
+
+
 SpokenIn
 
 

=== modified file 'lib/lp/services/worlddata/tests/test_language.py'
--- lib/lp/services/worlddata/tests/test_language.py	2011-03-07 07:44:03 +0000
+++ lib/lp/services/worlddata/tests/test_language.py	2011-12-20 00:00:32 +0000
@@ -19,8 +19,8 @@
     ILanguageSet,
     )
 from lp.testing import (
+    StormStatementRecorder,
     TestCaseWithFactory,
-    StormStatementRecorder,
     )
 from lp.testing.dbuser import dbuser
 from lp.testing.matchers import HasQueryCount

=== modified file 'lib/lp/services/worlddata/vocabularies.py'
--- lib/lp/services/worlddata/vocabularies.py	2011-12-04 17:21:38 +0000
+++ lib/lp/services/worlddata/vocabularies.py	2011-12-20 00:00:32 +0000
@@ -10,27 +10,19 @@
 __metaclass__ = type
 
 import pytz
-
-from sqlobject import (
-    SQLObjectNotFound,
-    )
-
+from sqlobject import SQLObjectNotFound
 from zope.interface import alsoProvides
 from zope.schema.vocabulary import (
     SimpleTerm,
     SimpleVocabulary,
     )
 
+from canonical.launchpad.webapp.vocabulary import SQLObjectVocabularyBase
 from canonical.lazr.interfaces.timezone import ITimezoneNameVocabulary
-
-from canonical.launchpad.webapp.vocabulary import (
-    SQLObjectVocabularyBase,
-    )
 from lp.services.worlddata.interfaces.language import ILanguage
 from lp.services.worlddata.model.country import Country
 from lp.services.worlddata.model.language import Language
 
-
 # create a sorted list of the common time zone names, with UTC at the start
 _values = sorted(pytz.common_timezones)
 _values.remove('UTC')

=== modified file 'lib/lp/soyuz/adapters/archivesourcepublication.py'
--- lib/lp/soyuz/adapters/archivesourcepublication.py	2011-03-29 00:11:57 +0000
+++ lib/lp/soyuz/adapters/archivesourcepublication.py	2011-12-20 00:00:32 +0000
@@ -21,8 +21,8 @@
 
 from canonical.launchpad.browser.librarian import ProxiedLibraryFileAlias
 from canonical.launchpad.interfaces.lpstorm import IStore
+from lp.registry.model.distroseries import DistroSeries
 from lp.registry.model.sourcepackagename import SourcePackageName
-from lp.registry.model.distroseries import DistroSeries
 from lp.soyuz.interfaces.publishing import (
     IPublishingSet,
     ISourcePackagePublishingHistory,

=== modified file 'lib/lp/soyuz/adapters/overrides.py'
--- lib/lp/soyuz/adapters/overrides.py	2011-12-18 14:29:19 +0000
+++ lib/lp/soyuz/adapters/overrides.py	2011-12-20 00:00:32 +0000
@@ -29,12 +29,10 @@
     Interface,
     )
 
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.interfaces.lpstorm import IStore
 from lp.registry.model.sourcepackagename import SourcePackageName
 from lp.services.database import bulk
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.soyuz.interfaces.component import IComponentSet
 from lp.soyuz.interfaces.publishing import active_publishing_status
 from lp.soyuz.model.binarypackagename import BinaryPackageName

=== modified file 'lib/lp/soyuz/adapters/tests/test_copypolicy.py'
--- lib/lp/soyuz/adapters/tests/test_copypolicy.py	2011-06-10 11:17:39 +0000
+++ lib/lp/soyuz/adapters/tests/test_copypolicy.py	2011-12-20 00:00:32 +0000
@@ -9,11 +9,11 @@
     InsecureCopyPolicy,
     MassSyncCopyPolicy,
     )
-from lp.soyuz.interfaces.copypolicy import ICopyPolicy
 from lp.soyuz.enums import (
     ArchivePurpose,
     PackageCopyPolicy,
     )
+from lp.soyuz.interfaces.copypolicy import ICopyPolicy
 from lp.testing import TestCaseWithFactory
 
 

=== modified file 'lib/lp/soyuz/browser/archive.py'
--- lib/lp/soyuz/browser/archive.py	2011-12-19 20:08:42 +0000
+++ lib/lp/soyuz/browser/archive.py	2011-12-20 00:00:32 +0000
@@ -71,7 +71,6 @@
     stepthrough,
     )
 from canonical.launchpad.webapp.authorization import check_permission
-from lp.app.browser.badge import HasBadgeBase
 from canonical.launchpad.webapp.batching import BatchNavigator
 from canonical.launchpad.webapp.interfaces import (
     ICanonicalUrlData,
@@ -81,6 +80,7 @@
     NavigationMenu,
     structured,
     )
+from lp.app.browser.badge import HasBadgeBase
 from lp.app.browser.launchpadform import (
     action,
     custom_widget,

=== modified file 'lib/lp/soyuz/browser/tests/test_archive_webservice.py'
--- lib/lp/soyuz/browser/tests/test_archive_webservice.py	2011-12-15 16:19:18 +0000
+++ lib/lp/soyuz/browser/tests/test_archive_webservice.py	2011-12-20 00:00:32 +0000
@@ -7,10 +7,10 @@
 
 from lazr.restfulclient.errors import (
     BadRequest,
+    HTTPError,
     NotFound,
-    HTTPError,
     Unauthorized as LRUnauthorized,
-)
+    )
 from testtools import ExpectedException
 import transaction
 from zope.component import getUtility

=== modified file 'lib/lp/soyuz/browser/tests/test_build_views.py'
--- lib/lp/soyuz/browser/tests/test_build_views.py	2011-12-14 20:49:35 +0000
+++ lib/lp/soyuz/browser/tests/test_build_views.py	2011-12-20 00:00:32 +0000
@@ -7,6 +7,7 @@
     datetime,
     timedelta,
     )
+
 import pytz
 import soupmatchers
 from testtools.matchers import (
@@ -20,8 +21,8 @@
     )
 from zope.security.proxy import removeSecurityProxy
 
+from canonical.launchpad.webapp import canonical_url
 from canonical.launchpad.webapp.interfaces import StormRangeFactoryError
-from canonical.launchpad.webapp import canonical_url
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
 from canonical.testing.layers import LaunchpadFunctionalLayer
 from lp.buildmaster.enums import BuildStatus

=== modified file 'lib/lp/soyuz/browser/tests/test_distroarchseries_webservice.py'
--- lib/lp/soyuz/browser/tests/test_distroarchseries_webservice.py	2011-09-05 16:22:34 +0000
+++ lib/lp/soyuz/browser/tests/test_distroarchseries_webservice.py	2011-12-20 00:00:32 +0000
@@ -8,8 +8,8 @@
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.testing import (
     launchpadlib_for,
+    TestCaseWithFactory,
     ws_object,
-    TestCaseWithFactory,
     )
 
 

=== modified file 'lib/lp/soyuz/browser/tests/test_package_copying_mixin.py'
--- lib/lp/soyuz/browser/tests/test_package_copying_mixin.py	2011-07-15 12:31:40 +0000
+++ lib/lp/soyuz/browser/tests/test_package_copying_mixin.py	2011-12-20 00:00:32 +0000
@@ -20,9 +20,9 @@
     PackageCopyingMixin,
     render_cannotcopy_as_html,
     )
+from lp.soyuz.enums import SourcePackageFormat
 from lp.soyuz.interfaces.archive import CannotCopy
 from lp.soyuz.interfaces.packagecopyjob import IPlainPackageCopyJobSource
-from lp.soyuz.enums import SourcePackageFormat
 from lp.soyuz.interfaces.sourcepackageformat import (
     ISourcePackageFormatSelectionSet,
     )

=== modified file 'lib/lp/soyuz/browser/tests/test_processor.py'
--- lib/lp/soyuz/browser/tests/test_processor.py	2011-07-14 21:49:37 +0000
+++ lib/lp/soyuz/browser/tests/test_processor.py	2011-12-20 00:00:32 +0000
@@ -5,8 +5,8 @@
 
 __metaclass__ = type
 
+from canonical.launchpad.webapp.publisher import canonical_url
 from canonical.testing.layers import DatabaseFunctionalLayer
-from canonical.launchpad.webapp.publisher import canonical_url
 from lp.testing import TestCaseWithFactory
 from lp.testing.publication import test_traverse
 

=== modified file 'lib/lp/soyuz/browser/tests/test_publishing.py'
--- lib/lp/soyuz/browser/tests/test_publishing.py	2011-10-23 02:41:53 +0000
+++ lib/lp/soyuz/browser/tests/test_publishing.py	2011-12-20 00:00:32 +0000
@@ -16,11 +16,11 @@
 from zope.security.interfaces import Unauthorized
 
 from canonical.launchpad.ftests import logout
-from canonical.testing.layers import LaunchpadFunctionalLayer
 from canonical.launchpad.webapp.publisher import (
     canonical_url,
     RedirectionView,
     )
+from canonical.testing.layers import LaunchpadFunctionalLayer
 from lp.registry.interfaces.person import IPersonSet
 from lp.soyuz.browser.publishing import (
     SourcePackagePublishingHistoryNavigation,

=== modified file 'lib/lp/soyuz/browser/tests/test_queue.py'
--- lib/lp/soyuz/browser/tests/test_queue.py	2011-07-28 07:59:23 +0000
+++ lib/lp/soyuz/browser/tests/test_queue.py	2011-12-20 00:00:32 +0000
@@ -6,6 +6,7 @@
 __metaclass__ = type
 
 import cgi
+
 from lxml import html
 import transaction
 from zope.component import (

=== modified file 'lib/lp/soyuz/enums.py'
--- lib/lp/soyuz/enums.py	2011-08-25 16:47:29 +0000
+++ lib/lp/soyuz/enums.py	2011-12-20 00:00:32 +0000
@@ -33,7 +33,6 @@
     DBItem,
     )
 
-
 # Regexes that match bug numbers for closing in change logs.
 re_closes = re.compile(
     r"closes:\s*(?:bug)?\#?\s?\d+(?:,\s*(?:bug)?\#?\s?\d+)*", re.I)

=== modified file 'lib/lp/soyuz/interfaces/buildpackagejob.py'
--- lib/lp/soyuz/interfaces/buildpackagejob.py	2011-07-06 19:29:04 +0000
+++ lib/lp/soyuz/interfaces/buildpackagejob.py	2011-12-20 00:00:32 +0000
@@ -20,9 +20,9 @@
 from zope.schema import Int
 
 from canonical.launchpad import _
-from lp.services.job.interfaces.job import IJob
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.registry.interfaces.sourcepackage import SourcePackageUrgency
+from lp.services.job.interfaces.job import IJob
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuild
 from lp.soyuz.interfaces.buildfarmbuildjob import IBuildFarmBuildJob
 

=== modified file 'lib/lp/soyuz/interfaces/processor.py'
--- lib/lp/soyuz/interfaces/processor.py	2011-07-08 15:32:37 +0000
+++ lib/lp/soyuz/interfaces/processor.py	2011-12-20 00:00:32 +0000
@@ -15,17 +15,6 @@
     'ProcessorNotFound',
     ]
 
-from zope.interface import (
-    Attribute,
-    Interface,
-    )
-from zope.schema import (
-    Bool,
-    Text,
-    TextLine,
-    )
-
-from canonical.launchpad import _
 from lazr.restful.declarations import (
     collection_default_content,
     export_as_webservice_collection,
@@ -40,6 +29,17 @@
     CollectionField,
     Reference,
     )
+from zope.interface import (
+    Attribute,
+    Interface,
+    )
+from zope.schema import (
+    Bool,
+    Text,
+    TextLine,
+    )
+
+from canonical.launchpad import _
 from lp.app.errors import NameLookupFailed
 
 

=== modified file 'lib/lp/soyuz/interfaces/webservice.py'
--- lib/lp/soyuz/interfaces/webservice.py	2011-07-08 16:08:42 +0000
+++ lib/lp/soyuz/interfaces/webservice.py	2011-12-20 00:00:32 +0000
@@ -51,6 +51,14 @@
     'VersionRequiresName',
     ]
 
+from canonical.launchpad.components.apihelpers import (
+    patch_collection_property,
+    patch_plain_parameter_type,
+    patch_reference_property,
+    )
+# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
+# import bugs.  Break this up into a per-package thing.
+from canonical.launchpad.interfaces import _schema_circular_imports
 from lp.soyuz.interfaces.archive import (
     AlreadySubscribed,
     ArchiveDisabled,
@@ -58,14 +66,14 @@
     CannotCopy,
     CannotSwitchPrivacy,
     CannotUploadToArchive,
+    CannotUploadToPocket,
     CannotUploadToPPA,
-    CannotUploadToPocket,
     ComponentNotFound,
     IArchive,
     InsufficientUploadRights,
     InvalidComponent,
+    InvalidPocketForPartnerArchive,
     InvalidPocketForPPA,
-    InvalidPocketForPartnerArchive,
     NoRightsForArchive,
     NoRightsForComponent,
     NoSuchPPA,
@@ -83,9 +91,7 @@
 from lp.soyuz.interfaces.binarypackagerelease import (
     IBinaryPackageReleaseDownloadCount,
     )
-from lp.soyuz.interfaces.buildrecords import (
-    IncompatibleArguments,
-    )
+from lp.soyuz.interfaces.buildrecords import IncompatibleArguments
 from lp.soyuz.interfaces.distroarchseries import IDistroArchSeries
 from lp.soyuz.interfaces.packageset import (
     DuplicatePackagesetName,
@@ -105,15 +111,7 @@
     )
 from lp.soyuz.interfaces.queue import IPackageUpload
 
-from canonical.launchpad.components.apihelpers import (
-    patch_collection_property,
-    patch_plain_parameter_type,
-    patch_reference_property,
-    )
 
-# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
-# import bugs.  Break this up into a per-package thing.
-from canonical.launchpad.interfaces import _schema_circular_imports
 _schema_circular_imports
 
 # IProcessor

=== modified file 'lib/lp/soyuz/model/archive.py'
--- lib/lp/soyuz/model/archive.py	2011-12-19 18:31:39 +0000
+++ lib/lp/soyuz/model/archive.py	2011-12-20 00:00:32 +0000
@@ -54,9 +54,6 @@
     SQLBase,
     sqlvalues,
     )
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.components.tokens import (
     create_token,
     create_unique_token_for_table,
@@ -103,6 +100,7 @@
 from lp.registry.model.sourcepackagename import SourcePackageName
 from lp.registry.model.teammembership import TeamParticipation
 from lp.services.database.bulk import load_related
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.features import getFeatureFlag
 from lp.services.job.interfaces.job import JobStatus
 from lp.services.propertycache import (

=== modified file 'lib/lp/soyuz/model/archivejob.py'
--- lib/lp/soyuz/model/archivejob.py	2011-01-24 20:10:41 +0000
+++ lib/lp/soyuz/model/archivejob.py	2011-12-20 00:00:32 +0000
@@ -25,9 +25,9 @@
     MAIN_STORE,
     MASTER_FLAVOR,
     )
+from lp.services.database.stormbase import StormBase
 from lp.services.job.model.job import Job
 from lp.services.job.runner import BaseRunnableJob
-from lp.services.database.stormbase import StormBase
 from lp.soyuz.enums import ArchiveJobType
 from lp.soyuz.interfaces.archivejob import (
     IArchiveJob,

=== modified file 'lib/lp/soyuz/model/archivepermission.py'
--- lib/lp/soyuz/model/archivepermission.py	2011-08-26 15:15:08 +0000
+++ lib/lp/soyuz/model/archivepermission.py	2011-12-20 00:00:32 +0000
@@ -48,11 +48,11 @@
     ISourcePackageName,
     ISourcePackageNameSet,
     )
+from lp.soyuz.enums import ArchivePermissionType
 from lp.soyuz.interfaces.archive import (
     ComponentNotFound,
     IArchive,
     )
-from lp.soyuz.enums import ArchivePermissionType
 from lp.soyuz.interfaces.archivepermission import (
     IArchivePermission,
     IArchivePermissionSet,

=== modified file 'lib/lp/soyuz/model/archivesubscriber.py'
--- lib/lp/soyuz/model/archivesubscriber.py	2011-12-18 13:45:20 +0000
+++ lib/lp/soyuz/model/archivesubscriber.py	2011-12-20 00:00:32 +0000
@@ -30,15 +30,13 @@
 
 from canonical.database.constants import UTC_NOW
 from canonical.database.enumcol import DBEnum
-from lp.services.identity.model.emailaddress import EmailAddress
-from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
 from lp.registry.interfaces.person import validate_person
 from lp.registry.model.teammembership import TeamParticipation
+from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
+from lp.services.identity.model.emailaddress import EmailAddress
+from lp.soyuz.enums import ArchiveSubscriberStatus
 from lp.soyuz.interfaces.archiveauthtoken import IArchiveAuthTokenSet
-from lp.soyuz.interfaces.archivesubscriber import (
-    IArchiveSubscriber,
-    )
-from lp.soyuz.enums import ArchiveSubscriberStatus
+from lp.soyuz.interfaces.archivesubscriber import IArchiveSubscriber
 from lp.soyuz.model.archiveauthtoken import ArchiveAuthToken
 
 

=== modified file 'lib/lp/soyuz/model/binarypackagebuild.py'
--- lib/lp/soyuz/model/binarypackagebuild.py	2011-12-18 23:30:56 +0000
+++ lib/lp/soyuz/model/binarypackagebuild.py	2011-12-20 00:00:32 +0000
@@ -40,9 +40,6 @@
     sqlvalues,
     )
 from canonical.launchpad.browser.librarian import ProxiedLibraryFileAlias
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.database.librarian import (
     LibraryFileAlias,
     LibraryFileContent,
@@ -79,6 +76,7 @@
     PackageBuildDerived,
     )
 from lp.services.database.bulk import load_related
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.job.model.job import Job
 from lp.services.mail.sendmail import (
     format_address,

=== modified file 'lib/lp/soyuz/model/binarypackagename.py'
--- lib/lp/soyuz/model/binarypackagename.py	2011-06-05 09:55:08 +0000
+++ lib/lp/soyuz/model/binarypackagename.py	2011-12-20 00:00:32 +0000
@@ -32,11 +32,11 @@
     NamedSQLObjectHugeVocabulary,
     )
 from lp.app.errors import NotFoundError
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.interfaces.binarypackagename import (
     IBinaryPackageName,
     IBinaryPackageNameSet,
     )
-from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.model.binarypackagerelease import BinaryPackageRelease
 
 

=== modified file 'lib/lp/soyuz/model/buildpackagejob.py'
--- lib/lp/soyuz/model/buildpackagejob.py	2011-07-06 19:31:32 +0000
+++ lib/lp/soyuz/model/buildpackagejob.py	2011-12-20 00:00:32 +0000
@@ -20,9 +20,9 @@
 
 from canonical.database.sqlbase import sqlvalues
 from lp.buildmaster.enums import BuildStatus
+from lp.buildmaster.interfaces.builder import IBuilderSet
 from lp.buildmaster.model.buildfarmjob import BuildFarmJobOldDerived
 from lp.registry.interfaces.pocket import PackagePublishingPocket
-from lp.buildmaster.interfaces.builder import IBuilderSet
 from lp.soyuz.enums import (
     ArchivePurpose,
     PackagePublishingStatus,
@@ -36,7 +36,6 @@
     SCORE_BY_POCKET,
     SCORE_BY_URGENCY,
     )
-
 from lp.soyuz.model.buildfarmbuildjob import BuildFarmBuildJob
 
 

=== modified file 'lib/lp/soyuz/model/copyarchivejob.py'
--- lib/lp/soyuz/model/copyarchivejob.py	2010-08-23 17:01:11 +0000
+++ lib/lp/soyuz/model/copyarchivejob.py	2011-12-20 00:00:32 +0000
@@ -18,8 +18,8 @@
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.services.job.model.job import Job
 from lp.soyuz.adapters.packagelocation import PackageLocation
+from lp.soyuz.enums import ArchiveJobType
 from lp.soyuz.interfaces.archive import IArchiveSet
-from lp.soyuz.enums import ArchiveJobType
 from lp.soyuz.interfaces.archivejob import (
     ICopyArchiveJob,
     ICopyArchiveJobSource,

=== modified file 'lib/lp/soyuz/model/distributionsourcepackagecache.py'
--- lib/lp/soyuz/model/distributionsourcepackagecache.py	2011-12-19 15:09:08 +0000
+++ lib/lp/soyuz/model/distributionsourcepackagecache.py	2011-12-20 00:00:32 +0000
@@ -18,16 +18,14 @@
     SQLBase,
     sqlvalues,
     )
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.interfaces.lpstorm import IStore
 from lp.registry.model.sourcepackagename import SourcePackageName
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.soyuz.interfaces.distributionsourcepackagecache import (
     IDistributionSourcePackageCache,
     )
+from lp.soyuz.model.binarypackagerelease import BinaryPackageRelease
 from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease
-from lp.soyuz.model.binarypackagerelease import BinaryPackageRelease
 
 
 class DistributionSourcePackageCache(SQLBase):

=== modified file 'lib/lp/soyuz/model/distributionsourcepackagerelease.py'
--- lib/lp/soyuz/model/distributionsourcepackagerelease.py	2011-12-19 15:09:08 +0000
+++ lib/lp/soyuz/model/distributionsourcepackagerelease.py	2011-12-20 00:00:32 +0000
@@ -23,9 +23,6 @@
 from zope.interface import implements
 
 from canonical.database.sqlbase import sqlvalues
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.webapp.interfaces import (
     DEFAULT_FLAVOR,
     IStoreSelector,
@@ -33,6 +30,7 @@
     )
 from lp.buildmaster.model.buildfarmjob import BuildFarmJob
 from lp.buildmaster.model.packagebuild import PackageBuild
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.soyuz.interfaces.archive import MAIN_ARCHIVE_PURPOSES
 from lp.soyuz.interfaces.distributionsourcepackagerelease import (
     IDistributionSourcePackageRelease,

=== modified file 'lib/lp/soyuz/model/distroarchseries.py'
--- lib/lp/soyuz/model/distroarchseries.py	2011-12-18 14:29:19 +0000
+++ lib/lp/soyuz/model/distroarchseries.py	2011-12-20 00:00:32 +0000
@@ -33,9 +33,6 @@
     SQLBase,
     sqlvalues,
     )
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.helpers import shortlist
 from canonical.launchpad.webapp.interfaces import (
     IStoreSelector,
@@ -44,6 +41,7 @@
     )
 from lp.registry.interfaces.person import validate_public_person
 from lp.registry.interfaces.pocket import PackagePublishingPocket
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageName

=== modified file 'lib/lp/soyuz/model/distroarchseriesbinarypackagerelease.py'
--- lib/lp/soyuz/model/distroarchseriesbinarypackagerelease.py	2010-08-24 15:29:01 +0000
+++ lib/lp/soyuz/model/distroarchseriesbinarypackagerelease.py	2011-12-20 00:00:32 +0000
@@ -15,10 +15,10 @@
 from zope.interface import implements
 
 from canonical.database.sqlbase import sqlvalues
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.interfaces.distroarchseriesbinarypackagerelease import (
     IDistroArchSeriesBinaryPackageRelease,
     )
-from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.model.distributionsourcepackagerelease import (
     DistributionSourcePackageRelease,
     )

=== modified file 'lib/lp/soyuz/model/distroseriessourcepackagerelease.py'
--- lib/lp/soyuz/model/distroseriessourcepackagerelease.py	2011-12-19 15:09:08 +0000
+++ lib/lp/soyuz/model/distroseriessourcepackagerelease.py	2011-12-20 00:00:32 +0000
@@ -11,8 +11,9 @@
     'DistroSeriesSourcePackageRelease',
     ]
 
+from operator import itemgetter
+
 from lazr.delegates import delegates
-from operator import itemgetter
 from storm.expr import (
     And,
     Desc,
@@ -23,10 +24,8 @@
 from zope.security.proxy import removeSecurityProxy
 
 from canonical.database.sqlbase import sqlvalues
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from lp.registry.interfaces.distroseries import IDistroSeries
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.interfaces.distroseriessourcepackagerelease import (
     IDistroSeriesSourcePackageRelease,

=== modified file 'lib/lp/soyuz/model/packagecopyjob.py'
--- lib/lp/soyuz/model/packagecopyjob.py	2011-12-18 14:29:19 +0000
+++ lib/lp/soyuz/model/packagecopyjob.py	2011-12-20 00:00:32 +0000
@@ -29,9 +29,6 @@
 
 from canonical.database.enumcol import EnumCol
 from canonical.database.sqlbase import sqlvalues
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.interfaces.lpstorm import (
     IMasterStore,
     IStore,
@@ -49,6 +46,7 @@
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
 from lp.registry.model.distroseries import DistroSeries
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.database.stormbase import StormBase
 from lp.services.job.interfaces.job import (
     JobStatus,

=== modified file 'lib/lp/soyuz/model/packagediff.py'
--- lib/lp/soyuz/model/packagediff.py	2011-12-19 15:09:08 +0000
+++ lib/lp/soyuz/model/packagediff.py	2011-12-20 00:00:32 +0000
@@ -27,9 +27,6 @@
     SQLBase,
     sqlvalues,
     )
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.database.librarian import (
     LibraryFileAlias,
     LibraryFileContent,
@@ -43,6 +40,7 @@
     )
 from canonical.librarian.utils import copy_and_close
 from lp.services.database.bulk import load
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.soyuz.enums import PackageDiffStatus
 from lp.soyuz.interfaces.packagediff import (
     IPackageDiff,

=== modified file 'lib/lp/soyuz/model/publishing.py'
--- lib/lp/soyuz/model/publishing.py	2011-12-18 14:29:19 +0000
+++ lib/lp/soyuz/model/publishing.py	2011-12-20 00:00:32 +0000
@@ -50,9 +50,6 @@
     sqlvalues,
     )
 from canonical.launchpad.browser.librarian import ProxiedLibraryFileAlias
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.database.librarian import (
     LibraryFileAlias,
     LibraryFileContent,
@@ -73,6 +70,7 @@
 from lp.buildmaster.model.packagebuild import PackageBuild
 from lp.registry.interfaces.person import validate_public_person
 from lp.registry.interfaces.pocket import PackagePublishingPocket
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.propertycache import (
     cachedproperty,
     get_property_cache,

=== modified file 'lib/lp/soyuz/model/sourcepackagerelease.py'
--- lib/lp/soyuz/model/sourcepackagerelease.py	2011-12-18 14:29:19 +0000
+++ lib/lp/soyuz/model/sourcepackagerelease.py	2011-12-20 00:00:32 +0000
@@ -46,9 +46,6 @@
     SQLBase,
     sqlvalues,
     )
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.database.librarian import (
     LibraryFileAlias,
     LibraryFileContent,
@@ -62,6 +59,7 @@
     SourcePackageType,
     SourcePackageUrgency,
     )
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.propertycache import cachedproperty
 from lp.soyuz.enums import (
     PackageDiffStatus,

=== modified file 'lib/lp/soyuz/scripts/add_missing_builds.py'
--- lib/lp/soyuz/scripts/add_missing_builds.py	2011-03-06 08:40:21 +0000
+++ lib/lp/soyuz/scripts/add_missing_builds.py	2011-12-20 00:00:32 +0000
@@ -7,12 +7,12 @@
 from canonical.config import config
 from lp.app.errors import NotFoundError
 from lp.services.scripts.base import LaunchpadScriptFailure
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.pas import BuildDaemonPackagesArchSpecific
 from lp.soyuz.scripts.ftpmasterbase import (
     SoyuzScript,
     SoyuzScriptError,
     )
-from lp.soyuz.enums import PackagePublishingStatus
 
 
 class AddMissingBuilds(SoyuzScript):

=== modified file 'lib/lp/soyuz/scripts/buildd.py'
--- lib/lp/soyuz/scripts/buildd.py	2011-04-04 11:41:52 +0000
+++ lib/lp/soyuz/scripts/buildd.py	2011-12-20 00:00:32 +0000
@@ -25,7 +25,6 @@
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
 from lp.soyuz.pas import BuildDaemonPackagesArchSpecific
 
-
 # XXX cprov 2009-04-16: This function should live in
 # lp.registry.interfaces.distroseries. It cannot be done right now
 # because we haven't decided if archivepublisher.debversion will be

=== modified file 'lib/lp/soyuz/scripts/tests/test_add_missing_builds.py'
--- lib/lp/soyuz/scripts/tests/test_add_missing_builds.py	2011-03-02 10:05:20 +0000
+++ lib/lp/soyuz/scripts/tests/test_add_missing_builds.py	2011-12-20 00:00:32 +0000
@@ -4,9 +4,9 @@
 """Test the add-missing-builds.py script. """
 
 import os
+import shutil
 import subprocess
 import sys
-import shutil
 import tempfile
 
 from canonical.config import config

=== modified file 'lib/lp/soyuz/scripts/tests/test_changeoverride.py'
--- lib/lp/soyuz/scripts/tests/test_changeoverride.py	2011-06-09 10:50:25 +0000
+++ lib/lp/soyuz/scripts/tests/test_changeoverride.py	2011-12-20 00:00:32 +0000
@@ -15,8 +15,8 @@
 from lp.registry.interfaces.person import IPersonSet
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.services.log.logger import BufferLogger
+from lp.soyuz.enums import PackagePublishingPriority
 from lp.soyuz.interfaces.component import IComponentSet
-from lp.soyuz.enums import PackagePublishingPriority
 from lp.soyuz.interfaces.section import ISectionSet
 from lp.soyuz.scripts.changeoverride import (
     ArchiveOverriderError,

=== modified file 'lib/lp/soyuz/scripts/tests/test_populatearchive.py'
--- lib/lp/soyuz/scripts/tests/test_populatearchive.py	2011-07-07 14:00:10 +0000
+++ lib/lp/soyuz/scripts/tests/test_populatearchive.py	2011-12-20 00:00:32 +0000
@@ -13,18 +13,20 @@
 from zope.security.proxy import removeSecurityProxy
 
 from canonical.config import config
-from canonical.testing.layers import LaunchpadZopelessLayer
-from canonical.testing.layers import DatabaseLayer
+from canonical.testing.layers import (
+    DatabaseLayer,
+    LaunchpadZopelessLayer,
+    )
 from lp.buildmaster.enums import BuildStatus
 from lp.registry.interfaces.distribution import IDistributionSet
 from lp.registry.interfaces.person import IPersonSet
 from lp.services.job.interfaces.job import JobStatus
 from lp.services.log.logger import BufferLogger
-from lp.soyuz.enums import ArchivePurpose
-from lp.soyuz.interfaces.archive import (
-    IArchiveSet,
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
     )
-from lp.soyuz.enums import PackagePublishingStatus
+from lp.soyuz.interfaces.archive import IArchiveSet
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
 from lp.soyuz.scripts.ftpmaster import (
     PackageLocationError,

=== modified file 'lib/lp/soyuz/scripts/tests/test_publishdistro.py'
--- lib/lp/soyuz/scripts/tests/test_publishdistro.py	2011-07-21 12:34:49 +0000
+++ lib/lp/soyuz/scripts/tests/test_publishdistro.py	2011-12-20 00:00:32 +0000
@@ -10,6 +10,7 @@
 import shutil
 import subprocess
 import sys
+
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy
 

=== modified file 'lib/lp/soyuz/scripts/tests/test_queue.py'
--- lib/lp/soyuz/scripts/tests/test_queue.py	2011-10-27 13:03:04 +0000
+++ lib/lp/soyuz/scripts/tests/test_queue.py	2011-12-20 00:00:32 +0000
@@ -10,9 +10,9 @@
 import shutil
 from StringIO import StringIO
 import tempfile
+from unittest import TestCase
+
 from testtools.matchers import StartsWith
-from unittest import TestCase
-
 from zope.component import getUtility
 from zope.security.interfaces import ForbiddenAttribute
 from zope.security.proxy import removeSecurityProxy
@@ -61,7 +61,7 @@
     CommandRunnerError,
     name_queue_map,
     QueueAction,
-    QueueActionOverride
+    QueueActionOverride,
     )
 from lp.testing import (
     celebrity_logged_in,

=== modified file 'lib/lp/soyuz/scripts/tests/test_removepackage.py'
--- lib/lp/soyuz/scripts/tests/test_removepackage.py	2011-08-12 11:19:40 +0000
+++ lib/lp/soyuz/scripts/tests/test_removepackage.py	2011-12-20 00:00:32 +0000
@@ -22,9 +22,7 @@
 from lp.registry.interfaces.person import IPersonSet
 from lp.services.log.logger import DevNullLogger
 from lp.soyuz.enums import PackagePublishingStatus
-from lp.soyuz.interfaces.publishing import (
-    active_publishing_status,
-    )
+from lp.soyuz.interfaces.publishing import active_publishing_status
 from lp.soyuz.model.publishing import (
     BinaryPackagePublishingHistory,
     SourcePackagePublishingHistory,

=== modified file 'lib/lp/soyuz/tests/test_archive_subscriptions.py'
--- lib/lp/soyuz/tests/test_archive_subscriptions.py	2011-12-14 03:22:16 +0000
+++ lib/lp/soyuz/tests/test_archive_subscriptions.py	2011-12-20 00:00:32 +0000
@@ -7,19 +7,19 @@
 
 from canonical.launchpad.testing.pages import (
     find_tag_by_id,
-    setupBrowserForUser
+    setupBrowserForUser,
     )
 from canonical.launchpad.webapp.publisher import canonical_url
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.registry.interfaces.person import PersonVisibility
 from lp.testing import (
+    BrowserTestCase,
     celebrity_logged_in,
     login_person,
     person_logged_in,
     TestCaseWithFactory,
     )
 from lp.testing.mail_helpers import pop_notifications
-from lp.testing import BrowserTestCase
 from lp.testing.views import create_initialized_view
 
 

=== modified file 'lib/lp/soyuz/tests/test_binarypackagebuildbehavior.py'
--- lib/lp/soyuz/tests/test_binarypackagebuildbehavior.py	2010-12-20 03:21:03 +0000
+++ lib/lp/soyuz/tests/test_binarypackagebuildbehavior.py	2011-12-20 00:00:32 +0000
@@ -9,26 +9,18 @@
 import os
 import shutil
 import tempfile
+
+from storm.store import Store
+from testtools.deferredruntest import AsynchronousDeferredRunTest
 import transaction
-
-from testtools.deferredruntest import (
-    AsynchronousDeferredRunTest,
-    )
-
-from storm.store import Store
-
 from twisted.internet import defer
-
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy
 
 from canonical.config import config
 from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
 from canonical.testing.layers import LaunchpadZopelessLayer
-
-from lp.buildmaster.enums import (
-    BuildStatus,
-    )
+from lp.buildmaster.enums import BuildStatus
 from lp.buildmaster.tests.mock_slaves import (
     AbortedSlave,
     AbortingSlave,
@@ -46,9 +38,7 @@
 from lp.soyuz.adapters.archivedependencies import (
     get_sources_list_for_building,
     )
-from lp.soyuz.enums import (
-    ArchivePurpose,
-    )
+from lp.soyuz.enums import ArchivePurpose
 from lp.testing import TestCaseWithFactory
 
 

=== modified file 'lib/lp/soyuz/tests/test_binarypackagename.py'
--- lib/lp/soyuz/tests/test_binarypackagename.py	2010-10-04 19:50:45 +0000
+++ lib/lp/soyuz/tests/test_binarypackagename.py	2011-12-20 00:00:32 +0000
@@ -12,8 +12,8 @@
 
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.app.errors import NotFoundError
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageNameSet
-from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.model.binarypackagename import getBinaryPackageDescriptions
 from lp.testing import TestCaseWithFactory
 

=== modified file 'lib/lp/soyuz/tests/test_binarypackagereleasecontents.py'
--- lib/lp/soyuz/tests/test_binarypackagereleasecontents.py	2011-06-27 06:43:25 +0000
+++ lib/lp/soyuz/tests/test_binarypackagereleasecontents.py	2011-12-20 00:00:32 +0000
@@ -6,7 +6,6 @@
 __metaclass__ = type
 
 import transaction
-
 from zope.component import getUtility
 
 from canonical.launchpad.interfaces.lpstorm import IStore

=== modified file 'lib/lp/soyuz/tests/test_build_notify.py'
--- lib/lp/soyuz/tests/test_build_notify.py	2011-01-27 15:05:34 +0000
+++ lib/lp/soyuz/tests/test_build_notify.py	2011-12-20 00:00:32 +0000
@@ -7,8 +7,9 @@
     datetime,
     timedelta,
     )
+from textwrap import dedent
+
 import pytz
-from textwrap import dedent
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy
 

=== modified file 'lib/lp/soyuz/tests/test_build_set.py'
--- lib/lp/soyuz/tests/test_build_set.py	2011-01-20 20:45:28 +0000
+++ lib/lp/soyuz/tests/test_build_set.py	2011-12-20 00:00:32 +0000
@@ -7,10 +7,11 @@
     datetime,
     timedelta,
     )
+
 import pytz
+from storm.store import EmptyResultSet
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy
-from storm.store import EmptyResultSet
 
 from canonical.testing.layers import LaunchpadFunctionalLayer
 from lp.buildmaster.enums import BuildStatus

=== modified file 'lib/lp/soyuz/tests/test_build_start_estimation.py'
--- lib/lp/soyuz/tests/test_build_start_estimation.py	2011-01-11 16:00:12 +0000
+++ lib/lp/soyuz/tests/test_build_start_estimation.py	2011-12-20 00:00:32 +0000
@@ -7,6 +7,7 @@
     datetime,
     timedelta,
     )
+
 import pytz
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy

=== modified file 'lib/lp/soyuz/tests/test_buildpackagejob.py'
--- lib/lp/soyuz/tests/test_buildpackagejob.py	2011-07-06 19:31:32 +0000
+++ lib/lp/soyuz/tests/test_buildpackagejob.py	2011-12-20 00:00:32 +0000
@@ -19,10 +19,12 @@
     )
 from lp.buildmaster.enums import BuildStatus
 from lp.buildmaster.interfaces.builder import IBuilderSet
-from lp.soyuz.enums import ArchivePurpose
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.interfaces.buildfarmbuildjob import IBuildFarmBuildJob
 from lp.soyuz.interfaces.buildpackagejob import IBuildPackageJob
-from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.model.binarypackagebuild import BinaryPackageBuild
 from lp.soyuz.model.processor import ProcessorFamilySet
 from lp.soyuz.tests.test_publishing import SoyuzTestPublisher

=== modified file 'lib/lp/soyuz/tests/test_copyarchivejob.py'
--- lib/lp/soyuz/tests/test_copyarchivejob.py	2010-10-26 15:47:24 +0000
+++ lib/lp/soyuz/tests/test_copyarchivejob.py	2011-12-20 00:00:32 +0000
@@ -10,9 +10,11 @@
 from lp.buildmaster.enums import BuildStatus
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.soyuz.adapters.packagelocation import PackageLocation
-from lp.soyuz.enums import ArchivePurpose
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
-from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.model.copyarchivejob import CopyArchiveJob
 from lp.soyuz.model.processor import ProcessorFamilySet
 from lp.testing import (

=== modified file 'lib/lp/soyuz/tests/test_hasbuildrecords.py'
--- lib/lp/soyuz/tests/test_hasbuildrecords.py	2011-01-16 22:25:17 +0000
+++ lib/lp/soyuz/tests/test_hasbuildrecords.py	2011-12-20 00:00:32 +0000
@@ -7,6 +7,7 @@
     datetime,
     timedelta,
     )
+
 import pytz
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy
@@ -17,9 +18,7 @@
     BuildStatus,
     )
 from lp.buildmaster.interfaces.builder import IBuilderSet
-from lp.buildmaster.interfaces.buildfarmjob import (
-    IBuildFarmJob,
-    )
+from lp.buildmaster.interfaces.buildfarmjob import IBuildFarmJob
 from lp.buildmaster.interfaces.packagebuild import IPackageBuildSource
 from lp.registry.interfaces.person import IPersonSet
 from lp.registry.interfaces.pocket import PackagePublishingPocket

=== modified file 'lib/lp/soyuz/tests/test_packagecopyjob.py'
--- lib/lp/soyuz/tests/test_packagecopyjob.py	2011-12-01 17:58:52 +0000
+++ lib/lp/soyuz/tests/test_packagecopyjob.py	2011-12-20 00:00:32 +0000
@@ -4,11 +4,11 @@
 """Tests for sync package jobs."""
 
 import operator
+from textwrap import dedent
 
 from storm.store import Store
 from testtools.content import text_content
 from testtools.matchers import MatchesStructure
-from textwrap import dedent
 import transaction
 from zope.component import getUtility
 from zope.security.interfaces import Unauthorized

=== modified file 'lib/lp/soyuz/tests/test_processaccepted.py'
--- lib/lp/soyuz/tests/test_processaccepted.py	2011-11-16 06:15:58 +0000
+++ lib/lp/soyuz/tests/test_processaccepted.py	2011-12-20 00:00:32 +0000
@@ -4,14 +4,14 @@
 """Test process-accepted.py"""
 
 from cStringIO import StringIO
+from optparse import OptionValueError
 
-from canonical.launchpad.interfaces.lpstorm import IStore
 from debian.deb822 import Changes
-from optparse import OptionValueError
 from testtools.matchers import LessThan
 import transaction
 
 from canonical.config import config
+from canonical.launchpad.interfaces.lpstorm import IStore
 from canonical.testing.layers import LaunchpadZopelessLayer
 from lp.registry.interfaces.series import SeriesStatus
 from lp.services.log.logger import BufferLogger

=== modified file 'lib/lp/soyuz/tests/test_processor.py'
--- lib/lp/soyuz/tests/test_processor.py	2011-07-14 21:49:37 +0000
+++ lib/lp/soyuz/tests/test_processor.py	2011-12-20 00:00:32 +0000
@@ -5,17 +5,16 @@
 
 from zope.component import getUtility
 
+from canonical.launchpad.testing.pages import LaunchpadWebServiceCaller
 from canonical.launchpad.webapp.interfaces import (
     DEFAULT_FLAVOR,
     IStoreSelector,
     MAIN_STORE,
     )
-from canonical.launchpad.testing.pages import LaunchpadWebServiceCaller
 from canonical.testing.layers import (
     DatabaseFunctionalLayer,
     LaunchpadZopelessLayer,
     )
-
 from lp.soyuz.interfaces.processor import (
     IProcessor,
     IProcessorFamily,

=== modified file 'lib/lp/soyuz/vocabularies.py'
--- lib/lp/soyuz/vocabularies.py	2011-12-04 17:33:51 +0000
+++ lib/lp/soyuz/vocabularies.py	2011-12-20 00:00:32 +0000
@@ -14,17 +14,11 @@
     'ProcessorVocabulary',
     ]
 
-from sqlobject import (
-    AND,
-    )
-from storm.expr import (
-    SQL,
-    )
+from sqlobject import AND
+from storm.expr import SQL
 from zope.component import getUtility
 from zope.interface import implements
-from zope.schema.vocabulary import (
-    SimpleTerm,
-    )
+from zope.schema.vocabulary import SimpleTerm
 
 from canonical.database.sqlbase import (
     quote,

=== modified file 'lib/lp/testing/__init__.py'
--- lib/lp/testing/__init__.py	2011-12-16 16:48:28 +0000
+++ lib/lp/testing/__init__.py	2011-12-20 00:00:32 +0000
@@ -102,8 +102,8 @@
 from testtools.testcase import ExpectedException as TTExpectedException
 import transaction
 from zope.component import (
+    getMultiAdapter,
     getSiteManager,
-    getMultiAdapter,
     getUtility,
     )
 import zope.event

=== modified file 'lib/lp/testing/factory.py'
--- lib/lp/testing/factory.py	2011-12-18 13:45:20 +0000
+++ lib/lp/testing/factory.py	2011-12-20 00:00:32 +0000
@@ -70,16 +70,6 @@
     UTC_NOW,
     )
 from canonical.database.sqlbase import flush_database_updates
-from lp.services.identity.model.account import Account
-from lp.services.identity.interfaces.account import (
-    AccountCreationRationale,
-    AccountStatus,
-    IAccountSet,
-    )
-from lp.services.identity.interfaces.emailaddress import (
-    EmailAddressStatus,
-    IEmailAddressSet,
-    )
 from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
 from canonical.launchpad.interfaces.lpstorm import (
     IMasterStore,
@@ -242,6 +232,16 @@
 from lp.registry.model.milestone import Milestone
 from lp.registry.model.suitesourcepackage import SuiteSourcePackage
 from lp.services.gpg.interfaces import IGPGHandler
+from lp.services.identity.interfaces.account import (
+    AccountCreationRationale,
+    AccountStatus,
+    IAccountSet,
+    )
+from lp.services.identity.interfaces.emailaddress import (
+    EmailAddressStatus,
+    IEmailAddressSet,
+    )
+from lp.services.identity.model.account import Account
 from lp.services.job.interfaces.job import SuspendJobException
 from lp.services.log.logger import BufferLogger
 from lp.services.mail.signedmessage import SignedMessage

=== modified file 'lib/lp/testing/keyserver/__init__.py'
--- lib/lp/testing/keyserver/__init__.py	2011-02-17 13:24:42 +0000
+++ lib/lp/testing/keyserver/__init__.py	2011-12-20 00:00:32 +0000
@@ -8,3 +8,5 @@
     ]
 
 from lp.testing.keyserver.harness import KeyServerTac
+
+

=== modified file 'lib/lp/testing/keyserver/tests/test_harness.py'
--- lib/lp/testing/keyserver/tests/test_harness.py	2011-02-17 14:07:09 +0000
+++ lib/lp/testing/keyserver/tests/test_harness.py	2011-12-20 00:00:32 +0000
@@ -6,7 +6,6 @@
 from urllib import urlopen
 
 from canonical.config import config
-
 from lp.testing import TestCase
 from lp.testing.keyserver import KeyServerTac
 from lp.testing.keyserver.web import GREETING

=== modified file 'lib/lp/testing/keyserver/tests/test_web.py'
--- lib/lp/testing/keyserver/tests/test_web.py	2011-05-30 12:45:29 +0000
+++ lib/lp/testing/keyserver/tests/test_web.py	2011-12-20 00:00:32 +0000
@@ -9,7 +9,6 @@
 import shutil
 
 from testtools.deferredruntest import AsynchronousDeferredRunTest
-
 from twisted.internet.endpoints import serverFromString
 from twisted.python.failure import Failure
 from twisted.web.client import getPage

=== modified file 'lib/lp/testing/mail_helpers.py'
--- lib/lp/testing/mail_helpers.py	2011-12-16 01:43:48 +0000
+++ lib/lp/testing/mail_helpers.py	2011-12-20 00:00:32 +0000
@@ -9,15 +9,14 @@
 import operator
 
 import transaction
-
 from zope.component import getUtility
 
 from lp.registry.interfaces.persontransferjob import (
     IMembershipNotificationJobSource,
     )
 from lp.services.job.runner import JobRunner
+from lp.services.log.logger import DevNullLogger
 from lp.services.mail import stub
-from lp.services.log.logger import DevNullLogger
 
 
 def pop_notifications(sort_key=None, commit=True):

=== modified file 'lib/lp/testing/pgsql.py'
--- lib/lp/testing/pgsql.py	2011-09-26 06:30:07 +0000
+++ lib/lp/testing/pgsql.py	2011-12-20 00:00:32 +0000
@@ -10,11 +10,11 @@
 import atexit
 import os
 import random
+import sys
 import time
-import sys
 
+from bzrlib.errors import LockContention
 from bzrlib.lock import WriteLock
-from bzrlib.errors import LockContention
 import psycopg2
 
 from canonical.config import config

=== modified file 'lib/lp/testing/publication.py'
--- lib/lp/testing/publication.py	2011-07-21 19:31:25 +0000
+++ lib/lp/testing/publication.py	2011-12-20 00:00:32 +0000
@@ -31,7 +31,6 @@
     )
 from canonical.launchpad.webapp.servers import ProtocolErrorPublication
 
-
 # Defines an helper function that returns the appropriate
 # IRequest and IPublication.
 def get_request_and_publication(host='localhost', port=None,

=== modified file 'lib/lp/testing/tests/test_dbuser.py'
--- lib/lp/testing/tests/test_dbuser.py	2011-02-07 20:41:06 +0000
+++ lib/lp/testing/tests/test_dbuser.py	2011-12-20 00:00:32 +0000
@@ -9,8 +9,13 @@
 from canonical.launchpad.interfaces.lpstorm import IStore
 from canonical.testing.layers import LaunchpadZopelessLayer
 from lp.registry.model.person import Person
-from lp.testing import TestCase # or TestCaseWithFactory
-from lp.testing.dbuser import dbuser, lp_dbuser
+# or TestCaseWithFactory
+from lp.testing import TestCase
+from lp.testing.dbuser import (
+    dbuser,
+    lp_dbuser,
+    )
+
 
 class TestDbUser(TestCase):
 

=== modified file 'lib/lp/testing/tests/test_fixture.py'
--- lib/lp/testing/tests/test_fixture.py	2011-11-22 04:36:58 +0000
+++ lib/lp/testing/tests/test_fixture.py	2011-12-20 00:00:32 +0000
@@ -34,8 +34,8 @@
 from canonical.testing.layers import (
     BaseLayer,
     DatabaseLayer,
+    LaunchpadLayer,
     LaunchpadZopelessLayer,
-    LaunchpadLayer,
     )
 from lp.registry.model.person import Person
 from lp.services.messaging import rabbit

=== modified file 'lib/lp/testing/tests/test_publication.py'
--- lib/lp/testing/tests/test_publication.py	2011-07-14 21:49:37 +0000
+++ lib/lp/testing/tests/test_publication.py	2011-12-20 00:00:32 +0000
@@ -5,6 +5,7 @@
 
 __metaclass__ = type
 
+from lazr.restful import EntryResource
 from zope.app.pagetemplate.simpleviewclass import simple
 from zope.component import (
     getSiteManager,
@@ -23,7 +24,6 @@
 from canonical.launchpad.webapp.publisher import get_current_browser_request
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
 from canonical.testing.layers import DatabaseFunctionalLayer
-from lazr.restful import EntryResource
 from lp.testing import (
     ANONYMOUS,
     login,

=== modified file 'lib/lp/testing/tests/test_standard_yuixhr_test_template.py'
--- lib/lp/testing/tests/test_standard_yuixhr_test_template.py	2011-09-21 00:15:46 +0000
+++ lib/lp/testing/tests/test_standard_yuixhr_test_template.py	2011-12-20 00:00:32 +0000
@@ -8,12 +8,12 @@
 __all__ = []
 
 from lp.testing import person_logged_in
+from lp.testing.factory import LaunchpadObjectFactory
 from lp.testing.yuixhr import (
     login_as_person,
     make_suite,
     setup,
     )
-from lp.testing.factory import LaunchpadObjectFactory
 
 # This is one half of a YUI app test.  The other half is a .js test of
 # exactly the same name as your Python file, just with different file

=== modified file 'lib/lp/testing/tests/test_yuixhr.py'
--- lib/lp/testing/tests/test_yuixhr.py	2011-10-14 13:34:25 +0000
+++ lib/lp/testing/tests/test_yuixhr.py	2011-12-20 00:00:32 +0000
@@ -6,14 +6,14 @@
 __metaclass__ = type
 
 
+import os
 import re
-import os
 from shutil import rmtree
-import simplejson
 import sys
 import tempfile
 import types
 
+import simplejson
 from storm.exceptions import DisconnectionError
 from testtools.testcase import ExpectedException
 import transaction
@@ -27,19 +27,19 @@
 from canonical.config import config
 from canonical.launchpad.webapp.interfaces import ILaunchpadRoot
 from canonical.testing.layers import LaunchpadFunctionalLayer
-
 from lp.registry.interfaces.product import IProductSet
 from lp.services.osutils import override_environ
 from lp.testing import (
+    ANONYMOUS,
+    login,
     TestCase,
-    login,
-    ANONYMOUS,
     )
 from lp.testing.matchers import Contains
+from lp.testing.publication import test_traverse
+from lp.testing.tests import test_yuixhr_fixture
 from lp.testing.views import create_view
 from lp.testing.yuixhr import setup
-from lp.testing.tests import test_yuixhr_fixture
-from lp.testing.publication import test_traverse
+
 
 TEST_MODULE_NAME = '_lp_.tests'
 

=== modified file 'lib/lp/testing/tests/test_yuixhr_fixture.py'
--- lib/lp/testing/tests/test_yuixhr_fixture.py	2011-09-21 00:15:46 +0000
+++ lib/lp/testing/tests/test_yuixhr_fixture.py	2011-12-20 00:00:32 +0000
@@ -10,12 +10,12 @@
 from zope.security.proxy import removeSecurityProxy
 
 from lp.testing import login_person
+from lp.testing.factory import LaunchpadObjectFactory
 from lp.testing.yuixhr import (
     login_as_person,
     make_suite,
     setup,
     )
-from lp.testing.factory import LaunchpadObjectFactory
 
 # The following are the fixtures needed by the tests.
 

=== modified file 'lib/lp/testing/views.py'
--- lib/lp/testing/views.py	2011-11-01 05:30:11 +0000
+++ lib/lp/testing/views.py	2011-12-20 00:00:32 +0000
@@ -19,13 +19,15 @@
     )
 
 from canonical.launchpad.layers import setFirstLayer
-from canonical.launchpad.webapp.servers import WebServiceTestRequest
 from canonical.launchpad.webapp.interfaces import (
     ICanonicalUrlData,
     IPlacelessAuthUtility,
     )
 from canonical.launchpad.webapp.publisher import layer_for_rootsite
-from canonical.launchpad.webapp.servers import LaunchpadTestRequest
+from canonical.launchpad.webapp.servers import (
+    LaunchpadTestRequest,
+    WebServiceTestRequest,
+    )
 
 
 def create_view(context, name, form=None, layer=None, server_url=None,

=== modified file 'lib/lp/testing/xmlrpc.py'
--- lib/lp/testing/xmlrpc.py	2011-02-17 16:54:08 +0000
+++ lib/lp/testing/xmlrpc.py	2011-12-20 00:00:32 +0000
@@ -12,10 +12,15 @@
 import xmlrpclib
 
 from zope.app.testing.functional import HTTPCaller
-from zope.security.management import endInteraction, queryInteraction
+from zope.security.management import (
+    endInteraction,
+    queryInteraction,
+    )
 
 from canonical.launchpad.webapp.interaction import (
-    get_current_principal, setupInteraction)
+    get_current_principal,
+    setupInteraction,
+    )
 
 
 class HTTPCallerHTTPConnection(httplib.HTTPConnection):

=== modified file 'lib/lp/testing/yuixhr.py'
--- lib/lp/testing/yuixhr.py	2011-11-30 01:18:42 +0000
+++ lib/lp/testing/yuixhr.py	2011-12-20 00:00:32 +0000
@@ -13,7 +13,6 @@
 
 from fnmatch import fnmatchcase
 import os
-import simplejson
 import sys
 from textwrap import dedent
 import traceback
@@ -21,6 +20,7 @@
 
 from lazr.restful import ResourceJSONEncoder
 from lazr.restful.utils import get_current_browser_request
+import simplejson
 from zope.component import getUtility
 from zope.exceptions.exceptionformatter import format_exception
 from zope.interface import implements
@@ -28,27 +28,29 @@
 from zope.publisher.interfaces.http import IResult
 from zope.security.checker import (
     NamesChecker,
-    ProxyFactory)
+    ProxyFactory,
+    )
 from zope.security.proxy import removeSecurityProxy
 from zope.session.interfaces import IClientIdManager
 
 from canonical.config import config
 from canonical.launchpad.webapp.interfaces import (
+    IOpenLaunchBag,
     IPlacelessAuthUtility,
-    IOpenLaunchBag,
     )
 from canonical.launchpad.webapp.login import logInPrincipal
 from canonical.launchpad.webapp.publisher import LaunchpadView
 from canonical.testing.layers import (
     DatabaseLayer,
     LaunchpadLayer,
+    LayerProcessController,
     LibrarianLayer,
-    LayerProcessController,
     YUIAppServerLayer,
     )
 from lp.app.versioninfo import revno
 from lp.testing import AbstractYUITestCase
 
+
 EXPLOSIVE_ERRORS = (SystemExit, MemoryError, KeyboardInterrupt)
 
 

=== modified file 'lib/lp/testopenid/adapters/openid.py'
--- lib/lp/testopenid/adapters/openid.py	2011-12-18 13:55:35 +0000
+++ lib/lp/testopenid/adapters/openid.py	2011-12-20 00:00:32 +0000
@@ -12,8 +12,8 @@
 from zope.component import adapts
 from zope.interface import implements
 
+from canonical.launchpad.webapp.vhosts import allvhosts
 from lp.services.identity.interfaces.account import IAccount
-from canonical.launchpad.webapp.vhosts import allvhosts
 from lp.services.openid.adapters.openid import OpenIDPersistentIdentity
 from lp.testopenid.interfaces.server import ITestOpenIDPersistentIdentity
 

=== modified file 'lib/lp/testopenid/browser/server.py'
--- lib/lp/testopenid/browser/server.py	2011-12-18 13:55:35 +0000
+++ lib/lp/testopenid/browser/server.py	2011-12-20 00:00:32 +0000
@@ -33,13 +33,7 @@
 from zope.session.interfaces import ISession
 
 from canonical.launchpad import _
-from lp.services.identity.interfaces.account import (
-    AccountStatus,
-    IAccountSet,
-    )
-from canonical.launchpad.webapp import (
-    LaunchpadView,
-    )
+from canonical.launchpad.webapp import LaunchpadView
 from canonical.launchpad.webapp.interfaces import (
     ICanonicalUrlData,
     IPlacelessLoginSource,
@@ -59,6 +53,10 @@
     )
 from lp.app.errors import UnexpectedFormData
 from lp.registry.interfaces.person import IPerson
+from lp.services.identity.interfaces.account import (
+    AccountStatus,
+    IAccountSet,
+    )
 from lp.services.openid.browser.openiddiscovery import (
     XRDSContentNegotiationMixin,
     )

=== modified file 'lib/lp/translations/browser/distroseries.py'
--- lib/lp/translations/browser/distroseries.py	2011-05-10 10:26:50 +0000
+++ lib/lp/translations/browser/distroseries.py	2011-12-20 00:00:32 +0000
@@ -28,8 +28,8 @@
     canonical_url,
     LaunchpadView,
     )
+from lp.app.enums import service_uses_launchpad
 from lp.app.errors import TranslationUnavailable
-from lp.app.enums import service_uses_launchpad
 from lp.registry.interfaces.distroseries import IDistroSeries
 from lp.registry.interfaces.series import SeriesStatus
 from lp.services.propertycache import cachedproperty

=== modified file 'lib/lp/translations/browser/poexportrequest.py'
--- lib/lp/translations/browser/poexportrequest.py	2011-03-23 11:51:07 +0000
+++ lib/lp/translations/browser/poexportrequest.py	2011-12-20 00:00:32 +0000
@@ -18,10 +18,10 @@
     )
 from lp.app.browser.tales import DurationFormatterAPI
 from lp.services.propertycache import cachedproperty
-from lp.translations.interfaces.poexportrequest import IPOExportRequestSet
 from lp.translations.interfaces.hastranslationtemplates import (
     IHasTranslationTemplates,
     )
+from lp.translations.interfaces.poexportrequest import IPOExportRequestSet
 from lp.translations.interfaces.translationexporter import (
     ITranslationExporter,
     )

=== modified file 'lib/lp/translations/browser/potemplate.py'
--- lib/lp/translations/browser/potemplate.py	2011-10-10 11:25:51 +0000
+++ lib/lp/translations/browser/potemplate.py	2011-12-20 00:00:32 +0000
@@ -31,16 +31,16 @@
 import os.path
 
 from lazr.restful.utils import smartquote
-from storm.info import ClassAlias
+import pytz
 from storm.expr import (
     And,
     Or,
     )
+from storm.info import ClassAlias
 from zope.component import getUtility
 from zope.interface import implements
 from zope.publisher.browser import FileUpload
 from zope.security.proxy import removeSecurityProxy
-import pytz
 
 from canonical.launchpad import (
     _,
@@ -83,7 +83,6 @@
 from lp.registry.model.productseries import ProductSeries
 from lp.registry.model.sourcepackagename import SourcePackageName
 from lp.services.worlddata.interfaces.language import ILanguageSet
-from lp.translations.model.potemplate import POTemplate
 from lp.translations.browser.poexportrequest import BaseExportView
 from lp.translations.browser.translations import TranslationsMixin
 from lp.translations.browser.translationsharing import (
@@ -102,6 +101,7 @@
 from lp.translations.interfaces.translationimportqueue import (
     ITranslationImportQueue,
     )
+from lp.translations.model.potemplate import POTemplate
 
 
 class POTemplateNavigation(Navigation):

=== modified file 'lib/lp/translations/browser/productseries.py'
--- lib/lp/translations/browser/productseries.py	2011-03-30 11:17:35 +0000
+++ lib/lp/translations/browser/productseries.py	2011-12-20 00:00:32 +0000
@@ -40,9 +40,9 @@
     custom_widget,
     LaunchpadEditFormView,
     LaunchpadFormView,
+    ReturnToReferrerMixin,
     )
 from lp.app.enums import service_uses_launchpad
-from lp.app.browser.launchpadform import ReturnToReferrerMixin
 from lp.app.widgets.itemswidgets import LaunchpadRadioWidgetWithDescription
 from lp.code.interfaces.branchjob import IRosettaUploadJobSource
 from lp.registry.interfaces.productseries import IProductSeries

=== modified file 'lib/lp/translations/browser/tests/test_breadcrumbs.py'
--- lib/lp/translations/browser/tests/test_breadcrumbs.py	2011-09-13 05:23:16 +0000
+++ lib/lp/translations/browser/tests/test_breadcrumbs.py	2011-12-20 00:00:32 +0000
@@ -3,8 +3,8 @@
 
 __metaclass__ = type
 
+from lazr.restful.utils import smartquote
 from zope.component import getUtility
-from lazr.restful.utils import smartquote
 
 from lp.app.enums import ServiceUsage
 from lp.services.worlddata.interfaces.language import ILanguageSet

=== modified file 'lib/lp/translations/browser/tests/test_noindex.py'
--- lib/lp/translations/browser/tests/test_noindex.py	2010-10-15 03:35:27 +0000
+++ lib/lp/translations/browser/tests/test_noindex.py	2011-12-20 00:00:32 +0000
@@ -10,11 +10,11 @@
 from canonical.launchpad.webapp import canonical_url
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.app.enums import ServiceUsage
+from lp.services.propertycache import cachedproperty
 from lp.testing import (
     BrowserTestCase,
     login_person,
     )
-from lp.services.propertycache import cachedproperty
 
 
 class TestRobotsMixin:

=== modified file 'lib/lp/translations/browser/tests/test_poexportrequest_views.py'
--- lib/lp/translations/browser/tests/test_poexportrequest_views.py	2011-04-06 15:55:05 +0000
+++ lib/lp/translations/browser/tests/test_poexportrequest_views.py	2011-12-20 00:00:32 +0000
@@ -16,7 +16,8 @@
 from lp.translations.browser.potemplate import POTemplateExportView
 from lp.translations.interfaces.side import TranslationSide
 from lp.translations.interfaces.translationfileformat import (
-    TranslationFileFormat)
+    TranslationFileFormat,
+    )
 from lp.translations.model.poexportrequest import POExportRequest
 
 

=== modified file 'lib/lp/translations/browser/tests/test_product_view.py'
--- lib/lp/translations/browser/tests/test_product_view.py	2011-10-12 11:10:39 +0000
+++ lib/lp/translations/browser/tests/test_product_view.py	2011-12-20 00:00:32 +0000
@@ -11,8 +11,8 @@
 from lp.app.enums import ServiceUsage
 from lp.registry.interfaces.series import SeriesStatus
 from lp.testing import (
+    celebrity_logged_in,
     login_person,
-    celebrity_logged_in,
     TestCaseWithFactory,
     )
 from lp.testing.views import create_view

=== modified file 'lib/lp/translations/browser/tests/test_seriestemplatesview.py'
--- lib/lp/translations/browser/tests/test_seriestemplatesview.py	2011-07-27 20:37:13 +0000
+++ lib/lp/translations/browser/tests/test_seriestemplatesview.py	2011-12-20 00:00:32 +0000
@@ -15,13 +15,13 @@
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.registry.model.distroseries import DistroSeries
 from lp.registry.model.productseries import ProductSeries
-from lp.translations.browser.distroseries import DistroSeriesTemplatesView
-from lp.translations.browser.productseries import ProductSeriesTemplatesView
 from lp.testing import (
     login_person,
     TestCaseWithFactory,
     )
 from lp.testing.sampledata import ADMIN_EMAIL
+from lp.translations.browser.distroseries import DistroSeriesTemplatesView
+from lp.translations.browser.productseries import ProductSeriesTemplatesView
 
 
 class SeriesTemplatesViewScenario:

=== modified file 'lib/lp/translations/browser/tests/test_translationmessage_view.py'
--- lib/lp/translations/browser/tests/test_translationmessage_view.py	2011-05-17 21:45:39 +0000
+++ lib/lp/translations/browser/tests/test_translationmessage_view.py	2011-12-20 00:00:32 +0000
@@ -27,16 +27,14 @@
     TestCaseWithFactory,
     )
 from lp.testing.views import create_view
-from lp.translations.enums import TranslationPermission
 from lp.translations.browser.translationmessage import (
     contains_translations,
     CurrentTranslationMessagePageView,
     CurrentTranslationMessageView,
     revert_unselected_translations,
     )
-from lp.translations.interfaces.side import (
-    ITranslationSideTraitsSet,
-    )
+from lp.translations.enums import TranslationPermission
+from lp.translations.interfaces.side import ITranslationSideTraitsSet
 from lp.translations.interfaces.translations import TranslationConstants
 from lp.translations.interfaces.translationsperson import ITranslationsPerson
 from lp.translations.publisher import TranslationsLayer

=== modified file 'lib/lp/translations/browser/tests/test_translationtemplatesbuild.py'
--- lib/lp/translations/browser/tests/test_translationtemplatesbuild.py	2010-09-14 11:11:56 +0000
+++ lib/lp/translations/browser/tests/test_translationtemplatesbuild.py	2011-12-20 00:00:32 +0000
@@ -6,6 +6,7 @@
 __metaclass__ = type
 
 from datetime import datetime
+
 from pytz import utc
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy

=== modified file 'lib/lp/translations/browser/translator.py'
--- lib/lp/translations/browser/translator.py	2011-04-01 09:09:45 +0000
+++ lib/lp/translations/browser/translator.py	2011-12-20 00:00:32 +0000
@@ -10,9 +10,7 @@
 
 import cgi
 
-from canonical.launchpad.webapp import (
-    canonical_url,
-    )
+from canonical.launchpad.webapp import canonical_url
 from canonical.launchpad.webapp.menu import structured
 from lp.app.browser.launchpadform import (
     action,

=== modified file 'lib/lp/translations/interfaces/translationgroup.py'
--- lib/lp/translations/interfaces/translationgroup.py	2011-03-24 13:16:48 +0000
+++ lib/lp/translations/interfaces/translationgroup.py	2011-12-20 00:00:32 +0000
@@ -15,11 +15,11 @@
 
 from lazr.restful.declarations import (
     collection_default_content,
-    exported,
+    export_as_webservice_collection,
     export_as_webservice_entry,
-    export_as_webservice_collection,
+    export_operation_as,
     export_read_operation,
-    export_operation_as,
+    exported,
     operation_for_version,
     operation_parameters,
     operation_returns_entry,

=== modified file 'lib/lp/translations/interfaces/translationpackagingjob.py'
--- lib/lp/translations/interfaces/translationpackagingjob.py	2011-02-24 21:14:21 +0000
+++ lib/lp/translations/interfaces/translationpackagingjob.py	2011-12-20 00:00:32 +0000
@@ -1,6 +1,4 @@
-from lp.services.job.interfaces.job import (
-    IJobSource,
-    )
+from lp.services.job.interfaces.job import IJobSource
 
 
 class ITranslationPackagingJobSource(IJobSource):

=== modified file 'lib/lp/translations/interfaces/translationpolicy.py'
--- lib/lp/translations/interfaces/translationpolicy.py	2011-03-22 16:04:10 +0000
+++ lib/lp/translations/interfaces/translationpolicy.py	2011-12-20 00:00:32 +0000
@@ -8,12 +8,8 @@
     'ITranslationPolicy',
     ]
 
-from lazr.restful.declarations import (
-    exported,
-    )
-from lazr.restful.fields import (
-    ReferenceChoice,
-    )
+from lazr.restful.declarations import exported
+from lazr.restful.fields import ReferenceChoice
 from zope.interface import Interface
 from zope.schema import Choice
 

=== modified file 'lib/lp/translations/interfaces/translationsharingjob.py'
--- lib/lp/translations/interfaces/translationsharingjob.py	2011-07-30 14:07:47 +0000
+++ lib/lp/translations/interfaces/translationsharingjob.py	2011-12-20 00:00:32 +0000
@@ -3,9 +3,7 @@
 
 __metaclass__ = type
 
-from zope.interface import (
-    Attribute,
-    )
+from zope.interface import Attribute
 
 from canonical.launchpad import _
 from lp.services.job.interfaces.job import IJob

=== modified file 'lib/lp/translations/interfaces/webservice.py'
--- lib/lp/translations/interfaces/webservice.py	2011-03-04 21:15:00 +0000
+++ lib/lp/translations/interfaces/webservice.py	2011-12-20 00:00:32 +0000
@@ -20,6 +20,9 @@
     'ITranslationImportQueueEntry',
     ]
 
+# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
+# import bugs.  Break this up into a per-package thing.
+from canonical.launchpad.interfaces import _schema_circular_imports
 from lp.translations.interfaces.hastranslationimports import (
     IHasTranslationImports,
     )
@@ -28,12 +31,11 @@
 from lp.translations.interfaces.translationgroup import (
     ITranslationGroup,
     ITranslationGroupSet,
-)
+    )
 from lp.translations.interfaces.translationimportqueue import (
     ITranslationImportQueue,
     ITranslationImportQueueEntry,
     )
-# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
-# import bugs.  Break this up into a per-package thing.
-from canonical.launchpad.interfaces import _schema_circular_imports
+
+
 _schema_circular_imports

=== modified file 'lib/lp/translations/model/hastranslationtemplates.py'
--- lib/lp/translations/model/hastranslationtemplates.py	2011-03-24 11:08:57 +0000
+++ lib/lp/translations/model/hastranslationtemplates.py	2011-12-20 00:00:32 +0000
@@ -18,8 +18,8 @@
 from lp.translations.interfaces.hastranslationtemplates import (
     IHasTranslationTemplates,
     )
+from lp.translations.model.pofile import POFile
 from lp.translations.model.potemplate import POTemplate
-from lp.translations.model.pofile import POFile
 
 
 class HasTranslationTemplatesMixin:

=== modified file 'lib/lp/translations/model/pofilestatsjob.py'
--- lib/lp/translations/model/pofilestatsjob.py	2011-11-10 15:02:49 +0000
+++ lib/lp/translations/model/pofilestatsjob.py	2011-12-20 00:00:32 +0000
@@ -12,13 +12,13 @@
     ]
 
 import logging
-from zope.component import getUtility
 
 from storm.locals import (
     And,
     Int,
     Reference,
     )
+from zope.component import getUtility
 from zope.interface import (
     classProvides,
     implements,

=== modified file 'lib/lp/translations/model/potemplate.py'
--- lib/lp/translations/model/potemplate.py	2011-12-18 14:29:19 +0000
+++ lib/lp/translations/model/potemplate.py	2011-12-20 00:00:32 +0000
@@ -62,9 +62,6 @@
     sqlvalues,
     )
 from canonical.launchpad import helpers
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.interfaces.lpstorm import (
     IMasterStore,
     IStore,
@@ -76,6 +73,7 @@
 from lp.registry.model.packaging import Packaging
 from lp.registry.model.sourcepackagename import SourcePackageName
 from lp.services.database.collection import Collection
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.propertycache import cachedproperty
 from lp.services.worlddata.model.language import Language
 from lp.translations.enums import RosettaImportStatus

=== modified file 'lib/lp/translations/model/translationgroup.py'
--- lib/lp/translations/model/translationgroup.py	2011-12-18 14:29:19 +0000
+++ lib/lp/translations/model/translationgroup.py	2011-12-20 00:00:32 +0000
@@ -28,21 +28,19 @@
 from canonical.database.constants import DEFAULT
 from canonical.database.datetimecol import UtcDateTimeCol
 from canonical.database.sqlbase import SQLBase
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.database.librarian import (
     LibraryFileAlias,
     LibraryFileContent,
     )
 from canonical.launchpad.interfaces.lpstorm import (
+    ISlaveStore,
     IStore,
-    ISlaveStore,
     )
 from lp.app.errors import NotFoundError
 from lp.registry.interfaces.person import validate_public_person
 from lp.registry.model.person import Person
 from lp.registry.model.teammembership import TeamParticipation
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.services.worlddata.model.language import Language
 from lp.translations.interfaces.translationgroup import (
     ITranslationGroup,

=== modified file 'lib/lp/translations/model/translationsharingjob.py'
--- lib/lp/translations/model/translationsharingjob.py	2011-08-01 08:12:35 +0000
+++ lib/lp/translations/model/translationsharingjob.py	2011-12-20 00:00:32 +0000
@@ -22,9 +22,7 @@
     )
 
 from canonical.database.enumcol import EnumCol
-from canonical.launchpad.interfaces.lpstorm import (
-    IStore,
-    )
+from canonical.launchpad.interfaces.lpstorm import IStore
 from lp.registry.model.distroseries import DistroSeries
 from lp.registry.model.productseries import ProductSeries
 from lp.registry.model.sourcepackagename import SourcePackageName

=== modified file 'lib/lp/translations/model/translationtemplatesbuild.py'
--- lib/lp/translations/model/translationtemplatesbuild.py	2011-12-19 15:09:08 +0000
+++ lib/lp/translations/model/translationtemplatesbuild.py	2011-12-20 00:00:32 +0000
@@ -18,9 +18,6 @@
     implements,
     )
 
-from lp.services.database.decoratedresultset import (
-    DecoratedResultSet,
-    )
 from canonical.launchpad.interfaces.lpstorm import IStore
 from lp.buildmaster.model.buildfarmjob import BuildFarmJobDerived
 from lp.code.model.branch import Branch
@@ -31,6 +28,7 @@
     )
 from lp.registry.model.product import Product
 from lp.services.database.bulk import load_related
+from lp.services.database.decoratedresultset import DecoratedResultSet
 from lp.translations.interfaces.translationtemplatesbuild import (
     ITranslationTemplatesBuild,
     ITranslationTemplatesBuildSource,

=== modified file 'lib/lp/translations/scripts/language_pack.py'
--- lib/lp/translations/scripts/language_pack.py	2011-05-05 15:38:20 +0000
+++ lib/lp/translations/scripts/language_pack.py	2011-12-20 00:00:32 +0000
@@ -31,13 +31,13 @@
     UploadFailed,
     )
 from lp.registry.interfaces.distribution import IDistributionSet
+from lp.services.tarfile_helpers import LaunchpadWriteTarFile
 from lp.translations.enums import LanguagePackType
 from lp.translations.interfaces.languagepack import ILanguagePackSet
 from lp.translations.interfaces.translationfileformat import (
     TranslationFileFormat,
     )
 from lp.translations.interfaces.vpoexport import IVPOExportSet
-from lp.services.tarfile_helpers import LaunchpadWriteTarFile
 
 
 def iter_sourcepackage_translationdomain_mapping(series):

=== modified file 'lib/lp/translations/scripts/migrate_current_flag.py'
--- lib/lp/translations/scripts/migrate_current_flag.py	2010-12-09 19:49:36 +0000
+++ lib/lp/translations/scripts/migrate_current_flag.py	2011-12-20 00:00:32 +0000
@@ -8,12 +8,16 @@
 
 import logging
 
+from storm.expr import (
+    And,
+    Count,
+    Or,
+    Select,
+    )
+from storm.info import ClassAlias
 from zope.component import getUtility
 from zope.interface import implements
 
-from storm.info import ClassAlias
-from storm.expr import And, Count, Or, Select
-
 from canonical.launchpad.interfaces.looptuner import ITunableLoop
 from canonical.launchpad.utilities.looptuner import DBLoopTuner
 from canonical.launchpad.webapp.interfaces import (

=== modified file 'lib/lp/translations/scripts/tests/test_copy_distroseries_translations.py'
--- lib/lp/translations/scripts/tests/test_copy_distroseries_translations.py	2011-06-28 15:04:29 +0000
+++ lib/lp/translations/scripts/tests/test_copy_distroseries_translations.py	2011-12-20 00:00:32 +0000
@@ -7,9 +7,7 @@
 
 
 import logging
-from unittest import (
-    TestCase,
-    )
+from unittest import TestCase
 
 from zope.component import getUtility
 

=== modified file 'lib/lp/translations/scripts/tests/test_merge_existing_packagings.py'
--- lib/lp/translations/scripts/tests/test_merge_existing_packagings.py	2011-04-11 16:00:53 +0000
+++ lib/lp/translations/scripts/tests/test_merge_existing_packagings.py	2011-12-20 00:00:32 +0000
@@ -8,15 +8,15 @@
 
 from canonical.launchpad.scripts.tests import run_script
 from canonical.testing.layers import ZopelessAppServerLayer
+from lp.testing import (
+    person_logged_in,
+    TestCaseWithFactory,
+    )
 from lp.translations.tests.test_translationpackagingjob import (
     count_translations,
     make_translation_merge_job,
     )
 from lp.translations.translationmerger import TranslationMerger
-from lp.testing import (
-    person_logged_in,
-    TestCaseWithFactory,
-    )
 
 
 class TestMergeExistingPackagings(TestCaseWithFactory):

=== modified file 'lib/lp/translations/scripts/tests/test_packaging_translations.py'
--- lib/lp/translations/scripts/tests/test_packaging_translations.py	2011-08-12 21:36:45 +0000
+++ lib/lp/translations/scripts/tests/test_packaging_translations.py	2011-12-20 00:00:32 +0000
@@ -11,9 +11,8 @@
 
 from canonical.launchpad.scripts.tests import run_script
 from canonical.testing.layers import ZopelessAppServerLayer
-from lp.translations.model.translationpackagingjob import (
-    TranslationSplitJob)
 from lp.testing import TestCaseWithFactory
+from lp.translations.model.translationpackagingjob import TranslationSplitJob
 from lp.translations.tests.test_translationpackagingjob import (
     make_translation_merge_job,
     )

=== modified file 'lib/lp/translations/scripts/tests/test_remove_translations.py'
--- lib/lp/translations/scripts/tests/test_remove_translations.py	2011-08-16 10:11:32 +0000
+++ lib/lp/translations/scripts/tests/test_remove_translations.py	2011-12-20 00:00:32 +0000
@@ -12,10 +12,10 @@
     OptionParser,
     OptionValueError,
     )
-from testtools.matchers import MatchesStructure
 from unittest import TestLoader
 
 from storm.store import Store
+from testtools.matchers import MatchesStructure
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy
 from zope.testing.loghandler import Handler

=== modified file 'lib/lp/translations/scripts/tests/test_translations_approval.py'
--- lib/lp/translations/scripts/tests/test_translations_approval.py	2011-10-05 15:26:24 +0000
+++ lib/lp/translations/scripts/tests/test_translations_approval.py	2011-12-20 00:00:32 +0000
@@ -2,6 +2,7 @@
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 import logging
+
 import transaction
 
 from canonical.testing.layers import LaunchpadScriptLayer

=== modified file 'lib/lp/translations/scripts/translations_to_branch.py'
--- lib/lp/translations/scripts/translations_to_branch.py	2011-12-04 07:43:25 +0000
+++ lib/lp/translations/scripts/translations_to_branch.py	2011-12-20 00:00:32 +0000
@@ -22,11 +22,6 @@
     )
 from zope.component import getUtility
 
-# Load the normal plugin set.  Your linter may complain, and automated
-# imports formatting tools will rearrange this, but keep it above the
-# other Launchpad imports.
-import lp.codehosting
-
 from canonical.config import config
 from canonical.launchpad.helpers import (
     get_contact_email_addresses,
@@ -49,6 +44,10 @@
     ConcurrentUpdateError,
     DirectBranchCommit,
     )
+# Load the normal plugin set.  Your linter may complain, and automated
+# imports formatting tools will rearrange this, but keep it above the
+# other Launchpad imports.
+import lp.codehosting
 from lp.codehosting.vfs import get_rw_server
 from lp.services.mail.sendmail import (
     format_address,

=== modified file 'lib/lp/translations/tests/test_generate_translation_templates.py'
--- lib/lp/translations/tests/test_generate_translation_templates.py	2011-11-20 23:37:23 +0000
+++ lib/lp/translations/tests/test_generate_translation_templates.py	2011-12-20 00:00:32 +0000
@@ -5,16 +5,16 @@
 from StringIO import StringIO
 import tarfile
 
-from lp.testing.fakemethod import FakeMethod
-
 from lpbuildd import pottery
 from lpbuildd.pottery.generate_translation_templates import (
-    GenerateTranslationTemplates)
+    GenerateTranslationTemplates,
+    )
 
 from canonical.launchpad.ftests.script import run_script
 from canonical.testing.layers import ZopelessDatabaseLayer
 from lp.code.model.directbranchcommit import DirectBranchCommit
 from lp.testing import TestCaseWithFactory
+from lp.testing.fakemethod import FakeMethod
 
 
 class TestGenerateTranslationTemplates(TestCaseWithFactory):

=== modified file 'lib/lp/translations/tests/test_pofilestatsjob.py'
--- lib/lp/translations/tests/test_pofilestatsjob.py	2011-12-06 22:21:35 +0000
+++ lib/lp/translations/tests/test_pofilestatsjob.py	2011-12-20 00:00:32 +0000
@@ -8,9 +8,7 @@
 
 from canonical.config import config
 from canonical.launchpad.webapp.testing import verifyObject
-from canonical.testing.layers import (
-    LaunchpadZopelessLayer,
-    )
+from canonical.testing.layers import LaunchpadZopelessLayer
 from lp.app.enums import ServiceUsage
 from lp.services.job.interfaces.job import (
     IJobSource,

=== modified file 'lib/lp/translations/tests/test_potemplate.py'
--- lib/lp/translations/tests/test_potemplate.py	2011-09-15 11:35:28 +0000
+++ lib/lp/translations/tests/test_potemplate.py	2011-12-20 00:00:32 +0000
@@ -21,12 +21,8 @@
     )
 from lp.testing.fakemethod import FakeMethod
 from lp.translations.interfaces.potemplate import IPOTemplateSet
-from lp.translations.interfaces.side import (
-    TranslationSide,
-    )
-from lp.translations.model.potemplate import (
-    get_pofiles_for,
-    )
+from lp.translations.interfaces.side import TranslationSide
+from lp.translations.model.potemplate import get_pofiles_for
 
 
 class TestPOTemplate(TestCaseWithFactory):

=== modified file 'lib/lp/translations/tests/test_pottery_detect_intltool.py'
--- lib/lp/translations/tests/test_pottery_detect_intltool.py	2011-11-20 23:37:23 +0000
+++ lib/lp/translations/tests/test_pottery_detect_intltool.py	2011-12-20 00:00:32 +0000
@@ -7,7 +7,6 @@
 from textwrap import dedent
 
 from bzrlib.bzrdir import BzrDir
-
 from lpbuildd.pottery.intltool import (
     check_potfiles_in,
     ConfigFile,
@@ -17,6 +16,7 @@
     generate_pots,
     get_translation_domain,
     )
+
 from canonical.launchpad.scripts.tests import run_script
 from lp.testing import TestCase
 from lp.testing.fakemethod import FakeMethod

=== modified file 'lib/lp/translations/tests/test_translationimportqueue.py'
--- lib/lp/translations/tests/test_translationimportqueue.py	2011-09-15 11:35:28 +0000
+++ lib/lp/translations/tests/test_translationimportqueue.py	2011-12-20 00:00:32 +0000
@@ -5,6 +5,7 @@
 
 from operator import attrgetter
 import os.path
+
 import transaction
 from zope.component import getUtility
 from zope.security.proxy import removeSecurityProxy

=== modified file 'lib/lp/translations/tests/test_translationpackagingjob.py'
--- lib/lp/translations/tests/test_translationpackagingjob.py	2011-08-01 14:32:31 +0000
+++ lib/lp/translations/tests/test_translationpackagingjob.py	2011-12-20 00:00:32 +0000
@@ -6,23 +6,15 @@
 __metaclass__ = type
 
 
+from lazr.lifecycle.event import ObjectModifiedEvent
+from lazr.lifecycle.snapshot import Snapshot
 import transaction
 from zope.component import getUtility
 from zope.event import notify
 
-from lazr.lifecycle.event import ObjectModifiedEvent
-from lazr.lifecycle.snapshot import Snapshot
-
 from canonical.launchpad.webapp.testing import verifyObject
-from canonical.testing.layers import (
-    LaunchpadZopelessLayer,
-    )
+from canonical.testing.layers import LaunchpadZopelessLayer
 from lp.registry.interfaces.packaging import IPackagingUtil
-from lp.translations.interfaces.potemplate import IPOTemplate
-from lp.translations.model.translationsharingjob import (
-    TranslationSharingJob,
-    TranslationSharingJobDerived,
-    )
 from lp.services.job.interfaces.job import (
     IRunnableJob,
     JobStatus,
@@ -32,6 +24,7 @@
     person_logged_in,
     TestCaseWithFactory,
     )
+from lp.translations.interfaces.potemplate import IPOTemplate
 from lp.translations.interfaces.side import TranslationSide
 from lp.translations.interfaces.translationpackagingjob import (
     ITranslationPackagingJobSource,
@@ -43,6 +36,10 @@
     TranslationSplitJob,
     TranslationTemplateChangeJob,
     )
+from lp.translations.model.translationsharingjob import (
+    TranslationSharingJob,
+    TranslationSharingJobDerived,
+    )
 from lp.translations.tests.test_translationsplitter import (
     make_shared_potmsgset,
     )

=== modified file 'lib/lp/translations/tests/test_translationpermission.py'
--- lib/lp/translations/tests/test_translationpermission.py	2010-12-02 16:13:51 +0000
+++ lib/lp/translations/tests/test_translationpermission.py	2011-12-20 00:00:32 +0000
@@ -12,7 +12,6 @@
 from lp.translations.interfaces.translationgroup import TranslationPermission
 from lp.translations.interfaces.translator import ITranslatorSet
 
-
 # A user can be translating either a translation that's not covered by a
 # translation team ("untended"), or one that is ("tended"), or one whose
 # translation team the user is a member of ("member").

=== modified file 'lib/lp/translations/tests/test_translationsplitter.py'
--- lib/lp/translations/tests/test_translationsplitter.py	2011-08-05 06:06:21 +0000
+++ lib/lp/translations/tests/test_translationsplitter.py	2011-12-20 00:00:32 +0000
@@ -8,9 +8,7 @@
 
 from canonical.testing.layers import ZopelessDatabaseLayer
 from lp.testing import TestCaseWithFactory
-from lp.translations.interfaces.side import (
-    TranslationSide,
-    )
+from lp.translations.interfaces.side import TranslationSide
 from lp.translations.utilities.translationsplitter import (
     TranslationSplitter,
     TranslationTemplateSplitter,

=== modified file 'lib/lp/translations/tests/test_translationtemplatesbuildbehavior.py'
--- lib/lp/translations/tests/test_translationtemplatesbuildbehavior.py	2011-10-19 08:09:15 +0000
+++ lib/lp/translations/tests/test_translationtemplatesbuildbehavior.py	2011-12-20 00:00:32 +0000
@@ -6,8 +6,8 @@
 import datetime
 import logging
 import os
+
 import pytz
-
 from testtools.deferredruntest import AsynchronousDeferredRunTest
 import transaction
 from twisted.internet import defer

=== modified file 'lib/lp/translations/utilities/translation_import.py'
--- lib/lp/translations/utilities/translation_import.py	2011-12-18 13:45:20 +0000
+++ lib/lp/translations/utilities/translation_import.py	2011-12-20 00:00:32 +0000
@@ -24,13 +24,13 @@
     cursor,
     quote,
     )
-from lp.services.identity.interfaces.emailaddress import InvalidEmailAddress
 from canonical.launchpad.webapp import canonical_url
 from lp.registry.interfaces.person import (
     IPersonSet,
     PersonCreationRationale,
     )
 from lp.registry.interfaces.sourcepackage import ISourcePackageFactory
+from lp.services.identity.interfaces.emailaddress import InvalidEmailAddress
 from lp.services.propertycache import (
     cachedproperty,
     get_property_cache,

=== modified file 'lib/lp/translations/vocabularies.py'
--- lib/lp/translations/vocabularies.py	2011-12-04 18:01:35 +0000
+++ lib/lp/translations/vocabularies.py	2011-12-20 00:00:32 +0000
@@ -15,16 +15,10 @@
     'TranslationTemplateVocabulary',
     ]
 
-from sqlobject import (
-    AND,
-    )
-from zope.schema.vocabulary import (
-    SimpleTerm,
-    )
+from sqlobject import AND
+from zope.schema.vocabulary import SimpleTerm
 
-from canonical.database.sqlbase import (
-    sqlvalues,
-    )
+from canonical.database.sqlbase import sqlvalues
 from canonical.launchpad.webapp.vocabulary import (
     NamedSQLObjectVocabulary,
     SQLObjectVocabularyBase,

=== modified file 'lib/lp/translations/windmill/tests/test_sourcepackage_sharing_details.py'
--- lib/lp/translations/windmill/tests/test_sourcepackage_sharing_details.py	2011-04-20 06:12:26 +0000
+++ lib/lp/translations/windmill/tests/test_sourcepackage_sharing_details.py	2011-12-20 00:00:32 +0000
@@ -9,30 +9,22 @@
 
 import transaction
 
-from lp.app.enums import (
-    ServiceUsage,
-    )
+from lp.app.enums import ServiceUsage
 from lp.testing import (
     feature_flags,
     set_feature_flag,
     WindmillTestCase,
-)
-from lp.testing.windmill import (
-    lpuser,
-)
-from lp.testing.windmill.constants import (
-    FOR_ELEMENT,
-)
+    )
+from lp.testing.windmill import lpuser
+from lp.testing.windmill.constants import FOR_ELEMENT
 from lp.testing.windmill.widgets import (
     OnPageWidget,
     search_and_select_picker_widget,
-)
+    )
 from lp.translations.interfaces.translations import (
     TranslationsBranchImportMode,
-)
-from lp.translations.windmill.testing import (
-    TranslationsWindmillLayer,
-)
+    )
+from lp.translations.windmill.testing import TranslationsWindmillLayer
 
 
 class TestSharingDetails(WindmillTestCase):