launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #01325
[Merge] lp:~sinzui/launchpad/apocalypse-interface-imports-2 into lp:launchpad/devel
Curtis Hovey has proposed merging lp:~sinzui/launchpad/apocalypse-interface-imports-2 into lp:launchpad/devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
This is my branch to import interfaces from their true location in lp.code.
lp:~sinzui/launchpad/apocalypse-interface-imports-2
Diff size: 397
Launchpad bug:
https://bugs.launchpad.net/bugs/652647
Test command: The entire test suite.
Pre-implementation: no one
Target release: 10.10
Import interfaces from their true location in lp.code
-----------------------------------------------------
This branch fixes the imports from canonical.launchpad.interfaces located
in lp.code
This is my second attempt at this. This failes a few weeks ago, but ec2
now passes it since the ZCML was fixed this week.
Rules
-----
* Big find and replace.
QA
--
None, this is a refactoring
Lint
----
Linting changed files:
lib/lp/code/adapters/branch.py
lib/lp/code/browser/codereviewcomment.py
lib/lp/code/browser/sourcepackagerecipe.py
lib/lp/code/doc/branch-visibility.txt
lib/lp/code/doc/branch-xmlrpc.txt
lib/lp/code/doc/branch.txt
lib/lp/code/doc/codeimport-event.txt
lib/lp/code/doc/codeimport-machine.txt
lib/lp/code/doc/codeimport-result.txt
lib/lp/code/doc/codeimport.txt
lib/lp/code/doc/xmlrpc-codehosting.txt
lib/lp/code/doc/xmlrpc-codeimport-scheduler.txt
lib/lp/code/mail/codeimport.py
lib/lp/code/mail/tests/test_branchmergeproposal.py
lib/lp/code/mail/tests/test_codehandler.py
lib/lp/code/model/codeimport.py
lib/lp/code/model/diff.py
lib/lp/code/model/directbranchcommit.py
lib/lp/code/model/revision.py
lib/lp/code/model/tests/test_branchmergeproposal.py
lib/lp/code/stories/branches/xx-branch-edit.txt
lib/lp/code/vocabularies/sourcepackagerecipe.py
lib/lp/code/xmlrpc/codeimportscheduler.py
lib/lp/code/xmlrpc/tests/test_codehosting.py
lib/lp/code/xmlrpc/tests/test_codeimportscheduler.py
^ Lint hates these files. I can clean then up after I get approval to land.
--
https://code.launchpad.net/~sinzui/launchpad/apocalypse-interface-imports-2/+merge/37212
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~sinzui/launchpad/apocalypse-interface-imports-2 into lp:launchpad/devel.
=== modified file 'lib/lp/code/adapters/branch.py'
--- lib/lp/code/adapters/branch.py 2010-08-20 20:31:18 +0000
+++ lib/lp/code/adapters/branch.py 2010-10-01 03:26:16 +0000
@@ -20,7 +20,7 @@
# well as landing target when it is added to the UI
class BranchDelta:
- """See canonical.launchpad.interfaces.IBranchDelta."""
+ """See IBranchDelta."""
implements(IBranchDelta)
=== modified file 'lib/lp/code/browser/codereviewcomment.py'
--- lib/lp/code/browser/codereviewcomment.py 2010-08-24 10:45:57 +0000
+++ lib/lp/code/browser/codereviewcomment.py 2010-10-01 03:26:16 +0000
@@ -26,7 +26,7 @@
from canonical.config import config
from canonical.launchpad import _
-from canonical.launchpad.interfaces import ILibraryFileAlias
+from canonical.launchpad.interfaces.librarian import ILibraryFileAlias
from canonical.launchpad.webapp import (
action,
canonical_url,
=== modified file 'lib/lp/code/browser/sourcepackagerecipe.py'
--- lib/lp/code/browser/sourcepackagerecipe.py 2010-09-27 21:14:18 +0000
+++ lib/lp/code/browser/sourcepackagerecipe.py 2010-10-01 03:26:16 +0000
@@ -60,7 +60,7 @@
BuildAlreadyPending,
NoSuchBranch,
PrivateBranchRecipe,
- TooNewRecipeFormat
+ TooNewRecipeFormat,
)
from lp.code.interfaces.sourcepackagerecipe import (
ISourcePackageRecipe,
@@ -161,7 +161,7 @@
facet = 'branches'
- links = ('request_builds',)
+ links = ('request_builds', )
def request_builds(self):
"""Provide a link for requesting builds of a recipe."""
@@ -269,7 +269,7 @@
'name',
'description',
'owner',
- 'build_daily'
+ 'build_daily',
])
daily_build_archive = Choice(vocabulary='TargetPPAs',
title=u'Daily build archive')
@@ -384,7 +384,8 @@
def initial_values(self):
return {
'distros': self.context.distroseries,
- 'recipe_text': str(self.context.builder_recipe),}
+ 'recipe_text': str(self.context.builder_recipe),
+ }
@property
def cancel_url(self):
=== modified file 'lib/lp/code/doc/branch-visibility.txt'
--- lib/lp/code/doc/branch-visibility.txt 2010-06-07 19:48:29 +0000
+++ lib/lp/code/doc/branch-visibility.txt 2010-10-01 03:26:16 +0000
@@ -88,7 +88,7 @@
Check the configuration of the AccessBranch authorization.
- >>> from canonical.launchpad.interfaces import ILaunchBag
+ >>> from canonical.launchpad.webapp.interfaces import ILaunchBag
>>> print getUtility(ILaunchBag).user.displayname
Sample Person
>>> getUtility(ILaunchBag).user == no_priv_person
@@ -104,7 +104,8 @@
Launchpad things in order to fix up fubars by users.
>>> mark = person_set.getByName('mark')
- >>> from canonical.launchpad.interfaces import ILaunchpadCelebrities
+ >>> from canonical.launchpad.interfaces.launchpad import (
+ ... ILaunchpadCelebrities)
>>> lp_admins = getUtility(ILaunchpadCelebrities).admin
>>> mark.inTeam(lp_admins)
True
=== modified file 'lib/lp/code/doc/branch-xmlrpc.txt'
--- lib/lp/code/doc/branch-xmlrpc.txt 2010-09-03 00:25:28 +0000
+++ lib/lp/code/doc/branch-xmlrpc.txt 2010-10-01 03:26:16 +0000
@@ -282,7 +282,7 @@
Let's take a look to see that the branch actually got linked to the bug:
- >>> from canonical.launchpad.interfaces import IBugSet
+ >>> from lp.bugs.interfaces.bug import IBugSet
>>> bug_one = getUtility(IBugSet).get(1)
>>> for bug_branch in bug_one.linked_branches:
... print bug_branch.branch.url
=== modified file 'lib/lp/code/doc/branch.txt'
--- lib/lp/code/doc/branch.txt 2010-07-26 09:15:31 +0000
+++ lib/lp/code/doc/branch.txt 2010-10-01 03:26:16 +0000
@@ -191,7 +191,8 @@
>>> make_new_scanned_branch('oldest')
>>> make_new_scanned_branch('middling')
>>> make_new_scanned_branch('young')
- >>> from canonical.launchpad.interfaces import ILaunchpadCelebrities
+ >>> from canonical.launchpad.interfaces.launchpad import (
+ ... ILaunchpadCelebrities)
>>> vcs_imports = getUtility(ILaunchpadCelebrities).vcs_imports
>>> make_new_scanned_branch(
... 'imported', owner=vcs_imports, branch_type=BranchType.IMPORTED)
=== modified file 'lib/lp/code/doc/codeimport-event.txt'
--- lib/lp/code/doc/codeimport-event.txt 2010-03-18 17:49:21 +0000
+++ lib/lp/code/doc/codeimport-event.txt 2010-10-01 03:26:16 +0000
@@ -88,7 +88,8 @@
>>> from lp.code.enums import BranchType, CodeImportEventDataType
>>> from lp.registry.interfaces.person import IPersonSet
>>> from lp.registry.interfaces.product import IProductSet
- >>> from canonical.launchpad.interfaces import ILaunchpadCelebrities
+ >>> from canonical.launchpad.interfaces.launchpad import (
+ ... ILaunchpadCelebrities)
>>> from lp.code.model.codeimport import CodeImport
>>> from lp.code.interfaces.branchnamespace import (
... get_branch_namespace)
=== modified file 'lib/lp/code/doc/codeimport-machine.txt'
--- lib/lp/code/doc/codeimport-machine.txt 2010-05-14 01:31:11 +0000
+++ lib/lp/code/doc/codeimport-machine.txt 2010-10-01 03:26:16 +0000
@@ -143,7 +143,8 @@
member of the bazaar experts or more likely a LOSA (administrator).
>>> login('admin@xxxxxxxxxxxxx')
- >>> from canonical.launchpad.interfaces import ILaunchpadCelebrities
+ >>> from canonical.launchpad.interfaces.launchpad import (
+ ... ILaunchpadCelebrities)
>>> admin = getUtility(ILaunchBag).user
>>> new_machine.setOnline()
=== modified file 'lib/lp/code/doc/codeimport-result.txt'
--- lib/lp/code/doc/codeimport-result.txt 2010-03-18 17:49:21 +0000
+++ lib/lp/code/doc/codeimport-result.txt 2010-10-01 03:26:16 +0000
@@ -35,7 +35,8 @@
>>> from transaction import commit
>>> commit()
- >>> from canonical.launchpad.interfaces import ILibraryFileAliasSet
+ >>> from canonical.launchpad.interfaces.librarian import (
+ ... ILibraryFileAliasSet)
>>> log_alias = getUtility(ILibraryFileAliasSet)[log_alias_id]
>>> sample_import = factory.makeCodeImport()
=== modified file 'lib/lp/code/doc/codeimport.txt'
--- lib/lp/code/doc/codeimport.txt 2010-08-02 02:13:52 +0000
+++ lib/lp/code/doc/codeimport.txt 2010-10-01 03:26:16 +0000
@@ -89,7 +89,8 @@
>>> len(stub.test_emails)
3
>>> from canonical.launchpad.helpers import get_contact_email_addresses
- >>> from canonical.launchpad.interfaces import ILaunchpadCelebrities
+ >>> from canonical.launchpad.interfaces.launchpad import (
+ ... ILaunchpadCelebrities)
>>> vcs_imports = getUtility(ILaunchpadCelebrities).vcs_imports
>>> len(get_contact_email_addresses(vcs_imports))
3
=== modified file 'lib/lp/code/doc/xmlrpc-codehosting.txt'
--- lib/lp/code/doc/xmlrpc-codehosting.txt 2010-04-27 09:00:41 +0000
+++ lib/lp/code/doc/xmlrpc-codehosting.txt 2010-10-01 03:26:16 +0000
@@ -5,7 +5,7 @@
branches. It is available as the codehosting attribute of our private
XMLRPC instance.
- >>> from canonical.launchpad.interfaces import (
+ >>> from canonical.launchpad.interfaces.launchpad import (
... IPrivateApplication)
>>> from lp.code.interfaces.codehosting import (
... ICodehostingApplication)
=== modified file 'lib/lp/code/doc/xmlrpc-codeimport-scheduler.txt'
--- lib/lp/code/doc/xmlrpc-codeimport-scheduler.txt 2010-02-22 08:10:03 +0000
+++ lib/lp/code/doc/xmlrpc-codeimport-scheduler.txt 2010-10-01 03:26:16 +0000
@@ -6,7 +6,8 @@
>>> from lp.code.interfaces.codeimportscheduler import (
... ICodeImportSchedulerApplication)
- >>> from canonical.launchpad.interfaces import IPrivateApplication
+ >>> from canonical.launchpad.interfaces.launchpad import (
+ ... IPrivateApplication)
>>> from canonical.launchpad.webapp.testing import verifyObject
>>> private_root = getUtility(IPrivateApplication)
=== modified file 'lib/lp/code/mail/codeimport.py'
--- lib/lp/code/mail/codeimport.py 2010-08-20 20:31:18 +0000
+++ lib/lp/code/mail/codeimport.py 2010-10-01 03:26:16 +0000
@@ -15,7 +15,7 @@
get_contact_email_addresses,
get_email_template,
)
-from canonical.launchpad.interfaces import ILaunchpadCelebrities
+from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
from canonical.launchpad.mail import (
format_address,
simple_sendmail,
=== modified file 'lib/lp/code/mail/tests/test_branchmergeproposal.py'
--- lib/lp/code/mail/tests/test_branchmergeproposal.py 2010-08-20 20:31:18 +0000
+++ lib/lp/code/mail/tests/test_branchmergeproposal.py 2010-10-01 03:26:16 +0000
@@ -12,7 +12,7 @@
import transaction
from zope.security.proxy import removeSecurityProxy
-from canonical.launchpad.interfaces import IStore
+from canonical.launchpad.interfaces.lpstorm import IStore
from canonical.launchpad.webapp import canonical_url
from canonical.testing import (
DatabaseFunctionalLayer,
=== modified file 'lib/lp/code/mail/tests/test_codehandler.py'
--- lib/lp/code/mail/tests/test_codehandler.py 2010-09-23 20:38:59 +0000
+++ lib/lp/code/mail/tests/test_codehandler.py 2010-10-01 03:26:16 +0000
@@ -25,7 +25,7 @@
from zope.security.proxy import removeSecurityProxy
from canonical.config import config
-from canonical.launchpad.database import MessageSet
+from canonical.launchpad.database.message import MessageSet
from canonical.launchpad.interfaces.mail import (
EmailProcessingError,
IWeaklyAuthenticatedPrincipal,
=== modified file 'lib/lp/code/model/codeimport.py'
--- lib/lp/code/model/codeimport.py 2010-08-20 20:31:18 +0000
+++ lib/lp/code/model/codeimport.py 2010-10-01 03:26:16 +0000
@@ -39,7 +39,7 @@
from canonical.database.datetimecol import UtcDateTimeCol
from canonical.database.enumcol import EnumCol
from canonical.database.sqlbase import SQLBase
-from canonical.launchpad.interfaces import IStore
+from canonical.launchpad.interfaces.lpstorm import IStore
from lp.app.errors import NotFoundError
from lp.code.enums import (
BranchType,
=== modified file 'lib/lp/code/model/diff.py'
--- lib/lp/code/model/diff.py 2010-08-20 20:31:18 +0000
+++ lib/lp/code/model/diff.py 2010-10-01 03:26:16 +0000
@@ -6,12 +6,12 @@
__metaclass__ = type
__all__ = ['Diff', 'PreviewDiff', 'StaticDiff']
+import sys
from cStringIO import StringIO
-import sys
+
from uuid import uuid1
from bzrlib import trace
-from bzrlib.branch import Branch
from bzrlib.diff import show_diff_trees
from bzrlib.merge import Merge3Merger
from bzrlib.patches import (
=== modified file 'lib/lp/code/model/directbranchcommit.py'
--- lib/lp/code/model/directbranchcommit.py 2010-09-22 07:46:57 +0000
+++ lib/lp/code/model/directbranchcommit.py 2010-10-01 03:26:16 +0000
@@ -22,7 +22,7 @@
)
from canonical.config import config
-from canonical.launchpad.interfaces import IMasterObject
+from canonical.launchpad.interfaces.lpstorm import IMasterObject
from lp.codehosting.bzrutils import get_stacked_on_url
from lp.services.mail.sendmail import format_address_for_person
from lp.services.osutils import override_environ
=== modified file 'lib/lp/code/model/revision.py'
--- lib/lp/code/model/revision.py 2010-09-15 20:41:46 +0000
+++ lib/lp/code/model/revision.py 2010-10-01 03:26:16 +0000
@@ -61,11 +61,11 @@
sqlvalues,
)
from canonical.launchpad.helpers import shortlist
-from canonical.launchpad.interfaces import (
+from canonical.launchpad.interfaces.emailaddress import (
EmailAddressStatus,
IEmailAddressSet,
- IMasterStore,
)
+from canonical.launchpad.interfaces.lpstorm import IMasterStore
from canonical.launchpad.webapp.interfaces import (
DEFAULT_FLAVOR,
IStoreSelector,
=== modified file 'lib/lp/code/model/tests/test_branchmergeproposal.py'
--- lib/lp/code/model/tests/test_branchmergeproposal.py 2010-09-15 20:41:46 +0000
+++ lib/lp/code/model/tests/test_branchmergeproposal.py 2010-10-01 03:26:16 +0000
@@ -9,6 +9,7 @@
from datetime import datetime, timedelta
from difflib import unified_diff
+import transaction
from unittest import (
TestCase,
TestLoader,
@@ -18,7 +19,6 @@
from pytz import UTC
from sqlobject import SQLObjectNotFound
from storm.locals import Store
-import transaction
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
@@ -29,7 +29,7 @@
login,
syncUpdate,
)
-from canonical.launchpad.interfaces import IPrivacy
+from canonical.launchpad.interfaces.launchpad import IPrivacy
from canonical.launchpad.interfaces.message import IMessageJob
from canonical.launchpad.webapp import canonical_url
from canonical.launchpad.webapp.testing import verifyObject
=== modified file 'lib/lp/code/stories/branches/xx-branch-edit.txt'
--- lib/lp/code/stories/branches/xx-branch-edit.txt 2010-09-27 19:39:21 +0000
+++ lib/lp/code/stories/branches/xx-branch-edit.txt 2010-10-01 03:26:16 +0000
@@ -218,7 +218,7 @@
editable by any user.
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import IPersonSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> from lp.code.enums import (
... BranchSubscriptionNotificationLevel, BranchSubscriptionDiffSize,
... CodeReviewNotificationLevel)
=== modified file 'lib/lp/code/vocabularies/sourcepackagerecipe.py'
--- lib/lp/code/vocabularies/sourcepackagerecipe.py 2010-08-20 20:31:18 +0000
+++ lib/lp/code/vocabularies/sourcepackagerecipe.py 2010-10-01 03:26:16 +0000
@@ -14,8 +14,8 @@
SimpleVocabulary,
)
-from canonical.launchpad.interfaces import ILaunchBag
from canonical.launchpad.webapp.authorization import check_permission
+from canonical.launchpad.webapp.interfaces import ILaunchBag
from canonical.launchpad.webapp.sorting import sorted_dotted_numbers
from lp.code.model.sourcepackagerecipe import get_buildable_distroseries_set
from lp.soyuz.browser.archive import make_archive_vocabulary
=== modified file 'lib/lp/code/xmlrpc/codeimportscheduler.py'
--- lib/lp/code/xmlrpc/codeimportscheduler.py 2010-08-20 20:31:18 +0000
+++ lib/lp/code/xmlrpc/codeimportscheduler.py 2010-10-01 03:26:16 +0000
@@ -12,7 +12,7 @@
from zope.interface import implements
from zope.security.proxy import removeSecurityProxy
-from canonical.launchpad.interfaces import ILibraryFileAliasSet
+from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
from canonical.launchpad.webapp import (
canonical_url,
LaunchpadXMLRPCView,
=== modified file 'lib/lp/code/xmlrpc/tests/test_codehosting.py'
--- lib/lp/code/xmlrpc/tests/test_codehosting.py 2010-08-20 20:31:18 +0000
+++ lib/lp/code/xmlrpc/tests/test_codehosting.py 2010-10-01 03:26:16 +0000
@@ -22,7 +22,7 @@
login,
logout,
)
-from canonical.launchpad.interfaces.launchpad import ILaunchBag
+from canonical.launchpad.webapp.interfaces import ILaunchBag
from canonical.launchpad.xmlrpc import faults
from canonical.testing import (
DatabaseFunctionalLayer,
=== modified file 'lib/lp/code/xmlrpc/tests/test_codeimportscheduler.py'
--- lib/lp/code/xmlrpc/tests/test_codeimportscheduler.py 2010-08-20 20:31:18 +0000
+++ lib/lp/code/xmlrpc/tests/test_codeimportscheduler.py 2010-10-01 03:26:16 +0000
@@ -12,7 +12,7 @@
from zope.security.proxy import removeSecurityProxy
from canonical.database.constants import UTC_NOW
-from canonical.launchpad.interfaces import ILaunchpadCelebrities
+from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
from canonical.launchpad.testing.codeimporthelpers import make_running_import
from canonical.launchpad.webapp import canonical_url
from canonical.launchpad.xmlrpc.faults import NoSuchCodeImportJob