launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #01590
[Merge] lp:~sinzui/launchpad/apocalypse-interface-imports-7 into lp:launchpad/devel
Curtis Hovey has proposed merging lp:~sinzui/launchpad/apocalypse-interface-imports-7 into lp:launchpad/devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
This is my branch to fix the remaining glob imports in doctests.
lp:~sinzui/launchpad/apocalypse-interface-imports-7
Diff size: 2979
Launchpad bug: https://bugs.launchpad.net/bugs/662669
Test command: The whole test suite.
Pre-implementation: no one
Target release: 10.11
Fix the remaining glob imports in doctests
------------------------------------------
Do not import from canonical.launchpad.interfaces in doctests.
Rules
-----
* Update the deglobber to expand multi-line import to single line imports
* Then run the deglob doctest rules.
* Send to ec2 to verify the tests run.
QA
--
None.
Lint
----
Lint hates these files. There are lots of long lines, moin headers, and
indentation issues. I am not inclined to fix these at this time since I
believe many of these tests should be unittests instead.
Test
----
All test changes were made via the script--no direct edits were made.
Implementation
--------------
* Modified the deglobber helper. This is really a script that will always
require hacks to help fix the imports from c.l.i.
--
https://code.launchpad.net/~sinzui/launchpad/apocalypse-interface-imports-7/+merge/38727
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~sinzui/launchpad/apocalypse-interface-imports-7 into lp:launchpad/devel.
=== modified file 'lib/canonical/launchpad/browser/ftests/logintoken-corner-cases.txt'
--- lib/canonical/launchpad/browser/ftests/logintoken-corner-cases.txt 2010-10-03 15:30:06 +0000
+++ lib/canonical/launchpad/browser/ftests/logintoken-corner-cases.txt 2010-10-18 13:56:04 +0000
@@ -12,8 +12,8 @@
user tried to re-post the form after validating one of their email addresses.
>>> from lp.registry.interfaces.person import IPersonSet
- >>> from canonical.launchpad.interfaces import (
- ... ILoginTokenSet, LoginTokenType)
+ >>> from canonical.launchpad.interfaces.logintoken import ILoginTokenSet
+ >>> from canonical.launchpad.interfaces.authtoken import LoginTokenType
>>> from canonical.launchpad.browser import ValidateEmailView
>>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest
=== modified file 'lib/canonical/launchpad/doc/account.txt'
--- lib/canonical/launchpad/doc/account.txt 2010-10-10 15:39:28 +0000
+++ lib/canonical/launchpad/doc/account.txt 2010-10-18 13:56:04 +0000
@@ -126,8 +126,8 @@
If we add a new guessed email address, it will be included in the
guessed list.
- >>> from canonical.launchpad.interfaces import (
- ... EmailAddressStatus, IEmailAddressSet)
+ >>> from canonical.launchpad.interfaces.emailaddress import EmailAddressStatus
+ >>> from canonical.launchpad.interfaces.emailaddress import IEmailAddressSet
>>> email = getUtility(IEmailAddressSet).new(
... "guessed-email@xxxxxxxxxxx", account=account,
... status=EmailAddressStatus.NEW)
=== modified file 'lib/canonical/launchpad/doc/canonical_url_examples.txt'
--- lib/canonical/launchpad/doc/canonical_url_examples.txt 2010-10-11 16:17:45 +0000
+++ lib/canonical/launchpad/doc/canonical_url_examples.txt 2010-10-18 13:56:04 +0000
@@ -52,8 +52,9 @@
== Persons and Teams ==
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, ICodeOfConductSet, ISignedCodeOfConductSet)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.codeofconduct import ICodeOfConductSet
+ >>> from lp.registry.interfaces.codeofconduct import ISignedCodeOfConductSet
The IPersonSet.
@@ -133,8 +134,8 @@
== Projects groups and products ==
- >>> from canonical.launchpad.interfaces import (
- ... IProjectGroupSet, IProductSet)
+ >>> from lp.registry.interfaces.projectgroup import IProjectGroupSet
+ >>> from lp.registry.interfaces.product import IProductSet
The IProjectGroupSet.
=== modified file 'lib/canonical/launchpad/doc/checkbox-matrix-widget.txt'
--- lib/canonical/launchpad/doc/checkbox-matrix-widget.txt 2010-10-03 15:30:06 +0000
+++ lib/canonical/launchpad/doc/checkbox-matrix-widget.txt 2010-10-18 13:56:04 +0000
@@ -10,8 +10,9 @@
>>> from BeautifulSoup import BeautifulSoup
>>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest
- >>> from canonical.launchpad.interfaces import (
- ... IProduct, IProductSet, License)
+ >>> from lp.registry.interfaces.product import IProduct
+ >>> from lp.registry.interfaces.product import IProductSet
+ >>> from lp.registry.interfaces.product import License
>>> product = getUtility(IProductSet).get(1)
>>> licenses_field = IProduct['licenses'].bind(product)
>>> vtype = licenses_field.value_type
=== modified file 'lib/canonical/launchpad/doc/gpghandler.txt'
--- lib/canonical/launchpad/doc/gpghandler.txt 2010-10-03 15:30:06 +0000
+++ lib/canonical/launchpad/doc/gpghandler.txt 2010-10-18 13:56:04 +0000
@@ -25,8 +25,8 @@
>>> from zope.component import getUtility
>>> from canonical.launchpad.webapp.testing import verifyObject
- >>> from canonical.launchpad.interfaces import (
- ... IGPGHandler, IPymeKey)
+ >>> from canonical.launchpad.interfaces.gpghandler import IGPGHandler
+ >>> from canonical.launchpad.interfaces.gpghandler import IPymeKey
>>> gpghandler = getUtility(IGPGHandler)
-------------------------------------------------------------------------
=== modified file 'lib/canonical/launchpad/doc/message.txt'
--- lib/canonical/launchpad/doc/message.txt 2010-10-09 16:36:22 +0000
+++ lib/canonical/launchpad/doc/message.txt 2010-10-18 13:56:04 +0000
@@ -4,8 +4,9 @@
various parts of launchpad. Currently, it is used by Malone for comments
on bugs. Bugs are linked to Messages via the BugMessage table.
- >>> from canonical.launchpad.interfaces import (
- ... IBugMessageSet, IBugSet, IOpenLaunchBag)
+ >>> from lp.bugs.interfaces.bugmessage import IBugMessageSet
+ >>> from lp.bugs.interfaces.bug import IBugSet
+ >>> from canonical.launchpad.webapp.interfaces import IOpenLaunchBag
>>> login('foo.bar@xxxxxxxxxxxxx')
>>> bugmessageset = getUtility(IBugMessageSet)
>>> bug_one = getUtility(IBugSet).get(1)
=== modified file 'lib/canonical/launchpad/doc/oauth.txt'
--- lib/canonical/launchpad/doc/oauth.txt 2010-10-09 16:36:22 +0000
+++ lib/canonical/launchpad/doc/oauth.txt 2010-10-18 13:56:04 +0000
@@ -13,9 +13,12 @@
>>> from canonical.launchpad.webapp.testing import verifyObject
>>> from canonical.launchpad.webapp.interfaces import (
... AccessLevel, OAuthPermission)
- >>> from canonical.launchpad.interfaces import (
- ... IOAuthAccessToken, IOAuthConsumer, IOAuthConsumerSet,
- ... IOAuthNonce, IOAuthRequestToken, IPersonSet)
+ >>> from canonical.launchpad.interfaces.oauth import IOAuthAccessToken
+ >>> from canonical.launchpad.interfaces.oauth import IOAuthConsumer
+ >>> from canonical.launchpad.interfaces.oauth import IOAuthConsumerSet
+ >>> from canonical.launchpad.interfaces.oauth import IOAuthNonce
+ >>> from canonical.launchpad.interfaces.oauth import IOAuthRequestToken
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> consumer_set = getUtility(IOAuthConsumerSet)
>>> verifyObject(IOAuthConsumerSet, consumer_set)
True
=== modified file 'lib/canonical/launchpad/doc/object-privacy.txt'
--- lib/canonical/launchpad/doc/object-privacy.txt 2010-10-03 15:30:06 +0000
+++ lib/canonical/launchpad/doc/object-privacy.txt 2010-10-18 13:56:04 +0000
@@ -8,8 +8,9 @@
IObjectPrivacy and check its is_private attribute.
>>> from canonical.lazr.interfaces import IObjectPrivacy
- >>> from canonical.launchpad.interfaces import (
- ... IBugSet, IPersonSet, IQuestionSet)
+ >>> from lp.bugs.interfaces.bug import IBugSet
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.answers.interfaces.questioncollection import IQuestionSet
>>> bug = getUtility(IBugSet).get(1)
>>> bug.private
False
=== modified file 'lib/canonical/launchpad/doc/security-proxies.txt'
--- lib/canonical/launchpad/doc/security-proxies.txt 2010-10-17 02:00:18 +0000
+++ lib/canonical/launchpad/doc/security-proxies.txt 2010-10-18 13:56:04 +0000
@@ -45,8 +45,8 @@
XXX: bug 3315
DB schema objects should be comparable correctly when proxied...
- >>> from canonical.launchpad.interfaces import (
- ... SeriesStatus, IDistroSeriesSet)
+ >>> from lp.registry.interfaces.series import SeriesStatus
+ >>> from lp.registry.interfaces.distroseries import IDistroSeriesSet
>>> hoary = getUtility(IDistroSeriesSet).get(3)
>>> print hoary.status.name
DEVELOPMENT
=== modified file 'lib/canonical/launchpad/doc/storm.txt'
--- lib/canonical/launchpad/doc/storm.txt 2010-10-03 15:30:06 +0000
+++ lib/canonical/launchpad/doc/storm.txt 2010-10-18 13:56:04 +0000
@@ -6,9 +6,12 @@
In addition to what Storm provides, we also have some Launchpad
specific Storm tools to cope with our master and slave store arrangement.
- >>> from canonical.launchpad.interfaces import (
- ... EmailAddressStatus, IEmailAddressSet,
- ... IMasterObject, IMasterStore, ISlaveStore, IStore)
+ >>> from canonical.launchpad.interfaces.emailaddress import EmailAddressStatus
+ >>> from canonical.launchpad.interfaces.emailaddress import IEmailAddressSet
+ >>> from canonical.launchpad.interfaces.lpstorm import IMasterObject
+ >>> from canonical.launchpad.interfaces.lpstorm import IMasterStore
+ >>> from canonical.launchpad.interfaces.lpstorm import ISlaveStore
+ >>> from canonical.launchpad.interfaces.lpstorm import IStore
>>> from canonical.launchpad.database import (
... Account, AccountPassword, EmailAddress)
>>> from lp.registry.interfaces.person import IPersonSet
=== modified file 'lib/canonical/launchpad/doc/validation.txt'
--- lib/canonical/launchpad/doc/validation.txt 2010-10-10 15:39:28 +0000
+++ lib/canonical/launchpad/doc/validation.txt 2010-10-18 13:56:04 +0000
@@ -7,9 +7,10 @@
The validate_distrotask() function is used to guarantee that distribution
bugtasks are unique per bug.
- >>> from canonical.launchpad.interfaces import (
- ... IBugSet, IDistributionSet, ISourcePackageNameSet,
- ... validate_distrotask)
+ >>> from lp.bugs.interfaces.bug import IBugSet
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
+ >>> from canonical.launchpad.interfaces import validate_distrotask
>>> bug_two = getUtility(IBugSet).get(2)
>>> debian = getUtility(IDistributionSet).getByName('debian')
>>> mozilla_firefox = getUtility(
@@ -31,8 +32,8 @@
If the bug already has a distribution task with no source package, it's
not possible to add a another one.
- >>> from canonical.launchpad.interfaces import (
- ... CreateBugParams, IDistributionSet)
+ >>> from lp.bugs.interfaces.bug import CreateBugParams
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
>>> login('no-priv@xxxxxxxxxxxxx')
>>> no_priv = getUtility(ILaunchBag).user
=== modified file 'lib/canonical/launchpad/doc/vocabularies.txt'
--- lib/canonical/launchpad/doc/vocabularies.txt 2010-10-09 16:36:22 +0000
+++ lib/canonical/launchpad/doc/vocabularies.txt 2010-10-18 13:56:04 +0000
@@ -10,8 +10,10 @@
>>> from zope.component import getUtility
>>> from canonical.launchpad.ftests import ANONYMOUS, login
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, IOpenLaunchBag, IProductSet, IProjectGroupSet)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from canonical.launchpad.webapp.interfaces import IOpenLaunchBag
+ >>> from lp.registry.interfaces.product import IProductSet
+ >>> from lp.registry.interfaces.projectgroup import IProjectGroupSet
>>> from canonical.database.sqlbase import flush_database_updates
>>> person_set = getUtility(IPersonSet)
>>> product_set = getUtility(IProductSet)
@@ -395,8 +397,8 @@
Bug watches with an email address URL (i.e. starts with "mailto:") are
treated differently.
- >>> from canonical.launchpad.interfaces import (
- ... IBugWatchSet, IBugTrackerSet)
+ >>> from lp.bugs.interfaces.bugwatch import IBugWatchSet
+ >>> from lp.bugs.interfaces.bugtracker import IBugTrackerSet
>>> bug_twelve = getUtility(IBugSet).get(12)
>>> email_bugtracker = getUtility(IBugTrackerSet).getByName('email')
=== modified file 'lib/canonical/launchpad/doc/xmlrpc-authserver.txt'
--- lib/canonical/launchpad/doc/xmlrpc-authserver.txt 2010-10-03 15:30:06 +0000
+++ lib/canonical/launchpad/doc/xmlrpc-authserver.txt 2010-10-18 13:56:04 +0000
@@ -3,8 +3,8 @@
The AuthServer interface is available on the authserver attribute
of our private XMLRPC instance.
- >>> from canonical.launchpad.interfaces import (
- ... IAuthServerApplication, IPrivateApplication)
+ >>> from canonical.launchpad.interfaces.launchpad import IAuthServerApplication
+ >>> from canonical.launchpad.interfaces.launchpad import IPrivateApplication
>>> from canonical.launchpad.webapp.testing import verifyObject
>>> private_root = getUtility(IPrivateApplication)
=== modified file 'lib/canonical/launchpad/interfaces/ftests/validation.txt'
--- lib/canonical/launchpad/interfaces/ftests/validation.txt 2010-10-03 15:30:06 +0000
+++ lib/canonical/launchpad/interfaces/ftests/validation.txt 2010-10-18 13:56:04 +0000
@@ -1,16 +1,17 @@
= Launchpad field validators =
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... CreateBugParams, IOpenLaunchBag, IPersonSet, IProductSet)
+ >>> from lp.bugs.interfaces.bug import CreateBugParams
+ >>> from canonical.launchpad.webapp.interfaces import IOpenLaunchBag
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
== can_be_nominated_for_series ==
This validator is used to check if the bug in the launchbag can be
nominated for the given series.
- >>> from canonical.launchpad.interfaces import (
- ... can_be_nominated_for_series)
+ >>> from canonical.launchpad.interfaces import can_be_nominated_for_series
If we create a new bug, all the target's series can be nominated.
=== modified file 'lib/canonical/launchpad/pagetests/feeds/xx-links.txt'
--- lib/canonical/launchpad/pagetests/feeds/xx-links.txt 2010-10-03 15:30:06 +0000
+++ lib/canonical/launchpad/pagetests/feeds/xx-links.txt 2010-10-18 13:56:04 +0000
@@ -116,8 +116,9 @@
>>> from canonical.database.sqlbase import flush_database_updates
>>> login('foo.bar@xxxxxxxxxxxxx')
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... ILaunchBag, IProductSet, License)
+ >>> from canonical.launchpad.webapp.interfaces import ILaunchBag
+ >>> from lp.registry.interfaces.product import IProductSet
+ >>> from lp.registry.interfaces.product import License
>>> user = getUtility(ILaunchBag).user
>>> getUtility(IProductSet).createProduct(
... user, 'bad-displayname',
=== modified file 'lib/canonical/launchpad/pagetests/oauth/access-token.txt'
--- lib/canonical/launchpad/pagetests/oauth/access-token.txt 2010-10-03 15:30:06 +0000
+++ lib/canonical/launchpad/pagetests/oauth/access-token.txt 2010-10-18 13:56:04 +0000
@@ -6,8 +6,9 @@
# First we create a new request token and review it.
>>> from canonical.launchpad.webapp.interfaces import OAuthPermission
- >>> from canonical.launchpad.interfaces import (
- ... IOAuthConsumerSet, IPersonSet, IProductSet)
+ >>> from canonical.launchpad.interfaces.oauth import IOAuthConsumerSet
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
>>> from zope.component import getUtility
>>> from canonical.launchpad.ftests import login, logout
>>> login('salgado@xxxxxxxxxx')
=== modified file 'lib/canonical/launchpad/pagetests/oauth/managing-tokens.txt'
--- lib/canonical/launchpad/pagetests/oauth/managing-tokens.txt 2010-10-03 15:30:06 +0000
+++ lib/canonical/launchpad/pagetests/oauth/managing-tokens.txt 2010-10-18 13:56:04 +0000
@@ -6,8 +6,9 @@
# Create a request token, but don't convert it to an access token.
>>> from zope.component import getUtility
>>> from canonical.launchpad.webapp.interfaces import OAuthPermission
- >>> from canonical.launchpad.interfaces import (
- ... IOAuthConsumerSet, IPersonSet, IProductSet)
+ >>> from canonical.launchpad.interfaces.oauth import IOAuthConsumerSet
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
>>> login('salgado@xxxxxxxxxx')
>>> token = getUtility(IOAuthConsumerSet).getByKey(
... 'foobar123451432').newRequestToken()
=== modified file 'lib/lp/app/stories/basics/xx-beta-testers-redirection.txt'
--- lib/lp/app/stories/basics/xx-beta-testers-redirection.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/app/stories/basics/xx-beta-testers-redirection.txt 2010-10-18 13:56:04 +0000
@@ -203,8 +203,8 @@
Add Foo Bar to the beta team.
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... ILaunchpadCelebrities, IPersonSet)
+ >>> from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> from canonical.launchpad.ftests import login, logout
>>> login('foo.bar@xxxxxxxxxxxxx')
>>> foo_bar = getUtility(IPersonSet).getByName('name16')
=== modified file 'lib/lp/archiveuploader/tests/nascentupload-announcements.txt'
--- lib/lp/archiveuploader/tests/nascentupload-announcements.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/archiveuploader/tests/nascentupload-announcements.txt 2010-10-18 13:56:04 +0000
@@ -52,8 +52,9 @@
distroseries so that we can upload to it. Also adjust 'changeslist'
address and allow uploads to universe:
- >>> from canonical.launchpad.interfaces import (
- ... SeriesStatus, IDistributionSet, ILibraryFileAliasSet)
+ >>> from lp.registry.interfaces.series import SeriesStatus
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
>>> ubuntu = getUtility(IDistributionSet)['ubuntu']
>>> hoary = ubuntu['hoary']
>>> hoary.status = SeriesStatus.DEVELOPMENT
=== modified file 'lib/lp/archiveuploader/tests/nascentupload-closing-bugs.txt'
--- lib/lp/archiveuploader/tests/nascentupload-closing-bugs.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/archiveuploader/tests/nascentupload-closing-bugs.txt 2010-10-18 13:56:04 +0000
@@ -32,8 +32,9 @@
>>> from canonical.testing.layers import LaunchpadZopelessLayer
>>> from lp.bugs.interfaces.bug import IBugSet
- >>> from canonical.launchpad.interfaces import (
- ... IBugTaskSet, IDistributionSet, IPersonSet)
+ >>> from lp.bugs.interfaces.bugtask import IBugTaskSet
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> login('no-priv@xxxxxxxxxxxxx')
>>> LaunchpadZopelessLayer.switchDbUser('launchpad')
=== modified file 'lib/lp/archiveuploader/tests/nascentupload-packageset.txt'
--- lib/lp/archiveuploader/tests/nascentupload-packageset.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/archiveuploader/tests/nascentupload-packageset.txt 2010-10-18 13:56:04 +0000
@@ -5,9 +5,10 @@
... datadir, getPolicy, mock_logger_quiet)
>>> from canonical.database.sqlbase import commit
>>> from lp.soyuz.enums import ArchivePermissionType
- >>> from canonical.launchpad.interfaces import (
- ... IArchivePermissionSet, IPackagesetSet,
- ... IPersonSet, ISourcePackageNameSet)
+ >>> from lp.soyuz.interfaces.archivepermission import IArchivePermissionSet
+ >>> from lp.soyuz.interfaces.packageset import IPackagesetSet
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
>>> from canonical.testing.layers import LaunchpadZopelessLayer
>>> insecure_policy = getPolicy(
=== modified file 'lib/lp/archiveuploader/tests/nascentupload.txt'
--- lib/lp/archiveuploader/tests/nascentupload.txt 2010-10-14 18:42:19 +0000
+++ lib/lp/archiveuploader/tests/nascentupload.txt 2010-10-18 13:56:04 +0000
@@ -12,8 +12,8 @@
For the purpose of this test, hoary needs to be an open (development)
distroseries so that we can upload to it.
- >>> from canonical.launchpad.interfaces import (
- ... SeriesStatus, IDistributionSet)
+ >>> from lp.registry.interfaces.series import SeriesStatus
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
>>> ubuntu = getUtility(IDistributionSet)['ubuntu']
>>> hoary = ubuntu['hoary']
>>> hoary.status = SeriesStatus.DEVELOPMENT
@@ -814,8 +814,8 @@
False
>>> from canonical.launchpad.webapp.testing import verifyObject
- >>> from canonical.launchpad.interfaces import (
- ... IGPGKey, IPersonSet)
+ >>> from lp.registry.interfaces.gpg import IGPGKey
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> verifyObject(IGPGKey, bar_ok.changes.dsc.signingkey)
True
=== modified file 'lib/lp/archiveuploader/tests/uploadpolicy.txt'
--- lib/lp/archiveuploader/tests/uploadpolicy.txt 2010-10-06 11:46:51 +0000
+++ lib/lp/archiveuploader/tests/uploadpolicy.txt 2010-10-18 13:56:04 +0000
@@ -78,8 +78,8 @@
approve an upload automatically (I.E. move it straight to ACCEPTED
instead of UNAPPROVED)
- >>> from canonical.launchpad.interfaces import (
- ... SeriesStatus, IDistributionSet)
+ >>> from lp.registry.interfaces.series import SeriesStatus
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
>>> ubuntu = getUtility(IDistributionSet)['ubuntu']
>>> hoary = ubuntu['hoary']
=== modified file 'lib/lp/bugs/browser/tests/bug-views.txt'
--- lib/lp/bugs/browser/tests/bug-views.txt 2010-10-14 18:42:19 +0000
+++ lib/lp/bugs/browser/tests/bug-views.txt 2010-10-18 13:56:04 +0000
@@ -27,9 +27,14 @@
comment, of the bug report.
>>> from zope.component import getMultiAdapter, getUtility
- >>> from canonical.launchpad.interfaces import (
- ... BugTaskSearchParams, IDistributionSet, IBugSet, IBugTaskSet,
- ... ILaunchBag, IOpenLaunchBag, IPersonSet, IProductSet)
+ >>> from lp.bugs.interfaces.bugtask import BugTaskSearchParams
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.bugs.interfaces.bug import IBugSet
+ >>> from lp.bugs.interfaces.bugtask import IBugTaskSet
+ >>> from canonical.launchpad.webapp.interfaces import ILaunchBag
+ >>> from canonical.launchpad.webapp.interfaces import IOpenLaunchBag
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
>>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest
>>> launchbag = getUtility(IOpenLaunchBag)
=== modified file 'lib/lp/bugs/browser/tests/buglinktarget-views.txt'
--- lib/lp/bugs/browser/tests/buglinktarget-views.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/bugs/browser/tests/buglinktarget-views.txt 2010-10-18 13:56:04 +0000
@@ -4,8 +4,9 @@
>>> from zope.component import getMultiAdapter
>>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest
- >>> from canonical.launchpad.interfaces import (
- ... IBugLinkTarget, IBugSet, ICveSet)
+ >>> from lp.bugs.interfaces.buglink import IBugLinkTarget
+ >>> from lp.bugs.interfaces.bug import IBugSet
+ >>> from lp.bugs.interfaces.cve import ICveSet
>>> from lazr.lifecycle.event import ObjectModifiedEvent
>>> bugset = getUtility(IBugSet)
=== modified file 'lib/lp/bugs/browser/tests/bugtask-adding-views.txt'
--- lib/lp/bugs/browser/tests/bugtask-adding-views.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/browser/tests/bugtask-adding-views.txt 2010-10-18 13:56:04 +0000
@@ -97,8 +97,8 @@
most likely to get added. Let's take a look how it works for packages,
which can have packaging links that helps us choose the product.
- >>> from canonical.launchpad.interfaces import (
- ... CreateBugParams, IDistributionSet)
+ >>> from lp.bugs.interfaces.bug import CreateBugParams
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
>>> owner = getUtility(ILaunchBag).user
>>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
>>> ubuntu_firefox = ubuntu.getSourcePackage('mozilla-firefox')
=== modified file 'lib/lp/bugs/browser/tests/bugtask-edit-views.txt'
--- lib/lp/bugs/browser/tests/bugtask-edit-views.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/browser/tests/bugtask-edit-views.txt 2010-10-18 13:56:04 +0000
@@ -83,8 +83,8 @@
distribution task already has, an error message will occur. First,
let's add an evolution (Ubuntu) task to bug two.
- >>> from canonical.launchpad.interfaces import (
- ... IBugTaskSet, IDistributionSet)
+ >>> from lp.bugs.interfaces.bugtask import IBugTaskSet
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
>>> bug_two = getUtility(IBugSet).get(2)
>>> ubuntu = getUtility(IDistributionSet).getByName("ubuntu")
>>> ubuntu_evolution = ubuntu.getSourcePackage('evolution')
=== modified file 'lib/lp/bugs/browser/tests/bugtask-search-views.txt'
--- lib/lp/bugs/browser/tests/bugtask-search-views.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/browser/tests/bugtask-search-views.txt 2010-10-18 13:56:04 +0000
@@ -3,8 +3,8 @@
In the 'Bugs' facet of a distribution we can find a list of bugs
reported in that distribution and simple and advanced search forms.
- >>> from canonical.launchpad.interfaces import (
- ... IOpenLaunchBag, IDistributionSet)
+ >>> from canonical.launchpad.webapp.interfaces import IOpenLaunchBag
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
>>> launchbag = getUtility(IOpenLaunchBag)
>>> debian = getUtility(IDistributionSet).getByName('debian')
=== modified file 'lib/lp/bugs/browser/tests/distrosourcepackage-bug-views.txt'
--- lib/lp/bugs/browser/tests/distrosourcepackage-bug-views.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/bugs/browser/tests/distrosourcepackage-bug-views.txt 2010-10-18 13:56:04 +0000
@@ -5,8 +5,8 @@
Simple searching is possible on the distro source package bug view page.
>>> from zope.component import getMultiAdapter, getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, ISourcePackageNameSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
>>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest
>>> debian = getUtility(IDistributionSet).get(3)
=== modified file 'lib/lp/bugs/doc/bug-export.txt'
--- lib/lp/bugs/doc/bug-export.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/bugs/doc/bug-export.txt 2010-10-18 13:56:04 +0000
@@ -25,8 +25,9 @@
... import cElementTree as ET
>>> from cStringIO import StringIO
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IBugSet, IPersonSet, IProductSet)
+ >>> from lp.bugs.interfaces.bug import IBugSet
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
>>> from lp.bugs.scripts.bugexport import (
... serialise_bugtask, export_bugtasks)
=== modified file 'lib/lp/bugs/doc/bug-private-by-default.txt'
--- lib/lp/bugs/doc/bug-private-by-default.txt 2010-10-04 19:50:45 +0000
+++ lib/lp/bugs/doc/bug-private-by-default.txt 2010-10-18 13:56:04 +0000
@@ -4,8 +4,9 @@
(this is enforced by a DB constraint).
>>> from canonical.testing.layers import LaunchpadZopelessLayer
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, CreateBugParams, IProductSet)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.bugs.interfaces.bug import CreateBugParams
+ >>> from lp.registry.interfaces.product import IProductSet
>>> LaunchpadZopelessLayer.switchDbUser('launchpad')
>>> no_priv = getUtility(IPersonSet).getByName('no-priv')
>>> name16 = getUtility(IPersonSet).get(16)
=== modified file 'lib/lp/bugs/doc/bug-reported-acknowledgement.txt'
--- lib/lp/bugs/doc/bug-reported-acknowledgement.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/bug-reported-acknowledgement.txt 2010-10-18 13:56:04 +0000
@@ -7,8 +7,9 @@
>>> login('foo.bar@xxxxxxxxxxxxx')
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, IProjectGroupSet, IProductSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.projectgroup import IProjectGroupSet
+ >>> from lp.registry.interfaces.product import IProductSet
>>> distribution = getUtility(IDistributionSet).getByName('ubuntu')
>>> distribution_source_package = (
=== modified file 'lib/lp/bugs/doc/bug-reporting-guidelines.txt'
--- lib/lp/bugs/doc/bug-reporting-guidelines.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/bug-reporting-guidelines.txt 2010-10-18 13:56:04 +0000
@@ -6,8 +6,9 @@
>>> login('foo.bar@xxxxxxxxxxxxx')
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, IProjectGroupSet, IProductSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.projectgroup import IProjectGroupSet
+ >>> from lp.registry.interfaces.product import IProductSet
>>> distribution = getUtility(IDistributionSet).getByName('ubuntu')
>>> distribution_source_package = (
=== modified file 'lib/lp/bugs/doc/bug-set-status.txt'
--- lib/lp/bugs/doc/bug-set-status.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/bug-set-status.txt 2010-10-18 13:56:04 +0000
@@ -10,8 +10,8 @@
>>> login('no-priv@xxxxxxxxxxxxx')
>>> no_priv = getUtility(IPersonSet).getByName('no-priv')
- >>> from canonical.launchpad.interfaces import (
- ... CreateBugParams, IProductSet)
+ >>> from lp.bugs.interfaces.bug import CreateBugParams
+ >>> from lp.registry.interfaces.product import IProductSet
>>> from lp.bugs.interfaces.bugtask import BugTaskStatus
>>> bug_params = CreateBugParams(
... owner=no_priv, title='Sample bug', comment='This is a sample bug.')
=== modified file 'lib/lp/bugs/doc/bug-tags.txt'
--- lib/lp/bugs/doc/bug-tags.txt 2010-10-11 16:17:45 +0000
+++ lib/lp/bugs/doc/bug-tags.txt 2010-10-18 13:56:04 +0000
@@ -178,8 +178,8 @@
We can search for bugs with some specific tag.
- >>> from canonical.launchpad.interfaces import (
- ... BugTaskSearchParams, IDistributionSet)
+ >>> from lp.bugs.interfaces.bugtask import BugTaskSearchParams
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
>>> from canonical.launchpad.searchbuilder import all
>>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
>>> svg_tasks = ubuntu.searchTasks(
=== modified file 'lib/lp/bugs/doc/bugactivity.txt'
--- lib/lp/bugs/doc/bugactivity.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/bugactivity.txt 2010-10-18 13:56:04 +0000
@@ -22,8 +22,10 @@
>>> from zope.event import notify
>>> from lazr.lifecycle.event import (
... ObjectCreatedEvent, ObjectModifiedEvent)
- >>> from canonical.launchpad.interfaces import (
- ... IUpstreamBugTask, IDistroBugTask, IProductSet, IBugTaskSet)
+ >>> from lp.bugs.interfaces.bugtask import IUpstreamBugTask
+ >>> from lp.bugs.interfaces.bugtask import IDistroBugTask
+ >>> from lp.registry.interfaces.product import IProductSet
+ >>> from lp.bugs.interfaces.bugtask import IBugTaskSet
>>> from lazr.lifecycle.snapshot import Snapshot
>>> user = getUtility(ILaunchBag).user
@@ -67,8 +69,8 @@
>>> from lazr.lifecycle.snapshot import Snapshot
>>> from lp.bugs.interfaces.bugtask import BugTaskStatus
- >>> from canonical.launchpad.interfaces import (
- ... ISourcePackageNameSet, IDistributionSet)
+ >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
>>> mozilla_firefox = getUtility(ISourcePackageNameSet)['mozilla-firefox']
>>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
>>> source_package_assignment = getUtility(IBugTaskSet).createTask(
=== modified file 'lib/lp/bugs/doc/bugattachments.txt'
--- lib/lp/bugs/doc/bugattachments.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/bugs/doc/bugattachments.txt 2010-10-18 13:56:04 +0000
@@ -10,8 +10,10 @@
>>> from canonical.launchpad.ftests import login
>>> login("foo.bar@xxxxxxxxxxxxx")
- >>> from canonical.launchpad.interfaces import (
- ... IBugAttachment, IBugSet, IMessageSet, IPersonSet)
+ >>> from lp.bugs.interfaces.bugattachment import IBugAttachment
+ >>> from lp.bugs.interfaces.bug import IBugSet
+ >>> from canonical.launchpad.interfaces.message import IMessageSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> bugset = getUtility(IBugSet)
>>> bug_one = bugset.get(1)
>>> bug_one.attachments.count()
@@ -382,8 +384,9 @@
We can search for attachment of a specific types:
- >>> from canonical.launchpad.interfaces import (
- ... BugAttachmentType, BugTaskSearchParams, IBugTaskSet)
+ >>> from lp.bugs.interfaces.bugattachment import BugAttachmentType
+ >>> from lp.bugs.interfaces.bugtask import BugTaskSearchParams
+ >>> from lp.bugs.interfaces.bugtask import IBugTaskSet
>>> bugtaskset = getUtility(IBugTaskSet)
>>> attachmenttype = BugAttachmentType.UNSPECIFIED
>>> params = BugTaskSearchParams(attachmenttype=attachmenttype, user=None)
=== modified file 'lib/lp/bugs/doc/bugnotification-email.txt'
--- lib/lp/bugs/doc/bugnotification-email.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/bugnotification-email.txt 2010-10-18 13:56:04 +0000
@@ -28,8 +28,10 @@
examples that follow:
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IBugDelta, IBugSet, IEmailAddressSet, IPersonSet)
+ >>> from lp.bugs.interfaces.bug import IBugDelta
+ >>> from lp.bugs.interfaces.bug import IBugSet
+ >>> from canonical.launchpad.interfaces.emailaddress import IEmailAddressSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> from lp.bugs.adapters.bugdelta import BugDelta
= Filing a bug =
@@ -280,8 +282,9 @@
We use a BugTaskDelta to represent changes to a BugTask.
- >>> from canonical.launchpad.interfaces import (
- ... BugTaskStatus, IBugTaskDelta, IBugTaskSet)
+ >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
+ >>> from lp.bugs.interfaces.bugtask import IBugTaskDelta
+ >>> from lp.bugs.interfaces.bugtask import IBugTaskSet
>>> from lp.bugs.model.bugtask import BugTaskDelta
>>> from canonical.launchpad.webapp.testing import verifyObject
>>> example_bug_task = factory.makeBugTask()
=== modified file 'lib/lp/bugs/doc/bugnotification-sending.txt'
--- lib/lp/bugs/doc/bugnotification-sending.txt 2010-10-11 16:17:45 +0000
+++ lib/lp/bugs/doc/bugnotification-sending.txt 2010-10-18 13:56:04 +0000
@@ -374,8 +374,8 @@
We will also need a fresh new bug.
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, CreateBugParams)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.bugs.interfaces.bug import CreateBugParams
>>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
>>> description = getUtility(IMessageSet).fromText(
... 'subject', 'a description of the bug.', sample_person,
=== modified file 'lib/lp/bugs/doc/bugnotifications.txt'
--- lib/lp/bugs/doc/bugnotifications.txt 2010-10-10 15:39:28 +0000
+++ lib/lp/bugs/doc/bugnotifications.txt 2010-10-18 13:56:04 +0000
@@ -26,9 +26,12 @@
>>> from zope.event import notify
>>> from lazr.lifecycle.event import (
... ObjectModifiedEvent, ObjectCreatedEvent)
- >>> from canonical.launchpad.interfaces import (
- ... CreateBugParams, IDistributionSet, IDistroSeriesSet, IPersonSet,
- ... IProductSet, ISourcePackageNameSet)
+ >>> from lp.bugs.interfaces.bug import CreateBugParams
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.distroseries import IDistroSeriesSet
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
+ >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
>>> bug_submitter = getUtility(IPersonSet).get(12)
>>> firefox = getUtility(IProductSet).get(4)
@@ -207,8 +210,8 @@
Let's demonstrate a notification email where Sample Person marks a
task Fixed, and assigns himself to it.
- >>> from canonical.launchpad.interfaces import (
- ... BugTaskStatus, IDistroBugTask)
+ >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
+ >>> from lp.bugs.interfaces.bugtask import IDistroBugTask
>>> from lazr.lifecycle.snapshot import Snapshot
>>> bugtask_before_modification = Snapshot(
=== modified file 'lib/lp/bugs/doc/bugsubscription.txt'
--- lib/lp/bugs/doc/bugsubscription.txt 2010-10-15 14:26:57 +0000
+++ lib/lp/bugs/doc/bugsubscription.txt 2010-10-18 13:56:04 +0000
@@ -43,8 +43,10 @@
Let's create a new bug to demonstrate how direct and indirect
subscriptions work.
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, ILaunchBag, IPersonSet, CreateBugParams)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from canonical.launchpad.webapp.interfaces import ILaunchBag
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.bugs.interfaces.bug import CreateBugParams
>>> ubuntu = getUtility(IDistributionSet).getByName("ubuntu")
>>> personset = getUtility(IPersonSet)
=== modified file 'lib/lp/bugs/doc/bugtarget.txt'
--- lib/lp/bugs/doc/bugtarget.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/bugs/doc/bugtarget.txt 2010-10-18 13:56:04 +0000
@@ -12,8 +12,9 @@
target (such as in filterable e-mail messages).
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IBugTarget, IDistributionSet, IProductSet)
+ >>> from lp.bugs.interfaces.bugtarget import IBugTarget
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.product import IProductSet
>>> distroset = getUtility(IDistributionSet)
>>> debian = distroset.getByName("debian")
>>> debian_firefox = debian.getSourcePackage("mozilla-firefox")
=== modified file 'lib/lp/bugs/doc/bugtask-expiration.txt'
--- lib/lp/bugs/doc/bugtask-expiration.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/bugtask-expiration.txt 2010-10-18 13:56:04 +0000
@@ -32,8 +32,8 @@
status. It also requires specifying the user that is doing the search.
>>> from storm.store import Store
- >>> from canonical.launchpad.interfaces import (
- ... BugTaskStatus, IBugTaskSet)
+ >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
+ >>> from lp.bugs.interfaces.bugtask import IBugTaskSet
>>> bugtaskset = getUtility(IBugTaskSet)
>>> expirable_bugtasks = bugtaskset.findExpirableBugTasks()
@@ -64,8 +64,9 @@
can_expire avoid an expensive db, in the case where we can easily tell
that no bug tasks can be expired.
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, IPersonSet, IProductSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
>>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
>>> jokosher = getUtility(IProductSet).getByName('jokosher')
>>> sample_person = getUtility(IPersonSet).getByEmail(
=== modified file 'lib/lp/bugs/doc/bugtask-find-similar.txt'
--- lib/lp/bugs/doc/bugtask-find-similar.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/bugtask-find-similar.txt 2010-10-18 13:56:04 +0000
@@ -11,8 +11,9 @@
It doesn't make much sense to find bugs similar to an empty string, so
no results will be returned.
- >>> from canonical.launchpad.interfaces import (
- ... IBugTaskSet, IPersonSet, IProductSet)
+ >>> from lp.bugs.interfaces.bugtask import IBugTaskSet
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
>>> firefox = getUtility(IProductSet).getByName('firefox')
>>> sample_person = getUtility(IPersonSet).getByEmail('test@xxxxxxxxxxxxx')
>>> similar_bugs = getUtility(IBugTaskSet).findSimilar(
=== modified file 'lib/lp/bugs/doc/bugtask-retrieval.txt'
--- lib/lp/bugs/doc/bugtask-retrieval.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/bugs/doc/bugtask-retrieval.txt 2010-10-18 13:56:04 +0000
@@ -5,8 +5,8 @@
implementation of IBugTaskSet, allowing retrieval of any bug task in
Launchpad. We'll use this implementation for demonstration purposes:
- >>> from canonical.launchpad.interfaces import (
- ... IBugTask, IBugTaskSet)
+ >>> from lp.bugs.interfaces.bugtask import IBugTask
+ >>> from lp.bugs.interfaces.bugtask import IBugTaskSet
>>> from lp.app.errors import NotFoundError
>>> task_set = getUtility(IBugTaskSet)
=== modified file 'lib/lp/bugs/doc/bugtask-search.txt'
--- lib/lp/bugs/doc/bugtask-search.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/bugtask-search.txt 2010-10-18 13:56:04 +0000
@@ -4,8 +4,8 @@
method, but they all delegate the search to IBugTaskSet.search(). That
method accepts a single parameter; an BugTaskSearchParams instance.
- >>> from canonical.launchpad.interfaces import (
- ... BugTaskSearchParams, IBugTaskSet)
+ >>> from lp.bugs.interfaces.bugtask import BugTaskSearchParams
+ >>> from lp.bugs.interfaces.bugtask import IBugTaskSet
>>> bugtask_set = getUtility(IBugTaskSet)
>>> all_public = BugTaskSearchParams(user=None)
>>> found_bugtasks = bugtask_set.search(all_public)
@@ -293,8 +293,8 @@
Add an Ubuntu bugtask for a bug that is confirmed upstream.
- >>> from canonical.launchpad.interfaces import (
- ... BugTaskImportance, BugTaskStatus)
+ >>> from lp.bugs.interfaces.bugtask import BugTaskImportance
+ >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
>>> from lp.bugs.tests.test_bugtask_1 import (
... BugTaskSearchBugsElsewhereTest)
>>> def bugTaskInfo(bugtask):
@@ -736,9 +736,10 @@
It's possible to search for bugs with an attachment of a certain type.
>>> from StringIO import StringIO
- >>> from canonical.launchpad.interfaces import (
- ... BugAttachmentType, IBugAttachmentSet, ILibraryFileAliasSet,
- ... IMessageSet)
+ >>> from lp.bugs.interfaces.bugattachment import BugAttachmentType
+ >>> from lp.bugs.interfaces.bugattachment import IBugAttachmentSet
+ >>> from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
+ >>> from canonical.launchpad.interfaces.message import IMessageSet
>>> product = factory.makeProduct()
>>> patch_bug = factory.makeBug(
... product=product)
=== modified file 'lib/lp/bugs/doc/bugtask-status-workflow.txt'
--- lib/lp/bugs/doc/bugtask-status-workflow.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/bugtask-status-workflow.txt 2010-10-18 13:56:04 +0000
@@ -11,8 +11,9 @@
a new bug to work with:
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, ILaunchBag, CreateBugParams)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from canonical.launchpad.webapp.interfaces import ILaunchBag
+ >>> from lp.bugs.interfaces.bug import CreateBugParams
>>> login("foo.bar@xxxxxxxxxxxxx")
>>> foobar = getUtility(ILaunchBag).user
=== modified file 'lib/lp/bugs/doc/bugtask.txt'
--- lib/lp/bugs/doc/bugtask.txt 2010-10-10 15:39:28 +0000
+++ lib/lp/bugs/doc/bugtask.txt 2010-10-18 13:56:04 +0000
@@ -41,8 +41,8 @@
Next, we need to grab some values to provide for importance and status.
- >>> from canonical.launchpad.interfaces import (
- ... BugTaskImportance, BugTaskStatus)
+ >>> from lp.bugs.interfaces.bugtask import BugTaskImportance
+ >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
>>> STATUS_NEW = BugTaskStatus.NEW
>>> STATUS_CONFIRMED = BugTaskStatus.CONFIRMED
>>> STATUS_FIXRELEASED = BugTaskStatus.FIXRELEASED
=== modified file 'lib/lp/bugs/doc/bugtracker.txt'
--- lib/lp/bugs/doc/bugtracker.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/bugtracker.txt 2010-10-18 13:56:04 +0000
@@ -139,8 +139,8 @@
bugtracker it will use make_bugtracker_name() to generate a name for the
bug tracker.
- >>> from canonical.launchpad.interfaces import (
- ... BugTrackerType, IPersonSet)
+ >>> from lp.bugs.interfaces.bugtracker import BugTrackerType
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> sample_person = getUtility(IPersonSet).getByEmail(
... 'test@xxxxxxxxxxxxx')
>>> a_bugtracker = bugtracker_set.ensureBugTracker(
=== modified file 'lib/lp/bugs/doc/bugwatch.txt'
--- lib/lp/bugs/doc/bugwatch.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/bugwatch.txt 2010-10-18 13:56:04 +0000
@@ -59,8 +59,9 @@
Watches of Email Address bugtrackers are slightly different: the `url`
property is always the same as the bugtracker baseurl property.
- >>> from canonical.launchpad.interfaces import (
- ... IBugSet, IBugTrackerSet, IPersonSet)
+ >>> from lp.bugs.interfaces.bug import IBugSet
+ >>> from lp.bugs.interfaces.bugtracker import IBugTrackerSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> bugtrackerset = getUtility(IBugTrackerSet)
>>> email_bugtracker = bugtrackerset['email']
@@ -417,9 +418,11 @@
>>> from zope.component import getUtility
>>> from canonical.database.sqlbase import flush_database_updates
- >>> from canonical.launchpad.interfaces import (
- ... CreateBugParams, BugTrackerType, IBugTaskSet,
- ... IBugTrackerSet, IDistributionSet)
+ >>> from lp.bugs.interfaces.bug import CreateBugParams
+ >>> from lp.bugs.interfaces.bugtracker import BugTrackerType
+ >>> from lp.bugs.interfaces.bugtask import IBugTaskSet
+ >>> from lp.bugs.interfaces.bugtracker import IBugTrackerSet
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
>>> ubuntu = getUtility(IDistributionSet).get(1)
>>> firefox = ubuntu.getSourcePackage('mozilla-firefox')
=== modified file 'lib/lp/bugs/doc/bugzilla-import.txt'
--- lib/lp/bugs/doc/bugzilla-import.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/bugs/doc/bugzilla-import.txt 2010-10-18 13:56:04 +0000
@@ -106,8 +106,9 @@
>>> from zope.component import getUtility
>>> from canonical.launchpad.ftests import login
- >>> from canonical.launchpad.interfaces import (
- ... IBugSet, ILaunchpadCelebrities, IPersonSet)
+ >>> from lp.bugs.interfaces.bug import IBugSet
+ >>> from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> from lp.bugs.scripts import bugzilla
Get a reference to the Ubuntu bug tracker, and log in:
=== modified file 'lib/lp/bugs/doc/checkwatches.txt'
--- lib/lp/bugs/doc/checkwatches.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/checkwatches.txt 2010-10-18 13:56:04 +0000
@@ -106,12 +106,11 @@
>>> from datetime import datetime
>>> from pytz import utc
>>> from lp.bugs.model.bugtracker import BugTracker
- >>> from canonical.launchpad.interfaces import (
- ... BugTrackerType, IBugSet)
+ >>> from lp.bugs.interfaces.bugtracker import BugTrackerType
+ >>> from lp.bugs.interfaces.bug import IBugSet
>>> from lp.bugs.scripts.checkwatches import (
... CheckwatchesMaster)
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet)
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> sample_person = getUtility(IPersonSet).getByEmail(
... 'test@xxxxxxxxxxxxx')
=== modified file 'lib/lp/bugs/doc/externalbugtracker-bug-imports.txt'
--- lib/lp/bugs/doc/externalbugtracker-bug-imports.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/externalbugtracker-bug-imports.txt 2010-10-18 13:56:04 +0000
@@ -24,8 +24,8 @@
... def getBugTargetName(self, remote_bug):
... return self._bugs[remote_bug]['package']
- >>> from canonical.launchpad.interfaces import (
- ... BugTrackerType, IDistributionSet)
+ >>> from lp.bugs.interfaces.bugtracker import BugTrackerType
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
>>> from lp.bugs.tests.externalbugtracker import (
... new_bugtracker)
>>> bugtracker = new_bugtracker(BugTrackerType.BUGZILLA)
=== modified file 'lib/lp/bugs/doc/externalbugtracker-bugzilla.txt'
--- lib/lp/bugs/doc/externalbugtracker-bugzilla.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/externalbugtracker-bugzilla.txt 2010-10-18 13:56:04 +0000
@@ -430,8 +430,9 @@
Let's add a handful of watches:
- >>> from canonical.launchpad.interfaces import (
- ... IBugSet, IBugWatchSet, IPersonSet)
+ >>> from lp.bugs.interfaces.bug import IBugSet
+ >>> from lp.bugs.interfaces.bugwatch import IBugWatchSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> sample_person = getUtility(IPersonSet).getByEmail(
... 'test@xxxxxxxxxxxxx')
>>> bug_one = getUtility(IBugSet).get(1)
=== modified file 'lib/lp/bugs/doc/externalbugtracker-comment-imports.txt'
--- lib/lp/bugs/doc/externalbugtracker-comment-imports.txt 2010-10-04 19:50:45 +0000
+++ lib/lp/bugs/doc/externalbugtracker-comment-imports.txt 2010-10-18 13:56:04 +0000
@@ -10,9 +10,13 @@
>>> from canonical.config import config
>>> from lp.bugs.tests.externalbugtracker import (
... new_bugtracker)
- >>> from canonical.launchpad.interfaces import (
- ... BugTrackerType, CreateBugParams, IBugMessageSet,
- ... IBugWatchSet, IMessageSet, IPersonSet, IProductSet)
+ >>> from lp.bugs.interfaces.bugtracker import BugTrackerType
+ >>> from lp.bugs.interfaces.bug import CreateBugParams
+ >>> from lp.bugs.interfaces.bugmessage import IBugMessageSet
+ >>> from lp.bugs.interfaces.bugwatch import IBugWatchSet
+ >>> from canonical.launchpad.interfaces.message import IMessageSet
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
>>> from canonical.testing.layers import LaunchpadZopelessLayer
>>> bug_tracker = new_bugtracker(BugTrackerType.BUGZILLA)
@@ -41,8 +45,7 @@
>>> from lp.bugs.externalbugtracker import (
... ExternalBugTracker)
- >>> from canonical.launchpad.interfaces import (
- ... ISupportsCommentImport)
+ >>> from lp.bugs.interfaces.externalbugtracker import ISupportsCommentImport
>>> class CommentImportingExternalBugTracker(ExternalBugTracker):
... implements(ISupportsCommentImport)
...
=== modified file 'lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt'
--- lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt 2010-10-04 19:50:45 +0000
+++ lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt 2010-10-18 13:56:04 +0000
@@ -10,9 +10,13 @@
>>> from canonical.config import config
>>> from lp.bugs.tests.externalbugtracker import (
... new_bugtracker)
- >>> from canonical.launchpad.interfaces import (
- ... BugTrackerType, CreateBugParams, IBugMessageSet,
- ... IBugWatchSet, IMessageSet, IPersonSet, IProductSet)
+ >>> from lp.bugs.interfaces.bugtracker import BugTrackerType
+ >>> from lp.bugs.interfaces.bug import CreateBugParams
+ >>> from lp.bugs.interfaces.bugmessage import IBugMessageSet
+ >>> from lp.bugs.interfaces.bugwatch import IBugWatchSet
+ >>> from canonical.launchpad.interfaces.message import IMessageSet
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
>>> from canonical.testing.layers import LaunchpadZopelessLayer
>>> bug_tracker = new_bugtracker(BugTrackerType.TRAC)
@@ -46,8 +50,7 @@
an example ExternalBugTracker that implements the
ISupportsCommentPushing interface.
- >>> from canonical.launchpad.interfaces import (
- ... ISupportsCommentPushing)
+ >>> from lp.bugs.interfaces.externalbugtracker import ISupportsCommentPushing
>>> from lp.bugs.externalbugtracker import (
... ExternalBugTracker)
@@ -187,8 +190,7 @@
from the remote bugtracker. To demonstrate this, we need to create an
example ExternalBugTracker that does comment importing.
- >>> from canonical.launchpad.interfaces import (
- ... ISupportsCommentImport)
+ >>> from lp.bugs.interfaces.externalbugtracker import ISupportsCommentImport
>>> class CommentImportingExternalBugTracker(
... CommentPushingExternalBugTracker):
... implements(ISupportsCommentImport)
=== modified file 'lib/lp/bugs/doc/externalbugtracker-debbugs.txt'
--- lib/lp/bugs/doc/externalbugtracker-debbugs.txt 2010-10-11 16:17:45 +0000
+++ lib/lp/bugs/doc/externalbugtracker-debbugs.txt 2010-10-18 13:56:04 +0000
@@ -348,8 +348,8 @@
>>> from lp.bugs.externalbugtracker import (
... get_external_bugtracker)
- >>> from canonical.launchpad.interfaces import (
- ... BugTrackerType, ISupportsCommentImport)
+ >>> from lp.bugs.interfaces.bugtracker import BugTrackerType
+ >>> from lp.bugs.interfaces.externalbugtracker import ISupportsCommentImport
>>> from lp.bugs.tests.externalbugtracker import (
... new_bugtracker)
>>> external_debbugs = get_external_bugtracker(
@@ -438,8 +438,8 @@
Message. It requires a Person instance to be used as the Message's
owner, so we'll turn Teun Vink into a Person.
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, PersonCreationRationale)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.person import PersonCreationRationale
>>> poster = getUtility(IPersonSet).ensurePerson(
... poster_email, poster_name, PersonCreationRationale.BUGIMPORT,
... comment='when importing comments for %s.' % bug_watch.title)
=== modified file 'lib/lp/bugs/doc/externalbugtracker-emailaddress.txt'
--- lib/lp/bugs/doc/externalbugtracker-emailaddress.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/externalbugtracker-emailaddress.txt 2010-10-18 13:56:04 +0000
@@ -33,8 +33,9 @@
>>> from zope.component import getUtility
>>> from canonical.launchpad.webapp.testing import verifyObject
- >>> from canonical.launchpad.interfaces import (
- ... IBugTracker, IBugTrackerSet, IPersonSet)
+ >>> from lp.bugs.interfaces.bugtracker import IBugTracker
+ >>> from lp.bugs.interfaces.bugtracker import IBugTrackerSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> sample_person = getUtility(IPersonSet).getByEmail(
... 'test@xxxxxxxxxxxxx')
=== modified file 'lib/lp/bugs/doc/externalbugtracker-mantis.txt'
--- lib/lp/bugs/doc/externalbugtracker-mantis.txt 2010-10-11 16:17:45 +0000
+++ lib/lp/bugs/doc/externalbugtracker-mantis.txt 2010-10-18 13:56:04 +0000
@@ -13,8 +13,8 @@
>>> from lp.bugs.externalbugtracker import Mantis
>>> from lp.bugs.tests.externalbugtracker import (
... new_bugtracker)
- >>> from canonical.launchpad.interfaces import (
- ... BugTrackerType, IExternalBugTracker)
+ >>> from lp.bugs.interfaces.bugtracker import BugTrackerType
+ >>> from lp.bugs.interfaces.externalbugtracker import IExternalBugTracker
>>> from canonical.launchpad.webapp.testing import verifyObject
>>> alsa_mantis = Mantis('http://example.com/')
=== modified file 'lib/lp/bugs/doc/externalbugtracker-roundup.txt'
--- lib/lp/bugs/doc/externalbugtracker-roundup.txt 2010-10-11 16:17:45 +0000
+++ lib/lp/bugs/doc/externalbugtracker-roundup.txt 2010-10-18 13:56:04 +0000
@@ -11,8 +11,8 @@
implements IExternalBugTracker.
>>> from lp.bugs.externalbugtracker import Roundup
- >>> from canonical.launchpad.interfaces import (
- ... BugTrackerType, IExternalBugTracker)
+ >>> from lp.bugs.interfaces.bugtracker import BugTrackerType
+ >>> from lp.bugs.interfaces.externalbugtracker import IExternalBugTracker
>>> from lp.bugs.tests.externalbugtracker import (
... new_bugtracker)
>>> from canonical.launchpad.webapp.testing import verifyObject
=== modified file 'lib/lp/bugs/doc/externalbugtracker-rt.txt'
--- lib/lp/bugs/doc/externalbugtracker-rt.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/externalbugtracker-rt.txt 2010-10-18 13:56:04 +0000
@@ -11,8 +11,8 @@
>>> from lp.bugs.externalbugtracker import (
... RequestTracker)
- >>> from canonical.launchpad.interfaces import (
- ... BugTrackerType, IExternalBugTracker)
+ >>> from lp.bugs.interfaces.bugtracker import BugTrackerType
+ >>> from lp.bugs.interfaces.externalbugtracker import IExternalBugTracker
>>> from lp.bugs.tests.externalbugtracker import (
... new_bugtracker)
>>> from canonical.launchpad.webapp.testing import verifyObject
@@ -155,8 +155,9 @@
First, we create some bug watches to test with. Example.com hosts an RT
instance which has several bugs that we wish to watch:
- >>> from canonical.launchpad.interfaces import (
- ... IBugSet, IBugWatchSet, IPersonSet)
+ >>> from lp.bugs.interfaces.bug import IBugSet
+ >>> from lp.bugs.interfaces.bugwatch import IBugWatchSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> from lp.bugs.tests.externalbugtracker import (
... print_bugwatches)
=== modified file 'lib/lp/bugs/doc/externalbugtracker-sourceforge.txt'
--- lib/lp/bugs/doc/externalbugtracker-sourceforge.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/externalbugtracker-sourceforge.txt 2010-10-18 13:56:04 +0000
@@ -12,8 +12,8 @@
>>> from lp.bugs.externalbugtracker import (
... SourceForge)
- >>> from canonical.launchpad.interfaces import (
- ... BugTrackerType, IExternalBugTracker)
+ >>> from lp.bugs.interfaces.bugtracker import BugTrackerType
+ >>> from lp.bugs.interfaces.externalbugtracker import IExternalBugTracker
>>> from canonical.launchpad.webapp.testing import verifyObject
>>> verifyObject(IExternalBugTracker,
... SourceForge('http://example.com'))
=== modified file 'lib/lp/bugs/doc/externalbugtracker-trac-lp-plugin.txt'
--- lib/lp/bugs/doc/externalbugtracker-trac-lp-plugin.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/externalbugtracker-trac-lp-plugin.txt 2010-10-18 13:56:04 +0000
@@ -338,8 +338,10 @@
We also need an example Bug, BugTracker and BugWatch.
>>> from canonical.database.sqlbase import commit
- >>> from canonical.launchpad.interfaces import (
- ... BugTrackerType, CreateBugParams, IPersonSet, IProductSet)
+ >>> from lp.bugs.interfaces.bugtracker import BugTrackerType
+ >>> from lp.bugs.interfaces.bug import CreateBugParams
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
>>> from lp.bugs.tests.externalbugtracker import (
... new_bugtracker)
=== modified file 'lib/lp/bugs/doc/externalbugtracker-trac.txt'
--- lib/lp/bugs/doc/externalbugtracker-trac.txt 2010-10-11 16:17:45 +0000
+++ lib/lp/bugs/doc/externalbugtracker-trac.txt 2010-10-18 13:56:04 +0000
@@ -13,8 +13,8 @@
>>> from lp.bugs.externalbugtracker import Trac
>>> from lp.bugs.tests.externalbugtracker import (
... new_bugtracker)
- >>> from canonical.launchpad.interfaces import (
- ... BugTrackerType, IExternalBugTracker)
+ >>> from lp.bugs.interfaces.bugtracker import BugTrackerType
+ >>> from lp.bugs.interfaces.externalbugtracker import IExternalBugTracker
>>> from canonical.launchpad.webapp.testing import verifyObject
>>> trac = Trac('http://example.com/')
>>> verifyObject(IExternalBugTracker, trac)
=== modified file 'lib/lp/bugs/doc/hasbugs.txt'
--- lib/lp/bugs/doc/hasbugs.txt 2010-10-10 15:39:28 +0000
+++ lib/lp/bugs/doc/hasbugs.txt 2010-10-18 13:56:04 +0000
@@ -30,8 +30,9 @@
>>> login("foo.bar@xxxxxxxxxxxxx")
- >>> from canonical.launchpad.interfaces import (
- ... BugTaskImportance, BugTaskStatus, IBugTaskSet)
+ >>> from lp.bugs.interfaces.bugtask import BugTaskImportance
+ >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
+ >>> from lp.bugs.interfaces.bugtask import IBugTaskSet
>>> bug_one_in_debian_firefox = getUtility(IBugTaskSet).get(4)
>>> bug_two_in_debian_firefox = getUtility(IBugTaskSet).get(5)
=== modified file 'lib/lp/bugs/doc/malone-karma.txt'
--- lib/lp/bugs/doc/malone-karma.txt 2010-10-10 15:39:28 +0000
+++ lib/lp/bugs/doc/malone-karma.txt 2010-10-18 13:56:04 +0000
@@ -2,8 +2,10 @@
import some stuff and define a function to help us make the
documentation cleaner:
- >>> from canonical.launchpad.interfaces import (
- ... IBugSet, IDistributionSet, IKarmaActionSet, IPersonSet)
+ >>> from lp.bugs.interfaces.bug import IBugSet
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.karma import IKarmaActionSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> foo_bar = getUtility(IPersonSet).getByEmail('foo.bar@xxxxxxxxxxxxx')
Setup an event listener to help ensure karma is assigned when it should.
@@ -70,8 +72,8 @@
Mark a bug task as fixed:
- >>> from canonical.launchpad.interfaces import (
- ... BugTaskStatus, IDistroBugTask)
+ >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
+ >>> from lp.bugs.interfaces.bugtask import IDistroBugTask
>>> bugtask = bug.bugtasks[0]
>>> old_bugtask = Snapshot(bugtask, providing=IDistroBugTask)
>>> bugtask.transitionToStatus(
=== modified file 'lib/lp/bugs/doc/malone-xmlrpc.txt'
--- lib/lp/bugs/doc/malone-xmlrpc.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/malone-xmlrpc.txt 2010-10-18 13:56:04 +0000
@@ -233,8 +233,8 @@
for authentication with external bug trackers.
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IPrivateMaloneApplication, IPrivateApplication)
+ >>> from canonical.launchpad.interfaces.launchpad import IPrivateMaloneApplication
+ >>> from canonical.launchpad.interfaces.launchpad import IPrivateApplication
>>> from canonical.launchpad.webapp.testing import verifyObject
>>> private_root = getUtility(IPrivateApplication)
@@ -246,8 +246,8 @@
the ID of the new LoginToken.
>>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest
- >>> from canonical.launchpad.interfaces import (
- ... IExternalBugTrackerTokenAPI, ILoginTokenSet)
+ >>> from lp.bugs.interfaces.externalbugtracker import IExternalBugTrackerTokenAPI
+ >>> from canonical.launchpad.interfaces.logintoken import ILoginTokenSet
>>> from lp.bugs.xmlrpc.bug import (
... ExternalBugTrackerTokenAPI)
=== modified file 'lib/lp/bugs/doc/official-bug-tags.txt'
--- lib/lp/bugs/doc/official-bug-tags.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/doc/official-bug-tags.txt 2010-10-18 13:56:04 +0000
@@ -3,8 +3,8 @@
Distributions and products can define official bug tags.
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, IProductSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.product import IProductSet
>>> from canonical.launchpad.webapp.interfaces import (
... IStoreSelector, MAIN_STORE, DEFAULT_FLAVOR)
>>> from lp.bugs.model.bugtarget import OfficialBugTag
=== modified file 'lib/lp/bugs/stories/bug-privacy/40-unsubscribe-from-private-bug.txt'
--- lib/lp/bugs/stories/bug-privacy/40-unsubscribe-from-private-bug.txt 2010-10-04 20:46:55 +0000
+++ lib/lp/bugs/stories/bug-privacy/40-unsubscribe-from-private-bug.txt 2010-10-18 13:56:04 +0000
@@ -1,9 +1,10 @@
First, some setup. Find out what the latest [private] bug reported on
Ubuntu evolution is, so we can avoid hardcoding its ID here:
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, BugTaskSearchParams, ILaunchBag,
- ... ISourcePackageNameSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.bugs.interfaces.bugtask import BugTaskSearchParams
+ >>> from canonical.launchpad.webapp.interfaces import ILaunchBag
+ >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
>>> from zope.component import getUtility
>>> from canonical.launchpad.ftests import login, logout
=== modified file 'lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt'
--- lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt 2010-10-18 13:56:04 +0000
@@ -39,8 +39,9 @@
>>> from zope.component import getUtility
>>> from canonical.launchpad.ftests import login, logout, syncUpdate
- >>> from canonical.launchpad.interfaces import (
- ... BugTaskStatus, IBugSet, ILaunchBag)
+ >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
+ >>> from lp.bugs.interfaces.bug import IBugSet
+ >>> from canonical.launchpad.webapp.interfaces import ILaunchBag
>>> login("foo.bar@xxxxxxxxxxxxx")
=== modified file 'lib/lp/bugs/stories/bugs/xx-front-page-bug-lists.txt'
--- lib/lp/bugs/stories/bugs/xx-front-page-bug-lists.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/bugs/stories/bugs/xx-front-page-bug-lists.txt 2010-10-18 13:56:04 +0000
@@ -9,8 +9,9 @@
>>> from zope.component import getUtility
>>> from canonical.launchpad.ftests import login, logout
>>> import transaction
- >>> from canonical.launchpad.interfaces import (
- ... BugTaskImportance, BugTaskStatus, ILaunchBag)
+ >>> from lp.bugs.interfaces.bugtask import BugTaskImportance
+ >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
+ >>> from canonical.launchpad.webapp.interfaces import ILaunchBag
>>> login('foo.bar@xxxxxxxxxxxxx')
>>> bigfixer = factory.makeProduct(name='bigfixer')
>>> for bug_x in range(1, 11):
=== modified file 'lib/lp/bugs/stories/bugtask-management/xx-bug-importance-change.txt'
--- lib/lp/bugs/stories/bugtask-management/xx-bug-importance-change.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/bugs/stories/bugtask-management/xx-bug-importance-change.txt 2010-10-18 13:56:04 +0000
@@ -23,8 +23,9 @@
>>> from zope.component import getUtility
>>> from canonical.launchpad.ftests import ANONYMOUS, login, logout
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, IProductSet, IDistributionSet)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
>>> login("foo.bar@xxxxxxxxxxxxx")
=== modified file 'lib/lp/bugs/stories/bugtask-searches/xx-listing-basics.txt'
--- lib/lp/bugs/stories/bugtask-searches/xx-listing-basics.txt 2010-10-06 18:27:57 +0000
+++ lib/lp/bugs/stories/bugtask-searches/xx-listing-basics.txt 2010-10-18 13:56:04 +0000
@@ -233,8 +233,9 @@
Patches also appear as badges in bug listings.
>>> from canonical.launchpad.ftests import login, logout
- >>> from canonical.launchpad.interfaces import (
- ... IBugSet, IMessageSet, IPersonSet)
+ >>> from lp.bugs.interfaces.bug import IBugSet
+ >>> from canonical.launchpad.interfaces.message import IMessageSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> from zope.component import getUtility
>>> from StringIO import StringIO
>>> import transaction
=== modified file 'lib/lp/bugs/stories/bugtask-searches/xx-searching-by-tags.txt'
--- lib/lp/bugs/stories/bugtask-searches/xx-searching-by-tags.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/bugs/stories/bugtask-searches/xx-searching-by-tags.txt 2010-10-18 13:56:04 +0000
@@ -7,8 +7,9 @@
First, we create some bugs.
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, IProductSet, CreateBugParams)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
+ >>> from lp.bugs.interfaces.bug import CreateBugParams
>>> from zope.component import getUtility
>>> from canonical.launchpad.ftests import login, logout
=== modified file 'lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt'
--- lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt 2010-10-06 18:53:53 +0000
+++ lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt 2010-10-18 13:56:04 +0000
@@ -74,8 +74,8 @@
Firstly, we appoint Sample Person as the driver for the distribution.
>>> from canonical.database.sqlbase import flush_database_updates
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, IPersonSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> from canonical.launchpad.ftests import login, logout
>>> from zope.component import getUtility
>>> login('foo.bar@xxxxxxxxxxxxx')
=== modified file 'lib/lp/bugs/tests/buglinktarget.txt'
--- lib/lp/bugs/tests/buglinktarget.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/bugs/tests/buglinktarget.txt 2010-10-18 13:56:04 +0000
@@ -16,8 +16,9 @@
# to a registered user.
>>> login('no-priv@xxxxxxxxxxxxx')
>>> from zope.interface.verify import verifyObject
- >>> from canonical.launchpad.interfaces import (
- ... IBugLinkTarget, IBugLink, IBugSet)
+ >>> from lp.bugs.interfaces.buglink import IBugLinkTarget
+ >>> from lp.bugs.interfaces.buglink import IBugLink
+ >>> from lp.bugs.interfaces.bug import IBugSet
>>> verifyObject(IBugLinkTarget, target)
True
=== modified file 'lib/lp/bugs/tests/bugs-emailinterface.txt'
--- lib/lp/bugs/tests/bugs-emailinterface.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/tests/bugs-emailinterface.txt 2010-10-18 13:56:04 +0000
@@ -339,8 +339,7 @@
will provide IWeaklyAuthenticatedPrincipal. Let's mark the current
principal with that.
- >>> from canonical.launchpad.interfaces import (
- ... IWeaklyAuthenticatedPrincipal)
+ >>> from canonical.launchpad.interfaces.mail import IWeaklyAuthenticatedPrincipal
>>> from zope.interface import directlyProvides, directlyProvidedBy
>>> from zope.security.management import queryInteraction
>>> participations = queryInteraction().participations
@@ -1648,8 +1647,8 @@
The user is a package bug supervisor
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, ISourcePackageNameSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
>>> commit()
>>> LaunchpadZopelessLayer.switchDbUser('launchpad')
@@ -2880,8 +2879,8 @@
>>> from lp.bugs.interfaces.bugtracker import BugTrackerType
>>> from lp.bugs.tests.externalbugtracker import (
... new_bugtracker)
- >>> from canonical.launchpad.interfaces import (
- ... IBugWatchSet, IProductSet)
+ >>> from lp.bugs.interfaces.bugwatch import IBugWatchSet
+ >>> from lp.registry.interfaces.product import IProductSet
>>> firefox = getUtility(IProductSet).getByName('firefox')
>>> no_priv = getUtility(IPersonSet).getByName('no-priv')
=== modified file 'lib/lp/bugs/tests/bugtarget-questiontarget.txt'
--- lib/lp/bugs/tests/bugtarget-questiontarget.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/tests/bugtarget-questiontarget.txt 2010-10-18 13:56:04 +0000
@@ -13,8 +13,8 @@
Product, Distribution, ProductSeries, DistributionSeries,
SourcePackage, or DistributionSourcePackages.
- >>> from canonical.launchpad.interfaces import (
- ... IBugTarget, IQuestionTarget)
+ >>> from lp.bugs.interfaces.bugtarget import IBugTarget
+ >>> from lp.answers.interfaces.questiontarget import IQuestionTarget
>>> login('foo.bar@xxxxxxxxxxxxx')
>>> IBugTarget.providedBy(bugtarget)
@@ -177,8 +177,9 @@
>>> big_bug = filebug(
... bugtarget, "Print is borked", status=BugTaskStatus.NEW)
- >>> from canonical.launchpad.interfaces import (
- ... IBugTaskSet, IDistributionSet, ISourcePackageNameSet)
+ >>> from lp.bugs.interfaces.bugtask import IBugTaskSet
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
>>> ubuntu = getUtility(IDistributionSet)['ubuntu']
>>> evo_ubuntu = getUtility(ISourcePackageNameSet)['evolution']
=== modified file 'lib/lp/bugs/tests/test_bugtask_status.txt'
--- lib/lp/bugs/tests/test_bugtask_status.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/tests/test_bugtask_status.txt 2010-10-18 13:56:04 +0000
@@ -1,7 +1,8 @@
= Setting Bug Statuses =
- >>> from canonical.launchpad.interfaces import (
- ... CreateBugParams, IPersonSet, IProductSet)
+ >>> from lp.bugs.interfaces.bug import CreateBugParams
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
>>> from lp.bugs.interfaces.bugtask import BugTaskStatus
>>> firefox = getUtility(IProductSet).getByName('firefox')
=== modified file 'lib/lp/hardwaredb/doc/hwdb-device-tables.txt'
--- lib/lp/hardwaredb/doc/hwdb-device-tables.txt 2010-10-10 15:39:28 +0000
+++ lib/lp/hardwaredb/doc/hwdb-device-tables.txt 2010-10-18 13:56:04 +0000
@@ -2342,8 +2342,8 @@
Instead of passing a seqence of bug IDs, we can also specify one or
more bug tags.
- >>> from canonical.launchpad.interfaces import (
- ... BugTaskSearchParams, IBugTaskSet)
+ >>> from lp.bugs.interfaces.bugtask import BugTaskSearchParams
+ >>> from lp.bugs.interfaces.bugtask import IBugTaskSet
>>> from canonical.launchpad.searchbuilder import any
>>> bugtask_set = getUtility(IBugTaskSet)
=== modified file 'lib/lp/hardwaredb/doc/hwdb.txt'
--- lib/lp/hardwaredb/doc/hwdb.txt 2010-10-18 03:00:11 +0000
+++ lib/lp/hardwaredb/doc/hwdb.txt 2010-10-18 13:56:04 +0000
@@ -155,8 +155,8 @@
>>> import pytz
>>> from datetime import datetime
>>> from StringIO import StringIO
- >>> from canonical.launchpad.interfaces import (
- ... HWSubmissionFormat, IHWSubmissionSet)
+ >>> from lp.hardwaredb.interfaces.hwdb import HWSubmissionFormat
+ >>> from lp.hardwaredb.interfaces.hwdb import IHWSubmissionSet
>>> date_created = datetime(2007, 04, 01, tzinfo=pytz.timezone('UTC'))
>>> date_submitted = datetime(2007, 04, 02, tzinfo=pytz.timezone('UTC'))
>>> submission_data = 'submission data'
@@ -366,8 +366,8 @@
When an anonymous submitter later registers a Launchpad account, the field
`owner` is updated.
- >>> from canonical.launchpad.interfaces import (
- ... IEmailAddressSet, PersonCreationRationale)
+ >>> from canonical.launchpad.interfaces.emailaddress import IEmailAddressSet
+ >>> from lp.registry.interfaces.person import PersonCreationRationale
>>> user = getUtility(IPersonSet).ensurePerson(
... u'beeblebrox@xxxxxxxxxxx', u'Beeblebrox',
... PersonCreationRationale.OWNER_CREATED_LAUNCHPAD)
=== modified file 'lib/lp/registry/browser/tests/person-views.txt'
--- lib/lp/registry/browser/tests/person-views.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/registry/browser/tests/person-views.txt 2010-10-18 13:56:04 +0000
@@ -330,8 +330,7 @@
Assigned specifications that do not display when they are not in an in
progress state.
- >>> from canonical.launchpad.interfaces import (
- ... SpecificationImplementationStatus)
+ >>> from lp.blueprints.interfaces.specification import SpecificationImplementationStatus
>>> login(user.preferredemail.email)
>>> product = factory.makeProduct(name="tool", owner=user)
@@ -352,8 +351,7 @@
specifications is a link to show all the specifications that the user is
working on.
- >>> from canonical.launchpad.interfaces import (
- ... SpecificationDefinitionStatus)
+ >>> from lp.blueprints.interfaces.specification import SpecificationDefinitionStatus
>>> spec.definition_status = SpecificationDefinitionStatus.APPROVED
>>> newstate = spec.updateLifecycleStatus(user)
=== modified file 'lib/lp/registry/browser/tests/team-views.txt'
--- lib/lp/registry/browser/tests/team-views.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/registry/browser/tests/team-views.txt 2010-10-18 13:56:04 +0000
@@ -2,8 +2,8 @@
== Home page ==
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, ITeamMembershipSet)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.teammembership import ITeamMembershipSet
>>> from zope.component import getMultiAdapter
>>> person_set = getUtility(IPersonSet)
=== modified file 'lib/lp/registry/doc/announcement.txt'
--- lib/lp/registry/doc/announcement.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/registry/doc/announcement.txt 2010-10-18 13:56:04 +0000
@@ -13,8 +13,10 @@
>>> import pytz
>>> NOW = datetime.utcnow().replace(tzinfo=pytz.utc)
>>> FUTURE = NOW + timedelta(days=10)
- >>> from canonical.launchpad.interfaces import (
- ... IAnnouncementSet, IDistributionSet, IProductSet, IProjectGroupSet)
+ >>> from lp.registry.interfaces.announcement import IAnnouncementSet
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.product import IProductSet
+ >>> from lp.registry.interfaces.projectgroup import IProjectGroupSet
>>> announcements = getUtility(IAnnouncementSet)
>>> kubuntu = getUtility(IDistributionSet).getByName('kubuntu')
>>> apache = getUtility(IProjectGroupSet).getByName('apache')
=== modified file 'lib/lp/registry/doc/commercialsubscription.txt'
--- lib/lp/registry/doc/commercialsubscription.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/registry/doc/commercialsubscription.txt 2010-10-18 13:56:04 +0000
@@ -7,8 +7,8 @@
>>> from zope.component import getUtility
>>> from canonical.launchpad.webapp.testing import verifyObject
- >>> from canonical.launchpad.interfaces import (
- ... ICommercialSubscription, IProductSet)
+ >>> from lp.registry.interfaces.commercialsubscription import ICommercialSubscription
+ >>> from lp.registry.interfaces.product import IProductSet
>>> from canonical.launchpad.ftests import login, ANONYMOUS
>>> login('no-priv@xxxxxxxxxxxxx')
=== modified file 'lib/lp/registry/doc/distribution-mirror.txt'
--- lib/lp/registry/doc/distribution-mirror.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/registry/doc/distribution-mirror.txt 2010-10-18 13:56:04 +0000
@@ -5,10 +5,16 @@
>>> from datetime import datetime, timedelta
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... ICountrySet, IDistributionSet, IDistributionMirrorSet,
- ... IDistroArchSeriesSet, IDistroSeriesSet, ILibraryFileAliasSet,
- ... IPersonSet, MirrorContent, MirrorSpeed, MirrorStatus)
+ >>> from lp.services.worlddata.interfaces.country import ICountrySet
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.distributionmirror import IDistributionMirrorSet
+ >>> from lp.soyuz.interfaces.distroarchseries import IDistroArchSeriesSet
+ >>> from lp.registry.interfaces.distroseries import IDistroSeriesSet
+ >>> from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.distributionmirror import MirrorContent
+ >>> from lp.registry.interfaces.distributionmirror import MirrorSpeed
+ >>> from lp.registry.interfaces.distributionmirror import MirrorStatus
>>> from lp.registry.interfaces.series import SeriesStatus
>>> from lp.registry.interfaces.pocket import PackagePublishingPocket
>>> mirrorset = getUtility(IDistributionMirrorSet)
=== modified file 'lib/lp/registry/doc/distribution-sourcepackage.txt'
--- lib/lp/registry/doc/distribution-sourcepackage.txt 2010-10-04 19:50:45 +0000
+++ lib/lp/registry/doc/distribution-sourcepackage.txt 2010-10-18 13:56:04 +0000
@@ -16,8 +16,8 @@
>>> from zope.component import getUtility
>>> from canonical.launchpad.webapp.testing import verifyObject
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, IDistributionSourcePackage)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.distributionsourcepackage import IDistributionSourcePackage
>>> debian = getUtility(IDistributionSet).getByName("debian")
>>> ubuntu = getUtility(IDistributionSet).getByName("ubuntu")
=== modified file 'lib/lp/registry/doc/distribution.txt'
--- lib/lp/registry/doc/distribution.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/registry/doc/distribution.txt 2010-10-18 13:56:04 +0000
@@ -70,9 +70,8 @@
>>> from lp.registry.model.sourcepackagename import (
... SourcePackageName)
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSourcePackage,
- ... IDistributionSourcePackageRelease)
+ >>> from lp.registry.interfaces.distributionsourcepackage import IDistributionSourcePackage
+ >>> from lp.soyuz.interfaces.distributionsourcepackagerelease import IDistributionSourcePackageRelease
>>> evo = SourcePackageName.byName("evolution")
>>> evo_ubuntu = ubuntu.getSourcePackage(evo)
@@ -571,9 +570,7 @@
We can get only valid specs (those that are not obsolete or superseded):
- >>> from canonical.launchpad.interfaces import (
- ... SpecificationDefinitionStatus,
- ... )
+ >>> from lp.blueprints.interfaces.specification import SpecificationDefinitionStatus
>>> login('mark@xxxxxxxxxxx')
>>> for spec in kubuntu.specifications():
... # Do this here, otherwise, the change will be flush before
=== modified file 'lib/lp/registry/doc/distroseries.txt'
--- lib/lp/registry/doc/distroseries.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/registry/doc/distroseries.txt 2010-10-18 13:56:04 +0000
@@ -22,8 +22,9 @@
>>> from zope.component import getUtility
>>> from canonical.database.sqlbase import flush_database_updates
>>> from canonical.launchpad.webapp.testing import verifyObject
- >>> from canonical.launchpad.interfaces import (
- ... IDistroSeries, IDistroSeriesSet, IDistributionSet)
+ >>> from lp.registry.interfaces.distroseries import IDistroSeries
+ >>> from lp.registry.interfaces.distroseries import IDistroSeriesSet
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
>>> from lp.translations.interfaces.translationimportqueue import (
... IHasTranslationImports)
>>> distroseriesset = getUtility(IDistroSeriesSet)
@@ -247,8 +248,8 @@
devel
translations
- >>> from canonical.launchpad.interfaces import (
- ... IComponentSet, ISectionSet)
+ >>> from lp.soyuz.interfaces.component import IComponentSet
+ >>> from lp.soyuz.interfaces.section import ISectionSet
>>> python = getUtility(ISectionSet).ensure('python')
>>> hoary.addSection(python)
@@ -502,10 +503,9 @@
DistroSeries can build meta objects for packages
------------------------------------------------
- >>> from canonical.launchpad.interfaces import (
- ... ISourcePackage,
- ... IDistroSeriesBinaryPackage,
- ... IDistroSeriesSourcePackageRelease)
+ >>> from lp.registry.interfaces.sourcepackage import ISourcePackage
+ >>> from lp.soyuz.interfaces.distroseriesbinarypackage import IDistroSeriesBinaryPackage
+ >>> from lp.soyuz.interfaces.distroseriessourcepackagerelease import IDistroSeriesSourcePackageRelease
>>> pmount_src_name = SourcePackageName.byName('pmount')
>>> pmount_source = hoary.getSourcePackage(pmount_src_name)
@@ -709,8 +709,7 @@
4
>>> warty_mozilla_pub_bin = warty_mozilla_pub_binaries[0]
- >>> from canonical.launchpad.interfaces import (
- ... IBinaryPackagePublishingHistory)
+ >>> from lp.soyuz.interfaces.publishing import IBinaryPackagePublishingHistory
>>> verifyObject(IBinaryPackagePublishingHistory, warty_mozilla_pub_bin)
True
=== modified file 'lib/lp/registry/doc/entitlement.txt'
--- lib/lp/registry/doc/entitlement.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/registry/doc/entitlement.txt 2010-10-18 13:56:04 +0000
@@ -8,9 +8,12 @@
>>> from datetime import datetime
>>> import pytz
>>> from canonical.launchpad.webapp.testing import verifyObject
- >>> from canonical.launchpad.interfaces import (
- ... EntitlementQuota, EntitlementState, EntitlementType,
- ... IEntitlement, IEntitlementSet, IPersonSet)
+ >>> from lp.registry.interfaces.entitlement import EntitlementQuota
+ >>> from lp.registry.interfaces.entitlement import EntitlementState
+ >>> from lp.registry.interfaces.entitlement import EntitlementType
+ >>> from lp.registry.interfaces.entitlement import IEntitlement
+ >>> from lp.registry.interfaces.entitlement import IEntitlementSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> from canonical.launchpad.ftests import login
>>> from canonical.database.sqlbase import flush_database_updates
=== modified file 'lib/lp/registry/doc/featuredproject.txt'
--- lib/lp/registry/doc/featuredproject.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/registry/doc/featuredproject.txt 2010-10-18 13:56:04 +0000
@@ -6,9 +6,10 @@
projects is stored in the FeaturedProject table, and managed through the
PillarNameSet.
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, IPillarNameSet, IProductSet, IProjectGroupSet
- ... )
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.pillar import IPillarNameSet
+ >>> from lp.registry.interfaces.product import IProductSet
+ >>> from lp.registry.interfaces.projectgroup import IProjectGroupSet
>>> pillar_set = getUtility(IPillarNameSet)
>>> def isFeatured(project):
... return project in getUtility(IPillarNameSet).featured_projects
=== modified file 'lib/lp/registry/doc/gpgkey.txt'
--- lib/lp/registry/doc/gpgkey.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/registry/doc/gpgkey.txt 2010-10-18 13:56:04 +0000
@@ -3,8 +3,9 @@
Launchpad models GPG keys in a GPGKey class.
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IGPGKeySet, IPersonSet, GPGKeyAlgorithm)
+ >>> from lp.registry.interfaces.gpg import IGPGKeySet
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.gpg import GPGKeyAlgorithm
>>> personset = getUtility(IPersonSet)
>>> foobar = personset.getByName('name16')
>>> gpgkeyset = getUtility(IGPGKeySet)
=== modified file 'lib/lp/registry/doc/karmacache.txt'
--- lib/lp/registry/doc/karmacache.txt 2010-10-04 19:50:45 +0000
+++ lib/lp/registry/doc/karmacache.txt 2010-10-18 13:56:04 +0000
@@ -10,8 +10,8 @@
>>> from zope.component import getUtility
>>> from lp.registry.model.karma import KarmaCategory
- >>> from canonical.launchpad.interfaces import (
- ... IKarmaCacheManager, IPersonSet)
+ >>> from lp.registry.interfaces.karma import IKarmaCacheManager
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> from canonical.testing.layers import LaunchpadZopelessLayer
>>> LaunchpadZopelessLayer.switchDbUser('karma')
=== modified file 'lib/lp/registry/doc/karmacontext.txt'
--- lib/lp/registry/doc/karmacontext.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/registry/doc/karmacontext.txt 2010-10-18 13:56:04 +0000
@@ -10,8 +10,10 @@
>>> import operator
>>> from zope.component import getUtility
>>> from canonical.launchpad.webapp.testing import verifyObject
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, IProductSet, IDistributionSet, IKarmaContext)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.karma import IKarmaContext
>>> salgado = getUtility(IPersonSet).getByName('salgado')
>>> firefox = getUtility(IProductSet).getByName('firefox')
>>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
=== modified file 'lib/lp/registry/doc/mailinglists.txt'
--- lib/lp/registry/doc/mailinglists.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/registry/doc/mailinglists.txt 2010-10-18 13:56:04 +0000
@@ -7,8 +7,8 @@
an existing team. This is done through an IMailingListSet utility.
>>> from canonical.launchpad.webapp.testing import verifyObject
- >>> from canonical.launchpad.interfaces import (
- ... IMailingList, IMailingListSet)
+ >>> from lp.registry.interfaces.mailinglist import IMailingList
+ >>> from lp.registry.interfaces.mailinglist import IMailingListSet
>>> list_set = getUtility(IMailingListSet)
>>> verifyObject(IMailingListSet, list_set)
True
=== modified file 'lib/lp/registry/doc/mentoringoffer.txt'
--- lib/lp/registry/doc/mentoringoffer.txt 2010-10-11 16:17:45 +0000
+++ lib/lp/registry/doc/mentoringoffer.txt 2010-10-18 13:56:04 +0000
@@ -86,8 +86,9 @@
show up there.
>>> firefox = productset.getByName('firefox')
- >>> from canonical.launchpad.interfaces import (
- ... BugTaskImportance, BugTaskStatus, IBugTaskSet)
+ >>> from lp.bugs.interfaces.bugtask import BugTaskImportance
+ >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
+ >>> from lp.bugs.interfaces.bugtask import IBugTaskSet
>>> bugtaskset = getUtility(IBugTaskSet)
>>> ff_task = bugtaskset.createTask(
... bug=bug2, product=firefox, owner=mark,
@@ -201,8 +202,8 @@
When a spec or a bug is completed, it drops off the mentoring lists.
- >>> from canonical.launchpad.interfaces import (
- ... BugTaskStatus, SpecificationImplementationStatus)
+ >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
+ >>> from lp.blueprints.interfaces.specification import SpecificationImplementationStatus
>>> bug2.is_complete
False
>>> from canonical.database.sqlbase import flush_database_updates
=== modified file 'lib/lp/registry/doc/milestone.txt'
--- lib/lp/registry/doc/milestone.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/registry/doc/milestone.txt 2010-10-18 13:56:04 +0000
@@ -287,8 +287,9 @@
>>> from lp.bugs.model.bugnotification import (
... BugNotification)
- >>> from canonical.launchpad.interfaces import (
- ... IBugSet, IPersonSet, IProductSet)
+ >>> from lp.bugs.interfaces.bug import IBugSet
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
>>> from lazr.lifecycle.event import ObjectModifiedEvent
>>> from lazr.lifecycle.snapshot import Snapshot
>>> from zope.event import notify
=== modified file 'lib/lp/registry/doc/person-account.txt'
--- lib/lp/registry/doc/person-account.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/registry/doc/person-account.txt 2010-10-18 13:56:04 +0000
@@ -12,8 +12,8 @@
process. Matsubara's account was created during a code import.
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, IEmailAddressSet)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from canonical.launchpad.interfaces.emailaddress import IEmailAddressSet
>>> emailset = getUtility(IEmailAddressSet)
>>> emailaddress = emailset.getByEmail('matsubara@xxxxxxxxxxxx')
=== modified file 'lib/lp/registry/doc/person-karma.txt'
--- lib/lp/registry/doc/person-karma.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/registry/doc/person-karma.txt 2010-10-18 13:56:04 +0000
@@ -19,9 +19,11 @@
>>> from zope.component import getUtility
>>> from canonical.launchpad.webapp.testing import verifyObject
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, IKarma, IPersonSet, IProductSet,
- ... ISourcePackageNameSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.karma import IKarma
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
+ >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
>>> salgado = getUtility(IPersonSet).getByName('salgado')
>>> firefox = getUtility(IProductSet).getByName('firefox')
>>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
=== modified file 'lib/lp/registry/doc/person.txt'
--- lib/lp/registry/doc/person.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/registry/doc/person.txt 2010-10-18 13:56:04 +0000
@@ -7,9 +7,11 @@
>>> from zope.component import getUtility
>>> from canonical.launchpad.webapp.testing import verifyObject
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, IPerson, IProductSet, IEmailAddressSet,
- ... IHasStanding)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.person import IPerson
+ >>> from lp.registry.interfaces.product import IProductSet
+ >>> from canonical.launchpad.interfaces.emailaddress import IEmailAddressSet
+ >>> from lp.registry.interfaces.person import IHasStanding
>>> from lp.translations.interfaces.translationimportqueue import (
... IHasTranslationImports)
@@ -79,8 +81,8 @@
start with the word "when" followed by a description of the action that
caused the entry to be created.
- >>> from canonical.launchpad.interfaces import (
- ... EmailAddressStatus, PersonCreationRationale)
+ >>> from canonical.launchpad.interfaces.emailaddress import EmailAddressStatus
+ >>> from lp.registry.interfaces.person import PersonCreationRationale
>>> p, email = personset.createPersonAndEmail(
... 'randomuser@xxxxxxxxxxxxxx', PersonCreationRationale.POFILEIMPORT,
... comment='when importing the Portuguese translation of firefox',
@@ -1042,8 +1044,9 @@
>>> login(ANONYMOUS)
- >>> from canonical.launchpad.interfaces import (
- ... IDistribution, IProjectGroup, IProduct)
+ >>> from lp.registry.interfaces.distribution import IDistribution
+ >>> from lp.registry.interfaces.projectgroup import IProjectGroup
+ >>> from lp.registry.interfaces.product import IProduct
>>> def print_pillar(pillarname):
... pillar = pillarname.pillar
=== modified file 'lib/lp/registry/doc/personlocation.txt'
--- lib/lp/registry/doc/personlocation.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/registry/doc/personlocation.txt 2010-10-18 13:56:04 +0000
@@ -7,8 +7,8 @@
location / time zone info for other people in a wiki style.
>>> from canonical.launchpad.webapp.testing import verifyObject
- >>> from canonical.launchpad.interfaces import (
- ... IObjectWithLocation, IPersonSet)
+ >>> from lp.registry.interfaces.location import IObjectWithLocation
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> personset = getUtility(IPersonSet)
A Person implements the IObjectWithLocation interface.
=== modified file 'lib/lp/registry/doc/pillar.txt'
--- lib/lp/registry/doc/pillar.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/registry/doc/pillar.txt 2010-10-18 13:56:04 +0000
@@ -5,9 +5,10 @@
easier to use and to shorten some of our URLs. Currently, the objects that
share their name namespace are Product, ProjectGroup and Distribution.
- >>> from canonical.launchpad.interfaces import (
- ... IPillarNameSet, IProduct, IProjectGroup, IDistribution
- ... )
+ >>> from lp.registry.interfaces.pillar import IPillarNameSet
+ >>> from lp.registry.interfaces.product import IProduct
+ >>> from lp.registry.interfaces.projectgroup import IProjectGroup
+ >>> from lp.registry.interfaces.distribution import IDistribution
>>> pillar_set = getUtility(IPillarNameSet)
>>> 'ubuntu' in pillar_set
@@ -231,8 +232,8 @@
PillarName objects have a pillar attribute that returns the object referenced
by that pillar name
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, IProjectGroupSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.projectgroup import IProjectGroupSet
>>> from lp.registry.model.pillar import PillarName
>>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
=== modified file 'lib/lp/registry/doc/poll.txt'
--- lib/lp/registry/doc/poll.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/registry/doc/poll.txt 2010-10-18 13:56:04 +0000
@@ -13,8 +13,10 @@
>>> from zope.component import getUtility
>>> from canonical.database.sqlbase import flush_database_updates
>>> from canonical.launchpad.ftests import login
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, IPollSubset, PollAlgorithm, PollSecrecy)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.poll import IPollSubset
+ >>> from lp.registry.interfaces.poll import PollAlgorithm
+ >>> from lp.registry.interfaces.poll import PollSecrecy
>>> team = getUtility(IPersonSet).getByName('ubuntu-team')
>>> member = getUtility(IPersonSet).getByName('stevea')
=== modified file 'lib/lp/registry/doc/product.txt'
--- lib/lp/registry/doc/product.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/registry/doc/product.txt 2010-10-18 13:56:04 +0000
@@ -6,8 +6,9 @@
software. It can be part of a ProjectGroup or it can be standalone.
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IProductSet, IProduct, IPersonSet)
+ >>> from lp.registry.interfaces.product import IProductSet
+ >>> from lp.registry.interfaces.product import IProduct
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> from lp.app.errors import NotFoundError
>>> from lp.translations.interfaces.translationimportqueue import (
... IHasTranslationImports)
=== modified file 'lib/lp/registry/doc/productseries.txt'
--- lib/lp/registry/doc/productseries.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/registry/doc/productseries.txt 2010-10-18 13:56:04 +0000
@@ -8,8 +8,9 @@
>>> from zope.component import getUtility
>>> from canonical.launchpad.webapp.testing import verifyObject
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, IProductSeries, IProductSet)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.productseries import IProductSeries
+ >>> from lp.registry.interfaces.product import IProductSet
>>> from lp.translations.interfaces.translationimportqueue import (
... IHasTranslationImports)
>>> from canonical.database.sqlbase import flush_database_updates
@@ -210,8 +211,8 @@
Now, we will make one of them accepted, the other declined, and both of
them informational.
- >>> from canonical.launchpad.interfaces import (
- ... SpecificationDefinitionStatus, SpecificationImplementationStatus)
+ >>> from lp.blueprints.interfaces.specification import SpecificationDefinitionStatus
+ >>> from lp.blueprints.interfaces.specification import SpecificationImplementationStatus
>>> a.definition_status = b.definition_status = SpecificationDefinitionStatus.APPROVED
>>> a.implementation_status = SpecificationImplementationStatus.INFORMATIONAL
>>> b.implementation_status = SpecificationImplementationStatus.INFORMATIONAL
=== modified file 'lib/lp/registry/doc/projectgroup.txt'
--- lib/lp/registry/doc/projectgroup.txt 2010-10-18 02:53:40 +0000
+++ lib/lp/registry/doc/projectgroup.txt 2010-10-18 13:56:04 +0000
@@ -6,8 +6,8 @@
common external bug tracker.
# Some basic imports
- >>> from canonical.launchpad.interfaces import (
- ... IProjectGroupSet, IProjectGroup)
+ >>> from lp.registry.interfaces.projectgroup import IProjectGroupSet
+ >>> from lp.registry.interfaces.projectgroup import IProjectGroup
>>> from canonical.launchpad.webapp.testing import verifyObject
>>> projectset = getUtility(IProjectGroupSet)
=== modified file 'lib/lp/registry/doc/sshkey.txt'
--- lib/lp/registry/doc/sshkey.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/registry/doc/sshkey.txt 2010-10-18 13:56:04 +0000
@@ -3,8 +3,9 @@
Launchpad models SSH keys in a SSHKey class.
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... ISSHKeySet, IPersonSet, SSHKeyType)
+ >>> from lp.registry.interfaces.ssh import ISSHKeySet
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.ssh import SSHKeyType
>>> personset = getUtility(IPersonSet)
>>> name12 = personset.getByName('name12')
>>> [(key.keytype, key.comment) for key in name12.sshkeys]
=== modified file 'lib/lp/registry/doc/standing.txt'
--- lib/lp/registry/doc/standing.txt 2010-10-04 19:50:45 +0000
+++ lib/lp/registry/doc/standing.txt 2010-10-18 13:56:04 +0000
@@ -11,8 +11,8 @@
>>> from lp.registry.tests import mailinglists_helper
>>> team_one, list_one = mailinglists_helper.new_team('test-one', True)
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, PersonalStanding)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.person import PersonalStanding
>>> from canonical.launchpad.ftests import sync, syncUpdate
>>> person_set = getUtility(IPersonSet)
@@ -29,8 +29,8 @@
>>> message_ids = message_id_generator()
# A helper for posting messages to a list.
- >>> from canonical.launchpad.interfaces import (
- ... IMailingListSet, IMessageSet)
+ >>> from lp.registry.interfaces.mailinglist import IMailingListSet
+ >>> from canonical.launchpad.interfaces.message import IMessageSet
>>> from email.Utils import formatdate
>>> def post_message(from_address, to_team_name):
... message = getUtility(IMessageSet).fromEmail("""\
=== modified file 'lib/lp/registry/doc/structural-subscriptions.txt'
--- lib/lp/registry/doc/structural-subscriptions.txt 2010-10-15 21:48:34 +0000
+++ lib/lp/registry/doc/structural-subscriptions.txt 2010-10-18 13:56:04 +0000
@@ -7,9 +7,10 @@
distribution.
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, IPersonSet, IProductSet,
- ... ISourcePackageNameSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.product import IProductSet
+ >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
>>> from lp.registry.model.structuralsubscription import (
... StructuralSubscription)
@@ -87,8 +88,7 @@
>>> from canonical.launchpad.ftests import syncUpdate
>>> from lp.registry.enum import BugNotificationLevel
- >>> from canonical.launchpad.interfaces import (
- ... BlueprintNotificationLevel)
+ >>> from lp.registry.interfaces.structuralsubscription import BlueprintNotificationLevel
>>> from lp.bugs.mail.bugnotificationrecipients import (
... BugNotificationRecipients)
=== modified file 'lib/lp/registry/doc/teammembership-email-notification.txt'
--- lib/lp/registry/doc/teammembership-email-notification.txt 2010-10-14 18:42:19 +0000
+++ lib/lp/registry/doc/teammembership-email-notification.txt 2010-10-18 13:56:04 +0000
@@ -27,10 +27,10 @@
... pop_notifications, print_distinct_emails, run_mail_jobs)
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, ITeamMembershipSet)
- >>> from canonical.launchpad.interfaces import (
- ... TeamMembershipRenewalPolicy, TeamMembershipStatus)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.teammembership import ITeamMembershipSet
+ >>> from lp.registry.interfaces.person import TeamMembershipRenewalPolicy
+ >>> from lp.registry.interfaces.teammembership import TeamMembershipStatus
>>> personset = getUtility(IPersonSet)
>>> membershipset = getUtility(ITeamMembershipSet)
>>> mark = personset.getByName('mark')
=== modified file 'lib/lp/registry/doc/teammembership.txt'
--- lib/lp/registry/doc/teammembership.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/registry/doc/teammembership.txt 2010-10-18 13:56:04 +0000
@@ -13,9 +13,9 @@
>>> import pytz
>>> from datetime import datetime, timedelta
- >>> from canonical.launchpad.interfaces import (
- ... TeamSubscriptionPolicy, TeamMembershipStatus,
- ... TeamMembershipRenewalPolicy)
+ >>> from lp.registry.interfaces.person import TeamSubscriptionPolicy
+ >>> from lp.registry.interfaces.teammembership import TeamMembershipStatus
+ >>> from lp.registry.interfaces.person import TeamMembershipRenewalPolicy
XXX: This doctest needs a lot of cleanups!
-- Guilherme Salgado, 2006-12-15
=== modified file 'lib/lp/registry/stories/mailinglists/subscriptions.txt'
--- lib/lp/registry/stories/mailinglists/subscriptions.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/registry/stories/mailinglists/subscriptions.txt 2010-10-18 13:56:04 +0000
@@ -186,8 +186,8 @@
team. (Otherwise, the mailing list subscription checkbox won't show at
all.)
- >>> from canonical.launchpad.interfaces import (
- ... ILaunchpadCelebrities, IPersonSet)
+ >>> from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> from canonical.launchpad.ftests import login, logout
>>> from zope.component import getUtility
>>> login('foo.bar@xxxxxxxxxxxxx')
=== modified file 'lib/lp/registry/stories/person/xx-person-editgpgkeys-invalid-key.txt'
--- lib/lp/registry/stories/person/xx-person-editgpgkeys-invalid-key.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/registry/stories/person/xx-person-editgpgkeys-invalid-key.txt 2010-10-18 13:56:04 +0000
@@ -5,8 +5,8 @@
>>> from canonical.launchpad.interfaces.authtoken import LoginTokenType
>>> from canonical.database.sqlbase import flush_database_updates
>>> from canonical.launchpad.ftests import login, logout, ANONYMOUS
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, ILoginTokenSet)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from canonical.launchpad.interfaces.logintoken import ILoginTokenSet
>>> from canonical.zeca.ftests.harness import ZecaTestSetup
>>> tokenset = getUtility(ILoginTokenSet)
=== modified file 'lib/lp/registry/stories/team/xx-team-membership.txt'
--- lib/lp/registry/stories/team/xx-team-membership.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/registry/stories/team/xx-team-membership.txt 2010-10-18 13:56:04 +0000
@@ -54,8 +54,8 @@
Give up on change, nothing should have changed with Colin:
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, ITeamMembershipSet)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.teammembership import ITeamMembershipSet
>>> from canonical.launchpad.ftests import login, logout, ANONYMOUS
>>> login(ANONYMOUS)
>>> personset = getUtility(IPersonSet)
=== modified file 'lib/lp/registry/stories/teammembership/xx-member-renewed-membership.txt'
--- lib/lp/registry/stories/teammembership/xx-member-renewed-membership.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/registry/stories/teammembership/xx-member-renewed-membership.txt 2010-10-18 13:56:04 +0000
@@ -14,8 +14,9 @@
>>> from canonical.launchpad.ftests import ANONYMOUS, login, logout
>>> login(ANONYMOUS)
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, ITeamMembershipSet, TeamMembershipRenewalPolicy)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.teammembership import ITeamMembershipSet
+ >>> from lp.registry.interfaces.person import TeamMembershipRenewalPolicy
>>> personset = getUtility(IPersonSet)
>>> membership = getUtility(ITeamMembershipSet).getByPersonAndTeam(
... personset.getByName('karl'),
=== modified file 'lib/lp/registry/tests/structural-subscription-target.txt'
--- lib/lp/registry/tests/structural-subscription-target.txt 2010-10-14 18:42:19 +0000
+++ lib/lp/registry/tests/structural-subscription-target.txt 2010-10-18 13:56:04 +0000
@@ -24,8 +24,7 @@
... subscription.bug_notification_level.name,
... subscription.blueprint_notification_level.name)
- >>> from canonical.launchpad.interfaces import (
- ... BlueprintNotificationLevel)
+ >>> from lp.registry.interfaces.structuralsubscription import BlueprintNotificationLevel
>>> subscription = target.addBugSubscription(foobar, foobar)
>>> subscription.blueprint_notification_level = (
=== modified file 'lib/lp/services/mailman/doc/recovery.txt'
--- lib/lp/services/mailman/doc/recovery.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/services/mailman/doc/recovery.txt 2010-10-18 13:56:04 +0000
@@ -37,8 +37,8 @@
>>> from zope.component import getUtility
>>> from zope.security.proxy import removeSecurityProxy
- >>> from canonical.launchpad.interfaces import (
- ... IMailingListSet, MailingListStatus)
+ >>> from lp.registry.interfaces.mailinglist import IMailingListSet
+ >>> from lp.registry.interfaces.mailinglist import MailingListStatus
>>> from canonical.launchpad.ftests import login, logout
>>> login('admin@xxxxxxxxxxxxx')
>>> mailing_list_set = getUtility(IMailingListSet)
=== modified file 'lib/lp/soyuz/browser/tests/builder-views.txt'
--- lib/lp/soyuz/browser/tests/builder-views.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/soyuz/browser/tests/builder-views.txt 2010-10-18 13:56:04 +0000
@@ -131,8 +131,8 @@
where builder 'Frog' is building a job from Celso's private PPA.
>>> from lp.buildmaster.model.buildqueue import BuildQueue
- >>> from canonical.launchpad.interfaces import (
- ... IBuilderSet, IPersonSet)
+ >>> from lp.buildmaster.interfaces.builder import IBuilderSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> cprov = getUtility(IPersonSet).getByName("cprov")
>>> cprov_private_ppa = factory.makeArchive(
=== modified file 'lib/lp/soyuz/doc/archivepermission.txt'
--- lib/lp/soyuz/doc/archivepermission.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/soyuz/doc/archivepermission.txt 2010-10-18 13:56:04 +0000
@@ -25,8 +25,9 @@
'checkAuthenticated'. The "Ubuntu Team" has a few permissions set in
the sample data that we can check.
- >>> from canonical.launchpad.interfaces import (
- ... IComponentSet, IDistributionSet, IPersonSet)
+ >>> from lp.soyuz.interfaces.component import IComponentSet
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> ubuntu_team = getUtility(IPersonSet).getByName("ubuntu-team")
>>> ubuntu = getUtility(IDistributionSet)['ubuntu']
>>> main_component = getUtility(IComponentSet)['main']
=== modified file 'lib/lp/soyuz/doc/binarypackagerelease.txt'
--- lib/lp/soyuz/doc/binarypackagerelease.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/soyuz/doc/binarypackagerelease.txt 2010-10-18 13:56:04 +0000
@@ -4,8 +4,8 @@
across build records.
>>> from canonical.launchpad.database import BinaryPackageRelease
- >>> from canonical.launchpad.interfaces import (
- ... IBinaryPackageRelease, IBinaryPackageReleaseSet)
+ >>> from lp.soyuz.interfaces.binarypackagerelease import IBinaryPackageRelease
+ >>> from lp.soyuz.interfaces.binarypackagerelease import IBinaryPackageReleaseSet
>>> from canonical.launchpad.webapp.testing import verifyObject
>>> firefox_bin_release = BinaryPackageRelease.get(12)
@@ -28,8 +28,7 @@
Retrieve the respective DistributionSourcePackageRelease, which allow
us to easily link to a source reference published in the web-ui.
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSourcePackageRelease)
+ >>> from lp.soyuz.interfaces.distributionsourcepackagerelease import IDistributionSourcePackageRelease
>>> verifyObject(
... IDistributionSourcePackageRelease,
... firefox_bin_release.distributionsourcepackagerelease)
@@ -101,8 +100,8 @@
Fetch brand new component, section and priority:
- >>> from canonical.launchpad.interfaces import (
- ... IComponentSet, ISectionSet)
+ >>> from lp.soyuz.interfaces.component import IComponentSet
+ >>> from lp.soyuz.interfaces.section import ISectionSet
>>> from lp.soyuz.enums import PackagePublishingPriority
>>> new_comp = getUtility(IComponentSet)['universe']
>>> new_sec = getUtility(ISectionSet)['mail']
=== modified file 'lib/lp/soyuz/doc/buildd-scoring.txt'
--- lib/lp/soyuz/doc/buildd-scoring.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/soyuz/doc/buildd-scoring.txt 2010-10-18 13:56:04 +0000
@@ -30,8 +30,7 @@
>>> from canonical.database.sqlbase import commit
>>> from lp.soyuz.enums import PackagePublishingStatus
- >>> from canonical.launchpad.interfaces import (
- ... SourcePackageUrgency)
+ >>> from lp.registry.interfaces.sourcepackage import SourcePackageUrgency
>>> from lp.registry.interfaces.pocket import PackagePublishingPocket
>>> from lp.soyuz.tests.test_publishing import (
... SoyuzTestPublisher)
=== modified file 'lib/lp/soyuz/doc/closing-bugs-from-changelogs.txt'
--- lib/lp/soyuz/doc/closing-bugs-from-changelogs.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/soyuz/doc/closing-bugs-from-changelogs.txt 2010-10-18 13:56:04 +0000
@@ -22,8 +22,8 @@
distribution package.
>>> from canonical.testing.layers import LaunchpadZopelessLayer
- >>> from canonical.launchpad.interfaces import (
- ... CreateBugParams, IDistributionSet)
+ >>> from lp.bugs.interfaces.bug import CreateBugParams
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
>>> login('no-priv@xxxxxxxxxxxxx')
>>> LaunchpadZopelessLayer.switchDbUser('launchpad')
=== modified file 'lib/lp/soyuz/doc/distribution.txt'
--- lib/lp/soyuz/doc/distribution.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/soyuz/doc/distribution.txt 2010-10-18 13:56:04 +0000
@@ -15,8 +15,8 @@
>>> from lp.registry.interfaces.distribution import IDistributionSet
>>> from lp.registry.interfaces.pocket import PackagePublishingPocket
>>> from lp.soyuz.enums import PackagePublishingStatus
- >>> from canonical.launchpad.interfaces import (
- ... ISourcePackageName, IBinaryPackageName)
+ >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageName
+ >>> from lp.soyuz.interfaces.binarypackagename import IBinaryPackageName
>>> distroset = getUtility(IDistributionSet)
>>> gentoo = distroset.getByName("gentoo")
=== modified file 'lib/lp/soyuz/doc/distroarchseries.txt'
--- lib/lp/soyuz/doc/distroarchseries.txt 2010-10-17 03:45:49 +0000
+++ lib/lp/soyuz/doc/distroarchseries.txt 2010-10-18 13:56:04 +0000
@@ -4,10 +4,9 @@
>>> from canonical.launchpad.webapp.testing import verifyObject
- >>> from canonical.launchpad.interfaces import (
- ... IDistroArchSeriesBinaryPackage,
- ... IBinaryPackagePublishingHistory,
- ... ISectionSet)
+ >>> from lp.soyuz.interfaces.distroarchseriesbinarypackage import IDistroArchSeriesBinaryPackage
+ >>> from lp.soyuz.interfaces.publishing import IBinaryPackagePublishingHistory
+ >>> from lp.soyuz.interfaces.section import ISectionSet
>>> from lp.registry.interfaces.distribution import IDistributionSet
>>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
@@ -153,8 +152,8 @@
publishing records with different (status, pocket, archive) in
ubuntu/breezy-autotest/i386, which is empty:
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, IPersonSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> from lp.registry.interfaces.pocket import PackagePublishingPocket
>>> from lp.soyuz.model.publishing import (
... BinaryPackagePublishingHistory)
=== modified file 'lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt'
--- lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt 2010-10-04 19:50:45 +0000
+++ lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt 2010-10-18 13:56:04 +0000
@@ -39,8 +39,7 @@
>>> binpackageformat = BinaryPackageFormat.DEB
>>> from lp.soyuz.enums import (
... PackagePublishingPriority, PackagePublishingStatus)
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
>>> from lp.registry.interfaces.pocket import PackagePublishingPocket
>>> priority = PackagePublishingPriority.STANDARD
@@ -190,8 +189,8 @@
DistroArchSeriesBinaryPackage.summary should be simplified.
-- kiko, 2008-03-28
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, IPersonSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> ubuntu = getUtility(IDistributionSet)['ubuntu']
>>> cprov = getUtility(IPersonSet).getByName('cprov')
>>> warty = ubuntu['warty']
=== modified file 'lib/lp/soyuz/doc/distroseries-publishing-lookups.txt'
--- lib/lp/soyuz/doc/distroseries-publishing-lookups.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/soyuz/doc/distroseries-publishing-lookups.txt 2010-10-18 13:56:04 +0000
@@ -9,8 +9,8 @@
publishing records with different (status, pocket, archive) in
ubuntu/breezy-autotest, which is empty:
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, IPersonSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> from lp.registry.interfaces.pocket import PackagePublishingPocket
>>> ubuntu = getUtility(IDistributionSet)['ubuntu']
=== modified file 'lib/lp/soyuz/doc/distroseriesqueue.txt'
--- lib/lp/soyuz/doc/distroseriesqueue.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/soyuz/doc/distroseriesqueue.txt 2010-10-18 13:56:04 +0000
@@ -54,8 +54,8 @@
>>> from canonical.launchpad.ftests import login
>>> login("foo.bar@xxxxxxxxxxxxx")
- >>> from canonical.launchpad.interfaces import (
- ... IComponentSet, IDistributionSet)
+ >>> from lp.soyuz.interfaces.component import IComponentSet
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
>>> from canonical.launchpad.database import ComponentSelection
>>> ubuntu = getUtility(IDistributionSet)['ubuntu']
>>> hoary = ubuntu['hoary']
@@ -80,8 +80,7 @@
what we expect the ed upload to produce. Let's find the queue item and
convert it to an ACCEPTED item.
- >>> from canonical.launchpad.interfaces import (
- ... QueueInconsistentStateError)
+ >>> from lp.soyuz.interfaces.queue import QueueInconsistentStateError
>>> from lp.soyuz.enums import PackageUploadStatus
>>> new_queue = hoary.getQueueItems(PackageUploadStatus.NEW)
@@ -268,8 +267,8 @@
>>> signed_queue = bar_ok.queue_root
- >>> from canonical.launchpad.interfaces import (
- ... IPackageUpload, IGPGKey)
+ >>> from lp.soyuz.interfaces.queue import IPackageUpload
+ >>> from lp.registry.interfaces.gpg import IGPGKey
>>> verifyObject(IPackageUpload, signed_queue)
True
@@ -509,8 +508,8 @@
Check forbidden approval of not selected Section:
>>> from zope.security.proxy import removeSecurityProxy
- >>> from canonical.launchpad.interfaces import (
- ... IComponentSet, ISectionSet)
+ >>> from lp.soyuz.interfaces.component import IComponentSet
+ >>> from lp.soyuz.interfaces.section import ISectionSet
Retrieve mozilla-firefox Upload:
=== modified file 'lib/lp/soyuz/doc/package-diff.txt'
--- lib/lp/soyuz/doc/package-diff.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/soyuz/doc/package-diff.txt 2010-10-18 13:56:04 +0000
@@ -12,8 +12,8 @@
First we have to retrieve a SourcePackageRelease from the sampledata,
let's use 'pmount' sources.
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, IPersonSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
>>> pmount = ubuntu.getSourcePackage('pmount')
=== modified file 'lib/lp/soyuz/doc/package-meta-classes.txt'
--- lib/lp/soyuz/doc/package-meta-classes.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/soyuz/doc/package-meta-classes.txt 2010-10-18 13:56:04 +0000
@@ -10,9 +10,8 @@
>>> from lp.registry.model.distribution import Distribution
>>> from lp.registry.model.sourcepackagename import SourcePackageName
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSourcePackageRelease,
- ... IDistroSeriesSourcePackageRelease)
+ >>> from lp.soyuz.interfaces.distributionsourcepackagerelease import IDistributionSourcePackageRelease
+ >>> from lp.soyuz.interfaces.distroseriessourcepackagerelease import IDistroSeriesSourcePackageRelease
DistributionSourcePackage class is tested in:
=== modified file 'lib/lp/soyuz/doc/packagecopyrequest.txt'
--- lib/lp/soyuz/doc/packagecopyrequest.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/soyuz/doc/packagecopyrequest.txt 2010-10-18 13:56:04 +0000
@@ -13,8 +13,8 @@
... IPackageCopyRequest, IPackageCopyRequestSet)
>>> from lp.soyuz.enums import ArchivePurpose, PackageCopyStatus
>>> from lp.soyuz.interfaces.archive import IArchiveSet
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, IDistributionSet)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
>>> from canonical.launchpad.webapp.testing import verifyObject
In order to instantiate a package copy request we require a source and
=== modified file 'lib/lp/soyuz/doc/publishing.txt'
--- lib/lp/soyuz/doc/publishing.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/soyuz/doc/publishing.txt 2010-10-18 13:56:04 +0000
@@ -26,12 +26,12 @@
Verify if the object follows its interface contracts:
>>> from canonical.launchpad.webapp.testing import verifyObject
- >>> from canonical.launchpad.interfaces import (
- ... ISourcePackageRelease, IDistroSeries,
- ... ISourcePackagePublishingHistory,
- ... IBinaryPackagePublishingHistory,
- ... ISourcePackage,
- ... IDistributionSourcePackageRelease)
+ >>> from lp.soyuz.interfaces.sourcepackagerelease import ISourcePackageRelease
+ >>> from lp.registry.interfaces.distroseries import IDistroSeries
+ >>> from lp.soyuz.interfaces.publishing import ISourcePackagePublishingHistory
+ >>> from lp.soyuz.interfaces.publishing import IBinaryPackagePublishingHistory
+ >>> from lp.registry.interfaces.sourcepackage import ISourcePackage
+ >>> from lp.soyuz.interfaces.distributionsourcepackagerelease import IDistributionSourcePackageRelease
>>> verifyObject(ISourcePackagePublishingHistory, spph)
True
@@ -296,9 +296,8 @@
Stanza generation
=================
- >>> from canonical.launchpad.interfaces import (
- ... IBinaryPackagePublishingHistory,
- ... ISourcePackageFilePublishing)
+ >>> from lp.soyuz.interfaces.publishing import IBinaryPackagePublishingHistory
+ >>> from lp.soyuz.interfaces.publishing import ISourcePackageFilePublishing
Retrieve any SourcePackagePublishingHistory entry.
@@ -896,8 +895,7 @@
Symmetric behaviour is offered for BinaryPackagePublishing,
BinaryPackageFile and IBinaryPackagePublishingHistory
- >>> from canonical.launchpad.interfaces import (
- ... IBinaryPackageFilePublishing)
+ >>> from lp.soyuz.interfaces.publishing import IBinaryPackageFilePublishing
>>> bpph = BinaryPackagePublishingHistory.get(15)
>>> print bpph.displayname
=== modified file 'lib/lp/soyuz/doc/sourcepackagerelease-build-lookup.txt'
--- lib/lp/soyuz/doc/sourcepackagerelease-build-lookup.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/soyuz/doc/sourcepackagerelease-build-lookup.txt 2010-10-18 13:56:04 +0000
@@ -12,8 +12,8 @@
To demonstrate this we need to define some variables.
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, ILibraryFileAliasSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
>>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
>>> hoary = ubuntu.getSeries('hoary')
=== modified file 'lib/lp/soyuz/doc/sourcepackagerelease.txt'
--- lib/lp/soyuz/doc/sourcepackagerelease.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/soyuz/doc/sourcepackagerelease.txt 2010-10-18 13:56:04 +0000
@@ -133,8 +133,8 @@
>>> spr.component.name, spr.section.name
(u'main', u'editors')
- >>> from canonical.launchpad.interfaces import (
- ... IComponentSet, ISectionSet)
+ >>> from lp.soyuz.interfaces.component import IComponentSet
+ >>> from lp.soyuz.interfaces.section import ISectionSet
>>> new_comp = getUtility(IComponentSet)['universe']
>>> new_sec = getUtility(ISectionSet)['mail']
@@ -155,8 +155,9 @@
Verify the creation of a new ISourcePackageRelease based on the
IDistroSeries API:
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, ISourcePackageNameSet, IGPGKeySet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
+ >>> from lp.registry.interfaces.gpg import IGPGKeySet
>>> from lp.registry.interfaces.sourcepackage import SourcePackageUrgency
>>> hoary = getUtility(IDistributionSet)['ubuntu']['hoary']
=== modified file 'lib/lp/soyuz/doc/soyuz-files.txt'
--- lib/lp/soyuz/doc/soyuz-files.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/soyuz/doc/soyuz-files.txt 2010-10-18 13:56:04 +0000
@@ -13,9 +13,10 @@
>>> from canonical.launchpad.webapp.testing import verifyObject
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, ILibraryFileAlias,
- ... ISourcePackageReleaseFile, IBinaryPackageFile)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from canonical.launchpad.interfaces.librarian import ILibraryFileAlias
+ >>> from lp.soyuz.interfaces.files import ISourcePackageReleaseFile
+ >>> from lp.soyuz.interfaces.files import IBinaryPackageFile
>>> warty = getUtility(IDistributionSet)['ubuntu']['warty']
=== modified file 'lib/lp/soyuz/doc/soyuz-upload.txt'
--- lib/lp/soyuz/doc/soyuz-upload.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/soyuz/doc/soyuz-upload.txt 2010-10-18 13:56:04 +0000
@@ -227,9 +227,11 @@
Create the katie user and register it in a team that is allowed to
do uploads:
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet, IEmailAddressSet, PersonCreationRationale, IGPGKeySet,
- ... GPGKeyAlgorithm)
+ >>> from lp.registry.interfaces.person import IPersonSet
+ >>> from canonical.launchpad.interfaces.emailaddress import IEmailAddressSet
+ >>> from lp.registry.interfaces.person import PersonCreationRationale
+ >>> from lp.registry.interfaces.gpg import IGPGKeySet
+ >>> from lp.registry.interfaces.gpg import GPGKeyAlgorithm
>>> name, address = "Katie", "katie@xxxxxxxxxxxxxxxxxxxxx"
>>> user = getUtility(IPersonSet).ensurePerson(
... address, name, PersonCreationRationale.OWNER_CREATED_LAUNCHPAD)
=== modified file 'lib/lp/soyuz/stories/ppa/xx-copy-packages.txt'
--- lib/lp/soyuz/stories/ppa/xx-copy-packages.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/soyuz/stories/ppa/xx-copy-packages.txt 2010-10-18 13:56:04 +0000
@@ -108,8 +108,8 @@
>>> from canonical.launchpad.ftests import login, logout
>>> login('foo.bar@xxxxxxxxxxxxx')
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, ILibraryFileAliasSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
>>> from lp.soyuz.model.processor import ProcessorFamily
>>> fake_chroot = getUtility(ILibraryFileAliasSet)[1]
=== modified file 'lib/lp/soyuz/stories/ppa/xx-delete-packages.txt'
--- lib/lp/soyuz/stories/ppa/xx-delete-packages.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/soyuz/stories/ppa/xx-delete-packages.txt 2010-10-18 13:56:04 +0000
@@ -325,8 +325,9 @@
>>> from canonical.database.constants import UTC_NOW
>>> from canonical.launchpad.ftests import login, logout
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, ILibraryFileAliasSet, IPersonSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> from lp.soyuz.enums import PackagePublishingStatus
>>> from lp.soyuz.tests.test_publishing import (
... SoyuzTestPublisher)
=== modified file 'lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt'
--- lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt 2010-10-18 13:56:04 +0000
@@ -271,8 +271,7 @@
states. Note, for consistency we have to create the binary publishing records
for iceweasel before marking it as superseded.
- >>> from canonical.launchpad.interfaces import (
- ... IPersonSet)
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> from zope.component import getUtility
>>> login('foo.bar@xxxxxxxxxxxxx')
>>> cprov = getUtility(IPersonSet).getByName('cprov')
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-distribution-archives.txt'
--- lib/lp/soyuz/stories/soyuz/xx-distribution-archives.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-distribution-archives.txt 2010-10-18 13:56:04 +0000
@@ -3,8 +3,7 @@
First create a copy archive for us to see:
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
>>> from lp.registry.interfaces.person import IPersonSet
>>> from lp.testing.factory import (
... remove_security_proxy_and_shout_at_engineer)
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-package-diff.txt'
--- lib/lp/soyuz/stories/soyuz/xx-package-diff.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-package-diff.txt 2010-10-18 13:56:04 +0000
@@ -30,8 +30,8 @@
they show up in the UI.
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IDistributionSet, IPersonSet)
+ >>> from lp.registry.interfaces.distribution import IDistributionSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> login('foo.bar@xxxxxxxxxxxxx')
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-private-builds.txt'
--- lib/lp/soyuz/stories/soyuz/xx-private-builds.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-private-builds.txt 2010-10-18 13:56:04 +0000
@@ -18,8 +18,8 @@
We'll make a private archive and add a new build to it to demonstrate this.
>>> from zope.component import getUtility
- >>> from canonical.launchpad.interfaces import (
- ... IBuilderSet, IPersonSet)
+ >>> from lp.buildmaster.interfaces.builder import IBuilderSet
+ >>> from lp.registry.interfaces.person import IPersonSet
>>> from lp.registry.interfaces.distribution import IDistributionSet
>>> from lp.soyuz.tests.test_publishing import (
... SoyuzTestPublisher)
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-queue-pages-motu.txt'
--- lib/lp/soyuz/stories/soyuz/xx-queue-pages-motu.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-queue-pages-motu.txt 2010-10-18 13:56:04 +0000
@@ -70,8 +70,9 @@
>>> from zope.component import getUtility
>>> from canonical.launchpad.ftests import login, logout
>>> login('foo.bar@xxxxxxxxxxxxx')
- >>> from canonical.launchpad.interfaces import (
- ... IBinaryPackageNameSet, IComponentSet, ISourcePackageNameSet)
+ >>> from lp.soyuz.interfaces.binarypackagename import IBinaryPackageNameSet
+ >>> from lp.soyuz.interfaces.component import IComponentSet
+ >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
>>> from canonical.launchpad.database import (
... BinaryPackageRelease, SourcePackageRelease)
>>> universe = getUtility(IComponentSet)['universe']
=== modified file 'utilities/migrater/deglob.py'
--- utilities/migrater/deglob.py 2010-10-09 16:34:45 +0000
+++ utilities/migrater/deglob.py 2010-10-18 13:56:04 +0000
@@ -56,7 +56,7 @@
root = 'lib'
types = r'\.(txt)'
globs = r'from \bcanonical\.launchpad\.interfaces import (\w+)$'
- interfaces = get_interfaces(types=types, glob_interface=globs)
+ interfaces = get_interfaces(types=types, globs=globs)
interface_modules = get_interface_modules(interfaces)
glob_interface = r'\b(from canonical\.launchpad\.interfaces import %s)\b'
for interface, module_ in interface_modules.items():
@@ -69,7 +69,76 @@
print " %(lineno)4s: %(text)s" % line
+def multiline_extract_match(file_path, match_re, substitution=None):
+ """Return a summary of matches in a file."""
+ lines = []
+ content = []
+ match = None
+ file_ = open(file_path, 'r')
+ in_match = False
+ current_match = None
+ try:
+ for lineno, line in enumerate(file_):
+ if in_match:
+ identifiers = line.split(',')
+ for idf in identifiers:
+ idf = idf.strip()
+ idf = idf.strip('...')
+ idf = idf.strip()
+ if idf.endswith(')'):
+ in_match = False
+ idf = idf[0:-1]
+ idf = idf.strip()
+ if idf == '':
+ continue
+ expanded_line = (
+ '%s %s\n' % (current_match.group(0), idf))
+ lines.append(
+ {'lineno': lineno + 1, 'text': expanded_line.strip(),
+ 'match': None})
+ if substitution is not None:
+ content.append(expanded_line)
+ if not in_match:
+ current_match = None
+ continue
+ # Else check if this is the start of a multi-line.
+ match = match_re.search(line)
+ if match and line.strip().endswith('('):
+ in_match = True
+ current_match = match
+ continue
+ # Always append the non-matching lines to content to rebuild
+ # the file.
+ if substitution is not None:
+ content.append(line)
+ finally:
+ file_.close()
+ if lines:
+ if substitution is not None:
+ file_ = open(file_path, 'w')
+ try:
+ file_.write(''.join(content))
+ finally:
+ file_.close()
+ return {'file_path': file_path, 'lines': lines}
+ return None
+
+
+def update_multi_doctest_globs_to_interfaces():
+ root = 'lib'
+ types = r'\.(txt)'
+ pattern = r'[ ]+>>> from canonical\.launchpad\.interfaces import'
+ substitution = True
+ for summary in find_matches(
+ root, types, pattern, substitution=substitution,
+ extract_match=multiline_extract_match):
+ print "\n%(file_path)s" % summary
+ for line in summary['lines']:
+ print " %(lineno)4s: %(text)s" % line
+
+
def main():
+ update_multi_doctest_globs_to_interfaces()
update_doctest_globs_to_interfaces()
=== modified file 'utilities/migrater/find.py'
--- utilities/migrater/find.py 2009-09-17 17:29:33 +0000
+++ utilities/migrater/find.py 2010-10-18 13:56:04 +0000
@@ -20,32 +20,6 @@
mimetypes.init()
-def find_matches(root_dir, file_pattern, match_pattern, substitution=None):
- """Iterate a summary of matching lines in a file."""
- match_re = re.compile(match_pattern)
- for file_path in find_files(root_dir, file_pattern=file_pattern):
- summary = extract_match(file_path, match_re, substitution=substitution)
- if summary:
- yield summary
-
-
-def find_files(root_dir, skip_dir_pattern='^[.]', file_pattern='.*'):
- """Iterate the matching files below a directory."""
- skip_dir_re = re.compile(r'^.*%s' % skip_dir_pattern)
- file_re = re.compile(r'^.*%s' % file_pattern)
- for path, subdirs, files in os.walk(root_dir):
- subdirs[:] = [dir_ for dir_ in subdirs
- if skip_dir_re.match(dir_) is None]
- for file_ in files:
- file_path = os.path.join(path, file_)
- if os.path.islink(file_path):
- continue
- mime_type, encoding = mimetypes.guess_type(file_)
- if mime_type is None or 'text/' in mime_type:
- if file_re.match(file_path) is not None:
- yield file_path
-
-
def extract_match(file_path, match_re, substitution=None):
"""Return a summary of matches in a file."""
lines = []
@@ -57,7 +31,7 @@
match = match_re.search(line)
if match:
lines.append(
- {'lineno' : lineno + 1, 'text' : line.strip(),
+ {'lineno': lineno + 1, 'text': line.strip(),
'match': match})
if substitution is not None:
line = match_re.sub(substitution, line)
@@ -72,10 +46,38 @@
file_.write(''.join(content))
finally:
file_.close()
- return {'file_path' : file_path, 'lines' : lines}
+ return {'file_path': file_path, 'lines': lines}
return None
+def find_matches(root_dir, file_pattern, match_pattern,
+ substitution=None, extract_match=extract_match):
+ """Iterate a summary of matching lines in a file."""
+ match_re = re.compile(match_pattern)
+ for file_path in find_files(root_dir, file_pattern=file_pattern):
+ summary = extract_match(
+ file_path, match_re, substitution=substitution)
+ if summary:
+ yield summary
+
+
+def find_files(root_dir, skip_dir_pattern='^[.]', file_pattern='.*'):
+ """Iterate the matching files below a directory."""
+ skip_dir_re = re.compile(r'^.*%s' % skip_dir_pattern)
+ file_re = re.compile(r'^.*%s' % file_pattern)
+ for path, subdirs, files in os.walk(root_dir):
+ subdirs[:] = [dir_ for dir_ in subdirs
+ if skip_dir_re.match(dir_) is None]
+ for file_ in files:
+ file_path = os.path.join(path, file_)
+ if os.path.islink(file_path):
+ continue
+ mime_type, encoding = mimetypes.guess_type(file_)
+ if mime_type is None or 'text/' in mime_type:
+ if file_re.match(file_path) is not None:
+ yield file_path
+
+
def get_option_parser():
"""Return the option parser for this program."""
usage = "usage: %prog [options] root_dir file_pattern match"