launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #08797
[Merge] lp:~stevenk/launchpad/fix-copyrights into lp:launchpad
Steve Kowalik has proposed merging lp:~stevenk/launchpad/fix-copyrights into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~stevenk/launchpad/fix-copyrights/+merge/110229
While working on another branch today I noticed one file that did not have a copyright header. This got me curious enough to search the entire tree for like files -- I found more than I wanted to, so I fixed them. I also ran format-imports across lib/lp.
--
https://code.launchpad.net/~stevenk/launchpad/fix-copyrights/+merge/110229
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/fix-copyrights into lp:launchpad.
=== modified file 'lib/lp/app/__init__.py'
--- lib/lp/app/__init__.py 2012-04-02 11:38:48 +0000
+++ lib/lp/app/__init__.py 2012-06-14 05:22:18 +0000
@@ -15,6 +15,8 @@
# values, but they kindly left this global variable for you to monkey patch if
# you want the old behavior, just like we do.
from zope.app.form.browser import itemswidgets
+
+
itemswidgets.EXPLICIT_EMPTY_SELECTION = False
# Monkeypatch our embedded BeautifulSoup and the one in mechanize to
=== modified file 'lib/lp/app/widgets/tests/test_datetime.py'
--- lib/lp/app/widgets/tests/test_datetime.py 2012-01-01 02:58:52 +0000
+++ lib/lp/app/widgets/tests/test_datetime.py 2012-06-14 05:22:18 +0000
@@ -1,3 +1,8 @@
+# Copyright 2011-2012 Canonical Ltd. This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+__metaclass__ = type
+
from datetime import datetime
from zope.app.form.interfaces import ConversionError
=== modified file 'lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py'
--- lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py 2012-05-31 12:11:19 +0000
+++ lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py 2012-06-14 05:22:18 +0000
@@ -34,12 +34,12 @@
from lp.services.config import config
from lp.services.log.logger import BufferLogger
from lp.services.mail import stub
-from lp.services.scripts.interfaces.scriptactivity import IScriptActivitySet
from lp.services.osutils import (
ensure_directory_exists,
remove_if_exists,
write_file,
)
+from lp.services.scripts.interfaces.scriptactivity import IScriptActivitySet
from lp.soyuz.enums import (
ArchiveStatus,
ArchiveSubscriberStatus,
=== modified file 'lib/lp/bugs/browser/tests/test_bugtarget_filebug.py'
--- lib/lp/bugs/browser/tests/test_bugtarget_filebug.py 2012-06-07 12:17:48 +0000
+++ lib/lp/bugs/browser/tests/test_bugtarget_filebug.py 2012-06-14 05:22:18 +0000
@@ -5,6 +5,7 @@
from BeautifulSoup import BeautifulSoup
+from lazr.restful.interfaces import IJSONRequestCache
import transaction
from zope.component import getUtility
from zope.schema.interfaces import (
@@ -13,10 +14,7 @@
)
from zope.security.proxy import removeSecurityProxy
-from lazr.restful.interfaces import IJSONRequestCache
-from lp.bugs.browser.bugtarget import (
- FileBugViewBase,
- )
+from lp.bugs.browser.bugtarget import FileBugViewBase
from lp.bugs.interfaces.bug import (
IBugAddForm,
IBugSet,
=== modified file 'lib/lp/bugs/browser/tests/test_distribution_upstream_report.py'
--- lib/lp/bugs/browser/tests/test_distribution_upstream_report.py 2012-05-25 19:58:27 +0000
+++ lib/lp/bugs/browser/tests/test_distribution_upstream_report.py 2012-06-14 05:22:18 +0000
@@ -30,8 +30,8 @@
LaunchpadFunctionalLayer,
)
from lp.testing.views import (
+ create_initialized_view,
create_view,
- create_initialized_view,
)
=== modified file 'lib/lp/bugs/model/bugtaskflat.py'
--- lib/lp/bugs/model/bugtaskflat.py 2012-05-07 07:43:07 +0000
+++ lib/lp/bugs/model/bugtaskflat.py 2012-06-14 05:22:18 +0000
@@ -1,3 +1,8 @@
+# Copyright 2012 Canonical Ltd. This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+__metaclass__ = type
+
from storm.locals import (
Bool,
DateTime,
@@ -6,13 +11,13 @@
Storm,
)
-from lp.registry.enums import InformationType
-from lp.services.database.enumcol import EnumCol
from lp.bugs.interfaces.bugtask import (
BugTaskImportance,
BugTaskStatus,
BugTaskStatusSearch,
)
+from lp.registry.enums import InformationType
+from lp.services.database.enumcol import EnumCol
class BugTaskFlat(Storm):
=== modified file 'lib/lp/bugs/model/structuralsubscription.py'
--- lib/lp/bugs/model/structuralsubscription.py 2012-05-03 11:58:01 +0000
+++ lib/lp/bugs/model/structuralsubscription.py 2012-06-14 05:22:18 +0000
@@ -83,12 +83,12 @@
from lp.services.database.constants import UTC_NOW
from lp.services.database.lpstorm import IStore
from lp.services.database.sqlbase import quote
-from lp.services.propertycache import cachedproperty
from lp.services.database.stormexpr import (
ArrayAgg,
ArrayContains,
ArrayIntersects,
)
+from lp.services.propertycache import cachedproperty
class StructuralSubscription(Storm):
=== modified file 'lib/lp/bugs/model/tests/test_bug.py'
--- lib/lp/bugs/model/tests/test_bug.py 2012-06-04 09:41:48 +0000
+++ lib/lp/bugs/model/tests/test_bug.py 2012-06-14 05:22:18 +0000
@@ -30,12 +30,12 @@
BugSubscriptionInfo,
)
from lp.bugs.model.bugnotification import BugNotificationRecipient
+from lp.registry.enums import InformationType
from lp.registry.interfaces.accesspolicy import (
IAccessArtifactSource,
+ IAccessPolicyArtifactSource,
IAccessPolicySource,
- IAccessPolicyArtifactSource,
)
-from lp.registry.enums import InformationType
from lp.registry.interfaces.person import PersonVisibility
from lp.registry.tests.test_accesspolicy import get_policies_for_artifact
from lp.testing import (
=== modified file 'lib/lp/bugs/model/tests/test_bugtask.py'
--- lib/lp/bugs/model/tests/test_bugtask.py 2012-06-07 05:59:10 +0000
+++ lib/lp/bugs/model/tests/test_bugtask.py 2012-06-14 05:22:18 +0000
@@ -61,7 +61,8 @@
)
from lp.bugs.model.tests.test_bug import LEGACY_ACCESS_TRIGGERS
from lp.bugs.scripts.bugtasktargetnamecaches import (
- BugTaskTargetNameCacheUpdater)
+ BugTaskTargetNameCacheUpdater,
+ )
from lp.bugs.tests.bug import create_old_bug
from lp.hardwaredb.interfaces.hwdb import (
HWBus,
@@ -69,16 +70,15 @@
)
from lp.registry.enums import InformationType
from lp.registry.interfaces.accesspolicy import (
+ IAccessArtifactGrantSource,
+ IAccessArtifactSource,
IAccessPolicyGrantSource,
IAccessPolicySource,
- IAccessArtifactGrantSource,
- IAccessArtifactSource,
)
from lp.registry.interfaces.distribution import IDistributionSet
from lp.registry.interfaces.distributionsourcepackage import (
- IDistributionSourcePackage
-)
-
+ IDistributionSourcePackage,
+ )
from lp.registry.interfaces.distroseries import IDistroSeriesSet
from lp.registry.interfaces.person import (
IPerson,
@@ -92,8 +92,8 @@
from lp.registry.tests.test_accesspolicy import get_policies_for_artifact
from lp.services.database.sqlbase import (
convert_storm_clause_to_string,
+ flush_database_caches,
flush_database_updates,
- flush_database_caches,
)
from lp.services.features.testing import FeatureFixture
from lp.services.job.tests import block_on_job
=== modified file 'lib/lp/bugs/scripts/tests/test_bugnotification.py'
--- lib/lp/bugs/scripts/tests/test_bugnotification.py 2012-05-08 17:04:43 +0000
+++ lib/lp/bugs/scripts/tests/test_bugnotification.py 2012-06-14 05:22:18 +0000
@@ -4,13 +4,13 @@
__metaclass__ = type
-import StringIO
from datetime import (
datetime,
timedelta,
)
import logging
import re
+import StringIO
import unittest
import pytz
=== modified file 'lib/lp/bugs/tests/test_bugtaskset.py'
--- lib/lp/bugs/tests/test_bugtaskset.py 2012-05-14 20:19:39 +0000
+++ lib/lp/bugs/tests/test_bugtaskset.py 2012-06-14 05:22:18 +0000
@@ -6,12 +6,9 @@
__metaclass__ = type
from zope.component import getUtility
-from lp.bugs.interfaces.bugtask import (
- IBugTaskSet,
- )
-from lp.bugs.interfaces.bug import (
- IBugSet,
- )
+
+from lp.bugs.interfaces.bug import IBugSet
+from lp.bugs.interfaces.bugtask import IBugTaskSet
from lp.registry.interfaces.person import IPersonSet
from lp.registry.interfaces.product import IProductSet
from lp.services.webapp.interfaces import ILaunchBag
=== modified file 'lib/lp/code/mail/codehandler.py'
--- lib/lp/code/mail/codehandler.py 2012-04-27 18:50:49 +0000
+++ lib/lp/code/mail/codehandler.py 2012-06-14 05:22:18 +0000
@@ -14,15 +14,9 @@
from zope.interface import implements
from zope.security.interfaces import Unauthorized
-from lp.code.enums import (
- CodeReviewVote,
- )
-from lp.code.errors import (
- UserNotBranchReviewer,
- )
-from lp.code.interfaces.branchmergeproposal import (
- IBranchMergeProposalGetter,
- )
+from lp.code.enums import CodeReviewVote
+from lp.code.errors import UserNotBranchReviewer
+from lp.code.interfaces.branchmergeproposal import IBranchMergeProposalGetter
from lp.services.config import config
from lp.services.mail.commands import (
EmailCommand,
=== modified file 'lib/lp/code/mail/tests/test_codehandler.py'
--- lib/lp/code/mail/tests/test_codehandler.py 2012-04-27 19:03:32 +0000
+++ lib/lp/code/mail/tests/test_codehandler.py 2012-06-14 05:22:18 +0000
@@ -35,9 +35,7 @@
from lp.code.tests.helpers import make_merge_proposal_without_reviewers
from lp.services.config import config
from lp.services.mail.handlers import mail_handlers
-from lp.services.mail.interfaces import (
- EmailProcessingError,
- )
+from lp.services.mail.interfaces import EmailProcessingError
from lp.services.messages.model.message import MessageSet
from lp.services.webapp.authorization import LaunchpadSecurityPolicy
from lp.testing import (
=== modified file 'lib/lp/code/model/branchjob.py'
--- lib/lp/code/model/branchjob.py 2012-04-19 18:59:21 +0000
+++ lib/lp/code/model/branchjob.py 2012-06-14 05:22:18 +0000
@@ -94,13 +94,13 @@
from lp.scripts.helpers import TransactionFreeOperation
from lp.services.config import config
from lp.services.database.enumcol import EnumCol
-from lp.services.database.lpstorm import IStore
-from lp.services.database.sqlbase import SQLBase
from lp.services.database.locking import (
AdvisoryLockHeld,
LockType,
try_advisory_lock,
)
+from lp.services.database.lpstorm import IStore
+from lp.services.database.sqlbase import SQLBase
from lp.services.job.interfaces.job import JobStatus
from lp.services.job.model.job import (
EnumeratedSubclass,
=== modified file 'lib/lp/code/model/branchmergeproposaljob.py'
--- lib/lp/code/model/branchmergeproposaljob.py 2012-04-27 19:03:32 +0000
+++ lib/lp/code/model/branchmergeproposaljob.py 2012-06-14 05:22:18 +0000
@@ -85,9 +85,7 @@
from lp.code.model.branchmergeproposal import BranchMergeProposal
from lp.code.model.diff import PreviewDiff
from lp.codehosting.bzrutils import server
-from lp.codehosting.vfs import (
- get_ro_server,
- )
+from lp.codehosting.vfs import get_ro_server
from lp.registry.interfaces.person import IPersonSet
from lp.services.config import config
from lp.services.database.enumcol import EnumCol
=== modified file 'lib/lp/code/model/tests/test_branchjob.py'
--- lib/lp/code/model/tests/test_branchjob.py 2012-04-26 17:18:47 +0000
+++ lib/lp/code/model/tests/test_branchjob.py 2012-06-14 05:22:18 +0000
@@ -61,8 +61,8 @@
)
from lp.code.model.branchrevision import BranchRevision
from lp.code.model.directbranchcommit import DirectBranchCommit
+from lp.code.model.revision import RevisionSet
from lp.code.model.tests.test_branch import create_knit
-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.config import config
@@ -73,9 +73,7 @@
from lp.services.job.interfaces.job import JobStatus
from lp.services.job.model.job import Job
from lp.services.job.runner import JobRunner
-from lp.services.job.tests import (
- block_on_job,
- )
+from lp.services.job.tests import block_on_job
from lp.services.osutils import override_environ
from lp.services.webapp import canonical_url
from lp.testing import (
=== modified file 'lib/lp/codehosting/bzrutils.py'
--- lib/lp/codehosting/bzrutils.py 2012-03-22 16:20:58 +0000
+++ lib/lp/codehosting/bzrutils.py 2012-06-14 05:22:18 +0000
@@ -34,9 +34,9 @@
)
from bzrlib.errors import (
NotStacked,
- UnsupportedProtocol,
UnstackableBranchFormat,
UnstackableRepositoryFormat,
+ UnsupportedProtocol,
)
from bzrlib.remote import (
RemoteBranch,
=== modified file 'lib/lp/codehosting/scanner/tests/test_email.py'
--- lib/lp/codehosting/scanner/tests/test_email.py 2012-04-24 18:36:17 +0000
+++ lib/lp/codehosting/scanner/tests/test_email.py 2012-06-14 05:22:18 +0000
@@ -6,9 +6,9 @@
__metaclass__ = type
import email
+import os
from bzrlib.uncommit import uncommit
-import os
from zope.component import getUtility
from zope.event import notify
@@ -22,18 +22,18 @@
IRevisionsAddedJobSource,
)
from lp.code.model.branchjob import RevisionMailJob
+from lp.codehosting.scanner import events
from lp.codehosting.scanner.bzrsync import BzrSync
-from lp.codehosting.scanner import events
from lp.codehosting.scanner.tests.test_bzrsync import BzrSyncTestCase
from lp.registry.interfaces.person import IPersonSet
from lp.services.config import config
from lp.services.features.testing import FeatureFixture
from lp.services.job.runner import JobRunner
-from lp.services.mail import stub
from lp.services.job.tests import (
block_on_job,
pop_remote_notifications,
)
+from lp.services.mail import stub
from lp.testing import TestCaseWithFactory
from lp.testing.dbuser import switch_dbuser
from lp.testing.layers import (
=== modified file 'lib/lp/codehosting/tests/test_upgrade.py'
--- lib/lp/codehosting/tests/test_upgrade.py 2012-03-26 22:45:24 +0000
+++ lib/lp/codehosting/tests/test_upgrade.py 2012-06-14 05:22:18 +0000
@@ -1,3 +1,6 @@
+# Copyright 2012 Canonical Ltd. This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
__metaclass__ = type
=== modified file 'lib/lp/registry/browser/distribution.py'
--- lib/lp/registry/browser/distribution.py 2012-06-05 11:41:23 +0000
+++ lib/lp/registry/browser/distribution.py 2012-06-14 05:22:18 +0000
@@ -57,12 +57,12 @@
QuestionTargetFacetMixin,
QuestionTargetTraversalMixin,
)
-from lp.app.browser.lazrjs import InlinePersonEditPickerWidget
from lp.app.browser.launchpadform import (
action,
custom_widget,
LaunchpadFormView,
)
+from lp.app.browser.lazrjs import InlinePersonEditPickerWidget
from lp.app.browser.tales import format_link
from lp.app.errors import NotFoundError
from lp.app.widgets.image import ImageChangeWidget
=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py 2012-06-12 16:25:42 +0000
+++ lib/lp/registry/browser/person.py 2012-06-14 05:22:18 +0000
@@ -147,9 +147,7 @@
LaunchpadRadioWidget,
LaunchpadRadioWidgetWithDescription,
)
-from lp.blueprints.enums import (
- SpecificationWorkItemStatus,
- )
+from lp.blueprints.enums import SpecificationWorkItemStatus
from lp.bugs.interfaces.bugtask import (
BugTaskSearchParams,
BugTaskStatus,
=== modified file 'lib/lp/registry/browser/tests/test_breadcrumbs.py'
--- lib/lp/registry/browser/tests/test_breadcrumbs.py 2012-04-27 19:52:37 +0000
+++ lib/lp/registry/browser/tests/test_breadcrumbs.py 2012-06-14 05:22:18 +0000
@@ -6,10 +6,10 @@
from zope.component import getUtility
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
+from lp.registry.browser.tests.test_pillar_sharing import SharingBaseTestCase
from lp.services.webapp.publisher import canonical_url
from lp.testing import login_person
from lp.testing.breadcrumbs import BaseBreadcrumbTestCase
-from lp.registry.browser.tests.test_pillar_sharing import SharingBaseTestCase
class TestPillarSharingBreadcrumb(BaseBreadcrumbTestCase, SharingBaseTestCase):
=== modified file 'lib/lp/registry/browser/tests/test_distribution.py'
--- lib/lp/registry/browser/tests/test_distribution.py 2012-06-04 16:13:51 +0000
+++ lib/lp/registry/browser/tests/test_distribution.py 2012-06-14 05:22:18 +0000
@@ -1,3 +1,4 @@
+# Copyright 2011-2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Tests for Distribution page."""
=== modified file 'lib/lp/registry/browser/tests/test_person.py'
--- lib/lp/registry/browser/tests/test_person.py 2012-05-01 06:49:04 +0000
+++ lib/lp/registry/browser/tests/test_person.py 2012-06-14 05:22:18 +0000
@@ -3,8 +3,8 @@
__metaclass__ = type
+import doctest
import email
-import doctest
from textwrap import dedent
import soupmatchers
=== modified file 'lib/lp/registry/browser/tests/test_sshkey.py'
--- lib/lp/registry/browser/tests/test_sshkey.py 2012-04-11 14:40:02 +0000
+++ lib/lp/registry/browser/tests/test_sshkey.py 2012-06-14 05:22:18 +0000
@@ -10,8 +10,8 @@
from lp.registry.interfaces.ssh import ISSHKeySet
from lp.services.webapp import canonical_url
from lp.testing import (
+ person_logged_in,
TestCaseWithFactory,
- person_logged_in,
)
from lp.testing.layers import DatabaseFunctionalLayer
from lp.testing.pages import (
=== modified file 'lib/lp/registry/model/accesspolicy.py'
--- lib/lp/registry/model/accesspolicy.py 2012-06-05 02:03:44 +0000
+++ lib/lp/registry/model/accesspolicy.py 2012-06-14 05:22:18 +0000
@@ -41,9 +41,9 @@
)
from lp.registry.interfaces.accesspolicy import (
IAccessArtifact,
- IAccessArtifactSource,
IAccessArtifactGrant,
IAccessArtifactGrantSource,
+ IAccessArtifactSource,
IAccessPolicy,
IAccessPolicyArtifact,
IAccessPolicyArtifactSource,
=== modified file 'lib/lp/registry/model/productjob.py'
--- lib/lp/registry/model/productjob.py 2012-06-08 17:11:46 +0000
+++ lib/lp/registry/model/productjob.py 2012-06-14 05:22:18 +0000
@@ -16,8 +16,9 @@
datetime,
timedelta,
)
+
+from lazr.delegates import delegates
from pytz import utc
-from lazr.delegates import delegates
import simplejson
from storm.expr import (
And,
@@ -44,12 +45,12 @@
License,
)
from lp.registry.interfaces.productjob import (
+ ICommercialExpiredJob,
+ ICommercialExpiredJobSource,
IProductJob,
IProductJobSource,
IProductNotificationJob,
IProductNotificationJobSource,
- ICommercialExpiredJob,
- ICommercialExpiredJobSource,
ISevenDayCommercialExpirationJob,
ISevenDayCommercialExpirationJobSource,
IThirtyDayCommercialExpirationJob,
@@ -65,19 +66,17 @@
IStore,
)
from lp.services.database.stormbase import StormBase
-from lp.services.propertycache import cachedproperty
from lp.services.job.model.job import Job
from lp.services.job.runner import BaseRunnableJob
-from lp.services.mail.helpers import (
- get_email_template,
- )
+from lp.services.mail.helpers import get_email_template
+from lp.services.mail.mailwrapper import MailWrapper
from lp.services.mail.notificationrecipientset import NotificationRecipientSet
-from lp.services.mail.mailwrapper import MailWrapper
from lp.services.mail.sendmail import (
format_address,
format_address_for_person,
simple_sendmail,
)
+from lp.services.propertycache import cachedproperty
from lp.services.webapp.publisher import canonical_url
=== modified file 'lib/lp/registry/model/sharingjob.py'
--- lib/lp/registry/model/sharingjob.py 2012-05-24 01:43:42 +0000
+++ lib/lp/registry/model/sharingjob.py 2012-06-14 05:22:18 +0000
@@ -78,9 +78,7 @@
EnumeratedSubclass,
Job,
)
-from lp.services.job.runner import (
- BaseRunnableJob,
- )
+from lp.services.job.runner import BaseRunnableJob
from lp.services.mail.sendmail import format_address_for_person
from lp.services.webapp import errorlog
=== modified file 'lib/lp/registry/subscribers.py'
--- lib/lp/registry/subscribers.py 2012-05-25 21:18:48 +0000
+++ lib/lp/registry/subscribers.py 2012-06-14 05:22:18 +0000
@@ -14,9 +14,7 @@
import pytz
from zope.security.proxy import removeSecurityProxy
-from lp.registry.interfaces.person import (
- IPerson,
- )
+from lp.registry.interfaces.person import IPerson
from lp.registry.interfaces.product import License
from lp.services.config import config
from lp.services.mail.helpers import get_email_template
=== modified file 'lib/lp/registry/tests/test_distribution.py'
--- lib/lp/registry/tests/test_distribution.py 2012-06-06 16:05:23 +0000
+++ lib/lp/registry/tests/test_distribution.py 2012-06-14 05:22:18 +0000
@@ -43,9 +43,7 @@
OPEN_TEAM_POLICY,
)
from lp.registry.interfaces.series import SeriesStatus
-from lp.registry.tests.test_distroseries import (
- CurrentSourceReleasesMixin,
- )
+from lp.registry.tests.test_distroseries import CurrentSourceReleasesMixin
from lp.services.database.constants import UTC_NOW
from lp.services.propertycache import get_property_cache
from lp.services.webapp import canonical_url
=== modified file 'lib/lp/registry/tests/test_productjob.py'
--- lib/lp/registry/tests/test_productjob.py 2012-06-08 17:29:07 +0000
+++ lib/lp/registry/tests/test_productjob.py 2012-06-14 05:22:18 +0000
@@ -9,8 +9,9 @@
datetime,
timedelta,
)
+
+import pytz
import transaction
-import pytz
from zope.component import getUtility
from zope.interface import (
classProvides,
@@ -46,6 +47,10 @@
SevenDayCommercialExpirationJob,
ThirtyDayCommercialExpirationJob,
)
+from lp.services.log.logger import BufferLogger
+from lp.services.propertycache import clear_property_cache
+from lp.services.scripts.tests import run_script
+from lp.services.webapp.publisher import canonical_url
from lp.testing import (
person_logged_in,
TestCaseWithFactory,
@@ -56,10 +61,6 @@
ZopelessAppServerLayer,
)
from lp.testing.mail_helpers import pop_notifications
-from lp.services.log.logger import BufferLogger
-from lp.services.propertycache import clear_property_cache
-from lp.services.scripts.tests import run_script
-from lp.services.webapp.publisher import canonical_url
class CommercialHelpers:
=== modified file 'lib/lp/registry/tests/test_sharingjob.py'
--- lib/lp/registry/tests/test_sharingjob.py 2012-06-05 02:03:44 +0000
+++ lib/lp/registry/tests/test_sharingjob.py 2012-06-14 05:22:18 +0000
@@ -5,10 +5,9 @@
__metaclass__ = type
-import transaction
-
from testtools.content import Content
from testtools.content_type import UTF8_TEXT
+import transaction
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
@@ -18,8 +17,8 @@
)
from lp.registry.enums import InformationType
from lp.registry.interfaces.accesspolicy import (
+ IAccessArtifactGrantSource,
IAccessArtifactSource,
- IAccessArtifactGrantSource,
IAccessPolicySource,
)
from lp.registry.interfaces.person import TeamSubscriptionPolicy
=== modified file 'lib/lp/registry/tests/test_teammembership.py'
--- lib/lp/registry/tests/test_teammembership.py 2012-06-07 05:59:10 +0000
+++ lib/lp/registry/tests/test_teammembership.py 2012-06-14 05:22:18 +0000
@@ -25,8 +25,8 @@
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.registry.enums import InformationType
from lp.registry.interfaces.accesspolicy import (
+ IAccessArtifactGrantSource,
IAccessArtifactSource,
- IAccessArtifactGrantSource,
)
from lp.registry.interfaces.person import (
IPersonSet,
@@ -59,8 +59,8 @@
sqlvalues,
)
from lp.services.features.testing import FeatureFixture
+from lp.services.job.tests import block_on_job
from lp.services.log.logger import BufferLogger
-from lp.services.job.tests import block_on_job
from lp.testing import (
login,
login_celebrity,
=== modified file 'lib/lp/scripts/utilities/js/combo.py'
--- lib/lp/scripts/utilities/js/combo.py 2011-12-19 23:38:16 +0000
+++ lib/lp/scripts/utilities/js/combo.py 2012-06-14 05:22:18 +0000
@@ -1,3 +1,8 @@
+# Copyright 2011-2012 Canonical Ltd. This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+__metaclass__ = type
+
import cgi
import os
import urlparse
=== modified file 'lib/lp/scripts/utilities/js/jsbuild.py'
--- lib/lp/scripts/utilities/js/jsbuild.py 2011-12-19 23:38:16 +0000
+++ lib/lp/scripts/utilities/js/jsbuild.py 2012-06-14 05:22:18 +0000
@@ -1,3 +1,6 @@
+# Copyright 2011-2012 Canonical Ltd. This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
"""build.py - Minifies and creates the JS build directory."""
__metaclass__ = type
=== modified file 'lib/lp/scripts/utilities/js/tests/test_combo.py'
--- lib/lp/scripts/utilities/js/tests/test_combo.py 2011-12-19 23:38:16 +0000
+++ lib/lp/scripts/utilities/js/tests/test_combo.py 2012-06-14 05:22:18 +0000
@@ -1,3 +1,8 @@
+# Copyright 2011-2012 Canonical Ltd. This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+__metaclass__ = type
+
import os
import shutil
import tempfile
=== modified file 'lib/lp/services/authserver/tests/test_authserver.py'
--- lib/lp/services/authserver/tests/test_authserver.py 2012-04-11 14:40:02 +0000
+++ lib/lp/services/authserver/tests/test_authserver.py 2012-06-14 05:22:18 +0000
@@ -10,8 +10,8 @@
from lp.services.authserver.xmlrpc import AuthServerAPIView
from lp.testing import (
+ person_logged_in,
TestCaseWithFactory,
- person_logged_in,
)
from lp.testing.layers import DatabaseFunctionalLayer
from lp.xmlrpc import faults
=== modified file 'lib/lp/services/comments/browser/tests/test_comment.py'
--- lib/lp/services/comments/browser/tests/test_comment.py 2012-02-28 04:24:19 +0000
+++ lib/lp/services/comments/browser/tests/test_comment.py 2012-06-14 05:22:18 +0000
@@ -1,3 +1,8 @@
+# Copyright 2012 Canonical Ltd. This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+__metaclass__ = type
+
from lp.services.comments.browser.comment import CommentBodyDownloadView
from lp.services.webapp.servers import LaunchpadTestRequest
from lp.testing import (
=== modified file 'lib/lp/services/database/locking.py'
--- lib/lp/services/database/locking.py 2012-04-20 19:38:28 +0000
+++ lib/lp/services/database/locking.py 2012-06-14 05:22:18 +0000
@@ -17,6 +17,7 @@
TryAdvisoryLock,
)
+
__all__ = [
'AdvisoryLockHeld',
'LockType',
=== modified file 'lib/lp/services/database/stormexpr.py'
--- lib/lp/services/database/stormexpr.py 2012-05-17 08:36:19 +0000
+++ lib/lp/services/database/stormexpr.py 2012-06-14 05:22:18 +0000
@@ -20,8 +20,8 @@
from storm.expr import (
BinaryOper,
ComparableExpr,
+ compile,
CompoundOper,
- compile,
EXPR,
Expr,
In,
=== modified file 'lib/lp/services/identity/model/emailaddress.py'
--- lib/lp/services/identity/model/emailaddress.py 2012-04-16 15:38:07 +0000
+++ lib/lp/services/identity/model/emailaddress.py 2012-06-14 05:22:18 +0000
@@ -19,7 +19,6 @@
ForeignKey,
StringCol,
)
-
from zope.interface import implements
from lp.app.validators.email import valid_email
=== modified file 'lib/lp/services/job/celeryconfig.py'
--- lib/lp/services/job/celeryconfig.py 2012-05-14 20:33:32 +0000
+++ lib/lp/services/job/celeryconfig.py 2012-06-14 05:22:18 +0000
@@ -1,10 +1,11 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-import argparse
from datetime import timedelta
import sys
+import argparse
+
from lp.services.config import config
=== modified file 'lib/lp/services/job/celeryjob.py'
--- lib/lp/services/job/celeryjob.py 2012-05-24 20:04:02 +0000
+++ lib/lp/services/job/celeryjob.py 2012-06-14 05:22:18 +0000
@@ -17,6 +17,7 @@
from logging import info
import os
+
os.environ.setdefault('CELERY_CONFIG_MODULE', 'lp.services.job.celeryconfig')
from celery.task import task
from lazr.jobrunner.celerytask import RunJob
=== modified file 'lib/lp/services/job/model/job.py'
--- lib/lp/services/job/model/job.py 2012-05-20 23:49:27 +0000
+++ lib/lp/services/job/model/job.py 2012-06-14 05:22:18 +0000
@@ -18,7 +18,6 @@
import time
from lazr.jobrunner.jobrunner import LeaseHeld
-
import pytz
from sqlobject import (
IntCol,
=== modified file 'lib/lp/services/job/runner.py'
--- lib/lp/services/job/runner.py 2012-05-18 00:04:30 +0000
+++ lib/lp/services/job/runner.py 2012-06-14 05:22:18 +0000
@@ -19,11 +19,11 @@
from calendar import timegm
from collections import defaultdict
+import contextlib
from datetime import (
datetime,
timedelta,
)
-import contextlib
import logging
import os
from resource import (
=== modified file 'lib/lp/services/job/tests/__init__.py'
--- lib/lp/services/job/tests/__init__.py 2012-05-14 20:06:58 +0000
+++ lib/lp/services/job/tests/__init__.py 2012-06-14 05:22:18 +0000
@@ -15,8 +15,8 @@
from testtools.content import text_content
+from lp.services.job.runner import BaseRunnableJob
from lp.testing.fixture import CaptureOops
-from lp.services.job.runner import BaseRunnableJob
def celeryd(queue, cwd=None):
=== modified file 'lib/lp/services/job/tests/celery_helpers.py'
--- lib/lp/services/job/tests/celery_helpers.py 2012-04-05 19:05:16 +0000
+++ lib/lp/services/job/tests/celery_helpers.py 2012-06-14 05:22:18 +0000
@@ -7,6 +7,7 @@
# Force the correct celeryconfig to be used.
import lp.services.job.celeryjob
+
# Quiet lint unused import warning.
lp.services.job.celeryjob
=== modified file 'lib/lp/services/job/tests/test_job.py'
--- lib/lp/services/job/tests/test_job.py 2012-05-14 14:57:15 +0000
+++ lib/lp/services/job/tests/test_job.py 2012-06-14 05:22:18 +0000
@@ -6,15 +6,13 @@
from datetime import datetime
import time
+from lazr.jobrunner.jobrunner import LeaseHeld
import pytz
-from lazr.jobrunner.jobrunner import LeaseHeld
from storm.locals import Store
from testtools.matchers import Equals
import transaction
-from lp.code.model.branchmergeproposaljob import (
- CodeReviewCommentEmailJob,
- )
+from lp.code.model.branchmergeproposaljob import CodeReviewCommentEmailJob
from lp.services.database.constants import UTC_NOW
from lp.services.database.lpstorm import IStore
from lp.services.job.interfaces.job import (
=== modified file 'lib/lp/services/job/tests/test_retry_jobs_with_celery.py'
--- lib/lp/services/job/tests/test_retry_jobs_with_celery.py 2012-06-04 16:15:49 +0000
+++ lib/lp/services/job/tests/test_retry_jobs_with_celery.py 2012-06-14 05:22:18 +0000
@@ -4,14 +4,11 @@
"""Tests for running jobs via Celery."""
-from datetime import (
- timedelta,
- )
-from time import (
- sleep,
- )
+from datetime import timedelta
+from time import sleep
+
+from lazr.delegates import delegates
import transaction
-from lazr.delegates import delegates
from zope.interface import implements
from lp.services.config import config
@@ -20,8 +17,8 @@
from lp.services.job.interfaces.job import (
IJob,
IRunnableJob,
+ JobStatus,
)
-from lp.services.job.interfaces.job import JobStatus
from lp.services.job.model.job import Job
from lp.services.job.runner import BaseRunnableJob
from lp.services.job.tests import block_on_job
=== modified file 'lib/lp/services/messages/tests/test_message.py'
--- lib/lp/services/messages/tests/test_message.py 2012-04-27 19:03:32 +0000
+++ lib/lp/services/messages/tests/test_message.py 2012-06-14 05:22:18 +0000
@@ -14,9 +14,7 @@
import transaction
-from lp.services.messages.model.message import (
- MessageSet,
- )
+from lp.services.messages.model.message import MessageSet
from lp.testing import (
login,
TestCase,
=== modified file 'lib/lp/services/testing/tests/test_customresult.py'
--- lib/lp/services/testing/tests/test_customresult.py 2012-06-07 10:03:44 +0000
+++ lib/lp/services/testing/tests/test_customresult.py 2012-06-14 05:22:18 +0000
@@ -7,8 +7,9 @@
import string
import tempfile
+import unittest
+
from testtools import TestCase
-import unittest
from lp.services.testing.customresult import filter_tests
from lp.testing.layers import BaseLayer
=== modified file 'lib/lp/services/verification/browser/tests/test_logintoken.py'
--- lib/lp/services/verification/browser/tests/test_logintoken.py 2012-04-11 14:40:02 +0000
+++ lib/lp/services/verification/browser/tests/test_logintoken.py 2012-06-14 05:22:18 +0000
@@ -13,8 +13,8 @@
from lp.services.verification.interfaces.authtoken import LoginTokenType
from lp.services.verification.interfaces.logintoken import ILoginTokenSet
from lp.testing import (
+ person_logged_in,
TestCaseWithFactory,
- person_logged_in,
)
from lp.testing.deprecated import LaunchpadFormHarness
from lp.testing.layers import DatabaseFunctionalLayer
=== modified file 'lib/lp/services/webapp/publisher.py'
--- lib/lp/services/webapp/publisher.py 2012-05-22 17:00:08 +0000
+++ lib/lp/services/webapp/publisher.py 2012-06-14 05:22:18 +0000
@@ -47,12 +47,12 @@
queryMultiAdapter,
)
from zope.component.interfaces import ComponentLookupError
+from zope.i18nmessageid import Message
from zope.interface import (
directlyProvides,
implements,
)
from zope.interface.advice import addClassAdvisor
-from zope.i18nmessageid import Message
from zope.publisher.interfaces import NotFound
from zope.publisher.interfaces.browser import (
IBrowserPublisher,
=== modified file 'lib/lp/services/webapp/tests/test_error.py'
--- lib/lp/services/webapp/tests/test_error.py 2012-06-12 09:26:39 +0000
+++ lib/lp/services/webapp/tests/test_error.py 2012-06-14 05:22:18 +0000
@@ -5,13 +5,14 @@
import httplib
+import time
+import urllib2
+
from storm.exceptions import (
DisconnectionError,
OperationalError,
)
-import time
import transaction
-import urllib2
from lp.services.webapp.error import (
DisconnectionErrorView,
=== modified file 'lib/lp/soyuz/model/packagecopyjob.py'
--- lib/lp/soyuz/model/packagecopyjob.py 2012-05-21 07:34:15 +0000
+++ lib/lp/soyuz/model/packagecopyjob.py 2012-06-14 05:22:18 +0000
@@ -49,9 +49,7 @@
IStore,
)
from lp.services.database.stormbase import StormBase
-from lp.services.job.interfaces.job import (
- JobStatus,
- )
+from lp.services.job.interfaces.job import JobStatus
from lp.services.job.model.job import (
EnumeratedSubclass,
Job,
=== modified file 'lib/lp/soyuz/tests/test_packagecopyjob.py'
--- lib/lp/soyuz/tests/test_packagecopyjob.py 2012-05-21 07:34:15 +0000
+++ lib/lp/soyuz/tests/test_packagecopyjob.py 2012-06-14 05:22:18 +0000
@@ -24,9 +24,7 @@
from lp.services.config import config
from lp.services.database.lpstorm import IStore
from lp.services.features.testing import FeatureFixture
-from lp.services.job.interfaces.job import (
- JobStatus,
- )
+from lp.services.job.interfaces.job import JobStatus
from lp.services.job.tests import (
block_on_job,
pop_remote_notifications,
=== modified file 'lib/lp/soyuz/tests/test_person_createppa.py'
--- lib/lp/soyuz/tests/test_person_createppa.py 2012-06-11 09:16:11 +0000
+++ lib/lp/soyuz/tests/test_person_createppa.py 2012-06-14 05:22:18 +0000
@@ -6,6 +6,7 @@
__metaclass__ = type
from zope.security.interfaces import Unauthorized
+
from lp.registry.errors import PPACreationError
from lp.registry.interfaces.person import (
PersonVisibility,
=== modified file 'lib/lp/testing/fixture.py'
--- lib/lp/testing/fixture.py 2012-05-16 03:56:28 +0000
+++ lib/lp/testing/fixture.py 2012-06-14 05:22:18 +0000
@@ -60,8 +60,8 @@
from lp.services.webapp.errorlog import ErrorReportEvent
from lp.services.webapp.interfaces import (
DEFAULT_FLAVOR,
+ IStoreSelector,
MAIN_STORE,
- IStoreSelector,
)
from lp.testing.dbuser import dbuser
=== modified file 'lib/lp/testing/layers.py'
--- lib/lp/testing/layers.py 2012-04-12 19:34:59 +0000
+++ lib/lp/testing/layers.py 2012-06-14 05:22:18 +0000
@@ -111,10 +111,10 @@
ConfigUseFixture,
)
from lp.services.database.sqlbase import session_store
-from lp.services.job.tests import celeryd
from lp.services.googlesearch.tests.googleserviceharness import (
GoogleServiceTestSetup,
)
+from lp.services.job.tests import celeryd
from lp.services.librarianserver.testing.server import LibrarianServerFixture
from lp.services.mail.mailbox import (
IMailBox,
=== modified file 'lib/lp/translations/interfaces/translationpackagingjob.py'
--- lib/lp/translations/interfaces/translationpackagingjob.py 2011-12-19 23:38:16 +0000
+++ lib/lp/translations/interfaces/translationpackagingjob.py 2012-06-14 05:22:18 +0000
@@ -1,3 +1,8 @@
+# Copyright 2011-2012 Canonical Ltd. This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+__metaclass__ = type
+
from lp.services.job.interfaces.job import IJobSource
=== modified file 'lib/lp/translations/tests/test_distroseries_translations_copy.py'
--- lib/lp/translations/tests/test_distroseries_translations_copy.py 2012-05-08 03:10:09 +0000
+++ lib/lp/translations/tests/test_distroseries_translations_copy.py 2012-06-14 05:22:18 +0000
@@ -6,10 +6,10 @@
__metaclass__ = type
from lp.services.database.multitablecopy import MultiTableCopy
+from lp.services.log.logger import DevNullLogger
from lp.testing import TestCaseWithFactory
from lp.testing.faketransaction import FakeTransaction
from lp.testing.layers import ZopelessDatabaseLayer
-from lp.services.log.logger import DevNullLogger
from lp.translations.model.distroseries_translations_copy import (
copy_active_translations,
)
=== modified file 'lib/lp/translations/tests/test_pofilestatsjob.py'
--- lib/lp/translations/tests/test_pofilestatsjob.py 2012-04-24 20:57:27 +0000
+++ lib/lp/translations/tests/test_pofilestatsjob.py 2012-06-14 05:22:18 +0000
@@ -15,9 +15,7 @@
IJobSource,
IRunnableJob,
)
-from lp.services.job.tests import (
- block_on_job
- )
+from lp.services.job.tests import block_on_job
from lp.services.webapp.testing import verifyObject
from lp.testing import TestCaseWithFactory
from lp.testing.dbuser import dbuser
Follow ups