Merge lp:~stevenk/launchpad/fix-copyrights into lp:launchpad
- fix-copyrights
- Merge into devel
Proposed by
Steve Kowalik
on 2012-06-14
| Status: | Merged |
|---|---|
| Approved by: | William Grant on 2012-06-14 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15415 |
| Proposed branch: | lp:~stevenk/launchpad/fix-copyrights |
| Merge into: | lp:launchpad |
| Diff against target: |
1124 lines (+132/-131) 61 files modified
lib/lp/app/widgets/tests/test_datetime.py (+5/-0) lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py (+1/-1) lib/lp/bugs/browser/tests/test_bugtarget_filebug.py (+2/-4) lib/lp/bugs/browser/tests/test_distribution_upstream_report.py (+1/-1) lib/lp/bugs/model/bugtaskflat.py (+7/-2) lib/lp/bugs/model/structuralsubscription.py (+1/-1) lib/lp/bugs/model/tests/test_bug.py (+2/-2) lib/lp/bugs/model/tests/test_bugtask.py (+7/-7) lib/lp/bugs/scripts/tests/test_bugnotification.py (+1/-1) lib/lp/bugs/tests/test_bugtaskset.py (+3/-6) lib/lp/code/mail/codehandler.py (+3/-9) lib/lp/code/mail/tests/test_codehandler.py (+1/-3) lib/lp/code/model/branchjob.py (+2/-2) lib/lp/code/model/branchmergeproposaljob.py (+1/-3) lib/lp/code/model/tests/test_branchjob.py (+2/-4) lib/lp/codehosting/bzrutils.py (+1/-1) lib/lp/codehosting/scanner/tests/test_email.py (+3/-3) lib/lp/codehosting/tests/test_upgrade.py (+3/-0) lib/lp/registry/browser/distribution.py (+1/-1) lib/lp/registry/browser/person.py (+1/-3) lib/lp/registry/browser/tests/test_breadcrumbs.py (+1/-1) lib/lp/registry/browser/tests/test_distribution.py (+1/-0) lib/lp/registry/browser/tests/test_person.py (+1/-1) lib/lp/registry/browser/tests/test_sshkey.py (+1/-1) lib/lp/registry/model/accesspolicy.py (+1/-1) lib/lp/registry/model/productjob.py (+7/-8) lib/lp/registry/model/sharingjob.py (+1/-3) lib/lp/registry/subscribers.py (+1/-3) lib/lp/registry/tests/test_distribution.py (+1/-3) lib/lp/registry/tests/test_productjob.py (+6/-5) lib/lp/registry/tests/test_sharingjob.py (+2/-3) lib/lp/registry/tests/test_teammembership.py (+2/-2) lib/lp/scripts/utilities/js/combo.py (+5/-0) lib/lp/scripts/utilities/js/jsbuild.py (+3/-0) lib/lp/scripts/utilities/js/tests/test_combo.py (+5/-0) lib/lp/services/authserver/tests/test_authserver.py (+1/-1) lib/lp/services/comments/browser/tests/test_comment.py (+5/-0) lib/lp/services/database/locking.py (+6/-7) lib/lp/services/database/stormexpr.py (+1/-1) lib/lp/services/identity/model/emailaddress.py (+0/-1) lib/lp/services/job/celeryconfig.py (+2/-1) lib/lp/services/job/celeryjob.py (+1/-0) lib/lp/services/job/model/job.py (+0/-1) lib/lp/services/job/runner.py (+1/-1) lib/lp/services/job/tests/__init__.py (+1/-1) lib/lp/services/job/tests/celery_helpers.py (+1/-0) lib/lp/services/job/tests/test_job.py (+2/-4) lib/lp/services/job/tests/test_retry_jobs_with_celery.py (+5/-8) lib/lp/services/messages/tests/test_message.py (+1/-3) lib/lp/services/testing/tests/test_customresult.py (+2/-1) lib/lp/services/verification/browser/tests/test_logintoken.py (+1/-1) lib/lp/services/webapp/publisher.py (+1/-1) lib/lp/services/webapp/tests/test_error.py (+3/-2) lib/lp/soyuz/model/packagecopyjob.py (+1/-3) lib/lp/soyuz/tests/test_packagecopyjob.py (+1/-3) lib/lp/soyuz/tests/test_person_createppa.py (+1/-0) lib/lp/testing/fixture.py (+1/-1) lib/lp/testing/layers.py (+1/-1) lib/lp/translations/interfaces/translationpackagingjob.py (+5/-0) lib/lp/translations/tests/test_distroseries_translations_copy.py (+1/-1) lib/lp/translations/tests/test_pofilestatsjob.py (+1/-3) |
| To merge this branch: | bzr merge lp:~stevenk/launchpad/fix-copyrights |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| William Grant | code | 2012-06-14 | Approve on 2012-06-14 |
|
Review via email:
|
|||
Commit Message
Add copyright headers to files that were missing them, and re-run format-imports over lib/lp.
Description of the Change
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.
To post a comment you must log in.
review:
Approve
(code)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
| 1 | === modified file 'lib/lp/app/widgets/tests/test_datetime.py' |
| 2 | --- lib/lp/app/widgets/tests/test_datetime.py 2012-01-01 02:58:52 +0000 |
| 3 | +++ lib/lp/app/widgets/tests/test_datetime.py 2012-06-14 05:34:29 +0000 |
| 4 | @@ -1,3 +1,8 @@ |
| 5 | +# Copyright 2011-2012 Canonical Ltd. This software is licensed under the |
| 6 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
| 7 | + |
| 8 | +__metaclass__ = type |
| 9 | + |
| 10 | from datetime import datetime |
| 11 | |
| 12 | from zope.app.form.interfaces import ConversionError |
| 13 | |
| 14 | === modified file 'lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py' |
| 15 | --- lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py 2012-05-31 12:11:19 +0000 |
| 16 | +++ lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py 2012-06-14 05:34:29 +0000 |
| 17 | @@ -34,12 +34,12 @@ |
| 18 | from lp.services.config import config |
| 19 | from lp.services.log.logger import BufferLogger |
| 20 | from lp.services.mail import stub |
| 21 | -from lp.services.scripts.interfaces.scriptactivity import IScriptActivitySet |
| 22 | from lp.services.osutils import ( |
| 23 | ensure_directory_exists, |
| 24 | remove_if_exists, |
| 25 | write_file, |
| 26 | ) |
| 27 | +from lp.services.scripts.interfaces.scriptactivity import IScriptActivitySet |
| 28 | from lp.soyuz.enums import ( |
| 29 | ArchiveStatus, |
| 30 | ArchiveSubscriberStatus, |
| 31 | |
| 32 | === modified file 'lib/lp/bugs/browser/tests/test_bugtarget_filebug.py' |
| 33 | --- lib/lp/bugs/browser/tests/test_bugtarget_filebug.py 2012-06-07 12:17:48 +0000 |
| 34 | +++ lib/lp/bugs/browser/tests/test_bugtarget_filebug.py 2012-06-14 05:34:29 +0000 |
| 35 | @@ -5,6 +5,7 @@ |
| 36 | |
| 37 | |
| 38 | from BeautifulSoup import BeautifulSoup |
| 39 | +from lazr.restful.interfaces import IJSONRequestCache |
| 40 | import transaction |
| 41 | from zope.component import getUtility |
| 42 | from zope.schema.interfaces import ( |
| 43 | @@ -13,10 +14,7 @@ |
| 44 | ) |
| 45 | from zope.security.proxy import removeSecurityProxy |
| 46 | |
| 47 | -from lazr.restful.interfaces import IJSONRequestCache |
| 48 | -from lp.bugs.browser.bugtarget import ( |
| 49 | - FileBugViewBase, |
| 50 | - ) |
| 51 | +from lp.bugs.browser.bugtarget import FileBugViewBase |
| 52 | from lp.bugs.interfaces.bug import ( |
| 53 | IBugAddForm, |
| 54 | IBugSet, |
| 55 | |
| 56 | === modified file 'lib/lp/bugs/browser/tests/test_distribution_upstream_report.py' |
| 57 | --- lib/lp/bugs/browser/tests/test_distribution_upstream_report.py 2012-05-25 19:58:27 +0000 |
| 58 | +++ lib/lp/bugs/browser/tests/test_distribution_upstream_report.py 2012-06-14 05:34:29 +0000 |
| 59 | @@ -30,8 +30,8 @@ |
| 60 | LaunchpadFunctionalLayer, |
| 61 | ) |
| 62 | from lp.testing.views import ( |
| 63 | + create_initialized_view, |
| 64 | create_view, |
| 65 | - create_initialized_view, |
| 66 | ) |
| 67 | |
| 68 | |
| 69 | |
| 70 | === modified file 'lib/lp/bugs/model/bugtaskflat.py' |
| 71 | --- lib/lp/bugs/model/bugtaskflat.py 2012-05-07 07:43:07 +0000 |
| 72 | +++ lib/lp/bugs/model/bugtaskflat.py 2012-06-14 05:34:29 +0000 |
| 73 | @@ -1,3 +1,8 @@ |
| 74 | +# Copyright 2012 Canonical Ltd. This software is licensed under the |
| 75 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
| 76 | + |
| 77 | +__metaclass__ = type |
| 78 | + |
| 79 | from storm.locals import ( |
| 80 | Bool, |
| 81 | DateTime, |
| 82 | @@ -6,13 +11,13 @@ |
| 83 | Storm, |
| 84 | ) |
| 85 | |
| 86 | -from lp.registry.enums import InformationType |
| 87 | -from lp.services.database.enumcol import EnumCol |
| 88 | from lp.bugs.interfaces.bugtask import ( |
| 89 | BugTaskImportance, |
| 90 | BugTaskStatus, |
| 91 | BugTaskStatusSearch, |
| 92 | ) |
| 93 | +from lp.registry.enums import InformationType |
| 94 | +from lp.services.database.enumcol import EnumCol |
| 95 | |
| 96 | |
| 97 | class BugTaskFlat(Storm): |
| 98 | |
| 99 | === modified file 'lib/lp/bugs/model/structuralsubscription.py' |
| 100 | --- lib/lp/bugs/model/structuralsubscription.py 2012-05-03 11:58:01 +0000 |
| 101 | +++ lib/lp/bugs/model/structuralsubscription.py 2012-06-14 05:34:29 +0000 |
| 102 | @@ -83,12 +83,12 @@ |
| 103 | from lp.services.database.constants import UTC_NOW |
| 104 | from lp.services.database.lpstorm import IStore |
| 105 | from lp.services.database.sqlbase import quote |
| 106 | -from lp.services.propertycache import cachedproperty |
| 107 | from lp.services.database.stormexpr import ( |
| 108 | ArrayAgg, |
| 109 | ArrayContains, |
| 110 | ArrayIntersects, |
| 111 | ) |
| 112 | +from lp.services.propertycache import cachedproperty |
| 113 | |
| 114 | |
| 115 | class StructuralSubscription(Storm): |
| 116 | |
| 117 | === modified file 'lib/lp/bugs/model/tests/test_bug.py' |
| 118 | --- lib/lp/bugs/model/tests/test_bug.py 2012-06-04 09:41:48 +0000 |
| 119 | +++ lib/lp/bugs/model/tests/test_bug.py 2012-06-14 05:34:29 +0000 |
| 120 | @@ -30,12 +30,12 @@ |
| 121 | BugSubscriptionInfo, |
| 122 | ) |
| 123 | from lp.bugs.model.bugnotification import BugNotificationRecipient |
| 124 | +from lp.registry.enums import InformationType |
| 125 | from lp.registry.interfaces.accesspolicy import ( |
| 126 | IAccessArtifactSource, |
| 127 | + IAccessPolicyArtifactSource, |
| 128 | IAccessPolicySource, |
| 129 | - IAccessPolicyArtifactSource, |
| 130 | ) |
| 131 | -from lp.registry.enums import InformationType |
| 132 | from lp.registry.interfaces.person import PersonVisibility |
| 133 | from lp.registry.tests.test_accesspolicy import get_policies_for_artifact |
| 134 | from lp.testing import ( |
| 135 | |
| 136 | === modified file 'lib/lp/bugs/model/tests/test_bugtask.py' |
| 137 | --- lib/lp/bugs/model/tests/test_bugtask.py 2012-06-07 05:59:10 +0000 |
| 138 | +++ lib/lp/bugs/model/tests/test_bugtask.py 2012-06-14 05:34:29 +0000 |
| 139 | @@ -61,7 +61,8 @@ |
| 140 | ) |
| 141 | from lp.bugs.model.tests.test_bug import LEGACY_ACCESS_TRIGGERS |
| 142 | from lp.bugs.scripts.bugtasktargetnamecaches import ( |
| 143 | - BugTaskTargetNameCacheUpdater) |
| 144 | + BugTaskTargetNameCacheUpdater, |
| 145 | + ) |
| 146 | from lp.bugs.tests.bug import create_old_bug |
| 147 | from lp.hardwaredb.interfaces.hwdb import ( |
| 148 | HWBus, |
| 149 | @@ -69,16 +70,15 @@ |
| 150 | ) |
| 151 | from lp.registry.enums import InformationType |
| 152 | from lp.registry.interfaces.accesspolicy import ( |
| 153 | + IAccessArtifactGrantSource, |
| 154 | + IAccessArtifactSource, |
| 155 | IAccessPolicyGrantSource, |
| 156 | IAccessPolicySource, |
| 157 | - IAccessArtifactGrantSource, |
| 158 | - IAccessArtifactSource, |
| 159 | ) |
| 160 | from lp.registry.interfaces.distribution import IDistributionSet |
| 161 | from lp.registry.interfaces.distributionsourcepackage import ( |
| 162 | - IDistributionSourcePackage |
| 163 | -) |
| 164 | - |
| 165 | + IDistributionSourcePackage, |
| 166 | + ) |
| 167 | from lp.registry.interfaces.distroseries import IDistroSeriesSet |
| 168 | from lp.registry.interfaces.person import ( |
| 169 | IPerson, |
| 170 | @@ -92,8 +92,8 @@ |
| 171 | from lp.registry.tests.test_accesspolicy import get_policies_for_artifact |
| 172 | from lp.services.database.sqlbase import ( |
| 173 | convert_storm_clause_to_string, |
| 174 | + flush_database_caches, |
| 175 | flush_database_updates, |
| 176 | - flush_database_caches, |
| 177 | ) |
| 178 | from lp.services.features.testing import FeatureFixture |
| 179 | from lp.services.job.tests import block_on_job |
| 180 | |
| 181 | === modified file 'lib/lp/bugs/scripts/tests/test_bugnotification.py' |
| 182 | --- lib/lp/bugs/scripts/tests/test_bugnotification.py 2012-05-08 17:04:43 +0000 |
| 183 | +++ lib/lp/bugs/scripts/tests/test_bugnotification.py 2012-06-14 05:34:29 +0000 |
| 184 | @@ -4,13 +4,13 @@ |
| 185 | |
| 186 | __metaclass__ = type |
| 187 | |
| 188 | -import StringIO |
| 189 | from datetime import ( |
| 190 | datetime, |
| 191 | timedelta, |
| 192 | ) |
| 193 | import logging |
| 194 | import re |
| 195 | +import StringIO |
| 196 | import unittest |
| 197 | |
| 198 | import pytz |
| 199 | |
| 200 | === modified file 'lib/lp/bugs/tests/test_bugtaskset.py' |
| 201 | --- lib/lp/bugs/tests/test_bugtaskset.py 2012-05-14 20:19:39 +0000 |
| 202 | +++ lib/lp/bugs/tests/test_bugtaskset.py 2012-06-14 05:34:29 +0000 |
| 203 | @@ -6,12 +6,9 @@ |
| 204 | __metaclass__ = type |
| 205 | |
| 206 | from zope.component import getUtility |
| 207 | -from lp.bugs.interfaces.bugtask import ( |
| 208 | - IBugTaskSet, |
| 209 | - ) |
| 210 | -from lp.bugs.interfaces.bug import ( |
| 211 | - IBugSet, |
| 212 | - ) |
| 213 | + |
| 214 | +from lp.bugs.interfaces.bug import IBugSet |
| 215 | +from lp.bugs.interfaces.bugtask import IBugTaskSet |
| 216 | from lp.registry.interfaces.person import IPersonSet |
| 217 | from lp.registry.interfaces.product import IProductSet |
| 218 | from lp.services.webapp.interfaces import ILaunchBag |
| 219 | |
| 220 | === modified file 'lib/lp/code/mail/codehandler.py' |
| 221 | --- lib/lp/code/mail/codehandler.py 2012-04-27 18:50:49 +0000 |
| 222 | +++ lib/lp/code/mail/codehandler.py 2012-06-14 05:34:29 +0000 |
| 223 | @@ -14,15 +14,9 @@ |
| 224 | from zope.interface import implements |
| 225 | from zope.security.interfaces import Unauthorized |
| 226 | |
| 227 | -from lp.code.enums import ( |
| 228 | - CodeReviewVote, |
| 229 | - ) |
| 230 | -from lp.code.errors import ( |
| 231 | - UserNotBranchReviewer, |
| 232 | - ) |
| 233 | -from lp.code.interfaces.branchmergeproposal import ( |
| 234 | - IBranchMergeProposalGetter, |
| 235 | - ) |
| 236 | +from lp.code.enums import CodeReviewVote |
| 237 | +from lp.code.errors import UserNotBranchReviewer |
| 238 | +from lp.code.interfaces.branchmergeproposal import IBranchMergeProposalGetter |
| 239 | from lp.services.config import config |
| 240 | from lp.services.mail.commands import ( |
| 241 | EmailCommand, |
| 242 | |
| 243 | === modified file 'lib/lp/code/mail/tests/test_codehandler.py' |
| 244 | --- lib/lp/code/mail/tests/test_codehandler.py 2012-04-27 19:03:32 +0000 |
| 245 | +++ lib/lp/code/mail/tests/test_codehandler.py 2012-06-14 05:34:29 +0000 |
| 246 | @@ -35,9 +35,7 @@ |
| 247 | from lp.code.tests.helpers import make_merge_proposal_without_reviewers |
| 248 | from lp.services.config import config |
| 249 | from lp.services.mail.handlers import mail_handlers |
| 250 | -from lp.services.mail.interfaces import ( |
| 251 | - EmailProcessingError, |
| 252 | - ) |
| 253 | +from lp.services.mail.interfaces import EmailProcessingError |
| 254 | from lp.services.messages.model.message import MessageSet |
| 255 | from lp.services.webapp.authorization import LaunchpadSecurityPolicy |
| 256 | from lp.testing import ( |
| 257 | |
| 258 | === modified file 'lib/lp/code/model/branchjob.py' |
| 259 | --- lib/lp/code/model/branchjob.py 2012-04-19 18:59:21 +0000 |
| 260 | +++ lib/lp/code/model/branchjob.py 2012-06-14 05:34:29 +0000 |
| 261 | @@ -94,13 +94,13 @@ |
| 262 | from lp.scripts.helpers import TransactionFreeOperation |
| 263 | from lp.services.config import config |
| 264 | from lp.services.database.enumcol import EnumCol |
| 265 | -from lp.services.database.lpstorm import IStore |
| 266 | -from lp.services.database.sqlbase import SQLBase |
| 267 | from lp.services.database.locking import ( |
| 268 | AdvisoryLockHeld, |
| 269 | LockType, |
| 270 | try_advisory_lock, |
| 271 | ) |
| 272 | +from lp.services.database.lpstorm import IStore |
| 273 | +from lp.services.database.sqlbase import SQLBase |
| 274 | from lp.services.job.interfaces.job import JobStatus |
| 275 | from lp.services.job.model.job import ( |
| 276 | EnumeratedSubclass, |
| 277 | |
| 278 | === modified file 'lib/lp/code/model/branchmergeproposaljob.py' |
| 279 | --- lib/lp/code/model/branchmergeproposaljob.py 2012-04-27 19:03:32 +0000 |
| 280 | +++ lib/lp/code/model/branchmergeproposaljob.py 2012-06-14 05:34:29 +0000 |
| 281 | @@ -85,9 +85,7 @@ |
| 282 | from lp.code.model.branchmergeproposal import BranchMergeProposal |
| 283 | from lp.code.model.diff import PreviewDiff |
| 284 | from lp.codehosting.bzrutils import server |
| 285 | -from lp.codehosting.vfs import ( |
| 286 | - get_ro_server, |
| 287 | - ) |
| 288 | +from lp.codehosting.vfs import get_ro_server |
| 289 | from lp.registry.interfaces.person import IPersonSet |
| 290 | from lp.services.config import config |
| 291 | from lp.services.database.enumcol import EnumCol |
| 292 | |
| 293 | === modified file 'lib/lp/code/model/tests/test_branchjob.py' |
| 294 | --- lib/lp/code/model/tests/test_branchjob.py 2012-04-26 17:18:47 +0000 |
| 295 | +++ lib/lp/code/model/tests/test_branchjob.py 2012-06-14 05:34:29 +0000 |
| 296 | @@ -61,8 +61,8 @@ |
| 297 | ) |
| 298 | from lp.code.model.branchrevision import BranchRevision |
| 299 | from lp.code.model.directbranchcommit import DirectBranchCommit |
| 300 | +from lp.code.model.revision import RevisionSet |
| 301 | from lp.code.model.tests.test_branch import create_knit |
| 302 | -from lp.code.model.revision import RevisionSet |
| 303 | from lp.codehosting.vfs import branch_id_to_path |
| 304 | from lp.scripts.helpers import TransactionFreeOperation |
| 305 | from lp.services.config import config |
| 306 | @@ -73,9 +73,7 @@ |
| 307 | from lp.services.job.interfaces.job import JobStatus |
| 308 | from lp.services.job.model.job import Job |
| 309 | from lp.services.job.runner import JobRunner |
| 310 | -from lp.services.job.tests import ( |
| 311 | - block_on_job, |
| 312 | - ) |
| 313 | +from lp.services.job.tests import block_on_job |
| 314 | from lp.services.osutils import override_environ |
| 315 | from lp.services.webapp import canonical_url |
| 316 | from lp.testing import ( |
| 317 | |
| 318 | === modified file 'lib/lp/codehosting/bzrutils.py' |
| 319 | --- lib/lp/codehosting/bzrutils.py 2012-03-22 16:20:58 +0000 |
| 320 | +++ lib/lp/codehosting/bzrutils.py 2012-06-14 05:34:29 +0000 |
| 321 | @@ -34,9 +34,9 @@ |
| 322 | ) |
| 323 | from bzrlib.errors import ( |
| 324 | NotStacked, |
| 325 | - UnsupportedProtocol, |
| 326 | UnstackableBranchFormat, |
| 327 | UnstackableRepositoryFormat, |
| 328 | + UnsupportedProtocol, |
| 329 | ) |
| 330 | from bzrlib.remote import ( |
| 331 | RemoteBranch, |
| 332 | |
| 333 | === modified file 'lib/lp/codehosting/scanner/tests/test_email.py' |
| 334 | --- lib/lp/codehosting/scanner/tests/test_email.py 2012-04-24 18:36:17 +0000 |
| 335 | +++ lib/lp/codehosting/scanner/tests/test_email.py 2012-06-14 05:34:29 +0000 |
| 336 | @@ -6,9 +6,9 @@ |
| 337 | __metaclass__ = type |
| 338 | |
| 339 | import email |
| 340 | +import os |
| 341 | |
| 342 | from bzrlib.uncommit import uncommit |
| 343 | -import os |
| 344 | from zope.component import getUtility |
| 345 | from zope.event import notify |
| 346 | |
| 347 | @@ -22,18 +22,18 @@ |
| 348 | IRevisionsAddedJobSource, |
| 349 | ) |
| 350 | from lp.code.model.branchjob import RevisionMailJob |
| 351 | +from lp.codehosting.scanner import events |
| 352 | from lp.codehosting.scanner.bzrsync import BzrSync |
| 353 | -from lp.codehosting.scanner import events |
| 354 | from lp.codehosting.scanner.tests.test_bzrsync import BzrSyncTestCase |
| 355 | from lp.registry.interfaces.person import IPersonSet |
| 356 | from lp.services.config import config |
| 357 | from lp.services.features.testing import FeatureFixture |
| 358 | from lp.services.job.runner import JobRunner |
| 359 | -from lp.services.mail import stub |
| 360 | from lp.services.job.tests import ( |
| 361 | block_on_job, |
| 362 | pop_remote_notifications, |
| 363 | ) |
| 364 | +from lp.services.mail import stub |
| 365 | from lp.testing import TestCaseWithFactory |
| 366 | from lp.testing.dbuser import switch_dbuser |
| 367 | from lp.testing.layers import ( |
| 368 | |
| 369 | === modified file 'lib/lp/codehosting/tests/test_upgrade.py' |
| 370 | --- lib/lp/codehosting/tests/test_upgrade.py 2012-03-26 22:45:24 +0000 |
| 371 | +++ lib/lp/codehosting/tests/test_upgrade.py 2012-06-14 05:34:29 +0000 |
| 372 | @@ -1,3 +1,6 @@ |
| 373 | +# Copyright 2012 Canonical Ltd. This software is licensed under the |
| 374 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
| 375 | + |
| 376 | __metaclass__ = type |
| 377 | |
| 378 | |
| 379 | |
| 380 | === modified file 'lib/lp/registry/browser/distribution.py' |
| 381 | --- lib/lp/registry/browser/distribution.py 2012-06-05 11:41:23 +0000 |
| 382 | +++ lib/lp/registry/browser/distribution.py 2012-06-14 05:34:29 +0000 |
| 383 | @@ -57,12 +57,12 @@ |
| 384 | QuestionTargetFacetMixin, |
| 385 | QuestionTargetTraversalMixin, |
| 386 | ) |
| 387 | -from lp.app.browser.lazrjs import InlinePersonEditPickerWidget |
| 388 | from lp.app.browser.launchpadform import ( |
| 389 | action, |
| 390 | custom_widget, |
| 391 | LaunchpadFormView, |
| 392 | ) |
| 393 | +from lp.app.browser.lazrjs import InlinePersonEditPickerWidget |
| 394 | from lp.app.browser.tales import format_link |
| 395 | from lp.app.errors import NotFoundError |
| 396 | from lp.app.widgets.image import ImageChangeWidget |
| 397 | |
| 398 | === modified file 'lib/lp/registry/browser/person.py' |
| 399 | --- lib/lp/registry/browser/person.py 2012-06-12 16:25:42 +0000 |
| 400 | +++ lib/lp/registry/browser/person.py 2012-06-14 05:34:29 +0000 |
| 401 | @@ -147,9 +147,7 @@ |
| 402 | LaunchpadRadioWidget, |
| 403 | LaunchpadRadioWidgetWithDescription, |
| 404 | ) |
| 405 | -from lp.blueprints.enums import ( |
| 406 | - SpecificationWorkItemStatus, |
| 407 | - ) |
| 408 | +from lp.blueprints.enums import SpecificationWorkItemStatus |
| 409 | from lp.bugs.interfaces.bugtask import ( |
| 410 | BugTaskSearchParams, |
| 411 | BugTaskStatus, |
| 412 | |
| 413 | === modified file 'lib/lp/registry/browser/tests/test_breadcrumbs.py' |
| 414 | --- lib/lp/registry/browser/tests/test_breadcrumbs.py 2012-04-27 19:52:37 +0000 |
| 415 | +++ lib/lp/registry/browser/tests/test_breadcrumbs.py 2012-06-14 05:34:29 +0000 |
| 416 | @@ -6,10 +6,10 @@ |
| 417 | from zope.component import getUtility |
| 418 | |
| 419 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 420 | +from lp.registry.browser.tests.test_pillar_sharing import SharingBaseTestCase |
| 421 | from lp.services.webapp.publisher import canonical_url |
| 422 | from lp.testing import login_person |
| 423 | from lp.testing.breadcrumbs import BaseBreadcrumbTestCase |
| 424 | -from lp.registry.browser.tests.test_pillar_sharing import SharingBaseTestCase |
| 425 | |
| 426 | |
| 427 | class TestPillarSharingBreadcrumb(BaseBreadcrumbTestCase, SharingBaseTestCase): |
| 428 | |
| 429 | === modified file 'lib/lp/registry/browser/tests/test_distribution.py' |
| 430 | --- lib/lp/registry/browser/tests/test_distribution.py 2012-06-04 16:13:51 +0000 |
| 431 | +++ lib/lp/registry/browser/tests/test_distribution.py 2012-06-14 05:34:29 +0000 |
| 432 | @@ -1,3 +1,4 @@ |
| 433 | +# Copyright 2011-2012 Canonical Ltd. This software is licensed under the |
| 434 | # GNU Affero General Public License version 3 (see the file LICENSE). |
| 435 | |
| 436 | """Tests for Distribution page.""" |
| 437 | |
| 438 | === modified file 'lib/lp/registry/browser/tests/test_person.py' |
| 439 | --- lib/lp/registry/browser/tests/test_person.py 2012-05-01 06:49:04 +0000 |
| 440 | +++ lib/lp/registry/browser/tests/test_person.py 2012-06-14 05:34:29 +0000 |
| 441 | @@ -3,8 +3,8 @@ |
| 442 | |
| 443 | __metaclass__ = type |
| 444 | |
| 445 | +import doctest |
| 446 | import email |
| 447 | -import doctest |
| 448 | from textwrap import dedent |
| 449 | |
| 450 | import soupmatchers |
| 451 | |
| 452 | === modified file 'lib/lp/registry/browser/tests/test_sshkey.py' |
| 453 | --- lib/lp/registry/browser/tests/test_sshkey.py 2012-04-11 14:40:02 +0000 |
| 454 | +++ lib/lp/registry/browser/tests/test_sshkey.py 2012-06-14 05:34:29 +0000 |
| 455 | @@ -10,8 +10,8 @@ |
| 456 | from lp.registry.interfaces.ssh import ISSHKeySet |
| 457 | from lp.services.webapp import canonical_url |
| 458 | from lp.testing import ( |
| 459 | + person_logged_in, |
| 460 | TestCaseWithFactory, |
| 461 | - person_logged_in, |
| 462 | ) |
| 463 | from lp.testing.layers import DatabaseFunctionalLayer |
| 464 | from lp.testing.pages import ( |
| 465 | |
| 466 | === modified file 'lib/lp/registry/model/accesspolicy.py' |
| 467 | --- lib/lp/registry/model/accesspolicy.py 2012-06-05 02:03:44 +0000 |
| 468 | +++ lib/lp/registry/model/accesspolicy.py 2012-06-14 05:34:29 +0000 |
| 469 | @@ -41,9 +41,9 @@ |
| 470 | ) |
| 471 | from lp.registry.interfaces.accesspolicy import ( |
| 472 | IAccessArtifact, |
| 473 | - IAccessArtifactSource, |
| 474 | IAccessArtifactGrant, |
| 475 | IAccessArtifactGrantSource, |
| 476 | + IAccessArtifactSource, |
| 477 | IAccessPolicy, |
| 478 | IAccessPolicyArtifact, |
| 479 | IAccessPolicyArtifactSource, |
| 480 | |
| 481 | === modified file 'lib/lp/registry/model/productjob.py' |
| 482 | --- lib/lp/registry/model/productjob.py 2012-06-08 17:11:46 +0000 |
| 483 | +++ lib/lp/registry/model/productjob.py 2012-06-14 05:34:29 +0000 |
| 484 | @@ -16,8 +16,9 @@ |
| 485 | datetime, |
| 486 | timedelta, |
| 487 | ) |
| 488 | + |
| 489 | +from lazr.delegates import delegates |
| 490 | from pytz import utc |
| 491 | -from lazr.delegates import delegates |
| 492 | import simplejson |
| 493 | from storm.expr import ( |
| 494 | And, |
| 495 | @@ -44,12 +45,12 @@ |
| 496 | License, |
| 497 | ) |
| 498 | from lp.registry.interfaces.productjob import ( |
| 499 | + ICommercialExpiredJob, |
| 500 | + ICommercialExpiredJobSource, |
| 501 | IProductJob, |
| 502 | IProductJobSource, |
| 503 | IProductNotificationJob, |
| 504 | IProductNotificationJobSource, |
| 505 | - ICommercialExpiredJob, |
| 506 | - ICommercialExpiredJobSource, |
| 507 | ISevenDayCommercialExpirationJob, |
| 508 | ISevenDayCommercialExpirationJobSource, |
| 509 | IThirtyDayCommercialExpirationJob, |
| 510 | @@ -65,19 +66,17 @@ |
| 511 | IStore, |
| 512 | ) |
| 513 | from lp.services.database.stormbase import StormBase |
| 514 | -from lp.services.propertycache import cachedproperty |
| 515 | from lp.services.job.model.job import Job |
| 516 | from lp.services.job.runner import BaseRunnableJob |
| 517 | -from lp.services.mail.helpers import ( |
| 518 | - get_email_template, |
| 519 | - ) |
| 520 | +from lp.services.mail.helpers import get_email_template |
| 521 | +from lp.services.mail.mailwrapper import MailWrapper |
| 522 | from lp.services.mail.notificationrecipientset import NotificationRecipientSet |
| 523 | -from lp.services.mail.mailwrapper import MailWrapper |
| 524 | from lp.services.mail.sendmail import ( |
| 525 | format_address, |
| 526 | format_address_for_person, |
| 527 | simple_sendmail, |
| 528 | ) |
| 529 | +from lp.services.propertycache import cachedproperty |
| 530 | from lp.services.webapp.publisher import canonical_url |
| 531 | |
| 532 | |
| 533 | |
| 534 | === modified file 'lib/lp/registry/model/sharingjob.py' |
| 535 | --- lib/lp/registry/model/sharingjob.py 2012-05-24 01:43:42 +0000 |
| 536 | +++ lib/lp/registry/model/sharingjob.py 2012-06-14 05:34:29 +0000 |
| 537 | @@ -78,9 +78,7 @@ |
| 538 | EnumeratedSubclass, |
| 539 | Job, |
| 540 | ) |
| 541 | -from lp.services.job.runner import ( |
| 542 | - BaseRunnableJob, |
| 543 | - ) |
| 544 | +from lp.services.job.runner import BaseRunnableJob |
| 545 | from lp.services.mail.sendmail import format_address_for_person |
| 546 | from lp.services.webapp import errorlog |
| 547 | |
| 548 | |
| 549 | === modified file 'lib/lp/registry/subscribers.py' |
| 550 | --- lib/lp/registry/subscribers.py 2012-05-25 21:18:48 +0000 |
| 551 | +++ lib/lp/registry/subscribers.py 2012-06-14 05:34:29 +0000 |
| 552 | @@ -14,9 +14,7 @@ |
| 553 | import pytz |
| 554 | from zope.security.proxy import removeSecurityProxy |
| 555 | |
| 556 | -from lp.registry.interfaces.person import ( |
| 557 | - IPerson, |
| 558 | - ) |
| 559 | +from lp.registry.interfaces.person import IPerson |
| 560 | from lp.registry.interfaces.product import License |
| 561 | from lp.services.config import config |
| 562 | from lp.services.mail.helpers import get_email_template |
| 563 | |
| 564 | === modified file 'lib/lp/registry/tests/test_distribution.py' |
| 565 | --- lib/lp/registry/tests/test_distribution.py 2012-06-06 16:05:23 +0000 |
| 566 | +++ lib/lp/registry/tests/test_distribution.py 2012-06-14 05:34:29 +0000 |
| 567 | @@ -43,9 +43,7 @@ |
| 568 | OPEN_TEAM_POLICY, |
| 569 | ) |
| 570 | from lp.registry.interfaces.series import SeriesStatus |
| 571 | -from lp.registry.tests.test_distroseries import ( |
| 572 | - CurrentSourceReleasesMixin, |
| 573 | - ) |
| 574 | +from lp.registry.tests.test_distroseries import CurrentSourceReleasesMixin |
| 575 | from lp.services.database.constants import UTC_NOW |
| 576 | from lp.services.propertycache import get_property_cache |
| 577 | from lp.services.webapp import canonical_url |
| 578 | |
| 579 | === modified file 'lib/lp/registry/tests/test_productjob.py' |
| 580 | --- lib/lp/registry/tests/test_productjob.py 2012-06-08 17:29:07 +0000 |
| 581 | +++ lib/lp/registry/tests/test_productjob.py 2012-06-14 05:34:29 +0000 |
| 582 | @@ -9,8 +9,9 @@ |
| 583 | datetime, |
| 584 | timedelta, |
| 585 | ) |
| 586 | + |
| 587 | +import pytz |
| 588 | import transaction |
| 589 | -import pytz |
| 590 | from zope.component import getUtility |
| 591 | from zope.interface import ( |
| 592 | classProvides, |
| 593 | @@ -46,6 +47,10 @@ |
| 594 | SevenDayCommercialExpirationJob, |
| 595 | ThirtyDayCommercialExpirationJob, |
| 596 | ) |
| 597 | +from lp.services.log.logger import BufferLogger |
| 598 | +from lp.services.propertycache import clear_property_cache |
| 599 | +from lp.services.scripts.tests import run_script |
| 600 | +from lp.services.webapp.publisher import canonical_url |
| 601 | from lp.testing import ( |
| 602 | person_logged_in, |
| 603 | TestCaseWithFactory, |
| 604 | @@ -56,10 +61,6 @@ |
| 605 | ZopelessAppServerLayer, |
| 606 | ) |
| 607 | from lp.testing.mail_helpers import pop_notifications |
| 608 | -from lp.services.log.logger import BufferLogger |
| 609 | -from lp.services.propertycache import clear_property_cache |
| 610 | -from lp.services.scripts.tests import run_script |
| 611 | -from lp.services.webapp.publisher import canonical_url |
| 612 | |
| 613 | |
| 614 | class CommercialHelpers: |
| 615 | |
| 616 | === modified file 'lib/lp/registry/tests/test_sharingjob.py' |
| 617 | --- lib/lp/registry/tests/test_sharingjob.py 2012-06-05 02:03:44 +0000 |
| 618 | +++ lib/lp/registry/tests/test_sharingjob.py 2012-06-14 05:34:29 +0000 |
| 619 | @@ -5,10 +5,9 @@ |
| 620 | |
| 621 | __metaclass__ = type |
| 622 | |
| 623 | -import transaction |
| 624 | - |
| 625 | from testtools.content import Content |
| 626 | from testtools.content_type import UTF8_TEXT |
| 627 | +import transaction |
| 628 | from zope.component import getUtility |
| 629 | from zope.security.proxy import removeSecurityProxy |
| 630 | |
| 631 | @@ -18,8 +17,8 @@ |
| 632 | ) |
| 633 | from lp.registry.enums import InformationType |
| 634 | from lp.registry.interfaces.accesspolicy import ( |
| 635 | + IAccessArtifactGrantSource, |
| 636 | IAccessArtifactSource, |
| 637 | - IAccessArtifactGrantSource, |
| 638 | IAccessPolicySource, |
| 639 | ) |
| 640 | from lp.registry.interfaces.person import TeamSubscriptionPolicy |
| 641 | |
| 642 | === modified file 'lib/lp/registry/tests/test_teammembership.py' |
| 643 | --- lib/lp/registry/tests/test_teammembership.py 2012-06-07 05:59:10 +0000 |
| 644 | +++ lib/lp/registry/tests/test_teammembership.py 2012-06-14 05:34:29 +0000 |
| 645 | @@ -25,8 +25,8 @@ |
| 646 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 647 | from lp.registry.enums import InformationType |
| 648 | from lp.registry.interfaces.accesspolicy import ( |
| 649 | + IAccessArtifactGrantSource, |
| 650 | IAccessArtifactSource, |
| 651 | - IAccessArtifactGrantSource, |
| 652 | ) |
| 653 | from lp.registry.interfaces.person import ( |
| 654 | IPersonSet, |
| 655 | @@ -59,8 +59,8 @@ |
| 656 | sqlvalues, |
| 657 | ) |
| 658 | from lp.services.features.testing import FeatureFixture |
| 659 | +from lp.services.job.tests import block_on_job |
| 660 | from lp.services.log.logger import BufferLogger |
| 661 | -from lp.services.job.tests import block_on_job |
| 662 | from lp.testing import ( |
| 663 | login, |
| 664 | login_celebrity, |
| 665 | |
| 666 | === modified file 'lib/lp/scripts/utilities/js/combo.py' |
| 667 | --- lib/lp/scripts/utilities/js/combo.py 2011-12-19 23:38:16 +0000 |
| 668 | +++ lib/lp/scripts/utilities/js/combo.py 2012-06-14 05:34:29 +0000 |
| 669 | @@ -1,3 +1,8 @@ |
| 670 | +# Copyright 2011-2012 Canonical Ltd. This software is licensed under the |
| 671 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
| 672 | + |
| 673 | +__metaclass__ = type |
| 674 | + |
| 675 | import cgi |
| 676 | import os |
| 677 | import urlparse |
| 678 | |
| 679 | === modified file 'lib/lp/scripts/utilities/js/jsbuild.py' |
| 680 | --- lib/lp/scripts/utilities/js/jsbuild.py 2011-12-19 23:38:16 +0000 |
| 681 | +++ lib/lp/scripts/utilities/js/jsbuild.py 2012-06-14 05:34:29 +0000 |
| 682 | @@ -1,3 +1,6 @@ |
| 683 | +# Copyright 2011-2012 Canonical Ltd. This software is licensed under the |
| 684 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
| 685 | + |
| 686 | """build.py - Minifies and creates the JS build directory.""" |
| 687 | |
| 688 | __metaclass__ = type |
| 689 | |
| 690 | === modified file 'lib/lp/scripts/utilities/js/tests/test_combo.py' |
| 691 | --- lib/lp/scripts/utilities/js/tests/test_combo.py 2011-12-19 23:38:16 +0000 |
| 692 | +++ lib/lp/scripts/utilities/js/tests/test_combo.py 2012-06-14 05:34:29 +0000 |
| 693 | @@ -1,3 +1,8 @@ |
| 694 | +# Copyright 2011-2012 Canonical Ltd. This software is licensed under the |
| 695 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
| 696 | + |
| 697 | +__metaclass__ = type |
| 698 | + |
| 699 | import os |
| 700 | import shutil |
| 701 | import tempfile |
| 702 | |
| 703 | === modified file 'lib/lp/services/authserver/tests/test_authserver.py' |
| 704 | --- lib/lp/services/authserver/tests/test_authserver.py 2012-04-11 14:40:02 +0000 |
| 705 | +++ lib/lp/services/authserver/tests/test_authserver.py 2012-06-14 05:34:29 +0000 |
| 706 | @@ -10,8 +10,8 @@ |
| 707 | |
| 708 | from lp.services.authserver.xmlrpc import AuthServerAPIView |
| 709 | from lp.testing import ( |
| 710 | + person_logged_in, |
| 711 | TestCaseWithFactory, |
| 712 | - person_logged_in, |
| 713 | ) |
| 714 | from lp.testing.layers import DatabaseFunctionalLayer |
| 715 | from lp.xmlrpc import faults |
| 716 | |
| 717 | === modified file 'lib/lp/services/comments/browser/tests/test_comment.py' |
| 718 | --- lib/lp/services/comments/browser/tests/test_comment.py 2012-02-28 04:24:19 +0000 |
| 719 | +++ lib/lp/services/comments/browser/tests/test_comment.py 2012-06-14 05:34:29 +0000 |
| 720 | @@ -1,3 +1,8 @@ |
| 721 | +# Copyright 2012 Canonical Ltd. This software is licensed under the |
| 722 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
| 723 | + |
| 724 | +__metaclass__ = type |
| 725 | + |
| 726 | from lp.services.comments.browser.comment import CommentBodyDownloadView |
| 727 | from lp.services.webapp.servers import LaunchpadTestRequest |
| 728 | from lp.testing import ( |
| 729 | |
| 730 | === modified file 'lib/lp/services/database/locking.py' |
| 731 | --- lib/lp/services/database/locking.py 2012-04-20 19:38:28 +0000 |
| 732 | +++ lib/lp/services/database/locking.py 2012-06-14 05:34:29 +0000 |
| 733 | @@ -1,8 +1,13 @@ |
| 734 | -# Copyright 2011 Canonical Ltd. This software is licensed under the |
| 735 | +# Copyright 2011-2012 Canonical Ltd. This software is licensed under the |
| 736 | # GNU Affero General Public License version 3 (see the file LICENSE). |
| 737 | |
| 738 | __metaclass__ = type |
| 739 | |
| 740 | +__all__ = [ |
| 741 | + 'AdvisoryLockHeld', |
| 742 | + 'LockType', |
| 743 | + 'try_advisory_lock', |
| 744 | +] |
| 745 | |
| 746 | from contextlib import contextmanager |
| 747 | |
| 748 | @@ -17,12 +22,6 @@ |
| 749 | TryAdvisoryLock, |
| 750 | ) |
| 751 | |
| 752 | -__all__ = [ |
| 753 | - 'AdvisoryLockHeld', |
| 754 | - 'LockType', |
| 755 | - 'try_advisory_lock', |
| 756 | -] |
| 757 | - |
| 758 | |
| 759 | class AdvisoryLockHeld(Exception): |
| 760 | """An attempt to acquire an advisory lock failed; it is already held.""" |
| 761 | |
| 762 | === modified file 'lib/lp/services/database/stormexpr.py' |
| 763 | --- lib/lp/services/database/stormexpr.py 2012-05-17 08:36:19 +0000 |
| 764 | +++ lib/lp/services/database/stormexpr.py 2012-06-14 05:34:29 +0000 |
| 765 | @@ -20,8 +20,8 @@ |
| 766 | from storm.expr import ( |
| 767 | BinaryOper, |
| 768 | ComparableExpr, |
| 769 | + compile, |
| 770 | CompoundOper, |
| 771 | - compile, |
| 772 | EXPR, |
| 773 | Expr, |
| 774 | In, |
| 775 | |
| 776 | === modified file 'lib/lp/services/identity/model/emailaddress.py' |
| 777 | --- lib/lp/services/identity/model/emailaddress.py 2012-04-16 15:38:07 +0000 |
| 778 | +++ lib/lp/services/identity/model/emailaddress.py 2012-06-14 05:34:29 +0000 |
| 779 | @@ -19,7 +19,6 @@ |
| 780 | ForeignKey, |
| 781 | StringCol, |
| 782 | ) |
| 783 | - |
| 784 | from zope.interface import implements |
| 785 | |
| 786 | from lp.app.validators.email import valid_email |
| 787 | |
| 788 | === modified file 'lib/lp/services/job/celeryconfig.py' |
| 789 | --- lib/lp/services/job/celeryconfig.py 2012-05-14 20:33:32 +0000 |
| 790 | +++ lib/lp/services/job/celeryconfig.py 2012-06-14 05:34:29 +0000 |
| 791 | @@ -1,10 +1,11 @@ |
| 792 | # Copyright 2012 Canonical Ltd. This software is licensed under the |
| 793 | # GNU Affero General Public License version 3 (see the file LICENSE). |
| 794 | |
| 795 | -import argparse |
| 796 | from datetime import timedelta |
| 797 | import sys |
| 798 | |
| 799 | +import argparse |
| 800 | + |
| 801 | from lp.services.config import config |
| 802 | |
| 803 | |
| 804 | |
| 805 | === modified file 'lib/lp/services/job/celeryjob.py' |
| 806 | --- lib/lp/services/job/celeryjob.py 2012-05-24 20:04:02 +0000 |
| 807 | +++ lib/lp/services/job/celeryjob.py 2012-06-14 05:34:29 +0000 |
| 808 | @@ -17,6 +17,7 @@ |
| 809 | from logging import info |
| 810 | import os |
| 811 | |
| 812 | + |
| 813 | os.environ.setdefault('CELERY_CONFIG_MODULE', 'lp.services.job.celeryconfig') |
| 814 | from celery.task import task |
| 815 | from lazr.jobrunner.celerytask import RunJob |
| 816 | |
| 817 | === modified file 'lib/lp/services/job/model/job.py' |
| 818 | --- lib/lp/services/job/model/job.py 2012-05-20 23:49:27 +0000 |
| 819 | +++ lib/lp/services/job/model/job.py 2012-06-14 05:34:29 +0000 |
| 820 | @@ -18,7 +18,6 @@ |
| 821 | import time |
| 822 | |
| 823 | from lazr.jobrunner.jobrunner import LeaseHeld |
| 824 | - |
| 825 | import pytz |
| 826 | from sqlobject import ( |
| 827 | IntCol, |
| 828 | |
| 829 | === modified file 'lib/lp/services/job/runner.py' |
| 830 | --- lib/lp/services/job/runner.py 2012-05-18 00:04:30 +0000 |
| 831 | +++ lib/lp/services/job/runner.py 2012-06-14 05:34:29 +0000 |
| 832 | @@ -19,11 +19,11 @@ |
| 833 | |
| 834 | from calendar import timegm |
| 835 | from collections import defaultdict |
| 836 | +import contextlib |
| 837 | from datetime import ( |
| 838 | datetime, |
| 839 | timedelta, |
| 840 | ) |
| 841 | -import contextlib |
| 842 | import logging |
| 843 | import os |
| 844 | from resource import ( |
| 845 | |
| 846 | === modified file 'lib/lp/services/job/tests/__init__.py' |
| 847 | --- lib/lp/services/job/tests/__init__.py 2012-05-14 20:06:58 +0000 |
| 848 | +++ lib/lp/services/job/tests/__init__.py 2012-06-14 05:34:29 +0000 |
| 849 | @@ -15,8 +15,8 @@ |
| 850 | |
| 851 | from testtools.content import text_content |
| 852 | |
| 853 | +from lp.services.job.runner import BaseRunnableJob |
| 854 | from lp.testing.fixture import CaptureOops |
| 855 | -from lp.services.job.runner import BaseRunnableJob |
| 856 | |
| 857 | |
| 858 | def celeryd(queue, cwd=None): |
| 859 | |
| 860 | === modified file 'lib/lp/services/job/tests/celery_helpers.py' |
| 861 | --- lib/lp/services/job/tests/celery_helpers.py 2012-04-05 19:05:16 +0000 |
| 862 | +++ lib/lp/services/job/tests/celery_helpers.py 2012-06-14 05:34:29 +0000 |
| 863 | @@ -7,6 +7,7 @@ |
| 864 | |
| 865 | # Force the correct celeryconfig to be used. |
| 866 | import lp.services.job.celeryjob |
| 867 | + |
| 868 | # Quiet lint unused import warning. |
| 869 | lp.services.job.celeryjob |
| 870 | |
| 871 | |
| 872 | === modified file 'lib/lp/services/job/tests/test_job.py' |
| 873 | --- lib/lp/services/job/tests/test_job.py 2012-05-14 14:57:15 +0000 |
| 874 | +++ lib/lp/services/job/tests/test_job.py 2012-06-14 05:34:29 +0000 |
| 875 | @@ -6,15 +6,13 @@ |
| 876 | from datetime import datetime |
| 877 | import time |
| 878 | |
| 879 | +from lazr.jobrunner.jobrunner import LeaseHeld |
| 880 | import pytz |
| 881 | -from lazr.jobrunner.jobrunner import LeaseHeld |
| 882 | from storm.locals import Store |
| 883 | from testtools.matchers import Equals |
| 884 | import transaction |
| 885 | |
| 886 | -from lp.code.model.branchmergeproposaljob import ( |
| 887 | - CodeReviewCommentEmailJob, |
| 888 | - ) |
| 889 | +from lp.code.model.branchmergeproposaljob import CodeReviewCommentEmailJob |
| 890 | from lp.services.database.constants import UTC_NOW |
| 891 | from lp.services.database.lpstorm import IStore |
| 892 | from lp.services.job.interfaces.job import ( |
| 893 | |
| 894 | === modified file 'lib/lp/services/job/tests/test_retry_jobs_with_celery.py' |
| 895 | --- lib/lp/services/job/tests/test_retry_jobs_with_celery.py 2012-06-04 16:15:49 +0000 |
| 896 | +++ lib/lp/services/job/tests/test_retry_jobs_with_celery.py 2012-06-14 05:34:29 +0000 |
| 897 | @@ -4,14 +4,11 @@ |
| 898 | """Tests for running jobs via Celery.""" |
| 899 | |
| 900 | |
| 901 | -from datetime import ( |
| 902 | - timedelta, |
| 903 | - ) |
| 904 | -from time import ( |
| 905 | - sleep, |
| 906 | - ) |
| 907 | +from datetime import timedelta |
| 908 | +from time import sleep |
| 909 | + |
| 910 | +from lazr.delegates import delegates |
| 911 | import transaction |
| 912 | -from lazr.delegates import delegates |
| 913 | from zope.interface import implements |
| 914 | |
| 915 | from lp.services.config import config |
| 916 | @@ -20,8 +17,8 @@ |
| 917 | from lp.services.job.interfaces.job import ( |
| 918 | IJob, |
| 919 | IRunnableJob, |
| 920 | + JobStatus, |
| 921 | ) |
| 922 | -from lp.services.job.interfaces.job import JobStatus |
| 923 | from lp.services.job.model.job import Job |
| 924 | from lp.services.job.runner import BaseRunnableJob |
| 925 | from lp.services.job.tests import block_on_job |
| 926 | |
| 927 | === modified file 'lib/lp/services/messages/tests/test_message.py' |
| 928 | --- lib/lp/services/messages/tests/test_message.py 2012-04-27 19:03:32 +0000 |
| 929 | +++ lib/lp/services/messages/tests/test_message.py 2012-06-14 05:34:29 +0000 |
| 930 | @@ -14,9 +14,7 @@ |
| 931 | |
| 932 | import transaction |
| 933 | |
| 934 | -from lp.services.messages.model.message import ( |
| 935 | - MessageSet, |
| 936 | - ) |
| 937 | +from lp.services.messages.model.message import MessageSet |
| 938 | from lp.testing import ( |
| 939 | login, |
| 940 | TestCase, |
| 941 | |
| 942 | === modified file 'lib/lp/services/testing/tests/test_customresult.py' |
| 943 | --- lib/lp/services/testing/tests/test_customresult.py 2012-06-07 10:03:44 +0000 |
| 944 | +++ lib/lp/services/testing/tests/test_customresult.py 2012-06-14 05:34:29 +0000 |
| 945 | @@ -7,8 +7,9 @@ |
| 946 | |
| 947 | import string |
| 948 | import tempfile |
| 949 | +import unittest |
| 950 | + |
| 951 | from testtools import TestCase |
| 952 | -import unittest |
| 953 | |
| 954 | from lp.services.testing.customresult import filter_tests |
| 955 | from lp.testing.layers import BaseLayer |
| 956 | |
| 957 | === modified file 'lib/lp/services/verification/browser/tests/test_logintoken.py' |
| 958 | --- lib/lp/services/verification/browser/tests/test_logintoken.py 2012-04-11 14:40:02 +0000 |
| 959 | +++ lib/lp/services/verification/browser/tests/test_logintoken.py 2012-06-14 05:34:29 +0000 |
| 960 | @@ -13,8 +13,8 @@ |
| 961 | from lp.services.verification.interfaces.authtoken import LoginTokenType |
| 962 | from lp.services.verification.interfaces.logintoken import ILoginTokenSet |
| 963 | from lp.testing import ( |
| 964 | + person_logged_in, |
| 965 | TestCaseWithFactory, |
| 966 | - person_logged_in, |
| 967 | ) |
| 968 | from lp.testing.deprecated import LaunchpadFormHarness |
| 969 | from lp.testing.layers import DatabaseFunctionalLayer |
| 970 | |
| 971 | === modified file 'lib/lp/services/webapp/publisher.py' |
| 972 | --- lib/lp/services/webapp/publisher.py 2012-05-22 17:00:08 +0000 |
| 973 | +++ lib/lp/services/webapp/publisher.py 2012-06-14 05:34:29 +0000 |
| 974 | @@ -47,12 +47,12 @@ |
| 975 | queryMultiAdapter, |
| 976 | ) |
| 977 | from zope.component.interfaces import ComponentLookupError |
| 978 | +from zope.i18nmessageid import Message |
| 979 | from zope.interface import ( |
| 980 | directlyProvides, |
| 981 | implements, |
| 982 | ) |
| 983 | from zope.interface.advice import addClassAdvisor |
| 984 | -from zope.i18nmessageid import Message |
| 985 | from zope.publisher.interfaces import NotFound |
| 986 | from zope.publisher.interfaces.browser import ( |
| 987 | IBrowserPublisher, |
| 988 | |
| 989 | === modified file 'lib/lp/services/webapp/tests/test_error.py' |
| 990 | --- lib/lp/services/webapp/tests/test_error.py 2012-06-12 09:26:39 +0000 |
| 991 | +++ lib/lp/services/webapp/tests/test_error.py 2012-06-14 05:34:29 +0000 |
| 992 | @@ -5,13 +5,14 @@ |
| 993 | |
| 994 | |
| 995 | import httplib |
| 996 | +import time |
| 997 | +import urllib2 |
| 998 | + |
| 999 | from storm.exceptions import ( |
| 1000 | DisconnectionError, |
| 1001 | OperationalError, |
| 1002 | ) |
| 1003 | -import time |
| 1004 | import transaction |
| 1005 | -import urllib2 |
| 1006 | |
| 1007 | from lp.services.webapp.error import ( |
| 1008 | DisconnectionErrorView, |
| 1009 | |
| 1010 | === modified file 'lib/lp/soyuz/model/packagecopyjob.py' |
| 1011 | --- lib/lp/soyuz/model/packagecopyjob.py 2012-05-21 07:34:15 +0000 |
| 1012 | +++ lib/lp/soyuz/model/packagecopyjob.py 2012-06-14 05:34:29 +0000 |
| 1013 | @@ -49,9 +49,7 @@ |
| 1014 | IStore, |
| 1015 | ) |
| 1016 | from lp.services.database.stormbase import StormBase |
| 1017 | -from lp.services.job.interfaces.job import ( |
| 1018 | - JobStatus, |
| 1019 | - ) |
| 1020 | +from lp.services.job.interfaces.job import JobStatus |
| 1021 | from lp.services.job.model.job import ( |
| 1022 | EnumeratedSubclass, |
| 1023 | Job, |
| 1024 | |
| 1025 | === modified file 'lib/lp/soyuz/tests/test_packagecopyjob.py' |
| 1026 | --- lib/lp/soyuz/tests/test_packagecopyjob.py 2012-05-21 07:34:15 +0000 |
| 1027 | +++ lib/lp/soyuz/tests/test_packagecopyjob.py 2012-06-14 05:34:29 +0000 |
| 1028 | @@ -24,9 +24,7 @@ |
| 1029 | from lp.services.config import config |
| 1030 | from lp.services.database.lpstorm import IStore |
| 1031 | from lp.services.features.testing import FeatureFixture |
| 1032 | -from lp.services.job.interfaces.job import ( |
| 1033 | - JobStatus, |
| 1034 | - ) |
| 1035 | +from lp.services.job.interfaces.job import JobStatus |
| 1036 | from lp.services.job.tests import ( |
| 1037 | block_on_job, |
| 1038 | pop_remote_notifications, |
| 1039 | |
| 1040 | === modified file 'lib/lp/soyuz/tests/test_person_createppa.py' |
| 1041 | --- lib/lp/soyuz/tests/test_person_createppa.py 2012-06-11 09:16:11 +0000 |
| 1042 | +++ lib/lp/soyuz/tests/test_person_createppa.py 2012-06-14 05:34:29 +0000 |
| 1043 | @@ -6,6 +6,7 @@ |
| 1044 | __metaclass__ = type |
| 1045 | |
| 1046 | from zope.security.interfaces import Unauthorized |
| 1047 | + |
| 1048 | from lp.registry.errors import PPACreationError |
| 1049 | from lp.registry.interfaces.person import ( |
| 1050 | PersonVisibility, |
| 1051 | |
| 1052 | === modified file 'lib/lp/testing/fixture.py' |
| 1053 | --- lib/lp/testing/fixture.py 2012-05-16 03:56:28 +0000 |
| 1054 | +++ lib/lp/testing/fixture.py 2012-06-14 05:34:29 +0000 |
| 1055 | @@ -60,8 +60,8 @@ |
| 1056 | from lp.services.webapp.errorlog import ErrorReportEvent |
| 1057 | from lp.services.webapp.interfaces import ( |
| 1058 | DEFAULT_FLAVOR, |
| 1059 | + IStoreSelector, |
| 1060 | MAIN_STORE, |
| 1061 | - IStoreSelector, |
| 1062 | ) |
| 1063 | from lp.testing.dbuser import dbuser |
| 1064 | |
| 1065 | |
| 1066 | === modified file 'lib/lp/testing/layers.py' |
| 1067 | --- lib/lp/testing/layers.py 2012-04-12 19:34:59 +0000 |
| 1068 | +++ lib/lp/testing/layers.py 2012-06-14 05:34:29 +0000 |
| 1069 | @@ -111,10 +111,10 @@ |
| 1070 | ConfigUseFixture, |
| 1071 | ) |
| 1072 | from lp.services.database.sqlbase import session_store |
| 1073 | -from lp.services.job.tests import celeryd |
| 1074 | from lp.services.googlesearch.tests.googleserviceharness import ( |
| 1075 | GoogleServiceTestSetup, |
| 1076 | ) |
| 1077 | +from lp.services.job.tests import celeryd |
| 1078 | from lp.services.librarianserver.testing.server import LibrarianServerFixture |
| 1079 | from lp.services.mail.mailbox import ( |
| 1080 | IMailBox, |
| 1081 | |
| 1082 | === modified file 'lib/lp/translations/interfaces/translationpackagingjob.py' |
| 1083 | --- lib/lp/translations/interfaces/translationpackagingjob.py 2011-12-19 23:38:16 +0000 |
| 1084 | +++ lib/lp/translations/interfaces/translationpackagingjob.py 2012-06-14 05:34:29 +0000 |
| 1085 | @@ -1,3 +1,8 @@ |
| 1086 | +# Copyright 2011-2012 Canonical Ltd. This software is licensed under the |
| 1087 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
| 1088 | + |
| 1089 | +__metaclass__ = type |
| 1090 | + |
| 1091 | from lp.services.job.interfaces.job import IJobSource |
| 1092 | |
| 1093 | |
| 1094 | |
| 1095 | === modified file 'lib/lp/translations/tests/test_distroseries_translations_copy.py' |
| 1096 | --- lib/lp/translations/tests/test_distroseries_translations_copy.py 2012-05-08 03:10:09 +0000 |
| 1097 | +++ lib/lp/translations/tests/test_distroseries_translations_copy.py 2012-06-14 05:34:29 +0000 |
| 1098 | @@ -6,10 +6,10 @@ |
| 1099 | __metaclass__ = type |
| 1100 | |
| 1101 | from lp.services.database.multitablecopy import MultiTableCopy |
| 1102 | +from lp.services.log.logger import DevNullLogger |
| 1103 | from lp.testing import TestCaseWithFactory |
| 1104 | from lp.testing.faketransaction import FakeTransaction |
| 1105 | from lp.testing.layers import ZopelessDatabaseLayer |
| 1106 | -from lp.services.log.logger import DevNullLogger |
| 1107 | from lp.translations.model.distroseries_translations_copy import ( |
| 1108 | copy_active_translations, |
| 1109 | ) |
| 1110 | |
| 1111 | === modified file 'lib/lp/translations/tests/test_pofilestatsjob.py' |
| 1112 | --- lib/lp/translations/tests/test_pofilestatsjob.py 2012-04-24 20:57:27 +0000 |
| 1113 | +++ lib/lp/translations/tests/test_pofilestatsjob.py 2012-06-14 05:34:29 +0000 |
| 1114 | @@ -15,9 +15,7 @@ |
| 1115 | IJobSource, |
| 1116 | IRunnableJob, |
| 1117 | ) |
| 1118 | -from lp.services.job.tests import ( |
| 1119 | - block_on_job |
| 1120 | - ) |
| 1121 | +from lp.services.job.tests import block_on_job |
| 1122 | from lp.services.webapp.testing import verifyObject |
| 1123 | from lp.testing import TestCaseWithFactory |
| 1124 | from lp.testing.dbuser import dbuser |
