Merge lp:~jml/launchpad/circular-rage into lp:launchpad
- circular-rage
- Merge into devel
Proposed by
Jonathan Lange
Status: | Merged |
---|---|
Approved by: | Jonathan Lange |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11905 |
Proposed branch: | lp:~jml/launchpad/circular-rage |
Merge into: | lp:launchpad |
Diff against target: |
2618 lines (+350/-645) 108 files modified
cronscripts/create-debwatches.py (+1/-1) cronscripts/distributionmirror-prober.py (+5/-2) cronscripts/flag-expired-memberships.py (+5/-3) cronscripts/foaf-update-karma-cache.py (+1/-1) cronscripts/parse-ppa-apache-access-logs.py (+1/-3) cronscripts/process-mail.py (+1/-1) cronscripts/send-bug-notifications.py (+1/-1) cronscripts/update-debwatches.py (+12/-3) cronscripts/update-pkgcache.py (+1/-2) cronscripts/update-stats.py (+5/-3) database/schema/pending/add-mailing-list-experts.py (+5/-2) database/schema/pending/create-openid-rp-configs.py (+0/-51) database/schema/pending/import_language_packs.py (+0/-69) database/schema/pending/update-shippingrequest-types.py (+0/-51) lib/canonical/database/harness.py (+0/-1) lib/canonical/database/sqlbase.py (+3/-3) lib/canonical/launchpad/browser/feeds.py (+16/-12) lib/canonical/launchpad/browser/launchpadstatistic.py (+3/-1) lib/canonical/launchpad/browser/librarian.py (+1/-1) lib/canonical/launchpad/browser/packagerelationship.py (+1/-1) lib/canonical/launchpad/components/cdatetime.py (+1/-1) lib/canonical/launchpad/components/tokens.py (+1/-1) lib/canonical/launchpad/database/__init__.py (+0/-25) lib/canonical/launchpad/database/account.py (+1/-2) lib/canonical/launchpad/database/emailaddress.py (+1/-1) lib/canonical/launchpad/database/launchpadstatistic.py (+3/-3) lib/canonical/launchpad/database/librarian.py (+2/-2) lib/canonical/launchpad/database/logintoken.py (+4/-4) lib/canonical/launchpad/database/message.py (+7/-5) lib/canonical/launchpad/database/oauth.py (+1/-1) lib/canonical/launchpad/database/temporaryblobstorage.py (+2/-2) lib/canonical/launchpad/doc/decoratedresultset.txt (+2/-2) lib/canonical/launchpad/doc/validation.txt (+1/-1) lib/canonical/launchpad/helpers.py (+1/-1) lib/canonical/launchpad/interfaces/__init__.py (+12/-146) lib/canonical/launchpad/interfaces/ftests/validation.txt (+2/-1) lib/canonical/launchpad/interfaces/validation.py (+4/-4) lib/canonical/launchpad/mail/commands.py (+24/-18) lib/canonical/launchpad/mail/handlers.py (+13/-11) lib/canonical/launchpad/mail/helpers.py (+2/-2) lib/canonical/launchpad/mail/meta.py (+1/-1) lib/canonical/launchpad/mailnotification.py (+10/-8) lib/canonical/launchpad/pagetitles.py (+2/-4) lib/canonical/launchpad/rest/me.py (+1/-1) lib/canonical/launchpad/rest/pillarset.py (+1/-1) lib/canonical/launchpad/subscribers/karma.py (+1/-1) lib/canonical/launchpad/systemhomes.py (+20/-14) lib/canonical/launchpad/testing/fakepackager.py (+2/-4) lib/canonical/launchpad/testing/pages.py (+3/-3) lib/canonical/launchpad/testing/systemdocs.py (+1/-1) lib/canonical/launchpad/utilities/celebrities.py (+7/-9) lib/canonical/launchpad/utilities/personroles.py (+1/-1) lib/canonical/launchpad/webapp/adapter.py (+1/-1) lib/canonical/launchpad/webapp/dbpolicy.py (+1/-2) lib/canonical/launchpad/webapp/launchbag.py (+12/-14) lib/canonical/launchpad/xmlrpc/application.py (+3/-3) lib/canonical/launchpad/xmlrpc/authserver.py (+2/-4) lib/canonical/lazr/feed/feed.py (+1/-1) lib/canonical/testing/layers.py (+2/-1) lib/canonical/widgets/announcementdate.py (+1/-1) lib/canonical/widgets/branch.py (+1/-1) lib/canonical/widgets/bugtask.py (+7/-3) lib/canonical/widgets/date.py (+1/-1) lib/canonical/widgets/launchpadtarget.py (+6/-3) lib/canonical/widgets/owner.py (+1/-1) lib/canonical/widgets/password.py (+1/-1) lib/canonical/widgets/product.py (+3/-2) lib/lp/archiveuploader/tests/nascentupload-packageset.txt (+1/-1) lib/lp/archiveuploader/tests/nascentupload.txt (+1/-1) lib/lp/archiveuploader/tests/test_nascentupload_documentation.py (+2/-4) lib/lp/archiveuploader/tests/test_ppauploadprocessor.py (+1/-1) lib/lp/bugs/doc/bug-nomination.txt (+1/-1) lib/lp/registry/doc/distribution-mirror.txt (+1/-1) lib/lp/registry/doc/sourcepackage.txt (+2/-2) lib/lp/soyuz/browser/tests/binarypackagerelease-views.txt (+1/-1) lib/lp/soyuz/doc/binarypackagerelease.txt (+1/-1) lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt (+5/-3) lib/lp/soyuz/doc/distroseriesqueue-translations.txt (+1/-1) lib/lp/soyuz/doc/distroseriesqueue.txt (+2/-2) lib/lp/soyuz/doc/gina-multiple-arch.txt (+12/-11) lib/lp/soyuz/doc/gina.txt (+10/-10) lib/lp/soyuz/doc/package-cache.txt (+1/-1) lib/lp/soyuz/doc/package-meta-classes.txt (+5/-3) lib/lp/soyuz/doc/publishing.txt (+1/-1) lib/lp/soyuz/doc/sourcepackagerelease.txt (+1/-1) lib/lp/soyuz/doc/soyuz-set-of-uploads.txt (+2/-2) lib/lp/soyuz/doc/soyuz-upload.txt (+1/-1) lib/lp/soyuz/model/binarypackagebuild.py (+1/-1) lib/lp/soyuz/model/distroarchseries.py (+1/-1) lib/lp/soyuz/model/distroseriessourcepackagerelease.py (+1/-1) lib/lp/soyuz/model/publishing.py (+1/-2) lib/lp/soyuz/scripts/tests/test_processdeathrow.py (+1/-1) lib/lp/soyuz/scripts/tests/test_queue.py (+17/-25) lib/lp/soyuz/stories/soyuz/xx-queue-pages-motu.txt (+2/-2) lib/lp/translations/doc/sourcepackagerelease-translations.txt (+1/-1) scripts/bug-export.py (+1/-1) scripts/bug-import.py (+1/-1) scripts/cache-country-mirrors.py (+3/-2) scripts/close-account.py (+3/-3) scripts/convert-person-to-team.py (+2/-1) scripts/ftpmaster-tools/initialise-from-parent.py (+1/-1) scripts/ftpmaster-tools/remove-package.py (+10/-5) scripts/ftpmaster-tools/sync-source.py (+2/-4) scripts/import-packagenames.py (+1/-1) scripts/migrate-bugzilla-initialcontacts.py (+3/-3) scripts/mlist-sync.py (+3/-2) scripts/rosetta/check-distroseries-translations-diffs.py (+1/-1) utilities/make-lp-user (+3/-5) |
To merge this branch: | bzr merge lp:~jml/launchpad/circular-rage |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Lange (community) | Approve | ||
Review via email: mp+40202@code.launchpad.net |
Commit message
Delete a bunch of imports from c.l.database.
Description of the change
Delete a bunch of imports from c.l.database.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'cronscripts/create-debwatches.py' |
2 | --- cronscripts/create-debwatches.py 2010-10-03 15:30:06 +0000 |
3 | +++ cronscripts/create-debwatches.py 2010-11-08 13:24:46 +0000 |
4 | @@ -22,7 +22,7 @@ |
5 | from lp.services.scripts.base import ( |
6 | LaunchpadCronScript, LaunchpadScriptFailure) |
7 | from canonical.launchpad.scripts.debsync import do_import |
8 | -from canonical.launchpad.interfaces import ILaunchpadCelebrities |
9 | +from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
10 | |
11 | |
12 | # setup core values and defaults |
13 | |
14 | === modified file 'cronscripts/distributionmirror-prober.py' |
15 | --- cronscripts/distributionmirror-prober.py 2010-10-03 15:30:06 +0000 |
16 | +++ cronscripts/distributionmirror-prober.py 2010-11-08 13:24:46 +0000 |
17 | @@ -20,8 +20,11 @@ |
18 | from canonical.database.sqlbase import ISOLATION_LEVEL_AUTOCOMMIT |
19 | from lp.services.scripts.base import ( |
20 | LaunchpadCronScript, LaunchpadScriptFailure) |
21 | -from canonical.launchpad.interfaces import ( |
22 | - IDistributionMirrorSet, ILibraryFileAliasSet, MirrorContent) |
23 | +from lp.registry.interfaces.distributionmirror import ( |
24 | + IDistributionMirrorSet, |
25 | + MirrorContent, |
26 | + ) |
27 | +from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet |
28 | from canonical.launchpad.webapp import canonical_url |
29 | from lp.registry.scripts.distributionmirror_prober import ( |
30 | get_expected_cdimage_paths, probe_archive_mirror, probe_cdimage_mirror) |
31 | |
32 | === modified file 'cronscripts/flag-expired-memberships.py' |
33 | --- cronscripts/flag-expired-memberships.py 2010-10-03 15:30:06 +0000 |
34 | +++ cronscripts/flag-expired-memberships.py 2010-11-08 13:24:46 +0000 |
35 | @@ -15,9 +15,11 @@ |
36 | from zope.component import getUtility |
37 | |
38 | from canonical.config import config |
39 | -from canonical.launchpad.interfaces import ( |
40 | - DAYS_BEFORE_EXPIRATION_WARNING_IS_SENT, ILaunchpadCelebrities, |
41 | - ITeamMembershipSet) |
42 | +from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
43 | +from lp.registry.interfaces.teammembership import ( |
44 | + DAYS_BEFORE_EXPIRATION_WARNING_IS_SENT, |
45 | + ITeamMembershipSet, |
46 | + ) |
47 | from lp.services.scripts.base import ( |
48 | LaunchpadCronScript, LaunchpadScriptFailure) |
49 | |
50 | |
51 | === modified file 'cronscripts/foaf-update-karma-cache.py' |
52 | --- cronscripts/foaf-update-karma-cache.py 2010-10-03 15:30:06 +0000 |
53 | +++ cronscripts/foaf-update-karma-cache.py 2010-11-08 13:24:46 +0000 |
54 | @@ -12,8 +12,8 @@ |
55 | from canonical.config import config |
56 | from canonical.database.sqlbase import ( |
57 | ISOLATION_LEVEL_AUTOCOMMIT, flush_database_updates) |
58 | -from canonical.launchpad.interfaces import IKarmaCacheManager |
59 | from lp.app.errors import NotFoundError |
60 | +from lp.registry.interfaces.karma import IKarmaCacheManager |
61 | from lp.services.scripts.base import LaunchpadCronScript |
62 | |
63 | |
64 | |
65 | === modified file 'cronscripts/parse-ppa-apache-access-logs.py' |
66 | --- cronscripts/parse-ppa-apache-access-logs.py 2010-06-10 05:22:58 +0000 |
67 | +++ cronscripts/parse-ppa-apache-access-logs.py 2010-11-08 13:24:46 +0000 |
68 | @@ -14,9 +14,7 @@ |
69 | from zope.component import getUtility |
70 | |
71 | from canonical.config import config |
72 | -# XXX: wgrant 2010-03-16 bug=539496: Importing directly from |
73 | -# lp.registry.interfaces.person results in a circular import. |
74 | -from canonical.launchpad.interfaces import IPersonSet |
75 | +from lp.registry.interfaces.person import IPersonSet |
76 | from lp.soyuz.interfaces.archive import NoSuchPPA |
77 | from lp.soyuz.scripts.ppa_apache_log_parser import DBUSER, get_ppa_file_key |
78 | from lp.services.apachelogparser.script import ParseApacheLogs |
79 | |
80 | === modified file 'cronscripts/process-mail.py' |
81 | --- cronscripts/process-mail.py 2010-10-11 18:29:14 +0000 |
82 | +++ cronscripts/process-mail.py 2010-11-08 13:24:46 +0000 |
83 | @@ -14,7 +14,7 @@ |
84 | from lp.services.scripts.base import ( |
85 | LaunchpadCronScript, LaunchpadScriptFailure) |
86 | from lp.services.mail.incoming import handleMail |
87 | -from canonical.launchpad.interfaces import IMailBox |
88 | +from canonical.launchpad.interfaces.mailbox import IMailBox |
89 | |
90 | |
91 | class ProcessMail(LaunchpadCronScript): |
92 | |
93 | === modified file 'cronscripts/send-bug-notifications.py' |
94 | --- cronscripts/send-bug-notifications.py 2010-10-03 15:30:06 +0000 |
95 | +++ cronscripts/send-bug-notifications.py 2010-11-08 13:24:46 +0000 |
96 | @@ -19,8 +19,8 @@ |
97 | |
98 | from canonical.config import config |
99 | from canonical.database.constants import UTC_NOW |
100 | -from canonical.launchpad.interfaces import IBugNotificationSet |
101 | from canonical.launchpad.mail import sendmail |
102 | +from lp.bugs.interfaces.bugnotification import IBugNotificationSet |
103 | from lp.bugs.scripts.bugnotification import get_email_notifications |
104 | from lp.services.scripts.base import LaunchpadCronScript |
105 | |
106 | |
107 | === modified file 'cronscripts/update-debwatches.py' |
108 | --- cronscripts/update-debwatches.py 2010-10-03 15:30:06 +0000 |
109 | +++ cronscripts/update-debwatches.py 2010-11-08 13:24:46 +0000 |
110 | @@ -15,12 +15,21 @@ |
111 | # zope bits |
112 | from zope.component import getUtility |
113 | |
114 | +from lp.bugs.interfaces.bug import IBugSet |
115 | +from lp.bugs.interfaces.bugtask import ( |
116 | + BugTaskSearchParams, |
117 | + IBugTaskSet, |
118 | + ) |
119 | +from lp.bugs.interfaces.bugwatch import IBugWatchSet |
120 | +from lp.bugs.interfaces.cve import ICveSet |
121 | from lp.bugs.scripts import debbugs |
122 | from lp.services.scripts.base import (LaunchpadCronScript, |
123 | LaunchpadScriptFailure) |
124 | -from canonical.launchpad.interfaces import (IBugSet, |
125 | - ILaunchpadCelebrities, InvalidEmailMessage, IBugTaskSet, |
126 | - IBugWatchSet, IMessageSet, ICveSet, BugTaskSearchParams) |
127 | +from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
128 | +from canonical.launchpad.interfaces.message import ( |
129 | + InvalidEmailMessage, |
130 | + IMessageSet, |
131 | + ) |
132 | from canonical.database.constants import UTC_NOW |
133 | |
134 | # setup core values and defaults |
135 | |
136 | === modified file 'cronscripts/update-pkgcache.py' |
137 | --- cronscripts/update-pkgcache.py 2010-10-03 15:30:06 +0000 |
138 | +++ cronscripts/update-pkgcache.py 2010-11-08 13:24:46 +0000 |
139 | @@ -13,8 +13,7 @@ |
140 | |
141 | from zope.component import getUtility |
142 | |
143 | -from canonical.config import config |
144 | -from canonical.launchpad.interfaces import IDistributionSet |
145 | +from lp.registry.interfaces.distribution import IDistributionSet |
146 | from lp.services.scripts.base import LaunchpadCronScript |
147 | |
148 | |
149 | |
150 | === modified file 'cronscripts/update-stats.py' |
151 | --- cronscripts/update-stats.py 2010-10-03 15:30:06 +0000 |
152 | +++ cronscripts/update-stats.py 2010-11-08 13:24:46 +0000 |
153 | @@ -11,10 +11,12 @@ |
154 | |
155 | from zope.component import getUtility |
156 | from canonical.database.sqlbase import ISOLATION_LEVEL_READ_COMMITTED |
157 | +from canonical.launchpad.interfaces.launchpadstatistic import ( |
158 | + ILaunchpadStatisticSet, |
159 | + ) |
160 | from lp.services.scripts.base import LaunchpadCronScript |
161 | -from canonical.launchpad.interfaces import ( |
162 | - IDistributionSet, ILaunchpadStatisticSet, IPersonSet |
163 | - ) |
164 | +from lp.registry.interfaces.distribution import IDistributionSet |
165 | +from lp.registry.interfaces.person import IPersonSet |
166 | from canonical.config import config |
167 | |
168 | |
169 | |
170 | === modified file 'database/schema/pending/add-mailing-list-experts.py' |
171 | --- database/schema/pending/add-mailing-list-experts.py 2010-10-03 15:30:06 +0000 |
172 | +++ database/schema/pending/add-mailing-list-experts.py 2010-11-08 13:24:46 +0000 |
173 | @@ -9,10 +9,13 @@ |
174 | |
175 | from zope.component import getUtility |
176 | |
177 | +from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
178 | from canonical.launchpad.scripts import execute_zcml_for_scripts |
179 | from canonical.lp import initZopeless |
180 | -from canonical.launchpad.interfaces import ( |
181 | - ILaunchpadCelebrities, IPersonSet, TeamSubscriptionPolicy) |
182 | +from lp.registry.interfaces.person import ( |
183 | + IPersonSet, |
184 | + TeamSubscriptionPolicy, |
185 | + ) |
186 | |
187 | |
188 | execute_zcml_for_scripts() |
189 | |
190 | === removed file 'database/schema/pending/create-openid-rp-configs.py' |
191 | --- database/schema/pending/create-openid-rp-configs.py 2010-10-03 15:30:06 +0000 |
192 | +++ database/schema/pending/create-openid-rp-configs.py 1970-01-01 00:00:00 +0000 |
193 | @@ -1,51 +0,0 @@ |
194 | -#!/usr/bin/python -S |
195 | -# |
196 | -# Copyright 2009 Canonical Ltd. This software is licensed under the |
197 | -# GNU Affero General Public License version 3 (see the file LICENSE). |
198 | - |
199 | -# A script to create OpenIDRPConfigs for trust roots we care about. |
200 | -# This is essentially porting the values from the KNOWN_TRUST_ROOTS |
201 | -# dict that we care about. |
202 | - |
203 | -import _pythonpath |
204 | - |
205 | -import os |
206 | - |
207 | -from zope.component import getUtility |
208 | - |
209 | -from canonical.config import config |
210 | -from canonical.launchpad.interfaces import ( |
211 | - ILibraryFileAliasSet, IOpenIDRPConfigSet) |
212 | -from canonical.launchpad.scripts import execute_zcml_for_scripts |
213 | -from canonical.lp import initZopeless |
214 | -from canonical.launchpad.interfaces import PersonCreationRationale as PCR |
215 | - |
216 | -execute_zcml_for_scripts() |
217 | -ztm = initZopeless() |
218 | - |
219 | -# Create Canonical logo file in Librarian |
220 | -filename = os.path.join( |
221 | - config.root, 'lib/canonical/launchpad/icing/canonical-logo.png') |
222 | -size = os.path.getsize(filename) |
223 | -fp = open(filename, 'rb') |
224 | -logo = getUtility(ILibraryFileAliasSet).create( |
225 | - name='canonical-logo.png', size=size, file=fp, contentType='image/png') |
226 | - |
227 | -# Create RP configs |
228 | -for trust_root in ['http://pdl-dev.co.uk', 'http://www.mmania.biz', |
229 | - 'http://shop.canonical.com', 'https://shop.canonical.com', |
230 | - 'https://testshop.canonical.com']: |
231 | - rpconfig = getUtility(IOpenIDRPConfigSet).new( |
232 | - trust_root=trust_root, |
233 | - displayname="The Ubuntu Store from Canonical", |
234 | - description=("For the Ubuntu Store, you need a Launchpad account " |
235 | - "so we can remember your order details and keep in " |
236 | - "touch with you about your orders."), |
237 | - logo=logo, |
238 | - allowed_sreg=['email', 'fullname', 'nickname', |
239 | - 'x_address1', 'x_address2', 'x_organization', |
240 | - 'x_city', 'x_province', 'country', 'postcode', |
241 | - 'x_phone'], |
242 | - creation_rationale=PCR.OWNER_CREATED_UBUNTU_SHOP) |
243 | - |
244 | -ztm.commit() |
245 | |
246 | === removed file 'database/schema/pending/import_language_packs.py' |
247 | --- database/schema/pending/import_language_packs.py 2010-10-03 15:30:06 +0000 |
248 | +++ database/schema/pending/import_language_packs.py 1970-01-01 00:00:00 +0000 |
249 | @@ -1,69 +0,0 @@ |
250 | -#!/usr/bin/python |
251 | -# |
252 | -# Copyright 2009 Canonical Ltd. This software is licensed under the |
253 | -# GNU Affero General Public License version 3 (see the file LICENSE). |
254 | - |
255 | -"""Script to upload existing language packs into Launchpad.""" |
256 | - |
257 | -from urllib2 import urlopen |
258 | -from zope.component import getUtility |
259 | - |
260 | -from canonical.launchpad.scripts import execute_zcml_for_scripts |
261 | -from canonical.launchpad.interfaces import ( |
262 | - IDistributionSet, ILanguagePackSet, LanguagePackType) |
263 | -from canonical.librarian.interfaces import ILibrarianClient |
264 | -from canonical.lp import initZopeless |
265 | - |
266 | -language_packs_dates = { |
267 | - 'dapper': '2007-08-03', |
268 | - 'edgy': '2006-10-19', |
269 | - 'feisty': '2007-04-12', |
270 | - 'gutsy': '2007-08-02', |
271 | - } |
272 | - |
273 | - |
274 | -def get_langpack_url(distroseries_name, export_date): |
275 | - filename = 'rosetta-%s-%s.tar.gz' % (distroseries_name, export_date) |
276 | - return 'http://people.ubuntu.com/~carlos/language-packs/%s/%s' % ( |
277 | - distroseries_name, filename) |
278 | - |
279 | - |
280 | -def main(): |
281 | - # setup a transaction manager to LPDB |
282 | - tm = initZopeless() |
283 | - |
284 | - # load the zcml configuration |
285 | - execute_zcml_for_scripts() |
286 | - |
287 | - # get an librarian client instance |
288 | - client = getUtility(ILibrarianClient) |
289 | - |
290 | - for distroseries_name, langpack_date in language_packs_dates.iteritems(): |
291 | - # Open the language pack file. |
292 | - langpack = urlopen(get_langpack_url(distroseries_name, langpack_date)) |
293 | - |
294 | - # Get some metadata information. |
295 | - flen = int(langpack.info()['Content-Length']) |
296 | - filename = 'ubuntu-%s-translations.tar.gz' % distroseries_name |
297 | - ftype = 'application/x-gtar' |
298 | - |
299 | - # Add it to Librarian |
300 | - file_alias = client.addFile( |
301 | - filename, flen, langpack, contentType=ftype) |
302 | - |
303 | - # Register it in the LanguagePack table. |
304 | - distribution = getUtility(IDistributionSet)['ubuntu'] |
305 | - distroseries = distribution.getSeries(distroseries_name) |
306 | - language_pack_set = getUtility(ILanguagePackSet) |
307 | - lang_pack_type = LanguagePackType.FULL |
308 | - |
309 | - # And set it as the base one. |
310 | - distroseries.language_pack_base = language_pack_set.addLanguagePack( |
311 | - distroseries, file_alias, lang_pack_type) |
312 | - |
313 | - # Store the changes. |
314 | - tm.commit() |
315 | - |
316 | - |
317 | -if __name__ == '__main__': |
318 | - main() |
319 | |
320 | === removed file 'database/schema/pending/update-shippingrequest-types.py' |
321 | --- database/schema/pending/update-shippingrequest-types.py 2010-10-03 15:30:06 +0000 |
322 | +++ database/schema/pending/update-shippingrequest-types.py 1970-01-01 00:00:00 +0000 |
323 | @@ -1,51 +0,0 @@ |
324 | -#!/usr/bin/python -S |
325 | -# |
326 | -# Copyright 2009 Canonical Ltd. This software is licensed under the |
327 | -# GNU Affero General Public License version 3 (see the file LICENSE). |
328 | - |
329 | -# Update the type of all Feisty requests since these are the only ones we can |
330 | -# still infer. |
331 | - |
332 | -import _pythonpath |
333 | - |
334 | -from canonical.database.sqlbase import cursor, sqlvalues |
335 | -from canonical.launchpad.database import ShippingRequest |
336 | -from canonical.launchpad.scripts import execute_zcml_for_scripts |
337 | -from canonical.lp import initZopeless |
338 | -from canonical.launchpad.interfaces import ( |
339 | - ShipItDistroSeries, ShipItFlavour, ShippingRequestType) |
340 | - |
341 | - |
342 | -execute_zcml_for_scripts() |
343 | -ztm = initZopeless(implicitBegin=False) |
344 | - |
345 | -ztm.begin() |
346 | -query = """ |
347 | - SELECT DISTINCT ShippingRequest.id |
348 | - FROM ShippingRequest |
349 | - WHERE ShippingRequest.type IS NULL |
350 | - AND ShippingRequest.id IN ( |
351 | - SELECT request FROM RequestedCDs WHERE distrorelease = %s) |
352 | - """ % sqlvalues(ShipItDistroSeries.FEISTY) |
353 | -cur = cursor() |
354 | -cur.execute(query) |
355 | -ids = cur.fetchall() |
356 | -ztm.abort() |
357 | - |
358 | -for [id] in ids: |
359 | - ztm.begin() |
360 | - |
361 | - request = ShippingRequest.get(id) |
362 | - requested_cds = request.getAllRequestedCDs() |
363 | - is_custom = False |
364 | - for flavour in ShipItFlavour.items: |
365 | - if request.containsCustomQuantitiesOfFlavour(flavour): |
366 | - is_custom = True |
367 | - if is_custom: |
368 | - request.type = ShippingRequestType.CUSTOM |
369 | - print "Updated type of request #%d to CUSTOM" % request.id |
370 | - else: |
371 | - request.type = ShippingRequestType.STANDARD |
372 | - print "Updated type of request #%d to STANDARD" % request.id |
373 | - |
374 | - ztm.commit() |
375 | |
376 | === modified file 'lib/canonical/database/harness.py' |
377 | --- lib/canonical/database/harness.py 2010-10-03 15:30:06 +0000 |
378 | +++ lib/canonical/database/harness.py 2010-11-08 13:24:46 +0000 |
379 | @@ -33,7 +33,6 @@ |
380 | # |
381 | # pylint: disable-msg=W0614,W0401 |
382 | from canonical.launchpad.database import * |
383 | -from canonical.launchpad.interfaces import * |
384 | from lp.bugs.model.bug import Bug |
385 | from lp.testing.factory import LaunchpadObjectFactory |
386 | from lp.testing.mail import create_mail_for_directoryMailBox |
387 | |
388 | === modified file 'lib/canonical/database/sqlbase.py' |
389 | --- lib/canonical/database/sqlbase.py 2010-10-24 12:37:51 +0000 |
390 | +++ lib/canonical/database/sqlbase.py 2010-11-08 13:24:46 +0000 |
391 | @@ -183,7 +183,7 @@ |
392 | We refetch any parameters from different stores from the |
393 | correct master Store. |
394 | """ |
395 | - from canonical.launchpad.interfaces import IMasterStore |
396 | + from canonical.launchpad.interfaces.lpstorm import IMasterStore |
397 | # Make it simple to write dumb-invalidators - initialised |
398 | # _cached_properties to a valid list rather than just-in-time creation. |
399 | self._cached_properties = [] |
400 | @@ -219,7 +219,7 @@ |
401 | |
402 | @classmethod |
403 | def _get_store(cls): |
404 | - from canonical.launchpad.interfaces import IStore |
405 | + from canonical.launchpad.interfaces.lpstorm import IStore |
406 | return IStore(cls) |
407 | |
408 | def __repr__(self): |
409 | @@ -229,7 +229,7 @@ |
410 | return '<%s at 0x%x>' % (self.__class__.__name__, id(self)) |
411 | |
412 | def destroySelf(self): |
413 | - from canonical.launchpad.interfaces import IMasterObject |
414 | + from canonical.launchpad.interfaces.lpstorm import IMasterObject |
415 | my_master = IMasterObject(self) |
416 | if self is my_master: |
417 | super(SQLBase, self).destroySelf() |
418 | |
419 | === modified file 'lib/canonical/launchpad/browser/feeds.py' |
420 | --- lib/canonical/launchpad/browser/feeds.py 2010-10-03 15:30:06 +0000 |
421 | +++ lib/canonical/launchpad/browser/feeds.py 2010-11-08 13:24:46 +0000 |
422 | @@ -29,17 +29,7 @@ |
423 | from zope.security.interfaces import Unauthorized |
424 | |
425 | from canonical.config import config |
426 | -from canonical.launchpad.interfaces import ( |
427 | - IAnnouncementSet, |
428 | - IBugSet, |
429 | - IBugTask, |
430 | - IBugTaskSet, |
431 | - IFeedsApplication, |
432 | - IHasAnnouncements, |
433 | - IHasBugs, |
434 | - ILaunchpadRoot, |
435 | - IPillarNameSet, |
436 | - ) |
437 | +from canonical.launchpad.interfaces.launchpad import IFeedsApplication |
438 | from canonical.launchpad.layers import FeedsLayer |
439 | from canonical.launchpad.webapp import ( |
440 | canonical_name, |
441 | @@ -47,16 +37,30 @@ |
442 | Navigation, |
443 | stepto, |
444 | ) |
445 | -from canonical.launchpad.webapp.interfaces import ICanonicalUrlData |
446 | +from canonical.launchpad.webapp.interfaces import ( |
447 | + ICanonicalUrlData, |
448 | + ILaunchpadRoot, |
449 | + ) |
450 | from canonical.launchpad.webapp.publisher import RedirectionView |
451 | from canonical.launchpad.webapp.url import urlappend |
452 | from canonical.launchpad.webapp.vhosts import allvhosts |
453 | from lp.app.errors import NotFoundError |
454 | +from lp.bugs.interfaces.bug import IBugSet |
455 | +from lp.bugs.interfaces.bugtarget import IHasBugs |
456 | +from lp.bugs.interfaces.bugtask import ( |
457 | + IBugTask, |
458 | + IBugTaskSet, |
459 | + ) |
460 | from lp.code.interfaces.branch import IBranch |
461 | +from lp.registry.interfaces.announcement import ( |
462 | + IAnnouncementSet, |
463 | + IHasAnnouncements, |
464 | + ) |
465 | from lp.registry.interfaces.person import ( |
466 | IPerson, |
467 | IPersonSet, |
468 | ) |
469 | +from lp.registry.interfaces.pillar import IPillarNameSet |
470 | from lp.registry.interfaces.product import IProduct |
471 | from lp.registry.interfaces.projectgroup import IProjectGroup |
472 | |
473 | |
474 | === modified file 'lib/canonical/launchpad/browser/launchpadstatistic.py' |
475 | --- lib/canonical/launchpad/browser/launchpadstatistic.py 2010-10-03 15:30:06 +0000 |
476 | +++ lib/canonical/launchpad/browser/launchpadstatistic.py 2010-11-08 13:24:46 +0000 |
477 | @@ -10,7 +10,9 @@ |
478 | 'LaunchpadStatisticSetFacets', |
479 | ] |
480 | |
481 | -from canonical.launchpad.interfaces import ILaunchpadStatisticSet |
482 | +from canonical.launchpad.interfaces.launchpadstatistic import ( |
483 | + ILaunchpadStatisticSet, |
484 | + ) |
485 | from canonical.launchpad.webapp import ( |
486 | LaunchpadView, |
487 | StandardLaunchpadFacets, |
488 | |
489 | === modified file 'lib/canonical/launchpad/browser/librarian.py' |
490 | --- lib/canonical/launchpad/browser/librarian.py 2010-10-03 15:30:06 +0000 |
491 | +++ lib/canonical/launchpad/browser/librarian.py 2010-11-08 13:24:46 +0000 |
492 | @@ -26,7 +26,7 @@ |
493 | from zope.publisher.interfaces.browser import IBrowserPublisher |
494 | from zope.security.interfaces import Unauthorized |
495 | |
496 | -from canonical.launchpad.interfaces import ILibraryFileAlias |
497 | +from canonical.launchpad.interfaces.librarian import ILibraryFileAlias |
498 | from canonical.launchpad.layers import WebServiceLayer |
499 | from canonical.launchpad.webapp.authorization import check_permission |
500 | from canonical.launchpad.webapp.interfaces import ( |
501 | |
502 | === modified file 'lib/canonical/launchpad/browser/packagerelationship.py' |
503 | --- lib/canonical/launchpad/browser/packagerelationship.py 2010-10-03 15:30:06 +0000 |
504 | +++ lib/canonical/launchpad/browser/packagerelationship.py 2010-11-08 13:24:46 +0000 |
505 | @@ -13,7 +13,7 @@ |
506 | import operator as std_operator |
507 | from zope.interface import implements |
508 | |
509 | -from canonical.launchpad.interfaces import ( |
510 | +from canonical.launchpad.interfaces.packagerelationship import ( |
511 | IPackageRelationship, |
512 | IPackageRelationshipSet, |
513 | ) |
514 | |
515 | === modified file 'lib/canonical/launchpad/components/cdatetime.py' |
516 | --- lib/canonical/launchpad/components/cdatetime.py 2010-10-03 15:30:06 +0000 |
517 | +++ lib/canonical/launchpad/components/cdatetime.py 2010-11-08 13:24:46 +0000 |
518 | @@ -10,7 +10,7 @@ |
519 | import pytz |
520 | from zope.interface import implements |
521 | |
522 | -from canonical.launchpad.interfaces import IAging |
523 | +from canonical.launchpad.interfaces.launchpad import IAging |
524 | |
525 | |
526 | SECONDS_PER_HOUR = 3600 |
527 | |
528 | === modified file 'lib/canonical/launchpad/components/tokens.py' |
529 | --- lib/canonical/launchpad/components/tokens.py 2010-10-03 15:30:06 +0000 |
530 | +++ lib/canonical/launchpad/components/tokens.py 2010-11-08 13:24:46 +0000 |
531 | @@ -14,7 +14,7 @@ |
532 | |
533 | from zope.component import getUtility |
534 | |
535 | -from canonical.launchpad.interfaces import IMasterStore |
536 | +from canonical.launchpad.interfaces.lpstorm import IMasterStore |
537 | |
538 | |
539 | def create_token(token_length): |
540 | |
541 | === modified file 'lib/canonical/launchpad/database/__init__.py' |
542 | --- lib/canonical/launchpad/database/__init__.py 2010-09-30 23:21:35 +0000 |
543 | +++ lib/canonical/launchpad/database/__init__.py 2010-11-08 13:24:46 +0000 |
544 | @@ -10,30 +10,5 @@ |
545 | from canonical.launchpad.database.message import * |
546 | from canonical.launchpad.database.oauth import * |
547 | from canonical.launchpad.database.temporaryblobstorage import * |
548 | -from lp.buildmaster.model.builder import * |
549 | from lp.services.worlddata.model.language import * |
550 | from lp.services.worlddata.model.spokenin import * |
551 | -from lp.soyuz.model.archive import * |
552 | -from lp.soyuz.model.archivedependency import * |
553 | -from lp.soyuz.model.archivepermission import * |
554 | -from lp.soyuz.model.binarypackagebuild import * |
555 | -from lp.soyuz.model.binarypackagename import * |
556 | -from lp.soyuz.model.binarypackagerelease import * |
557 | -from lp.soyuz.model.component import * |
558 | -from lp.soyuz.model.distributionsourcepackagerelease import * |
559 | -from lp.soyuz.model.distroarchseries import * |
560 | -from lp.soyuz.model.distroarchseriesbinarypackage import * |
561 | -from lp.soyuz.model.distroarchseriesbinarypackagerelease import * |
562 | -from lp.soyuz.model.distroseriesbinarypackage import * |
563 | -from lp.soyuz.model.distroseriespackagecache import * |
564 | -from lp.soyuz.model.distroseriessourcepackagerelease import * |
565 | -from lp.soyuz.model.files import * |
566 | -# XXX flacoste 2009/03/18 We should use specific imports instead of |
567 | -# importing from this module. |
568 | -from lp.soyuz.model.packagediff import * |
569 | -from lp.soyuz.model.packageset import * |
570 | -from lp.soyuz.model.processor import * |
571 | -from lp.soyuz.model.publishing import * |
572 | -from lp.soyuz.model.queue import * |
573 | -from lp.soyuz.model.section import * |
574 | -from lp.soyuz.model.sourcepackagerelease import * |
575 | |
576 | === modified file 'lib/canonical/launchpad/database/account.py' |
577 | --- lib/canonical/launchpad/database/account.py 2010-10-03 15:30:06 +0000 |
578 | +++ lib/canonical/launchpad/database/account.py 2010-11-08 13:24:46 +0000 |
579 | @@ -17,14 +17,13 @@ |
580 | from zope.security.proxy import removeSecurityProxy |
581 | |
582 | from canonical.database.constants import ( |
583 | - DEFAULT, |
584 | UTC_NOW, |
585 | ) |
586 | from canonical.database.datetimecol import UtcDateTimeCol |
587 | from canonical.database.enumcol import EnumCol |
588 | from canonical.database.sqlbase import SQLBase |
589 | from canonical.launchpad.database.emailaddress import EmailAddress |
590 | -from canonical.launchpad.interfaces import ( |
591 | +from canonical.launchpad.interfaces.lpstorm import ( |
592 | IMasterObject, |
593 | IMasterStore, |
594 | IStore, |
595 | |
596 | === modified file 'lib/canonical/launchpad/database/emailaddress.py' |
597 | --- lib/canonical/launchpad/database/emailaddress.py 2010-10-03 15:30:06 +0000 |
598 | +++ lib/canonical/launchpad/database/emailaddress.py 2010-11-08 13:24:46 +0000 |
599 | @@ -27,7 +27,7 @@ |
600 | SQLBase, |
601 | sqlvalues, |
602 | ) |
603 | -from canonical.launchpad.interfaces import ( |
604 | +from canonical.launchpad.interfaces.emailaddress import ( |
605 | EmailAddressAlreadyTaken, |
606 | EmailAddressStatus, |
607 | IEmailAddress, |
608 | |
609 | === modified file 'lib/canonical/launchpad/database/launchpadstatistic.py' |
610 | --- lib/canonical/launchpad/database/launchpadstatistic.py 2010-10-03 15:30:06 +0000 |
611 | +++ lib/canonical/launchpad/database/launchpadstatistic.py 2010-11-08 13:24:46 +0000 |
612 | @@ -25,15 +25,15 @@ |
613 | SQLBase, |
614 | sqlvalues, |
615 | ) |
616 | -from canonical.launchpad.interfaces import ( |
617 | +from canonical.launchpad.interfaces.launchpadstatistic import ( |
618 | ILaunchpadStatistic, |
619 | ILaunchpadStatisticSet, |
620 | - IPersonSet, |
621 | - QuestionStatus, |
622 | ) |
623 | +from lp.answers.interfaces.questionenums import QuestionStatus |
624 | from lp.answers.model.question import Question |
625 | from lp.bugs.model.bug import Bug |
626 | from lp.bugs.model.bugtask import BugTask |
627 | +from lp.registry.interfaces.person import IPersonSet |
628 | from lp.registry.model.product import Product |
629 | from lp.services.worlddata.model.language import Language |
630 | from lp.translations.model.pofile import POFile |
631 | |
632 | === modified file 'lib/canonical/launchpad/database/librarian.py' |
633 | --- lib/canonical/launchpad/database/librarian.py 2010-10-03 15:30:06 +0000 |
634 | +++ lib/canonical/launchpad/database/librarian.py 2010-11-08 13:24:46 +0000 |
635 | @@ -57,14 +57,14 @@ |
636 | session_store, |
637 | SQLBase, |
638 | ) |
639 | -from canonical.launchpad.interfaces import ( |
640 | +from canonical.launchpad.interfaces.librarian import ( |
641 | ILibraryFileAlias, |
642 | ILibraryFileAliasSet, |
643 | ILibraryFileAliasWithParent, |
644 | ILibraryFileContent, |
645 | ILibraryFileDownloadCount, |
646 | - IMasterStore, |
647 | ) |
648 | +from canonical.launchpad.interfaces.lpstorm import IMasterStore |
649 | from canonical.librarian.interfaces import ( |
650 | DownloadFailed, |
651 | ILibrarianClient, |
652 | |
653 | === modified file 'lib/canonical/launchpad/database/logintoken.py' |
654 | --- lib/canonical/launchpad/database/logintoken.py 2010-10-03 15:30:06 +0000 |
655 | +++ lib/canonical/launchpad/database/logintoken.py 2010-11-08 13:24:46 +0000 |
656 | @@ -31,14 +31,13 @@ |
657 | create_unique_token_for_table, |
658 | ) |
659 | from canonical.launchpad.helpers import get_email_template |
660 | -from canonical.launchpad.interfaces import ( |
661 | - IGPGHandler, |
662 | +from canonical.launchpad.interfaces.emailaddress import IEmailAddressSet |
663 | +from canonical.launchpad.interfaces.gpghandler import IGPGHandler |
664 | +from canonical.launchpad.interfaces.logintoken import ( |
665 | ILoginToken, |
666 | ILoginTokenSet, |
667 | - IPersonSet, |
668 | LoginTokenType, |
669 | ) |
670 | -from canonical.launchpad.interfaces.emailaddress import IEmailAddressSet |
671 | from canonical.launchpad.interfaces.lpstorm import IMasterObject |
672 | from canonical.launchpad.mail import ( |
673 | format_address, |
674 | @@ -53,6 +52,7 @@ |
675 | ) |
676 | from lp.app.errors import NotFoundError |
677 | from lp.registry.interfaces.gpg import IGPGKeySet |
678 | +from lp.registry.interfaces.person import IPersonSet |
679 | |
680 | |
681 | class LoginToken(SQLBase): |
682 | |
683 | === modified file 'lib/canonical/launchpad/database/message.py' |
684 | --- lib/canonical/launchpad/database/message.py 2010-10-21 16:36:01 +0000 |
685 | +++ lib/canonical/launchpad/database/message.py 2010-11-08 13:24:46 +0000 |
686 | @@ -63,11 +63,8 @@ |
687 | from canonical.database.sqlbase import SQLBase |
688 | from canonical.encoding import guess as ensure_unicode |
689 | from canonical.launchpad.helpers import get_filename_from_message_id |
690 | -from canonical.launchpad.interfaces import ( |
691 | +from canonical.launchpad.interfaces.librarian import ( |
692 | ILibraryFileAliasSet, |
693 | - IPersonSet, |
694 | - PersonCreationRationale, |
695 | - UnknownSender, |
696 | ) |
697 | from canonical.launchpad.interfaces.message import ( |
698 | IDirectEmailAuthorization, |
699 | @@ -77,10 +74,15 @@ |
700 | IMessageSet, |
701 | InvalidEmailMessage, |
702 | IUserToUserEmail, |
703 | + UnknownSender, |
704 | ) |
705 | from canonical.launchpad.mail import signed_message_from_string |
706 | from lp.app.errors import NotFoundError |
707 | -from lp.registry.interfaces.person import validate_public_person |
708 | +from lp.registry.interfaces.person import ( |
709 | + IPersonSet, |
710 | + PersonCreationRationale, |
711 | + validate_public_person, |
712 | + ) |
713 | from lp.services.job.model.job import Job |
714 | from lp.services.propertycache import cachedproperty |
715 | |
716 | |
717 | === modified file 'lib/canonical/launchpad/database/oauth.py' |
718 | --- lib/canonical/launchpad/database/oauth.py 2010-11-02 17:06:44 +0000 |
719 | +++ lib/canonical/launchpad/database/oauth.py 2010-11-08 13:24:46 +0000 |
720 | @@ -34,7 +34,7 @@ |
721 | create_token, |
722 | create_unique_token_for_table, |
723 | ) |
724 | -from canonical.launchpad.interfaces import ( |
725 | +from canonical.launchpad.interfaces.oauth import ( |
726 | ClockSkew, |
727 | IOAuthAccessToken, |
728 | IOAuthConsumer, |
729 | |
730 | === modified file 'lib/canonical/launchpad/database/temporaryblobstorage.py' |
731 | --- lib/canonical/launchpad/database/temporaryblobstorage.py 2010-10-03 15:30:06 +0000 |
732 | +++ lib/canonical/launchpad/database/temporaryblobstorage.py 2010-11-08 13:24:46 +0000 |
733 | @@ -32,12 +32,12 @@ |
734 | from canonical.database.datetimecol import UtcDateTimeCol |
735 | from canonical.database.sqlbase import SQLBase |
736 | from canonical.launchpad.database.librarian import LibraryFileAlias |
737 | -from canonical.launchpad.interfaces import ( |
738 | +from canonical.launchpad.interfaces.temporaryblobstorage import ( |
739 | BlobTooLarge, |
740 | - ILibraryFileAliasSet, |
741 | ITemporaryBlobStorage, |
742 | ITemporaryStorageManager, |
743 | ) |
744 | +from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet |
745 | from canonical.launchpad.interfaces.lpstorm import IStore |
746 | from lp.services.job.interfaces.job import JobStatus |
747 | |
748 | |
749 | === modified file 'lib/canonical/launchpad/doc/decoratedresultset.txt' |
750 | --- lib/canonical/launchpad/doc/decoratedresultset.txt 2010-10-25 13:16:10 +0000 |
751 | +++ lib/canonical/launchpad/doc/decoratedresultset.txt 2010-11-08 13:24:46 +0000 |
752 | @@ -77,8 +77,8 @@ |
753 | on a storm ResultSet does not respect the distinct |
754 | config option (https://bugs.launchpad.net/storm/+bug/217644): |
755 | |
756 | - >>> from canonical.launchpad.database import (BinaryPackageRelease, |
757 | - ... BinaryPackagePublishingHistory) |
758 | + >>> from lp.soyuz.model.binarypackagerelease import BinaryPackageRelease |
759 | + >>> from lp.soyuz.model.publishing import BinaryPackagePublishingHistory |
760 | >>> results = store.find(BinaryPackageRelease, |
761 | ... BinaryPackageRelease.id == |
762 | ... BinaryPackagePublishingHistory.binarypackagereleaseID) |
763 | |
764 | === modified file 'lib/canonical/launchpad/doc/validation.txt' |
765 | --- lib/canonical/launchpad/doc/validation.txt 2010-10-18 22:24:59 +0000 |
766 | +++ lib/canonical/launchpad/doc/validation.txt 2010-11-08 13:24:46 +0000 |
767 | @@ -7,7 +7,7 @@ |
768 | The validate_distrotask() function is used to guarantee that distribution |
769 | bugtasks are unique per bug. |
770 | |
771 | - >>> from canonical.launchpad.interfaces import validate_distrotask |
772 | + >>> from canonical.launchpad.interfaces.validation import validate_distrotask |
773 | >>> from lp.bugs.interfaces.bug import IBugSet |
774 | >>> from lp.registry.interfaces.distribution import IDistributionSet |
775 | >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet |
776 | |
777 | === modified file 'lib/canonical/launchpad/helpers.py' |
778 | --- lib/canonical/launchpad/helpers.py 2010-10-03 15:30:06 +0000 |
779 | +++ lib/canonical/launchpad/helpers.py 2010-11-08 13:24:46 +0000 |
780 | @@ -25,7 +25,7 @@ |
781 | from zope.security.interfaces import ForbiddenAttribute |
782 | |
783 | import canonical |
784 | -from canonical.launchpad.interfaces import ILaunchBag |
785 | +from canonical.launchpad.webapp.interfaces import ILaunchBag |
786 | from lp.services.geoip.interfaces import ( |
787 | IRequestLocalLanguages, |
788 | IRequestPreferredLanguages, |
789 | |
790 | === modified file 'lib/canonical/launchpad/interfaces/__init__.py' |
791 | --- lib/canonical/launchpad/interfaces/__init__.py 2010-10-31 20:18:45 +0000 |
792 | +++ lib/canonical/launchpad/interfaces/__init__.py 2010-11-08 13:24:46 +0000 |
793 | @@ -1,146 +1,12 @@ |
794 | -# Copyright 2009 Canonical Ltd. This software is licensed under the |
795 | -# GNU Affero General Public License version 3 (see the file LICENSE). |
796 | - |
797 | -# pylint: disable-msg=W0401,C0301 |
798 | - |
799 | -__metaclass__ = type |
800 | - |
801 | -# XXX flacoste 2009/03/18 We should use specific imports instead of |
802 | -# importing from this module. |
803 | - |
804 | -# SKIP this file when formatting imports. |
805 | -from canonical.launchpad.interfaces.launchpad import * |
806 | -from lp.bugs.interfaces.malone import * |
807 | -from canonical.launchpad.interfaces.validation import * |
808 | - |
809 | -# these need to be at the top, because the others depend on them sometimes |
810 | -from lp.blueprints.interfaces.specificationtarget import * |
811 | -from lp.registry.interfaces.person import * |
812 | -from lp.registry.interfaces.pillar import * |
813 | - |
814 | -from canonical.launchpad.interfaces.account import * |
815 | -from lp.soyuz.interfaces.archive import * |
816 | -from lp.soyuz.interfaces.archivedependency import * |
817 | -from lp.soyuz.interfaces.archivepermission import * |
818 | -from lp.soyuz.interfaces.archivesubscriber import * |
819 | -from lp.registry.interfaces.announcement import * |
820 | -from canonical.launchpad.interfaces.authserver import * |
821 | -from canonical.launchpad.interfaces.authtoken import * |
822 | -from lp.soyuz.interfaces.binarypackagerelease import * |
823 | -from lp.soyuz.interfaces.binarypackagename import * |
824 | -from lp.bugs.interfaces.bugactivity import * |
825 | -from lp.bugs.interfaces.bugattachment import * |
826 | -from lp.bugs.interfaces.bug import * |
827 | -from lp.bugs.interfaces.bugbranch import * |
828 | -from lp.bugs.interfaces.bugcve import * |
829 | -from lp.bugs.interfaces.buglink import * |
830 | -from lp.bugs.interfaces.bugmessage import * |
831 | -from lp.bugs.interfaces.bugnomination import * |
832 | -from lp.bugs.interfaces.bugnotification import * |
833 | -from lp.bugs.interfaces.bugsubscription import * |
834 | -from lp.bugs.interfaces.bugsupervisor import * |
835 | -from lp.bugs.interfaces.bugtask import * |
836 | -from lp.bugs.interfaces.bugtarget import * |
837 | -from lp.bugs.interfaces.bugtracker import * |
838 | -from lp.bugs.interfaces.bugwatch import * |
839 | -from lp.soyuz.interfaces.binarypackagebuild import * |
840 | -from lp.buildmaster.interfaces.builder import * |
841 | -from lp.soyuz.interfaces.buildrecords import * |
842 | -from lp.registry.interfaces.codeofconduct import * |
843 | -from lp.registry.interfaces.commercialsubscription import * |
844 | -from lp.soyuz.interfaces.component import * |
845 | -from lp.services.worlddata.interfaces.country import * |
846 | -from lp.bugs.interfaces.cve import * |
847 | -from lp.bugs.interfaces.cvereference import * |
848 | -from lp.registry.interfaces.distribution import * |
849 | -from lp.registry.interfaces.distributionmirror import * |
850 | -from lp.registry.interfaces.distributionsourcepackage import * |
851 | -from lp.registry.interfaces.distroseriesdifference import * |
852 | -from lp.registry.interfaces.distroseriesdifferencecomment import * |
853 | -from lp.soyuz.interfaces.distributionsourcepackagecache import * |
854 | -from lp.soyuz.interfaces.distributionsourcepackagerelease import * |
855 | -from lp.registry.interfaces.series import * |
856 | -from lp.soyuz.interfaces.distroarchseries import * |
857 | -from lp.soyuz.interfaces.distroarchseriesbinarypackage import * |
858 | -from lp.soyuz.interfaces.distroarchseriesbinarypackagerelease\ |
859 | - import * |
860 | -from lp.registry.interfaces.distroseries import * |
861 | -from lp.soyuz.interfaces.distroseriesbinarypackage import * |
862 | -from lp.soyuz.interfaces.distroseriespackagecache import * |
863 | -from lp.soyuz.interfaces.distroseriessourcepackagerelease import * |
864 | -from canonical.launchpad.interfaces.emailaddress import * |
865 | -from lp.registry.interfaces.entitlement import * |
866 | -from lp.bugs.interfaces.externalbugtracker import * |
867 | -from lp.registry.interfaces.featuredproject import * |
868 | -from lp.soyuz.interfaces.files import * |
869 | -from lp.registry.interfaces.gpg import * |
870 | -from canonical.launchpad.interfaces.gpghandler import * |
871 | -from lp.hardwaredb.interfaces.hwdb import * |
872 | -from lp.registry.interfaces.irc import * |
873 | -from lp.registry.interfaces.jabber import * |
874 | -from lp.registry.interfaces.karma import * |
875 | -from lp.services.worlddata.interfaces.language import * |
876 | -from canonical.launchpad.interfaces.launchpad import * |
877 | -from canonical.launchpad.interfaces.launchpadstatistic import * |
878 | -from canonical.launchpad.interfaces.librarian import * |
879 | -from lp.registry.interfaces.location import * |
880 | -from canonical.launchpad.interfaces.logintoken import * |
881 | -from canonical.launchpad.interfaces.lpstorm import * |
882 | -from canonical.launchpad.interfaces.mail import * |
883 | -from canonical.launchpad.interfaces.mailbox import * |
884 | -from lp.registry.interfaces.mailinglist import * |
885 | -from lp.registry.interfaces.mailinglistsubscription import * |
886 | -from canonical.launchpad.interfaces.message import * |
887 | -from lp.registry.interfaces.milestone import * |
888 | -from canonical.launchpad.interfaces.oauth import * |
889 | -from canonical.launchpad.interfaces.openidconsumer import * |
890 | -from canonical.launchpad.interfaces.packagerelationship import * |
891 | -from canonical.launchpad.interfaces.pathlookup import * |
892 | -from lp.registry.interfaces.poll import * |
893 | -from lp.soyuz.interfaces.processor import * |
894 | -from lp.registry.interfaces.product import * |
895 | -from lp.registry.interfaces.productlicense import * |
896 | -from lp.registry.interfaces.productrelease import * |
897 | -from lp.registry.interfaces.productseries import * |
898 | -from lp.registry.interfaces.projectgroup import * |
899 | -from lp.soyuz.interfaces.publishing import * |
900 | -from lp.soyuz.interfaces.queue import * |
901 | -from canonical.launchpad.interfaces.schema import * |
902 | -from lp.services.scripts.interfaces.scriptactivity import * |
903 | -from lp.soyuz.interfaces.section import * |
904 | -from canonical.launchpad.interfaces.searchservice import * |
905 | -from lp.registry.interfaces.sourcepackage import * |
906 | -from lp.registry.interfaces.sourcepackagename import * |
907 | -from lp.soyuz.interfaces.sourcepackagerelease import * |
908 | -from lp.blueprints.interfaces.specification import * |
909 | -from lp.blueprints.interfaces.specificationbranch import * |
910 | -from lp.blueprints.interfaces.specificationbug import * |
911 | -from lp.blueprints.interfaces.specificationdependency import * |
912 | -from lp.blueprints.interfaces.specificationfeedback import * |
913 | -from lp.blueprints.interfaces.specificationsubscription import * |
914 | -from lp.services.worlddata.interfaces.spokenin import * |
915 | -from lp.blueprints.interfaces.sprint import * |
916 | -from lp.blueprints.interfaces.sprintattendance import * |
917 | -from lp.blueprints.interfaces.sprintspecification import * |
918 | -from lp.registry.interfaces.ssh import * |
919 | -from lp.registry.interfaces.structuralsubscription import * |
920 | -from lp.registry.interfaces.teammembership import * |
921 | -from canonical.launchpad.interfaces.temporaryblobstorage import * |
922 | -from lp.registry.interfaces.wikiname import * |
923 | -from lp.soyuz.interfaces.packagediff import * |
924 | -from lp.soyuz.interfaces.packageset import * |
925 | - |
926 | -from lp.answers.interfaces.answercontact import * |
927 | -from lp.answers.interfaces.faq import * |
928 | -from lp.answers.interfaces.faqcollection import * |
929 | -from lp.answers.interfaces.faqtarget import * |
930 | -from lp.answers.interfaces.question import * |
931 | -from lp.coop.answersbugs.interfaces import * |
932 | -from lp.answers.interfaces.questioncollection import * |
933 | -from lp.answers.interfaces.questionenums import * |
934 | -from lp.answers.interfaces.questionmessage import * |
935 | -from lp.answers.interfaces.questionreopening import * |
936 | -from lp.answers.interfaces.questionsubscription import * |
937 | -from lp.answers.interfaces.questiontarget import * |
938 | - |
939 | -from canonical.launchpad.interfaces._schema_circular_imports import * |
940 | +# Copyright 2009-2010 Canonical Ltd. This software is licensed under the GNU |
941 | +# Affero General Public License version 3 (see the file LICENSE). |
942 | + |
943 | +"""Interface definitions for bits of Launchpad that don't fit anywhere else. |
944 | + |
945 | +See also `canonical.launchpad.database` for implementations of these |
946 | +interfaces. |
947 | + |
948 | +DEPRECATED: This package is deprecated. Do not add any new modules to this |
949 | +package. Where possible, move things out of this package into better |
950 | +locations under the 'lp' package. See the `lp` docstring for more details. |
951 | +""" |
952 | |
953 | === modified file 'lib/canonical/launchpad/interfaces/ftests/validation.txt' |
954 | --- lib/canonical/launchpad/interfaces/ftests/validation.txt 2010-10-21 01:42:14 +0000 |
955 | +++ lib/canonical/launchpad/interfaces/ftests/validation.txt 2010-11-08 13:24:46 +0000 |
956 | @@ -17,7 +17,8 @@ |
957 | This validator is used to check if the bug in the launchbag can be |
958 | nominated for the given series. |
959 | |
960 | - >>> from canonical.launchpad.interfaces import can_be_nominated_for_series |
961 | + >>> from canonical.launchpad.interfaces.validation import ( |
962 | + ... can_be_nominated_for_series) |
963 | |
964 | If we create a new bug, all the target's series can be nominated. |
965 | |
966 | |
967 | === modified file 'lib/canonical/launchpad/interfaces/validation.py' |
968 | --- lib/canonical/launchpad/interfaces/validation.py 2010-10-03 15:30:06 +0000 |
969 | +++ lib/canonical/launchpad/interfaces/validation.py 2010-11-08 13:24:46 +0000 |
970 | @@ -222,8 +222,8 @@ |
971 | """Check that the given email is valid and not registered to |
972 | another launchpad account. |
973 | """ |
974 | - from canonical.launchpad.webapp import canonical_url |
975 | - from canonical.launchpad.interfaces import IEmailAddressSet |
976 | + from canonical.launchpad.webapp.publisher import canonical_url |
977 | + from canonical.launchpad.interfaces.emailaddress import IEmailAddressSet |
978 | |
979 | _validate_email(email) |
980 | _check_email_availability(email) |
981 | @@ -239,8 +239,8 @@ |
982 | user that the profile he's trying to create already exists, so there's no |
983 | need to create another one. |
984 | """ |
985 | - from canonical.launchpad.webapp import canonical_url |
986 | - from canonical.launchpad.interfaces import IPersonSet |
987 | + from canonical.launchpad.webapp.publisher import canonical_url |
988 | + from lp.registry.interfaces.person import IPersonSet |
989 | _validate_email(email) |
990 | owner = getUtility(IPersonSet).getByEmail(email) |
991 | if owner is not None: |
992 | |
993 | === modified file 'lib/canonical/launchpad/mail/commands.py' |
994 | --- lib/canonical/launchpad/mail/commands.py 2010-10-03 15:30:06 +0000 |
995 | +++ lib/canonical/launchpad/mail/commands.py 2010-11-08 13:24:46 +0000 |
996 | @@ -25,31 +25,16 @@ |
997 | ) |
998 | from zope.schema import ValidationError |
999 | |
1000 | -from canonical.launchpad.interfaces import ( |
1001 | +from canonical.launchpad.interfaces.mail import ( |
1002 | BugTargetNotFound, |
1003 | - BugTaskImportance, |
1004 | - BugTaskStatus, |
1005 | - CreateBugParams, |
1006 | EmailProcessingError, |
1007 | - IBug, |
1008 | IBugEditEmailCommand, |
1009 | IBugEmailCommand, |
1010 | - IBugSet, |
1011 | IBugTaskEditEmailCommand, |
1012 | IBugTaskEmailCommand, |
1013 | - ICveSet, |
1014 | - IDistribution, |
1015 | - IDistributionSourcePackage, |
1016 | - IDistroBugTask, |
1017 | - IDistroSeries, |
1018 | - ILaunchBag, |
1019 | - IMessageSet, |
1020 | - IPillarNameSet, |
1021 | - IProduct, |
1022 | - IProductSeries, |
1023 | - IProjectGroup, |
1024 | - ISourcePackage, |
1025 | ) |
1026 | +from canonical.launchpad.interfaces.message import IMessageSet |
1027 | +from canonical.launchpad.webapp.interfaces import ILaunchBag |
1028 | from canonical.launchpad.mail.helpers import ( |
1029 | get_error_message, |
1030 | get_person_or_team, |
1031 | @@ -60,6 +45,27 @@ |
1032 | NotFoundError, |
1033 | UserCannotUnsubscribePerson, |
1034 | ) |
1035 | +from lp.bugs.interfaces.bug import ( |
1036 | + CreateBugParams, |
1037 | + IBug, |
1038 | + IBugSet, |
1039 | + ) |
1040 | +from lp.bugs.interfaces.bugtask import ( |
1041 | + BugTaskImportance, |
1042 | + BugTaskStatus, |
1043 | + IDistroBugTask, |
1044 | + ) |
1045 | +from lp.bugs.interfaces.cve import ICveSet |
1046 | +from lp.registry.interfaces.distribution import IDistribution |
1047 | +from lp.registry.interfaces.distributionsourcepackage import ( |
1048 | + IDistributionSourcePackage, |
1049 | + ) |
1050 | +from lp.registry.interfaces.distroseries import IDistroSeries |
1051 | +from lp.registry.interfaces.pillar import IPillarNameSet |
1052 | +from lp.registry.interfaces.product import IProduct |
1053 | +from lp.registry.interfaces.productseries import IProductSeries |
1054 | +from lp.registry.interfaces.projectgroup import IProjectGroup |
1055 | +from lp.registry.interfaces.sourcepackage import ISourcePackage |
1056 | |
1057 | |
1058 | def normalize_arguments(string_args): |
1059 | |
1060 | === modified file 'lib/canonical/launchpad/mail/handlers.py' |
1061 | --- lib/canonical/launchpad/mail/handlers.py 2010-10-11 18:29:14 +0000 |
1062 | +++ lib/canonical/launchpad/mail/handlers.py 2010-11-08 13:24:46 +0000 |
1063 | @@ -15,24 +15,16 @@ |
1064 | from canonical.config import config |
1065 | from canonical.database.sqlbase import rollback |
1066 | from canonical.launchpad.helpers import get_email_template |
1067 | -from canonical.launchpad.interfaces import ( |
1068 | - BugAttachmentType, |
1069 | - CreatedBugWithNoBugTasksError, |
1070 | +from canonical.launchpad.interfaces.gpghandler import IGPGHandler |
1071 | +from canonical.launchpad.interfaces.mail import ( |
1072 | EmailProcessingError, |
1073 | - IBugAttachmentSet, |
1074 | IBugEditEmailCommand, |
1075 | IBugEmailCommand, |
1076 | - IBugMessageSet, |
1077 | IBugTaskEditEmailCommand, |
1078 | IBugTaskEmailCommand, |
1079 | - ILaunchBag, |
1080 | IMailHandler, |
1081 | - IMessageSet, |
1082 | - IQuestionSet, |
1083 | - ISpecificationSet, |
1084 | - QuestionStatus, |
1085 | ) |
1086 | -from canonical.launchpad.interfaces.gpghandler import IGPGHandler |
1087 | +from canonical.launchpad.interfaces.message import IMessageSet |
1088 | from canonical.launchpad.mail.commands import ( |
1089 | BugEmailCommands, |
1090 | get_error_message, |
1091 | @@ -52,6 +44,16 @@ |
1092 | send_process_error_notification, |
1093 | ) |
1094 | from canonical.launchpad.webapp import urlparse |
1095 | +from canonical.launchpad.webapp.interfaces import ILaunchBag |
1096 | +from lp.answers.interfaces.questioncollection import IQuestionSet |
1097 | +from lp.answers.interfaces.questionenums import QuestionStatus |
1098 | +from lp.blueprints.interfaces.specification import ISpecificationSet |
1099 | +from lp.bugs.interfaces.bug import CreatedBugWithNoBugTasksError |
1100 | +from lp.bugs.interfaces.bugattachment import ( |
1101 | + BugAttachmentType, |
1102 | + IBugAttachmentSet, |
1103 | + ) |
1104 | +from lp.bugs.interfaces.bugmessage import IBugMessageSet |
1105 | from lp.code.mail.codehandler import CodeHandler |
1106 | from lp.services.mail.sendmail import ( |
1107 | sendmail, |
1108 | |
1109 | === modified file 'lib/canonical/launchpad/mail/helpers.py' |
1110 | --- lib/canonical/launchpad/mail/helpers.py 2010-10-03 15:30:06 +0000 |
1111 | +++ lib/canonical/launchpad/mail/helpers.py 2010-11-08 13:24:46 +0000 |
1112 | @@ -9,7 +9,7 @@ |
1113 | |
1114 | from zope.component import getUtility |
1115 | |
1116 | -from canonical.launchpad.interfaces import ( |
1117 | +from lp.bugs.interfaces.bugtask import ( |
1118 | IDistroBugTask, |
1119 | IDistroSeriesBugTask, |
1120 | IUpstreamBugTask, |
1121 | @@ -51,7 +51,7 @@ |
1122 | def get_bugtask_type(bugtask): |
1123 | """Returns the specific IBugTask interface the bugtask provides. |
1124 | |
1125 | - >>> from canonical.launchpad.interfaces import ( |
1126 | + >>> from lp.bugs.interfaces.bugtask import ( |
1127 | ... IUpstreamBugTask, IDistroBugTask, IDistroSeriesBugTask) |
1128 | >>> from zope.interface import classImplementsOnly |
1129 | >>> class BugTask: |
1130 | |
1131 | === modified file 'lib/canonical/launchpad/mail/meta.py' |
1132 | --- lib/canonical/launchpad/mail/meta.py 2010-10-03 15:30:06 +0000 |
1133 | +++ lib/canonical/launchpad/mail/meta.py 2010-11-08 13:24:46 +0000 |
1134 | @@ -15,7 +15,7 @@ |
1135 | from zope.sendmail.interfaces import IMailer |
1136 | from zope.sendmail.zcml import IMailerDirective |
1137 | |
1138 | -from canonical.launchpad.interfaces import IMailBox |
1139 | +from canonical.launchpad.interfaces.mailbox import IMailBox |
1140 | from lp.services.mail.mailbox import ( |
1141 | DirectoryMailBox, |
1142 | POP3MailBox, |
1143 | |
1144 | === modified file 'lib/canonical/launchpad/mailnotification.py' |
1145 | --- lib/canonical/launchpad/mailnotification.py 2010-10-19 22:06:16 +0000 |
1146 | +++ lib/canonical/launchpad/mailnotification.py 2010-11-08 13:24:46 +0000 |
1147 | @@ -30,14 +30,6 @@ |
1148 | get_contact_email_addresses, |
1149 | get_email_template, |
1150 | ) |
1151 | -from canonical.launchpad.interfaces import ( |
1152 | - IHeldMessageDetails, |
1153 | - IPerson, |
1154 | - IPersonSet, |
1155 | - ISpecification, |
1156 | - ITeamMembershipSet, |
1157 | - TeamMembershipStatus, |
1158 | - ) |
1159 | from canonical.launchpad.interfaces.launchpad import ILaunchpadRoot |
1160 | from canonical.launchpad.interfaces.message import ( |
1161 | IDirectEmailAuthorization, |
1162 | @@ -51,7 +43,17 @@ |
1163 | ) |
1164 | from canonical.launchpad.webapp.publisher import canonical_url |
1165 | from canonical.launchpad.webapp.url import urlappend |
1166 | +from lp.blueprints.interfaces.specification import ISpecification |
1167 | from lp.bugs.mail.bugnotificationbuilder import get_bugmail_error_address |
1168 | +from lp.registry.interfaces.mailinglist import IHeldMessageDetails |
1169 | +from lp.registry.interfaces.person import ( |
1170 | + IPerson, |
1171 | + IPersonSet, |
1172 | + ) |
1173 | +from lp.registry.interfaces.teammembership import ( |
1174 | + ITeamMembershipSet, |
1175 | + TeamMembershipStatus, |
1176 | + ) |
1177 | from lp.services.mail.mailwrapper import MailWrapper |
1178 | # XXX 2010-06-16 gmb bug=594985 |
1179 | # This shouldn't be here, but if we take it out lots of things cry, |
1180 | |
1181 | === modified file 'lib/canonical/launchpad/pagetitles.py' |
1182 | --- lib/canonical/launchpad/pagetitles.py 2010-10-06 01:27:34 +0000 |
1183 | +++ lib/canonical/launchpad/pagetitles.py 2010-11-08 13:24:46 +0000 |
1184 | @@ -45,11 +45,9 @@ |
1185 | |
1186 | from zope.component import getUtility |
1187 | |
1188 | -from canonical.launchpad.interfaces import ( |
1189 | - ILaunchBag, |
1190 | - IMaloneApplication, |
1191 | - ) |
1192 | +from canonical.launchpad.webapp.interfaces import ILaunchBag |
1193 | from canonical.lazr.utils import smartquote |
1194 | +from lp.bugs.interfaces.malone import IMaloneApplication |
1195 | |
1196 | |
1197 | DEFAULT_LAUNCHPAD_TITLE = 'Launchpad' |
1198 | |
1199 | === modified file 'lib/canonical/launchpad/rest/me.py' |
1200 | --- lib/canonical/launchpad/rest/me.py 2010-10-03 15:30:06 +0000 |
1201 | +++ lib/canonical/launchpad/rest/me.py 2010-11-08 13:24:46 +0000 |
1202 | @@ -16,7 +16,7 @@ |
1203 | from zope.component import getUtility |
1204 | from zope.interface import implements |
1205 | |
1206 | -from canonical.launchpad.interfaces import ( |
1207 | +from lp.registry.interfaces.person import ( |
1208 | IPerson, |
1209 | IPersonSet, |
1210 | ) |
1211 | |
1212 | === modified file 'lib/canonical/launchpad/rest/pillarset.py' |
1213 | --- lib/canonical/launchpad/rest/pillarset.py 2010-10-03 15:30:06 +0000 |
1214 | +++ lib/canonical/launchpad/rest/pillarset.py 2010-11-08 13:24:46 +0000 |
1215 | @@ -12,7 +12,7 @@ |
1216 | from lazr.restful.interfaces import ITopLevelEntryLink |
1217 | from zope.interface import implements |
1218 | |
1219 | -from canonical.launchpad.interfaces import IPillarNameSet |
1220 | +from lp.registry.interfaces.pillar import IPillarNameSet |
1221 | from canonical.launchpad.webapp.interfaces import ICanonicalUrlData |
1222 | |
1223 | |
1224 | |
1225 | === modified file 'lib/canonical/launchpad/subscribers/karma.py' |
1226 | --- lib/canonical/launchpad/subscribers/karma.py 2010-10-03 15:30:06 +0000 |
1227 | +++ lib/canonical/launchpad/subscribers/karma.py 2010-11-08 13:24:46 +0000 |
1228 | @@ -5,7 +5,7 @@ |
1229 | application.""" |
1230 | |
1231 | from canonical.database.sqlbase import block_implicit_flushes |
1232 | -from canonical.launchpad.interfaces import BugTaskStatus |
1233 | +from lp.bugs.interfaces.bugtask import BugTaskStatus |
1234 | from lp.bugs.subscribers.bug import get_bug_delta |
1235 | from lp.code.enums import BranchMergeProposalStatus |
1236 | from lp.registry.interfaces.person import IPerson |
1237 | |
1238 | === modified file 'lib/canonical/launchpad/systemhomes.py' |
1239 | --- lib/canonical/launchpad/systemhomes.py 2010-10-03 15:30:06 +0000 |
1240 | +++ lib/canonical/launchpad/systemhomes.py 2010-11-08 13:24:46 +0000 |
1241 | @@ -26,40 +26,40 @@ |
1242 | from zope.interface import implements |
1243 | |
1244 | from canonical.config import config |
1245 | -from canonical.launchpad.interfaces import ( |
1246 | - BugTaskSearchParams, |
1247 | +from canonical.launchpad.interfaces.launchpad import ( |
1248 | IAuthServerApplication, |
1249 | IBazaarApplication, |
1250 | - IBugTaskSet, |
1251 | - IBugTrackerSet, |
1252 | - IBugWatchSet, |
1253 | - IDistroSeriesSet, |
1254 | IFeedsApplication, |
1255 | - IHWDBApplication, |
1256 | - ILanguageSet, |
1257 | - ILaunchBag, |
1258 | - ILaunchpadStatisticSet, |
1259 | - IMailingListApplication, |
1260 | - IMaloneApplication, |
1261 | IPrivateMaloneApplication, |
1262 | - IProductSet, |
1263 | IRosettaApplication, |
1264 | IWebServiceApplication, |
1265 | ) |
1266 | from canonical.launchpad.webapp.interfaces import ( |
1267 | IAPIDocRoot, |
1268 | ICanonicalUrlData, |
1269 | + ILaunchBag, |
1270 | + ) |
1271 | +from canonical.launchpad.interfaces.launchpadstatistic import ( |
1272 | + ILaunchpadStatisticSet, |
1273 | ) |
1274 | from lp.bugs.interfaces.bug import ( |
1275 | CreateBugParams, |
1276 | IBugSet, |
1277 | InvalidBugTargetType, |
1278 | ) |
1279 | +from lp.bugs.interfaces.bugtask import ( |
1280 | + BugTaskSearchParams, |
1281 | + IBugTaskSet, |
1282 | + ) |
1283 | +from lp.bugs.interfaces.bugtracker import IBugTrackerSet |
1284 | +from lp.bugs.interfaces.bugwatch import IBugWatchSet |
1285 | +from lp.bugs.interfaces.malone import IMaloneApplication |
1286 | from lp.code.interfaces.codehosting import ICodehostingApplication |
1287 | from lp.code.interfaces.codeimportscheduler import ( |
1288 | ICodeImportSchedulerApplication, |
1289 | ) |
1290 | from lp.hardwaredb.interfaces.hwdb import ( |
1291 | + IHWDBApplication, |
1292 | IHWDeviceSet, |
1293 | IHWDriverSet, |
1294 | IHWSubmissionDeviceSet, |
1295 | @@ -71,7 +71,13 @@ |
1296 | from lp.registry.interfaces.distributionsourcepackage import ( |
1297 | IDistributionSourcePackage, |
1298 | ) |
1299 | -from lp.registry.interfaces.product import IProduct |
1300 | +from lp.registry.interfaces.distroseries import IDistroSeriesSet |
1301 | +from lp.registry.interfaces.product import ( |
1302 | + IProduct, |
1303 | + IProductSet, |
1304 | + ) |
1305 | +from lp.registry.interfaces.mailinglist import IMailingListApplication |
1306 | +from lp.services.worlddata.interfaces.language import ILanguageSet |
1307 | from lp.testopenid.interfaces.server import ITestOpenIDApplication |
1308 | from lp.translations.interfaces.translationgroup import ITranslationGroupSet |
1309 | from lp.translations.interfaces.translationsoverview import ( |
1310 | |
1311 | === modified file 'lib/canonical/launchpad/testing/fakepackager.py' |
1312 | --- lib/canonical/launchpad/testing/fakepackager.py 2010-10-03 15:30:06 +0000 |
1313 | +++ lib/canonical/launchpad/testing/fakepackager.py 2010-11-08 13:24:46 +0000 |
1314 | @@ -21,13 +21,11 @@ |
1315 | from zope.component import getUtility |
1316 | |
1317 | from canonical.launchpad.ftests.keys_for_tests import import_secret_test_key |
1318 | -from canonical.launchpad.interfaces import ( |
1319 | - IDistributionSet, |
1320 | - IGPGHandler, |
1321 | - ) |
1322 | +from canonical.launchpad.interfaces.gpghandler import IGPGHandler |
1323 | from canonical.launchpad.scripts import QuietFakeLogger |
1324 | from lp.archiveuploader.nascentupload import NascentUpload |
1325 | from lp.archiveuploader.uploadpolicy import findPolicyByName |
1326 | +from lp.registry.interfaces.distribution import IDistributionSet |
1327 | from lp.soyuz.enums import PackageUploadStatus |
1328 | |
1329 | |
1330 | |
1331 | === modified file 'lib/canonical/launchpad/testing/pages.py' |
1332 | --- lib/canonical/launchpad/testing/pages.py 2010-10-26 15:48:33 +0000 |
1333 | +++ lib/canonical/launchpad/testing/pages.py 2010-11-08 13:24:46 +0000 |
1334 | @@ -45,11 +45,10 @@ |
1335 | from zope.security.proxy import removeSecurityProxy |
1336 | from zope.testbrowser.testing import Browser |
1337 | |
1338 | -from canonical.launchpad.interfaces import ( |
1339 | - ILaunchpadCelebrities, |
1340 | +from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
1341 | +from canonical.launchpad.interfaces.oauth import ( |
1342 | IOAuthConsumerSet, |
1343 | OAUTH_REALM, |
1344 | - TeamMembershipStatus, |
1345 | ) |
1346 | from canonical.launchpad.testing.systemdocs import ( |
1347 | LayeredDocFileSuite, |
1348 | @@ -62,6 +61,7 @@ |
1349 | from canonical.launchpad.webapp.url import urlsplit |
1350 | from canonical.testing.layers import PageTestLayer |
1351 | from lp.registry.errors import NameAlreadyTaken |
1352 | +from lp.registry.interfaces.teammembership import TeamMembershipStatus |
1353 | from lp.testing import ( |
1354 | ANONYMOUS, |
1355 | launchpadlib_for, |
1356 | |
1357 | === modified file 'lib/canonical/launchpad/testing/systemdocs.py' |
1358 | --- lib/canonical/launchpad/testing/systemdocs.py 2010-10-26 15:48:33 +0000 |
1359 | +++ lib/canonical/launchpad/testing/systemdocs.py 2010-11-08 13:24:46 +0000 |
1360 | @@ -29,7 +29,7 @@ |
1361 | from canonical.chunkydiff import elided_source |
1362 | from canonical.config import config |
1363 | from canonical.database.sqlbase import flush_database_updates |
1364 | -from canonical.launchpad.interfaces import ILaunchBag |
1365 | +from canonical.launchpad.interfaces.launchpad import ILaunchBag |
1366 | from canonical.launchpad.webapp.testing import verifyObject |
1367 | from canonical.testing import reset_logging |
1368 | from lp.testing import ( |
1369 | |
1370 | === modified file 'lib/canonical/launchpad/utilities/celebrities.py' |
1371 | --- lib/canonical/launchpad/utilities/celebrities.py 2010-10-03 15:30:06 +0000 |
1372 | +++ lib/canonical/launchpad/utilities/celebrities.py 2010-11-08 13:24:46 +0000 |
1373 | @@ -9,16 +9,14 @@ |
1374 | from zope.component import getUtility |
1375 | from zope.interface import implements |
1376 | |
1377 | -from canonical.launchpad.interfaces import ( |
1378 | - IBugTrackerSet, |
1379 | - IDistributionMirrorSet, |
1380 | - IDistributionSet, |
1381 | - ILanguageSet, |
1382 | - ILaunchpadCelebrities, |
1383 | - IPersonSet, |
1384 | - IProductSet, |
1385 | - ) |
1386 | +from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
1387 | from lp.app.errors import NotFoundError |
1388 | +from lp.bugs.interfaces.bugtracker import IBugTrackerSet |
1389 | +from lp.registry.interfaces.distribution import IDistributionSet |
1390 | +from lp.registry.interfaces.distributionmirror import IDistributionMirrorSet |
1391 | +from lp.registry.interfaces.person import IPersonSet |
1392 | +from lp.registry.interfaces.product import IProductSet |
1393 | +from lp.services.worlddata.interfaces.language import ILanguageSet |
1394 | |
1395 | |
1396 | class MutatedCelebrityError(Exception): |
1397 | |
1398 | === modified file 'lib/canonical/launchpad/utilities/personroles.py' |
1399 | --- lib/canonical/launchpad/utilities/personroles.py 2010-10-03 15:30:06 +0000 |
1400 | +++ lib/canonical/launchpad/utilities/personroles.py 2010-11-08 13:24:46 +0000 |
1401 | @@ -12,7 +12,7 @@ |
1402 | ) |
1403 | from zope.interface import implements |
1404 | |
1405 | -from canonical.launchpad.interfaces import ( |
1406 | +from canonical.launchpad.interfaces.launchpad import ( |
1407 | IHasDrivers, |
1408 | ILaunchpadCelebrities, |
1409 | IPersonRoles, |
1410 | |
1411 | === modified file 'lib/canonical/launchpad/webapp/adapter.py' |
1412 | --- lib/canonical/launchpad/webapp/adapter.py 2010-10-20 04:25:48 +0000 |
1413 | +++ lib/canonical/launchpad/webapp/adapter.py 2010-11-08 13:24:46 +0000 |
1414 | @@ -49,7 +49,7 @@ |
1415 | DatabaseConfig, |
1416 | ) |
1417 | from canonical.database.interfaces import IRequestExpired |
1418 | -from canonical.launchpad.interfaces import ( |
1419 | +from canonical.launchpad.interfaces.lpstorm import ( |
1420 | IMasterObject, |
1421 | IMasterStore, |
1422 | ) |
1423 | |
1424 | === modified file 'lib/canonical/launchpad/webapp/dbpolicy.py' |
1425 | --- lib/canonical/launchpad/webapp/dbpolicy.py 2010-10-03 15:30:06 +0000 |
1426 | +++ lib/canonical/launchpad/webapp/dbpolicy.py 2010-11-08 13:24:46 +0000 |
1427 | @@ -25,7 +25,6 @@ |
1428 | Cache, |
1429 | GenerationalCache, |
1430 | ) |
1431 | -from storm.exceptions import TimeoutError |
1432 | from storm.zope.interfaces import IZStorm |
1433 | from zope.app.security.interfaces import IUnauthenticatedPrincipal |
1434 | from zope.component import getUtility |
1435 | @@ -43,7 +42,7 @@ |
1436 | dbconfig, |
1437 | ) |
1438 | from canonical.database.sqlbase import StupidCache |
1439 | -from canonical.launchpad.interfaces import ( |
1440 | +from canonical.launchpad.interfaces.lpstorm import ( |
1441 | IMasterStore, |
1442 | ISlaveStore, |
1443 | ) |
1444 | |
1445 | === modified file 'lib/canonical/launchpad/webapp/launchbag.py' |
1446 | --- lib/canonical/launchpad/webapp/launchbag.py 2010-10-03 15:30:06 +0000 |
1447 | +++ lib/canonical/launchpad/webapp/launchbag.py 2010-11-08 13:24:46 +0000 |
1448 | @@ -14,26 +14,24 @@ |
1449 | from zope.interface import implements |
1450 | |
1451 | from canonical.database.sqlbase import block_implicit_flushes |
1452 | -from canonical.launchpad.interfaces import ( |
1453 | - IAccount, |
1454 | - IBug, |
1455 | - IBugTask, |
1456 | - IDistribution, |
1457 | - IDistroArchSeries, |
1458 | - IDistroSeries, |
1459 | - ILaunchpadCelebrities, |
1460 | - IPerson, |
1461 | - IProduct, |
1462 | - IProjectGroup, |
1463 | - ISourcePackage, |
1464 | - ISpecification, |
1465 | - ) |
1466 | +from canonical.launchpad.interfaces.account import IAccount |
1467 | +from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
1468 | from canonical.launchpad.webapp.interaction import get_current_principal |
1469 | from canonical.launchpad.webapp.interfaces import ( |
1470 | ILaunchBag, |
1471 | ILoggedInEvent, |
1472 | IOpenLaunchBag, |
1473 | ) |
1474 | +from lp.blueprints.interfaces.specification import ISpecification |
1475 | +from lp.bugs.interfaces.bug import IBug |
1476 | +from lp.bugs.interfaces.bugtask import IBugTask |
1477 | +from lp.registry.interfaces.distribution import IDistribution |
1478 | +from lp.registry.interfaces.distroseries import IDistroSeries |
1479 | +from lp.registry.interfaces.person import IPerson |
1480 | +from lp.registry.interfaces.product import IProduct |
1481 | +from lp.registry.interfaces.projectgroup import IProjectGroup |
1482 | +from lp.registry.interfaces.sourcepackage import ISourcePackage |
1483 | +from lp.soyuz.interfaces.distroarchseries import IDistroArchSeries |
1484 | |
1485 | |
1486 | _utc_tz = pytz.timezone('UTC') |
1487 | |
1488 | === modified file 'lib/canonical/launchpad/xmlrpc/application.py' |
1489 | --- lib/canonical/launchpad/xmlrpc/application.py 2010-10-03 15:30:06 +0000 |
1490 | +++ lib/canonical/launchpad/xmlrpc/application.py 2010-11-08 13:24:46 +0000 |
1491 | @@ -23,18 +23,18 @@ |
1492 | Interface, |
1493 | ) |
1494 | |
1495 | -from canonical.launchpad.interfaces import ( |
1496 | +from canonical.launchpad.interfaces.launchpad import ( |
1497 | IAuthServerApplication, |
1498 | - ILaunchBag, |
1499 | - IMailingListApplication, |
1500 | IPrivateApplication, |
1501 | IPrivateMaloneApplication, |
1502 | ) |
1503 | from canonical.launchpad.webapp import LaunchpadXMLRPCView |
1504 | +from canonical.launchpad.webapp.interfaces import ILaunchBag |
1505 | from lp.code.interfaces.codehosting import ICodehostingApplication |
1506 | from lp.code.interfaces.codeimportscheduler import ( |
1507 | ICodeImportSchedulerApplication, |
1508 | ) |
1509 | +from lp.registry.interfaces.mailinglist import IMailingListApplication |
1510 | from lp.registry.interfaces.person import ISoftwareCenterAgentApplication |
1511 | |
1512 | |
1513 | |
1514 | === modified file 'lib/canonical/launchpad/xmlrpc/authserver.py' |
1515 | --- lib/canonical/launchpad/xmlrpc/authserver.py 2010-10-03 15:30:06 +0000 |
1516 | +++ lib/canonical/launchpad/xmlrpc/authserver.py 2010-11-08 13:24:46 +0000 |
1517 | @@ -12,12 +12,10 @@ |
1518 | from zope.component import getUtility |
1519 | from zope.interface import implements |
1520 | |
1521 | -from canonical.launchpad.interfaces import ( |
1522 | - IAuthServer, |
1523 | - IPersonSet, |
1524 | - ) |
1525 | +from canonical.launchpad.interfaces.authserver import IAuthServer |
1526 | from canonical.launchpad.webapp import LaunchpadXMLRPCView |
1527 | from canonical.launchpad.xmlrpc import faults |
1528 | +from lp.registry.interfaces.person import IPersonSet |
1529 | |
1530 | |
1531 | class AuthServerAPIView(LaunchpadXMLRPCView): |
1532 | |
1533 | === modified file 'lib/canonical/lazr/feed/feed.py' |
1534 | --- lib/canonical/lazr/feed/feed.py 2010-10-03 15:30:06 +0000 |
1535 | +++ lib/canonical/lazr/feed/feed.py 2010-11-08 13:24:46 +0000 |
1536 | @@ -35,7 +35,7 @@ |
1537 | # XXX: bac 2007-09-20 bug=153795: modules in canonical.lazr should not import |
1538 | # from canonical.launchpad, but we're doing it here as an expediency to get a |
1539 | # working prototype. |
1540 | -from canonical.launchpad.interfaces import ILaunchpadRoot |
1541 | +from canonical.launchpad.webapp.interfaces import ILaunchpadRoot |
1542 | from canonical.launchpad.webapp import ( |
1543 | canonical_url, |
1544 | LaunchpadView, |
1545 | |
1546 | === modified file 'lib/canonical/testing/layers.py' |
1547 | --- lib/canonical/testing/layers.py 2010-11-08 05:22:26 +0000 |
1548 | +++ lib/canonical/testing/layers.py 2010-11-08 13:24:46 +0000 |
1549 | @@ -108,7 +108,8 @@ |
1550 | session_store, |
1551 | ZopelessTransactionManager, |
1552 | ) |
1553 | -from canonical.launchpad.interfaces import IMailBox, IOpenLaunchBag |
1554 | +from canonical.launchpad.interfaces.mailbox import IMailBox |
1555 | +from canonical.launchpad.webapp.interfaces import IOpenLaunchBag |
1556 | from lp.testing import ANONYMOUS, login, logout, is_logged_in |
1557 | import lp.services.mail.stub |
1558 | from lp.services.mail.mailbox import TestMailBox |
1559 | |
1560 | === modified file 'lib/canonical/widgets/announcementdate.py' |
1561 | --- lib/canonical/widgets/announcementdate.py 2010-10-03 15:30:06 +0000 |
1562 | +++ lib/canonical/widgets/announcementdate.py 2010-11-08 13:24:46 +0000 |
1563 | @@ -16,11 +16,11 @@ |
1564 | from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm |
1565 | |
1566 | from canonical.launchpad.webapp.interfaces import IAlwaysSubmittedWidget |
1567 | -from canonical.launchpad.interfaces import IAnnouncement |
1568 | from canonical.launchpad.validators import LaunchpadValidationError |
1569 | from canonical.widgets.itemswidgets import LaunchpadRadioWidget |
1570 | from canonical.widgets.date import DateTimeWidget |
1571 | from canonical.launchpad import _ |
1572 | +from lp.registry.interfaces.announcement import IAnnouncement |
1573 | |
1574 | |
1575 | class IAnnouncementDateWidget(ISimpleInputWidget): |
1576 | |
1577 | === modified file 'lib/canonical/widgets/branch.py' |
1578 | --- lib/canonical/widgets/branch.py 2010-10-03 15:30:06 +0000 |
1579 | +++ lib/canonical/widgets/branch.py 2010-11-08 13:24:46 +0000 |
1580 | @@ -15,7 +15,7 @@ |
1581 | from zope.component import getMultiAdapter, getUtility |
1582 | from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm |
1583 | |
1584 | -from canonical.launchpad.interfaces import ILaunchBag |
1585 | +from canonical.launchpad.webapp.interfaces import ILaunchBag |
1586 | from canonical.launchpad.webapp import canonical_url |
1587 | from canonical.widgets.itemswidgets import LaunchpadRadioWidget |
1588 | |
1589 | |
1590 | === modified file 'lib/canonical/widgets/bugtask.py' |
1591 | --- lib/canonical/widgets/bugtask.py 2010-10-03 15:30:06 +0000 |
1592 | +++ lib/canonical/widgets/bugtask.py 2010-11-08 13:24:46 +0000 |
1593 | @@ -22,16 +22,20 @@ |
1594 | |
1595 | from canonical.launchpad import _ |
1596 | from lp.services.fields import URIField |
1597 | -from canonical.launchpad.interfaces import ( |
1598 | - IBugWatchSet, IDistributionSet, ILaunchBag, NoBugTrackerFound, |
1599 | - UnrecognizedBugTrackerURL) |
1600 | from canonical.launchpad.webapp import canonical_url |
1601 | +from canonical.launchpad.webapp.interfaces import ILaunchBag |
1602 | from lp.app.browser.tales import TeamFormatterAPI |
1603 | from canonical.widgets.helpers import get_widget_template |
1604 | from canonical.widgets.itemswidgets import LaunchpadRadioWidget |
1605 | from canonical.widgets.popup import VocabularyPickerWidget |
1606 | from canonical.widgets.textwidgets import StrippedTextWidget, URIWidget |
1607 | from lp.app.errors import NotFoundError, UnexpectedFormData |
1608 | +from lp.bugs.interfaces.bugwatch import ( |
1609 | + IBugWatchSet, |
1610 | + NoBugTrackerFound, |
1611 | + UnrecognizedBugTrackerURL, |
1612 | + ) |
1613 | +from lp.registry.interfaces.distribution import IDistributionSet |
1614 | |
1615 | |
1616 | class BugTaskAssigneeWidget(Widget): |
1617 | |
1618 | === modified file 'lib/canonical/widgets/date.py' |
1619 | --- lib/canonical/widgets/date.py 2010-10-03 15:30:06 +0000 |
1620 | +++ lib/canonical/widgets/date.py 2010-11-08 13:24:46 +0000 |
1621 | @@ -31,7 +31,7 @@ |
1622 | |
1623 | from z3c.ptcompat import ViewPageTemplateFile |
1624 | |
1625 | -from canonical.launchpad.interfaces import ILaunchBag |
1626 | +from canonical.launchpad.webapp.interfaces import ILaunchBag |
1627 | from canonical.launchpad.validators import LaunchpadValidationError |
1628 | |
1629 | |
1630 | |
1631 | === modified file 'lib/canonical/widgets/launchpadtarget.py' |
1632 | --- lib/canonical/widgets/launchpadtarget.py 2010-10-03 15:30:06 +0000 |
1633 | +++ lib/canonical/widgets/launchpadtarget.py 2010-11-08 13:24:46 +0000 |
1634 | @@ -14,14 +14,17 @@ |
1635 | |
1636 | from z3c.ptcompat import ViewPageTemplateFile |
1637 | |
1638 | -from canonical.launchpad.interfaces import ( |
1639 | - IDistribution, IDistributionSourcePackage, ILaunchpadCelebrities, |
1640 | - IProduct) |
1641 | +from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
1642 | from canonical.launchpad.validators import LaunchpadValidationError |
1643 | from canonical.launchpad.webapp.interfaces import ( |
1644 | IMultiLineWidgetLayout, IAlwaysSubmittedWidget) |
1645 | from canonical.widgets.itemswidgets import LaunchpadDropdownWidget |
1646 | from lp.app.errors import NotFoundError, UnexpectedFormData |
1647 | +from lp.registry.interfaces.distribution import IDistribution |
1648 | +from lp.registry.interfaces.distributionsourcepackage import ( |
1649 | + IDistributionSourcePackage, |
1650 | + ) |
1651 | +from lp.registry.interfaces.product import IProduct |
1652 | |
1653 | |
1654 | class LaunchpadTargetWidget(BrowserWidget, InputWidget): |
1655 | |
1656 | === modified file 'lib/canonical/widgets/owner.py' |
1657 | --- lib/canonical/widgets/owner.py 2010-10-03 15:30:06 +0000 |
1658 | +++ lib/canonical/widgets/owner.py 2010-11-08 13:24:46 +0000 |
1659 | @@ -8,7 +8,7 @@ |
1660 | from zope.app.form.interfaces import IInputWidget |
1661 | from zope.app.form.browser.interfaces import IBrowserWidget |
1662 | |
1663 | -from canonical.launchpad.interfaces import ILaunchBag |
1664 | +from canonical.launchpad.webapp.interfaces import ILaunchBag |
1665 | |
1666 | class RequestWidget(object): |
1667 | '''A widget that sets itself to a value calculated from request |
1668 | |
1669 | === modified file 'lib/canonical/widgets/password.py' |
1670 | --- lib/canonical/widgets/password.py 2010-10-03 15:30:06 +0000 |
1671 | +++ lib/canonical/widgets/password.py 2010-11-08 13:24:46 +0000 |
1672 | @@ -19,7 +19,7 @@ |
1673 | from z3c.ptcompat import ViewPageTemplateFile |
1674 | |
1675 | from canonical.launchpad import _ |
1676 | -from canonical.launchpad.interfaces import IPasswordEncryptor |
1677 | +from canonical.launchpad.interfaces.launchpad import IPasswordEncryptor |
1678 | from canonical.launchpad.webapp.interfaces import IMultiLineWidgetLayout |
1679 | |
1680 | |
1681 | |
1682 | === modified file 'lib/canonical/widgets/product.py' |
1683 | --- lib/canonical/widgets/product.py 2010-10-03 15:30:06 +0000 |
1684 | +++ lib/canonical/widgets/product.py 2010-11-08 13:24:46 +0000 |
1685 | @@ -30,8 +30,9 @@ |
1686 | |
1687 | from canonical.launchpad.browser.widgets import DescriptionWidget |
1688 | from lp.services.fields import StrippedTextLine |
1689 | -from canonical.launchpad.interfaces import ( |
1690 | - BugTrackerType, IBugTracker, IBugTrackerSet, ILaunchBag) |
1691 | +from lp.bugs.interfaces.bugtracker import ( |
1692 | + BugTrackerType, IBugTracker, IBugTrackerSet) |
1693 | +from canonical.launchpad.webapp.interfaces import ILaunchBag |
1694 | from canonical.launchpad.validators import LaunchpadValidationError |
1695 | from canonical.launchpad.validators.email import email_validator |
1696 | from canonical.launchpad.webapp import canonical_url |
1697 | |
1698 | === modified file 'lib/lp/archiveuploader/tests/nascentupload-packageset.txt' |
1699 | --- lib/lp/archiveuploader/tests/nascentupload-packageset.txt 2010-10-18 22:24:59 +0000 |
1700 | +++ lib/lp/archiveuploader/tests/nascentupload-packageset.txt 2010-11-08 13:24:46 +0000 |
1701 | @@ -22,7 +22,7 @@ |
1702 | rights to all components from 'ubuntu-team' to 'mark': |
1703 | |
1704 | >>> LaunchpadZopelessLayer.switchDbUser('launchpad') |
1705 | - >>> from canonical.launchpad.database import ArchivePermission |
1706 | + >>> from lp.soyuz.model.archivepermission import ArchivePermission |
1707 | >>> new_uploader = getUtility(IPersonSet).getByName('mark') |
1708 | >>> for permission in ArchivePermission.select(): |
1709 | ... permission.person = new_uploader |
1710 | |
1711 | === modified file 'lib/lp/archiveuploader/tests/nascentupload.txt' |
1712 | --- lib/lp/archiveuploader/tests/nascentupload.txt 2010-10-20 01:36:53 +0000 |
1713 | +++ lib/lp/archiveuploader/tests/nascentupload.txt 2010-11-08 13:24:46 +0000 |
1714 | @@ -770,7 +770,7 @@ |
1715 | |
1716 | >>> commit() |
1717 | >>> LaunchpadZopelessLayer.switchDbUser('launchpad') |
1718 | - >>> from canonical.launchpad.database import ArchivePermission |
1719 | + >>> from lp.soyuz.model.archivepermission import ArchivePermission |
1720 | >>> new_uploader = getUtility(IPersonSet).getByName('mark') |
1721 | >>> for permission in ArchivePermission.select(): |
1722 | ... permission.person = new_uploader |
1723 | |
1724 | === modified file 'lib/lp/archiveuploader/tests/test_nascentupload_documentation.py' |
1725 | --- lib/lp/archiveuploader/tests/test_nascentupload_documentation.py 2010-10-04 19:50:45 +0000 |
1726 | +++ lib/lp/archiveuploader/tests/test_nascentupload_documentation.py 2010-11-08 13:24:46 +0000 |
1727 | @@ -10,10 +10,7 @@ |
1728 | |
1729 | from zope.component import getUtility |
1730 | |
1731 | -from canonical.launchpad.database import ( |
1732 | - ComponentSelection, |
1733 | - LibraryFileAlias, |
1734 | - ) |
1735 | +from canonical.launchpad.database.librarian import LibraryFileAlias |
1736 | from canonical.launchpad.ftests import ( |
1737 | import_public_test_keys, |
1738 | login, |
1739 | @@ -32,6 +29,7 @@ |
1740 | ) |
1741 | from lp.archiveuploader.uploadpolicy import ArchiveUploadType |
1742 | from lp.registry.interfaces.distribution import IDistributionSet |
1743 | +from lp.soyuz.model.component import ComponentSelection |
1744 | from lp.soyuz.interfaces.component import IComponentSet |
1745 | |
1746 | |
1747 | |
1748 | === modified file 'lib/lp/archiveuploader/tests/test_ppauploadprocessor.py' |
1749 | --- lib/lp/archiveuploader/tests/test_ppauploadprocessor.py 2010-10-25 13:16:10 +0000 |
1750 | +++ lib/lp/archiveuploader/tests/test_ppauploadprocessor.py 2010-11-08 13:24:46 +0000 |
1751 | @@ -18,7 +18,6 @@ |
1752 | from zope.security.proxy import removeSecurityProxy |
1753 | |
1754 | from canonical.config import config |
1755 | -from canonical.launchpad.database import Component |
1756 | from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
1757 | from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet |
1758 | from canonical.launchpad.testing.fakepackager import FakePackager |
1759 | @@ -41,6 +40,7 @@ |
1760 | from lp.soyuz.interfaces.sourcepackageformat import ( |
1761 | ISourcePackageFormatSelectionSet, |
1762 | ) |
1763 | +from lp.soyuz.model.component import Component |
1764 | from lp.soyuz.model.publishing import BinaryPackagePublishingHistory |
1765 | from lp.soyuz.tests.test_publishing import SoyuzTestPublisher |
1766 | from lp.testing.mail_helpers import run_mail_jobs |
1767 | |
1768 | === modified file 'lib/lp/bugs/doc/bug-nomination.txt' |
1769 | --- lib/lp/bugs/doc/bug-nomination.txt 2010-10-21 01:42:14 +0000 |
1770 | +++ lib/lp/bugs/doc/bug-nomination.txt 2010-11-08 13:24:46 +0000 |
1771 | @@ -361,7 +361,7 @@ |
1772 | |
1773 | >>> from lp.soyuz.interfaces.archivepermission import ( |
1774 | ... IArchivePermissionSet) |
1775 | - >>> from canonical.launchpad.database import Component |
1776 | + >>> from lp.soyuz.model.component import Component |
1777 | >>> permission_set = getUtility(IArchivePermissionSet) |
1778 | >>> main = Component.byName('main') |
1779 | >>> main_uploader = factory.makePerson() |
1780 | |
1781 | === modified file 'lib/lp/registry/doc/distribution-mirror.txt' |
1782 | --- lib/lp/registry/doc/distribution-mirror.txt 2010-10-19 18:44:31 +0000 |
1783 | +++ lib/lp/registry/doc/distribution-mirror.txt 2010-11-08 13:24:46 +0000 |
1784 | @@ -573,7 +573,7 @@ |
1785 | package instead of a .deb, and we don't check .udeb files on the mirror, |
1786 | so we need to skip that upload. |
1787 | |
1788 | - >>> from canonical.launchpad.database import BinaryPackageFile |
1789 | + >>> from lp.soyuz.model.files import BinaryPackageFile |
1790 | |
1791 | >>> warty_i386_mirror = foo_mirror.ensureMirrorDistroArchSeries( |
1792 | ... warty['i386'], PackagePublishingPocket.RELEASE, |
1793 | |
1794 | === modified file 'lib/lp/registry/doc/sourcepackage.txt' |
1795 | --- lib/lp/registry/doc/sourcepackage.txt 2010-10-29 05:58:51 +0000 |
1796 | +++ lib/lp/registry/doc/sourcepackage.txt 2010-11-08 13:24:46 +0000 |
1797 | @@ -128,8 +128,8 @@ |
1798 | PUBLISHED main |
1799 | |
1800 | >>> from canonical.database.sqlbase import flush_database_caches |
1801 | - >>> from canonical.launchpad.database import Component |
1802 | - >>> from canonical.launchpad.database import ( |
1803 | + >>> from lp.soyuz.model.component import Component |
1804 | + >>> from lp.soyuz.model.publishing import ( |
1805 | ... SourcePackagePublishingHistory) |
1806 | >>> from canonical.launchpad.ftests import syncUpdate |
1807 | |
1808 | |
1809 | === modified file 'lib/lp/soyuz/browser/tests/binarypackagerelease-views.txt' |
1810 | --- lib/lp/soyuz/browser/tests/binarypackagerelease-views.txt 2010-10-18 22:24:59 +0000 |
1811 | +++ lib/lp/soyuz/browser/tests/binarypackagerelease-views.txt 2010-11-08 13:24:46 +0000 |
1812 | @@ -1,8 +1,8 @@ |
1813 | = BinaryPackageRelease Pages = |
1814 | |
1815 | >>> from zope.component import getMultiAdapter |
1816 | - >>> from canonical.launchpad.database import BinaryPackageRelease |
1817 | >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
1818 | + >>> from lp.soyuz.model.binarypackagerelease import BinaryPackageRelease |
1819 | |
1820 | >>> pmount_bin = BinaryPackageRelease.get(15) |
1821 | >>> pmount_bin.name |
1822 | |
1823 | === modified file 'lib/lp/soyuz/doc/binarypackagerelease.txt' |
1824 | --- lib/lp/soyuz/doc/binarypackagerelease.txt 2010-10-19 18:44:31 +0000 |
1825 | +++ lib/lp/soyuz/doc/binarypackagerelease.txt 2010-11-08 13:24:46 +0000 |
1826 | @@ -3,12 +3,12 @@ |
1827 | BinaryPackageRelease stores unique versions of binarypackagenames |
1828 | across build records. |
1829 | |
1830 | - >>> from canonical.launchpad.database import BinaryPackageRelease |
1831 | >>> from canonical.launchpad.webapp.testing import verifyObject |
1832 | >>> from lp.soyuz.interfaces.binarypackagerelease import ( |
1833 | ... IBinaryPackageRelease, |
1834 | ... IBinaryPackageReleaseSet, |
1835 | ... ) |
1836 | + >>> from lp.soyuz.model.binarypackagerelease import BinaryPackageRelease |
1837 | |
1838 | >>> firefox_bin_release = BinaryPackageRelease.get(12) |
1839 | >>> verifyObject(IBinaryPackageRelease, firefox_bin_release) |
1840 | |
1841 | === modified file 'lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt' |
1842 | --- lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt 2010-10-18 22:24:59 +0000 |
1843 | +++ lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt 2010-11-08 13:24:46 +0000 |
1844 | @@ -225,9 +225,11 @@ |
1845 | us up to demonstrate bug 208233). |
1846 | |
1847 | >>> LaunchpadZopelessLayer.switchDbUser('lucille') |
1848 | - >>> from canonical.launchpad.database import ( |
1849 | - ... DistroArchSeries, DistroArchSeriesBinaryPackage, |
1850 | - ... BinaryPackageName, BinaryPackagePublishingHistory) |
1851 | + >>> from lp.soyuz.model.binarypackagename import BinaryPackageName |
1852 | + >>> from lp.soyuz.model.distroarchseries import DistroArchSeries |
1853 | + >>> from lp.soyuz.model.distroarchseriesbinarypackage import ( |
1854 | + ... DistroArchSeriesBinaryPackage) |
1855 | + >>> from lp.soyuz.model.publishing import BinaryPackagePublishingHistory |
1856 | >>> warty_i386 = DistroArchSeries.get(1) |
1857 | >>> pmount_name = BinaryPackageName.selectOneBy(name="pmount") |
1858 | >>> pmount_warty_i386 = DistroArchSeriesBinaryPackage(warty_i386, |
1859 | |
1860 | === modified file 'lib/lp/soyuz/doc/distroseriesqueue-translations.txt' |
1861 | --- lib/lp/soyuz/doc/distroseriesqueue-translations.txt 2010-10-18 22:24:59 +0000 |
1862 | +++ lib/lp/soyuz/doc/distroseriesqueue-translations.txt 2010-11-08 13:24:46 +0000 |
1863 | @@ -3,9 +3,9 @@ |
1864 | This test covers the use case when a package includes translations and is |
1865 | uploaded into the system. |
1866 | |
1867 | - >>> from canonical.launchpad.database import ProcessorFamily |
1868 | >>> from lp.registry.model.gpgkey import GPGKey |
1869 | >>> from lp.soyuz.model.component import Component |
1870 | + >>> from lp.soyuz.model.processor import ProcessorFamily |
1871 | >>> from lp.soyuz.model.section import Section |
1872 | >>> from lp.soyuz.model.publishing import ( |
1873 | ... SourcePackagePublishingHistory) |
1874 | |
1875 | === modified file 'lib/lp/soyuz/doc/distroseriesqueue.txt' |
1876 | --- lib/lp/soyuz/doc/distroseriesqueue.txt 2010-10-18 22:24:59 +0000 |
1877 | +++ lib/lp/soyuz/doc/distroseriesqueue.txt 2010-11-08 13:24:46 +0000 |
1878 | @@ -54,9 +54,9 @@ |
1879 | >>> from canonical.launchpad.ftests import login |
1880 | >>> login("foo.bar@canonical.com") |
1881 | |
1882 | - >>> from canonical.launchpad.database import ComponentSelection |
1883 | >>> from lp.registry.interfaces.distribution import IDistributionSet |
1884 | >>> from lp.soyuz.interfaces.component import IComponentSet |
1885 | + >>> from lp.soyuz.model.component import ComponentSelection |
1886 | >>> ubuntu = getUtility(IDistributionSet)['ubuntu'] |
1887 | >>> hoary = ubuntu['hoary'] |
1888 | >>> universe = getUtility(IComponentSet)['universe'] |
1889 | @@ -111,8 +111,8 @@ |
1890 | |
1891 | Confirm we can now find ed published in hoary. |
1892 | |
1893 | - >>> from canonical.launchpad.database import SourcePackagePublishingHistory |
1894 | >>> from lp.soyuz.enums import PackagePublishingStatus |
1895 | + >>> from lp.soyuz.model.publishing import SourcePackagePublishingHistory |
1896 | >>> for release in SourcePackagePublishingHistory.selectBy( |
1897 | ... distroseries=hoary, status=PackagePublishingStatus.PENDING): |
1898 | ... if release.sourcepackagerelease.sourcepackagename.name == "ed": |
1899 | |
1900 | === modified file 'lib/lp/soyuz/doc/gina-multiple-arch.txt' |
1901 | --- lib/lp/soyuz/doc/gina-multiple-arch.txt 2010-10-18 22:24:59 +0000 |
1902 | +++ lib/lp/soyuz/doc/gina-multiple-arch.txt 2010-11-08 13:24:46 +0000 |
1903 | @@ -3,15 +3,16 @@ |
1904 | |
1905 | Get the current counts of stuff in the database: |
1906 | |
1907 | - >>> from canonical.launchpad.database import ( |
1908 | - ... SourcePackageRelease, |
1909 | - ... SourcePackagePublishingHistory, |
1910 | - ... BinaryPackagePublishingHistory, |
1911 | - ... EmailAddress, |
1912 | - ... BinaryPackageRelease, |
1913 | - ... BinaryPackageBuild) |
1914 | + >>> from canonical.launchpad.database.emailaddress import EmailAddress |
1915 | >>> from lp.registry.model.person import Person, WikiName |
1916 | >>> from lp.registry.model.teammembership import TeamParticipation |
1917 | + >>> from lp.soyuz.model.binarypackagebuild import BinaryPackageBuild |
1918 | + >>> from lp.soyuz.model.binarypackagerelease import BinaryPackageRelease |
1919 | + >>> from lp.soyuz.model.publishing import ( |
1920 | + ... BinaryPackagePublishingHistory, |
1921 | + ... SourcePackagePublishingHistory, |
1922 | + ... ) |
1923 | + >>> from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease |
1924 | >>> SSPPH = SourcePackagePublishingHistory |
1925 | >>> SBPPH = BinaryPackagePublishingHistory |
1926 | |
1927 | @@ -27,8 +28,8 @@ |
1928 | |
1929 | Create a distribution series and an arch series for dapper: |
1930 | |
1931 | - >>> from canonical.launchpad.database import ( |
1932 | - ... ProcessorFamily, DistroArchSeries) |
1933 | + >>> from lp.soyuz.model.distroarchseries import DistroArchSeries |
1934 | + >>> from lp.soyuz.model.processor import ProcessorFamily |
1935 | >>> from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
1936 | >>> celebs = getUtility(ILaunchpadCelebrities) |
1937 | >>> ubuntu = celebs.ubuntu |
1938 | @@ -101,7 +102,7 @@ |
1939 | dapper-updates/universe doesn't include the powerpc architecture, but we |
1940 | just warn it and move right ahead. |
1941 | |
1942 | - >>> from canonical.launchpad.database import Processor |
1943 | + >>> from lp.soyuz.model.processor import Processor |
1944 | >>> p = Processor(name="powerpc", title="PowerPC", family=pf, |
1945 | ... description="The little processor that could") |
1946 | >>> p == Processor.selectOneBy(familyID=pf.id) |
1947 | @@ -160,7 +161,7 @@ |
1948 | |
1949 | Check that the source package was correctly imported: |
1950 | |
1951 | - >>> from canonical.launchpad.database import BinaryPackageName |
1952 | + >>> from lp.soyuz.model.binarypackagename import BinaryPackageName |
1953 | >>> from lp.registry.model.sourcepackagename import SourcePackageName |
1954 | >>> n = SourcePackageName.selectOneBy(name="ekg") |
1955 | >>> ekg = SourcePackageRelease.selectOneBy(sourcepackagenameID=n.id, |
1956 | |
1957 | === modified file 'lib/lp/soyuz/doc/gina.txt' |
1958 | --- lib/lp/soyuz/doc/gina.txt 2010-10-20 13:33:24 +0000 |
1959 | +++ lib/lp/soyuz/doc/gina.txt 2010-11-08 13:24:46 +0000 |
1960 | @@ -7,17 +7,17 @@ |
1961 | |
1962 | Get the current counts of stuff in the database: |
1963 | |
1964 | - >>> from canonical.launchpad.database import ( |
1965 | - ... SourcePackageRelease, |
1966 | - ... SourcePackagePublishingHistory, |
1967 | + >>> from canonical.launchpad.database.emailaddress import EmailAddress |
1968 | + >>> from lp.soyuz.model.publishing import ( |
1969 | ... BinaryPackagePublishingHistory, |
1970 | - ... EmailAddress, |
1971 | - ... BinaryPackageRelease, |
1972 | - ... BinaryPackageBuild) |
1973 | + ... SourcePackagePublishingHistory) |
1974 | >>> from lp.registry.model.person import Person, WikiName |
1975 | >>> from lp.registry.model.teammembership import TeamParticipation |
1976 | >>> from lp.registry.interfaces.pocket import ( |
1977 | ... PackagePublishingPocket) |
1978 | + >>> from lp.soyuz.model.binarypackagebuild import BinaryPackageBuild |
1979 | + >>> from lp.soyuz.model.binarypackagerelease import BinaryPackageRelease |
1980 | + >>> from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease |
1981 | >>> SSPPH = SourcePackagePublishingHistory |
1982 | >>> SBPPH = BinaryPackagePublishingHistory |
1983 | |
1984 | @@ -35,8 +35,8 @@ |
1985 | |
1986 | Create a distribution release and an arch release for breezy: |
1987 | |
1988 | - >>> from canonical.launchpad.database import ( |
1989 | - ... ProcessorFamily, DistroArchSeries) |
1990 | + >>> from lp.soyuz.model.distroarchseries import DistroArchSeries |
1991 | + >>> from lp.soyuz.model.processor import ProcessorFamily |
1992 | >>> from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
1993 | >>> celebs = getUtility(ILaunchpadCelebrities) |
1994 | >>> ubuntu = celebs.ubuntu |
1995 | @@ -267,7 +267,7 @@ |
1996 | And check that its files actually ended up in the librarian (these sha1sums |
1997 | were calculated directly on the files): |
1998 | |
1999 | - >>> from canonical.launchpad.database import SourcePackageReleaseFile |
2000 | + >>> from lp.soyuz.model.files import SourcePackageReleaseFile |
2001 | >>> files = SourcePackageReleaseFile.selectBy(sourcepackagereleaseID=cap.id, |
2002 | ... orderBy="libraryfile") |
2003 | >>> for f in files: |
2004 | @@ -346,7 +346,7 @@ |
2005 | Check that the shlibs parsing and bin-only-NMU version handling works as |
2006 | expected: |
2007 | |
2008 | - >>> from canonical.launchpad.database import BinaryPackageName |
2009 | + >>> from lp.soyuz.model.binarypackagename import BinaryPackageName |
2010 | >>> n = BinaryPackageName.selectOneBy(name="rioutil") |
2011 | >>> rio = BinaryPackageRelease.selectOneBy(binarypackagenameID=n.id) |
2012 | >>> print rio.shlibdeps |
2013 | |
2014 | === modified file 'lib/lp/soyuz/doc/package-cache.txt' |
2015 | --- lib/lp/soyuz/doc/package-cache.txt 2010-10-09 16:36:22 +0000 |
2016 | +++ lib/lp/soyuz/doc/package-cache.txt 2010-11-08 13:24:46 +0000 |
2017 | @@ -215,7 +215,7 @@ |
2018 | >>> warty.searchPackages('foobar').count() |
2019 | 1 |
2020 | |
2021 | - >>> from canonical.launchpad.database import ( |
2022 | + >>> from lp.soyuz.model.distroseriespackagecache import ( |
2023 | ... DistroSeriesPackageCache) |
2024 | |
2025 | >>> foobar_bin_cache = DistroSeriesPackageCache.selectOneBy( |
2026 | |
2027 | === modified file 'lib/lp/soyuz/doc/package-meta-classes.txt' |
2028 | --- lib/lp/soyuz/doc/package-meta-classes.txt 2010-10-17 15:44:08 +0000 |
2029 | +++ lib/lp/soyuz/doc/package-meta-classes.txt 2010-11-08 13:24:46 +0000 |
2030 | @@ -4,11 +4,13 @@ |
2031 | There are a bunch of meta classes used for combine information from |
2032 | our Database Model for packages in a intuitive manner, they are: |
2033 | |
2034 | - >>> from canonical.launchpad.database import ( |
2035 | - ... DistributionSourcePackageRelease, |
2036 | - ... DistroSeriesSourcePackageRelease, SourcePackageRelease) |
2037 | >>> from lp.registry.model.distribution import Distribution |
2038 | >>> from lp.registry.model.sourcepackagename import SourcePackageName |
2039 | + >>> from lp.soyuz.model.distributionsourcepackagerelease import ( |
2040 | + ... DistributionSourcePackageRelease) |
2041 | + >>> from lp.soyuz.model.distroseriessourcepackagerelease import ( |
2042 | + ... DistroSeriesSourcePackageRelease) |
2043 | + >>> from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease |
2044 | |
2045 | >>> from lp.soyuz.interfaces.distributionsourcepackagerelease import IDistributionSourcePackageRelease |
2046 | >>> from lp.soyuz.interfaces.distroseriessourcepackagerelease import IDistroSeriesSourcePackageRelease |
2047 | |
2048 | === modified file 'lib/lp/soyuz/doc/publishing.txt' |
2049 | --- lib/lp/soyuz/doc/publishing.txt 2010-11-03 06:55:53 +0000 |
2050 | +++ lib/lp/soyuz/doc/publishing.txt 2010-11-08 13:24:46 +0000 |
2051 | @@ -4,7 +4,7 @@ |
2052 | |
2053 | This class provides public access to publishing records via a SQL view. |
2054 | |
2055 | - >>> from canonical.launchpad.database import ( |
2056 | + >>> from lp.soyuz.model.publishing import ( |
2057 | ... BinaryPackagePublishingHistory, |
2058 | ... SourcePackagePublishingHistory, |
2059 | ... ) |
2060 | |
2061 | === modified file 'lib/lp/soyuz/doc/sourcepackagerelease.txt' |
2062 | --- lib/lp/soyuz/doc/sourcepackagerelease.txt 2010-10-18 22:24:59 +0000 |
2063 | +++ lib/lp/soyuz/doc/sourcepackagerelease.txt 2010-11-08 13:24:46 +0000 |
2064 | @@ -14,7 +14,7 @@ |
2065 | |
2066 | Let's get one from the database: |
2067 | |
2068 | - >>> from canonical.launchpad.database import SourcePackageRelease |
2069 | + >>> from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease |
2070 | >>> spr = SourcePackageRelease.get(14) |
2071 | >>> spr.name |
2072 | u'mozilla-firefox' |
2073 | |
2074 | === modified file 'lib/lp/soyuz/doc/soyuz-set-of-uploads.txt' |
2075 | --- lib/lp/soyuz/doc/soyuz-set-of-uploads.txt 2010-10-19 18:44:31 +0000 |
2076 | +++ lib/lp/soyuz/doc/soyuz-set-of-uploads.txt 2010-11-08 13:24:46 +0000 |
2077 | @@ -187,7 +187,7 @@ |
2078 | Finally, as a very simplistic publishing process, we may need to punt any |
2079 | given upload into the published state, so here's a very simplistic publisher |
2080 | |
2081 | - >>> from canonical.launchpad.database import ( |
2082 | + >>> from lp.soyuz.model.publishing import ( |
2083 | ... SourcePackagePublishingHistory as SPPH, |
2084 | ... BinaryPackagePublishingHistory as BPPH) |
2085 | >>> from lp.soyuz.enums import PackagePublishingStatus as PPS |
2086 | @@ -495,7 +495,7 @@ |
2087 | will need to build a new DistroArchSeries for powerpc in |
2088 | ubuntutest/breezy. |
2089 | |
2090 | - >>> from canonical.launchpad.database import ( |
2091 | + >>> from lp.soyuz.model.processor import ( |
2092 | ... ProcessorFamily, Processor) |
2093 | >>> powerpc_pf = ProcessorFamily.selectOneBy(name='powerpc') |
2094 | >>> powerpc_proc = Processor(family=powerpc_pf, name='powerpc', |
2095 | |
2096 | === modified file 'lib/lp/soyuz/doc/soyuz-upload.txt' |
2097 | --- lib/lp/soyuz/doc/soyuz-upload.txt 2010-10-19 18:44:31 +0000 |
2098 | +++ lib/lp/soyuz/doc/soyuz-upload.txt 2010-11-08 13:24:46 +0000 |
2099 | @@ -535,7 +535,7 @@ |
2100 | |
2101 | These packages must now be in the publishing history. Let's check it. |
2102 | |
2103 | - >>> from canonical.launchpad.database import ( |
2104 | + >>> from lp.soyuz.model.publishing import ( |
2105 | ... SourcePackagePublishingHistory as SSPPH) |
2106 | >>> package_names.sort() |
2107 | >>> for name in package_names: |
2108 | |
2109 | === modified file 'lib/lp/soyuz/model/binarypackagebuild.py' |
2110 | --- lib/lp/soyuz/model/binarypackagebuild.py 2010-10-06 11:46:51 +0000 |
2111 | +++ lib/lp/soyuz/model/binarypackagebuild.py 2010-11-08 13:24:46 +0000 |
2112 | @@ -315,7 +315,7 @@ |
2113 | def distroarchseriesbinarypackages(self): |
2114 | """See `IBuild`.""" |
2115 | # Avoid circular import by importing locally. |
2116 | - from canonical.launchpad.database import ( |
2117 | + from lp.soyuz.model.distroarchseriesbinarypackagerelease import ( |
2118 | DistroArchSeriesBinaryPackageRelease) |
2119 | return [DistroArchSeriesBinaryPackageRelease( |
2120 | self.distro_arch_series, bp) |
2121 | |
2122 | === modified file 'lib/lp/soyuz/model/distroarchseries.py' |
2123 | --- lib/lp/soyuz/model/distroarchseries.py 2010-10-06 11:46:51 +0000 |
2124 | +++ lib/lp/soyuz/model/distroarchseries.py 2010-11-08 13:24:46 +0000 |
2125 | @@ -225,7 +225,7 @@ |
2126 | result = result.order_by("rank DESC, BinaryPackageName.name") |
2127 | |
2128 | # import here to avoid circular import problems |
2129 | - from canonical.launchpad.database import ( |
2130 | + from lp.soyuz.model.distroarchseriesbinarypackagerelease import ( |
2131 | DistroArchSeriesBinaryPackageRelease) |
2132 | |
2133 | # Create a function that will decorate the results, converting |
2134 | |
2135 | === modified file 'lib/lp/soyuz/model/distroseriessourcepackagerelease.py' |
2136 | --- lib/lp/soyuz/model/distroseriessourcepackagerelease.py 2010-08-24 15:29:01 +0000 |
2137 | +++ lib/lp/soyuz/model/distroseriessourcepackagerelease.py 2010-11-08 13:24:46 +0000 |
2138 | @@ -101,7 +101,7 @@ |
2139 | |
2140 | # Import DistributionSourcePackageRelease here to avoid circular |
2141 | # imports (and imported directly from database to avoid long line) |
2142 | - from canonical.launchpad.database import ( |
2143 | + from lp.soyuz.model.distributionsourcepackagerelease import ( |
2144 | DistributionSourcePackageRelease) |
2145 | |
2146 | distro_builds = DistributionSourcePackageRelease( |
2147 | |
2148 | === modified file 'lib/lp/soyuz/model/publishing.py' |
2149 | --- lib/lp/soyuz/model/publishing.py 2010-11-08 03:45:09 +0000 |
2150 | +++ lib/lp/soyuz/model/publishing.py 2010-11-08 13:24:46 +0000 |
2151 | @@ -22,7 +22,6 @@ |
2152 | import re |
2153 | import sys |
2154 | |
2155 | -import apt_pkg |
2156 | import pytz |
2157 | from sqlobject import ( |
2158 | ForeignKey, |
2159 | @@ -882,7 +881,7 @@ |
2160 | def distroarchseriesbinarypackagerelease(self): |
2161 | """See `IBinaryPackagePublishingHistory`.""" |
2162 | # Import here to avoid circular import. |
2163 | - from canonical.launchpad.database import ( |
2164 | + from lp.soyuz.model.distroarchseriesbinarypackagerelease import ( |
2165 | DistroArchSeriesBinaryPackageRelease) |
2166 | |
2167 | return DistroArchSeriesBinaryPackageRelease( |
2168 | |
2169 | === modified file 'lib/lp/soyuz/scripts/tests/test_processdeathrow.py' |
2170 | --- lib/lp/soyuz/scripts/tests/test_processdeathrow.py 2010-10-04 19:50:45 +0000 |
2171 | +++ lib/lp/soyuz/scripts/tests/test_processdeathrow.py 2010-11-08 13:24:46 +0000 |
2172 | @@ -23,11 +23,11 @@ |
2173 | from zope.security.proxy import removeSecurityProxy |
2174 | |
2175 | from canonical.config import config |
2176 | -from canonical.launchpad.database import SourcePackagePublishingHistory |
2177 | from canonical.testing.layers import LaunchpadZopelessLayer |
2178 | from lp.registry.interfaces.distribution import IDistributionSet |
2179 | from lp.registry.interfaces.person import IPersonSet |
2180 | from lp.soyuz.enums import PackagePublishingStatus |
2181 | +from lp.soyuz.model.publishing import SourcePackagePublishingHistory |
2182 | |
2183 | |
2184 | class TestProcessDeathRow(TestCase): |
2185 | |
2186 | === modified file 'lib/lp/soyuz/scripts/tests/test_queue.py' |
2187 | --- lib/lp/soyuz/scripts/tests/test_queue.py 2010-10-26 15:47:24 +0000 |
2188 | +++ lib/lp/soyuz/scripts/tests/test_queue.py 2010-11-08 13:24:46 +0000 |
2189 | @@ -4,10 +4,6 @@ |
2190 | """queue tool base class tests.""" |
2191 | |
2192 | __metaclass__ = type |
2193 | -__all__ = [ |
2194 | - 'upload_bar_source', |
2195 | - ] |
2196 | - |
2197 | |
2198 | import hashlib |
2199 | import os |
2200 | @@ -25,10 +21,7 @@ |
2201 | |
2202 | from canonical.config import config |
2203 | from canonical.database.sqlbase import ISOLATION_LEVEL_READ_COMMITTED |
2204 | -from canonical.launchpad.database import ( |
2205 | - LibraryFileAlias, |
2206 | - PackageUploadBuild, |
2207 | - ) |
2208 | +from canonical.launchpad.database.librarian import LibraryFileAlias |
2209 | from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet |
2210 | from canonical.librarian.testing.server import ( |
2211 | cleanupLibrarianFiles, |
2212 | @@ -36,7 +29,7 @@ |
2213 | ) |
2214 | from canonical.librarian.utils import filechunks |
2215 | from canonical.testing.layers import ( |
2216 | - DatabaseFunctionalLayer, |
2217 | + DatabaseFunctionalLayer, |
2218 | LaunchpadZopelessLayer, |
2219 | ) |
2220 | from lp.archiveuploader.nascentupload import NascentUpload |
2221 | @@ -64,6 +57,7 @@ |
2222 | from lp.soyuz.interfaces.archive import ( |
2223 | IArchiveSet, |
2224 | ) |
2225 | +from lp.soyuz.model.queue import PackageUploadBuild |
2226 | from lp.soyuz.scripts.processaccepted import ( |
2227 | close_bugs_for_sourcepackagerelease, |
2228 | ) |
2229 | @@ -182,7 +176,7 @@ |
2230 | actions we want to see the help, not available actions will be |
2231 | reported. |
2232 | """ |
2233 | - queue_action = self.execute_command('help') |
2234 | + self.execute_command('help') |
2235 | self.assertEqual( |
2236 | ['Running: "help"', |
2237 | '\tinfo : Present the Queue item including its contents. ', |
2238 | @@ -194,13 +188,13 @@ |
2239 | '\tfetch : Fetch the contents of a queue item. '], |
2240 | self.test_output) |
2241 | |
2242 | - queue_action = self.execute_command('help fetch') |
2243 | + self.execute_command('help fetch') |
2244 | self.assertEqual( |
2245 | ['Running: "help fetch"', |
2246 | '\tfetch : Fetch the contents of a queue item. '], |
2247 | self.test_output) |
2248 | |
2249 | - queue_action = self.execute_command('help foo') |
2250 | + self.execute_command('help foo') |
2251 | self.assertEqual( |
2252 | ['Running: "help foo"', |
2253 | 'Not available action(s): foo'], |
2254 | @@ -286,7 +280,7 @@ |
2255 | # We need to upload a new source package to do this because the |
2256 | # sample data is horribly broken with published sources also in |
2257 | # the NEW queue. Doing it this way guarantees a nice set of data. |
2258 | - bar_src = self.uploadPackage() |
2259 | + self.uploadPackage() |
2260 | |
2261 | # Swallow email generated at the upload stage. |
2262 | stub.test_emails.pop() |
2263 | @@ -315,7 +309,7 @@ |
2264 | |
2265 | def testAcceptingSourceCreateBuilds(self): |
2266 | """Check if accepting a source package creates build records.""" |
2267 | - bar_src = self.uploadPackage() |
2268 | + self.uploadPackage() |
2269 | |
2270 | # Swallow email generated at the upload stage. |
2271 | stub.test_emails.pop() |
2272 | @@ -395,7 +389,7 @@ |
2273 | changesfile="suite/bar_1.0-2/bar_1.0-2_source.changes") |
2274 | |
2275 | # Now accept the new bar upload with the queue tool. |
2276 | - queue_action = self.execute_command('accept bar', no_mail=False) |
2277 | + self.execute_command('accept bar', no_mail=False) |
2278 | |
2279 | # The upload wants to close bug 6: |
2280 | bugs_fixed_header = bar2_src.changes._dict['Launchpad-bugs-fixed'] |
2281 | @@ -638,7 +632,7 @@ |
2282 | 2, breezy_autotest, PackageUploadStatus.UNAPPROVED, "cnews") |
2283 | |
2284 | # Step 1: try to accept both. |
2285 | - queue_action = self.execute_command( |
2286 | + self.execute_command( |
2287 | 'accept cnews', queue_name='unapproved', |
2288 | suite_name='breezy-autotest') |
2289 | |
2290 | @@ -653,7 +647,7 @@ |
2291 | 1, breezy_autotest, PackageUploadStatus.UNAPPROVED, "cnews") |
2292 | |
2293 | # Step 2: try to accept the remaining item in UNAPPROVED. |
2294 | - queue_action = self.execute_command( |
2295 | + self.execute_command( |
2296 | 'accept cnews', queue_name='unapproved', |
2297 | suite_name='breezy-autotest') |
2298 | self.assertErrorAcceptingDuplicate() |
2299 | @@ -662,7 +656,7 @@ |
2300 | |
2301 | # Step 3: try to accept the remaining item in UNAPPROVED with the |
2302 | # duplication already in DONE. |
2303 | - queue_action = self.execute_command( |
2304 | + self.execute_command( |
2305 | 'accept cnews', queue_name='unapproved', |
2306 | suite_name='breezy-autotest') |
2307 | # It failed and te item remains in UNAPPROVED. |
2308 | @@ -671,7 +665,7 @@ |
2309 | 1, breezy_autotest, PackageUploadStatus.UNAPPROVED, "cnews") |
2310 | |
2311 | # Step 4: The only possible destiny for the remaining item it REJECT. |
2312 | - queue_action = self.execute_command( |
2313 | + self.execute_command( |
2314 | 'reject cnews', queue_name='unapproved', |
2315 | suite_name='breezy-autotest') |
2316 | self.assertQueueLength( |
2317 | @@ -934,8 +928,6 @@ |
2318 | When overriding the component, the archive may change, so we check |
2319 | that here and make sure it's disallowed. |
2320 | """ |
2321 | - breezy_autotest = getUtility( |
2322 | - IDistributionSet)['ubuntu']['breezy-autotest'] |
2323 | # Test that it changes to partner when required. |
2324 | self.assertRaises( |
2325 | CommandRunnerError, self.execute_command, |
2326 | @@ -1024,7 +1016,7 @@ |
2327 | |
2328 | bug 67014: Don't complain if files are the same |
2329 | """ |
2330 | - queue_action = self.execute_command('fetch 1') |
2331 | + self.execute_command('fetch 1') |
2332 | self.assertEqual( |
2333 | ['mozilla-firefox_0.9_i386.changes'], self._listfiles()) |
2334 | |
2335 | @@ -1047,7 +1039,7 @@ |
2336 | """ |
2337 | CLOBBERED = "you're clobbered" |
2338 | |
2339 | - queue_action = self.execute_command('fetch 1') |
2340 | + self.execute_command('fetch 1') |
2341 | self.assertEqual( |
2342 | ['mozilla-firefox_0.9_i386.changes'], self._listfiles()) |
2343 | |
2344 | @@ -1086,7 +1078,7 @@ |
2345 | FAKE_DEB_CONTENT = "Fake DEB" |
2346 | fillLibrarianFile(1, FAKE_CHANGESFILE_CONTENT) |
2347 | fillLibrarianFile(90, FAKE_DEB_CONTENT) |
2348 | - queue_action = self.execute_command('fetch pmount') |
2349 | + self.execute_command('fetch pmount') |
2350 | |
2351 | # Check the files' names. |
2352 | files = sorted(self._listfiles()) |
2353 | @@ -1108,7 +1100,7 @@ |
2354 | We can specify multiple items to fetch, even mixing IDs and names. |
2355 | e.g. queue fetch alsa-utils 1 3 |
2356 | """ |
2357 | - queue_action = self.execute_command('fetch 3 mozilla-firefox') |
2358 | + self.execute_command('fetch 3 mozilla-firefox') |
2359 | files = self._listfiles() |
2360 | files.sort() |
2361 | self.assertEqual( |
2362 | |
2363 | === modified file 'lib/lp/soyuz/stories/soyuz/xx-queue-pages-motu.txt' |
2364 | --- lib/lp/soyuz/stories/soyuz/xx-queue-pages-motu.txt 2010-10-18 22:24:59 +0000 |
2365 | +++ lib/lp/soyuz/stories/soyuz/xx-queue-pages-motu.txt 2010-11-08 13:24:46 +0000 |
2366 | @@ -73,8 +73,8 @@ |
2367 | >>> from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet |
2368 | >>> from lp.soyuz.interfaces.binarypackagename import IBinaryPackageNameSet |
2369 | >>> from lp.soyuz.interfaces.component import IComponentSet |
2370 | - >>> from canonical.launchpad.database import ( |
2371 | - ... BinaryPackageRelease, SourcePackageRelease) |
2372 | + >>> from lp.soyuz.model.binarypackagerelease import BinaryPackageRelease |
2373 | + >>> from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease |
2374 | >>> universe = getUtility(IComponentSet)['universe'] |
2375 | >>> alsa_utils = getUtility( |
2376 | ... ISourcePackageNameSet).queryByName("alsa-utils") |
2377 | |
2378 | === modified file 'lib/lp/translations/doc/sourcepackagerelease-translations.txt' |
2379 | --- lib/lp/translations/doc/sourcepackagerelease-translations.txt 2010-10-05 00:08:16 +0000 |
2380 | +++ lib/lp/translations/doc/sourcepackagerelease-translations.txt 2010-11-08 13:24:46 +0000 |
2381 | @@ -38,7 +38,7 @@ |
2382 | |
2383 | We will use an arbitrary source package release from the sampledata. |
2384 | |
2385 | - >>> from canonical.launchpad.database import SourcePackageRelease |
2386 | + >>> from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease |
2387 | >>> spr_test = SourcePackageRelease.get(20) |
2388 | >>> print spr_test.title |
2389 | pmount - 0.1-1 |
2390 | |
2391 | === modified file 'scripts/bug-export.py' |
2392 | --- scripts/bug-export.py 2010-10-03 15:30:06 +0000 |
2393 | +++ scripts/bug-export.py 2010-11-08 13:24:46 +0000 |
2394 | @@ -11,7 +11,7 @@ |
2395 | |
2396 | from zope.component import getUtility |
2397 | from canonical.lp import initZopeless |
2398 | -from canonical.launchpad.interfaces import IProductSet |
2399 | +from lp.registry.interfaces.product import IProductSet |
2400 | from canonical.launchpad.scripts import execute_zcml_for_scripts |
2401 | |
2402 | from lp.bugs.scripts.bugexport import export_bugtasks |
2403 | |
2404 | === modified file 'scripts/bug-import.py' |
2405 | --- scripts/bug-import.py 2010-10-03 15:30:06 +0000 |
2406 | +++ scripts/bug-import.py 2010-11-08 13:24:46 +0000 |
2407 | @@ -10,7 +10,7 @@ |
2408 | |
2409 | from zope.component import getUtility |
2410 | from canonical.config import config |
2411 | -from canonical.launchpad.interfaces import IProductSet |
2412 | +from lp.registry.interfaces.product import IProductSet |
2413 | |
2414 | from lp.bugs.scripts.bugimport import BugImporter |
2415 | from lp.services.scripts.base import LaunchpadScript |
2416 | |
2417 | === modified file 'scripts/cache-country-mirrors.py' |
2418 | --- scripts/cache-country-mirrors.py 2010-10-03 15:30:06 +0000 |
2419 | +++ scripts/cache-country-mirrors.py 2010-11-08 13:24:46 +0000 |
2420 | @@ -19,10 +19,11 @@ |
2421 | |
2422 | from zope.component import getUtility |
2423 | |
2424 | +from lp.registry.interfaces.distributionmirror import ( |
2425 | + IDistributionMirrorSet, MirrorContent) |
2426 | from lp.services.scripts.base import ( |
2427 | LaunchpadScript, LaunchpadScriptFailure) |
2428 | -from canonical.launchpad.interfaces import ( |
2429 | - ICountrySet, IDistributionMirrorSet, MirrorContent) |
2430 | +from lp.services.worlddata.interfaces.country import ICountrySet |
2431 | |
2432 | |
2433 | class CacheCountryMirrors(LaunchpadScript): |
2434 | |
2435 | === modified file 'scripts/close-account.py' |
2436 | --- scripts/close-account.py 2010-10-03 15:30:06 +0000 |
2437 | +++ scripts/close-account.py 2010-11-08 13:24:46 +0000 |
2438 | @@ -15,9 +15,9 @@ |
2439 | |
2440 | from canonical.database.sqlbase import connect, sqlvalues |
2441 | from canonical.launchpad.scripts import db_options, logger_options, logger |
2442 | -from canonical.launchpad.interfaces import ( |
2443 | - PersonCreationRationale, QuestionStatus) |
2444 | -from canonical.launchpad.interfaces.account import AccountStatus |
2445 | +from lp.answers.interfaces.questionenums import QuestionStatus |
2446 | +from lp.registry.interfaces.person import PersonCreationRationale |
2447 | + |
2448 | |
2449 | def close_account(con, log, username): |
2450 | """Close a person's account. |
2451 | |
2452 | === modified file 'scripts/convert-person-to-team.py' |
2453 | --- scripts/convert-person-to-team.py 2010-10-03 15:30:06 +0000 |
2454 | +++ scripts/convert-person-to-team.py 2010-11-08 13:24:46 +0000 |
2455 | @@ -15,7 +15,8 @@ |
2456 | |
2457 | from lp.services.scripts.base import ( |
2458 | LaunchpadScript, LaunchpadScriptFailure) |
2459 | -from canonical.launchpad.interfaces import AccountStatus, IPersonSet |
2460 | +from canonical.launchpad.interfaces.account import AccountStatus |
2461 | +from lp.registry.interfaces.person import IPersonSet |
2462 | |
2463 | |
2464 | class ConvertPersonToTeamScript(LaunchpadScript): |
2465 | |
2466 | === modified file 'scripts/ftpmaster-tools/initialise-from-parent.py' |
2467 | --- scripts/ftpmaster-tools/initialise-from-parent.py 2010-10-03 15:30:06 +0000 |
2468 | +++ scripts/ftpmaster-tools/initialise-from-parent.py 2010-11-08 13:24:46 +0000 |
2469 | @@ -14,7 +14,7 @@ |
2470 | from contrib.glock import GlobalLock |
2471 | |
2472 | from canonical.config import config |
2473 | -from canonical.launchpad.interfaces import IDistributionSet |
2474 | +from lp.registry.interfaces.distribution import IDistributionSet |
2475 | from canonical.launchpad.scripts import ( |
2476 | execute_zcml_for_scripts, logger, logger_options) |
2477 | from canonical.lp import initZopeless |
2478 | |
2479 | === modified file 'scripts/ftpmaster-tools/remove-package.py' |
2480 | --- scripts/ftpmaster-tools/remove-package.py 2010-10-03 15:30:06 +0000 |
2481 | +++ scripts/ftpmaster-tools/remove-package.py 2010-11-08 13:24:46 +0000 |
2482 | @@ -23,13 +23,18 @@ |
2483 | |
2484 | from canonical.config import config |
2485 | from canonical.database.constants import UTC_NOW |
2486 | -from canonical.launchpad.database import (BinaryPackagePublishingHistory, |
2487 | - SourcePackagePublishingHistory) |
2488 | -from canonical.launchpad.interfaces import IDistributionSet |
2489 | -from canonical.launchpad.scripts import (execute_zcml_for_scripts, |
2490 | - logger, logger_options) |
2491 | +from canonical.launchpad.scripts import ( |
2492 | + execute_zcml_for_scripts, |
2493 | + logger, |
2494 | + logger_options, |
2495 | + ) |
2496 | from canonical.lp import initZopeless |
2497 | +from lp.registry.interfaces.distribution import IDistributionSet |
2498 | from lp.soyuz.enums import PackagePublishingStatus |
2499 | +from lp.soyuz.model.publishing import ( |
2500 | + BinaryPackagePublishingHistory, |
2501 | + SourcePackagePublishingHistory, |
2502 | + ) |
2503 | |
2504 | from contrib.glock import GlobalLock |
2505 | |
2506 | |
2507 | === modified file 'scripts/ftpmaster-tools/sync-source.py' |
2508 | --- scripts/ftpmaster-tools/sync-source.py 2010-10-20 13:33:24 +0000 |
2509 | +++ scripts/ftpmaster-tools/sync-source.py 2010-11-08 13:24:46 +0000 |
2510 | @@ -40,10 +40,6 @@ |
2511 | cursor, |
2512 | sqlvalues, |
2513 | ) |
2514 | -from canonical.launchpad.interfaces import ( |
2515 | - IDistributionSet, |
2516 | - IPersonSet, |
2517 | - ) |
2518 | from canonical.launchpad.scripts import ( |
2519 | execute_zcml_for_scripts, |
2520 | logger, |
2521 | @@ -55,6 +51,8 @@ |
2522 | DpkgSourceError, |
2523 | extract_dpkg_source, |
2524 | ) |
2525 | +from lp.registry.interfaces.distribution import IDistributionSet |
2526 | +from lp.registry.interfaces.person import IPersonSet |
2527 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
2528 | from lp.soyuz.enums import PackagePublishingStatus |
2529 | from lp.soyuz.scripts.ftpmaster import ( |
2530 | |
2531 | === modified file 'scripts/import-packagenames.py' |
2532 | --- scripts/import-packagenames.py 2010-04-27 19:48:39 +0000 |
2533 | +++ scripts/import-packagenames.py 2010-11-08 13:24:46 +0000 |
2534 | @@ -11,7 +11,7 @@ |
2535 | from optparse import OptionParser |
2536 | |
2537 | from canonical.lp import initZopeless |
2538 | -from canonical.launchpad.database import BinaryPackageName |
2539 | +from lp.soyuz.model.binarypackagename import BinaryPackageName |
2540 | |
2541 | |
2542 | class BaseNameList: |
2543 | |
2544 | === modified file 'scripts/migrate-bugzilla-initialcontacts.py' |
2545 | --- scripts/migrate-bugzilla-initialcontacts.py 2010-10-03 15:30:06 +0000 |
2546 | +++ scripts/migrate-bugzilla-initialcontacts.py 2010-11-08 13:24:46 +0000 |
2547 | @@ -4,7 +4,6 @@ |
2548 | # GNU Affero General Public License version 3 (see the file LICENSE). |
2549 | |
2550 | import logging |
2551 | -import re |
2552 | import MySQLdb |
2553 | |
2554 | import _pythonpath |
2555 | @@ -13,9 +12,10 @@ |
2556 | |
2557 | from canonical.lp import initZopeless |
2558 | from canonical.launchpad.scripts import execute_zcml_for_scripts |
2559 | -from canonical.launchpad.interfaces import ( |
2560 | - IPersonSet, IEmailAddressSet, ILaunchpadCelebrities) |
2561 | +from canonical.launchpad.interfaces.emailaddress import IEmailAddressSet |
2562 | +from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
2563 | from lp.app.errors import NotFoundError |
2564 | +from lp.registry.interfaces.person import IPersonSet |
2565 | |
2566 | |
2567 | execute_zcml_for_scripts() |
2568 | |
2569 | === modified file 'scripts/mlist-sync.py' |
2570 | --- scripts/mlist-sync.py 2010-10-07 17:37:01 +0000 |
2571 | +++ scripts/mlist-sync.py 2010-11-08 13:24:46 +0000 |
2572 | @@ -37,8 +37,9 @@ |
2573 | from zope.security.proxy import removeSecurityProxy |
2574 | |
2575 | from canonical.config import config |
2576 | -from canonical.launchpad.interfaces import ( |
2577 | - IEmailAddressSet, IMailingListSet, IPersonSet) |
2578 | +from canonical.launchpad.interfaces.emailaddress import IEmailAddressSet |
2579 | +from lp.registry.interfaces.mailinglist import IMailingListSet |
2580 | +from lp.registry.interfaces.person import IPersonSet |
2581 | from lp.services.mailman.config import configure_prefix |
2582 | from lp.services.scripts.base import LaunchpadScript |
2583 | |
2584 | |
2585 | === modified file 'scripts/rosetta/check-distroseries-translations-diffs.py' |
2586 | --- scripts/rosetta/check-distroseries-translations-diffs.py 2010-10-03 15:30:06 +0000 |
2587 | +++ scripts/rosetta/check-distroseries-translations-diffs.py 2010-11-08 13:24:46 +0000 |
2588 | @@ -10,7 +10,7 @@ |
2589 | from zope.component import getUtility |
2590 | |
2591 | from canonical.lp import initZopeless |
2592 | -from canonical.launchpad.interfaces import IDistributionSet |
2593 | +from lp.registry.interfaces.distribution import IDistributionSet |
2594 | from canonical.launchpad.scripts import execute_zcml_for_scripts |
2595 | from canonical.launchpad.scripts import logger, logger_options |
2596 | |
2597 | |
2598 | === modified file 'utilities/make-lp-user' |
2599 | --- utilities/make-lp-user 2010-10-03 15:30:06 +0000 |
2600 | +++ utilities/make-lp-user 2010-11-08 13:24:46 +0000 |
2601 | @@ -43,14 +43,12 @@ |
2602 | |
2603 | from zope.component import getUtility |
2604 | |
2605 | -from canonical.launchpad.interfaces import ( |
2606 | - IPersonSet, |
2607 | - ISSHKeySet, |
2608 | - TeamMembershipStatus, |
2609 | - ) |
2610 | from canonical.launchpad.interfaces.gpghandler import IGPGHandler |
2611 | from canonical.launchpad.scripts import execute_zcml_for_scripts |
2612 | from lp.registry.interfaces.gpg import GPGKeyAlgorithm, IGPGKeySet |
2613 | +from lp.registry.interfaces.person import IPersonSet |
2614 | +from lp.registry.interfaces.ssh import ISSHKeySet |
2615 | +from lp.registry.interfaces.teammembership import TeamMembershipStatus |
2616 | from lp.testing.factory import LaunchpadObjectFactory |
2617 | |
2618 | # Shut up, pyflakes. |
Trivial