Merge lp:~jml/launchpad/patmos-2 into lp:launchpad
- patmos-2
- Merge into devel
Proposed by
Jonathan Lange
Status: | Merged |
---|---|
Merged at revision: | 11895 |
Proposed branch: | lp:~jml/launchpad/patmos-2 |
Merge into: | lp:launchpad |
Prerequisite: | lp:~jml/launchpad/patmos-1 |
Diff against target: |
730 lines (+494/-22) 17 files modified
lib/canonical/launchpad/interfaces/webservice.py (+32/-0) lib/canonical/launchpad/zcml/webservice.zcml (+6/-6) lib/lp/blueprints/configure.zcml (+3/-0) lib/lp/blueprints/interfaces/webservice.py (+22/-0) lib/lp/bugs/configure.zcml (+4/-0) lib/lp/bugs/interfaces/bugbranch.py (+0/-6) lib/lp/bugs/interfaces/webservice.py (+86/-0) lib/lp/code/interfaces/webservice.py (+35/-4) lib/lp/hardwaredb/configure.zcml (+4/-1) lib/lp/hardwaredb/interfaces/webservice.py (+42/-0) lib/lp/registry/configure.zcml (+1/-4) lib/lp/registry/interfaces/webservice.py (+106/-0) lib/lp/services/worlddata/configure.zcml (+2/-0) lib/lp/services/worlddata/interfaces/webservice.py (+30/-0) lib/lp/soyuz/configure.zcml (+4/-0) lib/lp/soyuz/interfaces/webservice.py (+106/-0) lib/lp/translations/interfaces/webservice.py (+11/-1) |
To merge this branch: | bzr merge lp:~jml/launchpad/patmos-2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | code | Approve | |
Review via email: mp+40396@code.launchpad.net |
Commit message
Description of the change
This branch changes the webservice registration to be explicit for all objects, thus removing another thing that depends on the c.l.interfaces globs.
To post a comment you must log in.
Revision history for this message
Jonathan Lange (jml) wrote : | # |
Revision history for this message
Curtis Hovey (sinzui) wrote : | # |
This looks good to land. I really appreciate the separation of concerns in the zcml. This change makes the API code easier to understand.
review:
Approve
(code)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file 'lib/canonical/launchpad/interfaces/webservice.py' |
2 | --- lib/canonical/launchpad/interfaces/webservice.py 1970-01-01 00:00:00 +0000 |
3 | +++ lib/canonical/launchpad/interfaces/webservice.py 2010-11-09 16:27:54 +0000 |
4 | @@ -0,0 +1,32 @@ |
5 | +# Copyright 2010 Canonical Ltd. This software is licensed under the |
6 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
7 | + |
8 | +"""All the interfaces that are exposed through the webservice. |
9 | + |
10 | +There is a declaration in ZCML somewhere that looks like: |
11 | + <webservice:register module="canonical.launchpad.interfaces.webservice" /> |
12 | + |
13 | +which tells `lazr.restful` that it should look for webservice exports here. |
14 | +""" |
15 | + |
16 | +__metaclass__ = type |
17 | +__all__ = [ |
18 | + 'IEmailAddress', |
19 | + 'IMessage', |
20 | + 'ITemporaryBlobStorage', |
21 | + 'ITemporaryStorageManager', |
22 | + 'IWebServiceApplication', |
23 | + ] |
24 | + |
25 | +from canonical.launchpad.interfaces.launchpad import IWebServiceApplication |
26 | + |
27 | +from canonical.launchpad.interfaces.emailaddress import IEmailAddress |
28 | +from canonical.launchpad.interfaces.message import IMessage |
29 | +from canonical.launchpad.interfaces.temporaryblobstorage import ( |
30 | + ITemporaryBlobStorage, |
31 | + ITemporaryStorageManager, |
32 | + ) |
33 | +# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular |
34 | +# import bugs. Break this up into a per-package thing. |
35 | +from canonical.launchpad.interfaces import _schema_circular_imports |
36 | +_schema_circular_imports |
37 | |
38 | === modified file 'lib/canonical/launchpad/zcml/webservice.zcml' |
39 | --- lib/canonical/launchpad/zcml/webservice.zcml 2010-10-03 15:30:06 +0000 |
40 | +++ lib/canonical/launchpad/zcml/webservice.zcml 2010-11-09 16:27:54 +0000 |
41 | @@ -36,10 +36,10 @@ |
42 | for="lazr.restful.interfaces.IEntry |
43 | zope.schema.interfaces.IField" |
44 | provides="lazr.restful.interfaces.IByteStorage" |
45 | - factory="canonical.launchpad.rest.LibraryBackedByteStorage" |
46 | + factory="canonical.launchpad.rest.bytestorage.LibraryBackedByteStorage" |
47 | /> |
48 | |
49 | - <class class="canonical.launchpad.rest.LibraryBackedByteStorage"> |
50 | + <class class="canonical.launchpad.rest.bytestorage.LibraryBackedByteStorage"> |
51 | <allow interface='lazr.restful.interfaces.IByteStorage' /> |
52 | </class> |
53 | |
54 | @@ -49,10 +49,10 @@ |
55 | for="lazr.restful.interfaces.IEntry |
56 | lp.services.fields.IRestrictedBytes" |
57 | provides="lazr.restful.interfaces.IByteStorage" |
58 | - factory="canonical.launchpad.rest.RestrictedLibraryBackedByteStorage" |
59 | + factory="canonical.launchpad.rest.bytestorage.RestrictedLibraryBackedByteStorage" |
60 | /> |
61 | |
62 | - <class class="canonical.launchpad.rest.RestrictedLibraryBackedByteStorage"> |
63 | + <class class="canonical.launchpad.rest.bytestorage.RestrictedLibraryBackedByteStorage"> |
64 | <allow interface='lazr.restful.interfaces.IByteStorage' /> |
65 | </class> |
66 | |
67 | @@ -68,13 +68,13 @@ |
68 | for="lp.bugs.interfaces.bugmessage.IBugComment |
69 | lazr.restful.interfaces.IWebServiceClientRequest" |
70 | provides="lazr.restful.interfaces.IEntry" |
71 | - factory="canonical.launchpad.rest.bugcomment_to_entry" |
72 | + factory="lp.bugs.adapters.bug.bugcomment_to_entry" |
73 | /> |
74 | |
75 | <grok:grok package="lazr.restful.directives" /> |
76 | <grok:grok package="canonical.launchpad.rest" /> |
77 | |
78 | - <webservice:register module="canonical.launchpad.interfaces" /> |
79 | + <webservice:register module="canonical.launchpad.interfaces.webservice" /> |
80 | |
81 | <adapter |
82 | for="zope.schema.interfaces.IChoice |
83 | |
84 | === modified file 'lib/lp/blueprints/configure.zcml' |
85 | --- lib/lp/blueprints/configure.zcml 2010-11-04 03:34:54 +0000 |
86 | +++ lib/lp/blueprints/configure.zcml 2010-11-09 16:27:54 +0000 |
87 | @@ -6,6 +6,7 @@ |
88 | xmlns="http://namespaces.zope.org/zope" |
89 | xmlns:browser="http://namespaces.zope.org/browser" |
90 | xmlns:i18n="http://namespaces.zope.org/i18n" |
91 | + xmlns:webservice="http://namespaces.canonical.com/webservice" |
92 | xmlns:xmlrpc="http://namespaces.zope.org/xmlrpc" |
93 | xmlns:lp="http://namespaces.canonical.com/lp" |
94 | i18n_domain="launchpad"> |
95 | @@ -238,4 +239,6 @@ |
96 | <allow interface="lp.blueprints.interfaces.specificationmessage.ISpecificationMessageSet"/> |
97 | </securedutility> |
98 | |
99 | + <webservice:register module="lp.blueprints.interfaces.webservice" /> |
100 | + |
101 | </configure> |
102 | |
103 | === added file 'lib/lp/blueprints/interfaces/webservice.py' |
104 | --- lib/lp/blueprints/interfaces/webservice.py 1970-01-01 00:00:00 +0000 |
105 | +++ lib/lp/blueprints/interfaces/webservice.py 2010-11-09 16:27:54 +0000 |
106 | @@ -0,0 +1,22 @@ |
107 | +# Copyright 2010 Canonical Ltd. This software is licensed under the |
108 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
109 | + |
110 | +"""All the interfaces that are exposed through the webservice. |
111 | + |
112 | +There is a declaration in ZCML somewhere that looks like: |
113 | + <webservice:register module="lp.blueprints.interfaces.webservice" /> |
114 | + |
115 | +which tells `lazr.restful` that it should look for webservice exports here. |
116 | +""" |
117 | + |
118 | +__all__ = [ |
119 | + 'ISpecification', |
120 | + 'ISpecificationBranch', |
121 | + ] |
122 | + |
123 | +from lp.blueprints.interfaces.specification import ISpecification |
124 | +from lp.blueprints.interfaces.specificationbranch import ISpecificationBranch |
125 | +# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular |
126 | +# import bugs. Break this up into a per-package thing. |
127 | +from canonical.launchpad.interfaces import _schema_circular_imports |
128 | +_schema_circular_imports |
129 | |
130 | === modified file 'lib/lp/bugs/configure.zcml' |
131 | --- lib/lp/bugs/configure.zcml 2010-11-09 16:27:51 +0000 |
132 | +++ lib/lp/bugs/configure.zcml 2010-11-09 16:27:54 +0000 |
133 | @@ -6,6 +6,7 @@ |
134 | xmlns="http://namespaces.zope.org/zope" |
135 | xmlns:browser="http://namespaces.zope.org/browser" |
136 | xmlns:i18n="http://namespaces.zope.org/i18n" |
137 | + xmlns:webservice="http://namespaces.canonical.com/webservice" |
138 | xmlns:xmlrpc="http://namespaces.zope.org/xmlrpc" |
139 | xmlns:lp="http://namespaces.canonical.com/lp" |
140 | i18n_domain="launchpad"> |
141 | @@ -1052,4 +1053,7 @@ |
142 | mail_header |
143 | recipient"/> |
144 | </class> |
145 | + |
146 | + <webservice:register module="lp.bugs.interfaces.webservice" /> |
147 | + |
148 | </configure> |
149 | |
150 | === modified file 'lib/lp/bugs/interfaces/bugbranch.py' |
151 | --- lib/lp/bugs/interfaces/bugbranch.py 2010-08-20 20:31:18 +0000 |
152 | +++ lib/lp/bugs/interfaces/bugbranch.py 2010-11-09 16:27:54 +0000 |
153 | @@ -12,10 +12,6 @@ |
154 | "IBugBranchSet", |
155 | ] |
156 | |
157 | -from lazr.enum import ( |
158 | - DBEnumeratedType, |
159 | - DBItem, |
160 | - ) |
161 | from lazr.restful.declarations import ( |
162 | export_as_webservice_entry, |
163 | exported, |
164 | @@ -23,7 +19,6 @@ |
165 | from lazr.restful.fields import ReferenceChoice |
166 | from zope.interface import Interface |
167 | from zope.schema import ( |
168 | - Choice, |
169 | Int, |
170 | Object, |
171 | TextLine, |
172 | @@ -40,7 +35,6 @@ |
173 | from lp.registry.interfaces.person import IPerson |
174 | from lp.services.fields import ( |
175 | BugField, |
176 | - Summary, |
177 | ) |
178 | |
179 | |
180 | |
181 | === added file 'lib/lp/bugs/interfaces/webservice.py' |
182 | --- lib/lp/bugs/interfaces/webservice.py 1970-01-01 00:00:00 +0000 |
183 | +++ lib/lp/bugs/interfaces/webservice.py 2010-11-09 16:27:54 +0000 |
184 | @@ -0,0 +1,86 @@ |
185 | +# Copyright 2010 Canonical Ltd. This software is licensed under the |
186 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
187 | + |
188 | +"""All the interfaces that are exposed through the webservice. |
189 | + |
190 | +There is a declaration in ZCML somewhere that looks like: |
191 | + <webservice:register module="lp.bugs.interfaces.webservice" /> |
192 | + |
193 | +which tells `lazr.restful` that it should look for webservice exports here. |
194 | +""" |
195 | + |
196 | +__all__ = [ |
197 | + 'BugNominationStatusError', |
198 | + 'IBug', |
199 | + 'InvalidBugTargetType', |
200 | + 'InvalidDuplicateValue', |
201 | + 'IBugActivity', |
202 | + 'IBugAttachment', |
203 | + 'IBugBranch', |
204 | + 'IBugNomination', |
205 | + 'IBugSubscription', |
206 | + 'IBugTarget', |
207 | + 'IBugTask', |
208 | + 'IBugTracker', |
209 | + 'IBugTrackerComponent', |
210 | + 'IBugTrackerComponentGroup', |
211 | + 'IBugTrackerSet', |
212 | + 'IBugWatch', |
213 | + 'ICve', |
214 | + 'ICveSet', |
215 | + 'IHasBugs', |
216 | + 'IMaloneApplication', |
217 | + 'IllegalRelatedBugTasksParams', |
218 | + 'IllegalTarget', |
219 | + 'NominationError', |
220 | + 'NominationSeriesObsoleteError', |
221 | + 'UserCannotEditBugTaskAssignee', |
222 | + 'UserCannotEditBugTaskImportance', |
223 | + 'UserCannotEditBugTaskMilestone', |
224 | + 'UserCannotEditBugTaskStatus', |
225 | + ] |
226 | + |
227 | +from lp.bugs.interfaces.bug import ( |
228 | + IBug, |
229 | + InvalidBugTargetType, |
230 | + InvalidDuplicateValue, |
231 | + ) |
232 | +from lp.bugs.interfaces.bugactivity import IBugActivity |
233 | +from lp.bugs.interfaces.bugattachment import IBugAttachment |
234 | +from lp.bugs.interfaces.bugbranch import IBugBranch |
235 | +from lp.bugs.interfaces.malone import IMaloneApplication |
236 | +from lp.bugs.interfaces.bugnomination import ( |
237 | + BugNominationStatusError, |
238 | + IBugNomination, |
239 | + NominationError, |
240 | + NominationSeriesObsoleteError, |
241 | + ) |
242 | +from lp.bugs.interfaces.bugsubscription import IBugSubscription |
243 | +from lp.bugs.interfaces.bugtarget import ( |
244 | + IBugTarget, |
245 | + IHasBugs, |
246 | + ) |
247 | +from lp.bugs.interfaces.bugtask import ( |
248 | + IBugTask, |
249 | + IllegalRelatedBugTasksParams, |
250 | + IllegalTarget, |
251 | + UserCannotEditBugTaskAssignee, |
252 | + UserCannotEditBugTaskImportance, |
253 | + UserCannotEditBugTaskMilestone, |
254 | + UserCannotEditBugTaskStatus, |
255 | + ) |
256 | +from lp.bugs.interfaces.bugtracker import ( |
257 | + IBugTracker, |
258 | + IBugTrackerComponent, |
259 | + IBugTrackerComponentGroup, |
260 | + IBugTrackerSet, |
261 | + ) |
262 | +from lp.bugs.interfaces.bugwatch import IBugWatch |
263 | +from lp.bugs.interfaces.cve import ( |
264 | + ICve, |
265 | + ICveSet, |
266 | + ) |
267 | +# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular |
268 | +# import bugs. Break this up into a per-package thing. |
269 | +from canonical.launchpad.interfaces import _schema_circular_imports |
270 | +_schema_circular_imports |
271 | |
272 | === modified file 'lib/lp/code/interfaces/webservice.py' |
273 | --- lib/lp/code/interfaces/webservice.py 2010-08-20 20:31:18 +0000 |
274 | +++ lib/lp/code/interfaces/webservice.py 2010-11-09 16:27:54 +0000 |
275 | @@ -1,7 +1,36 @@ |
276 | -# Copyright 2009 Canonical Ltd. This software is licensed under the |
277 | +# Copyright 2009-2010 Canonical Ltd. This software is licensed under the |
278 | # GNU Affero General Public License version 3 (see the file LICENSE). |
279 | |
280 | -"""All the interfaces that are exposed through the webservice.""" |
281 | +"""All the interfaces that are exposed through the webservice. |
282 | + |
283 | +There is a declaration in ZCML somewhere that looks like: |
284 | + <webservice:register module="lp.code.interfaces.webservice" /> |
285 | + |
286 | +which tells `lazr.restful` that it should look for webservice exports here. |
287 | +""" |
288 | + |
289 | +__all__ = [ |
290 | + 'BranchCreatorNotMemberOfOwnerTeam', |
291 | + 'BranchCreatorNotOwner', |
292 | + 'BranchExists', |
293 | + 'BranchMergeProposalExists', |
294 | + 'BuildAlreadyPending', |
295 | + 'CodeImportAlreadyRunning', |
296 | + 'CodeImportNotInReviewedState', |
297 | + 'IBranch', |
298 | + 'IBranchMergeProposal', |
299 | + 'IBranchSet', |
300 | + 'IBranchSubscription', |
301 | + 'ICodeImport', |
302 | + 'ICodeReviewComment', |
303 | + 'ICodeReviewVoteReference', |
304 | + 'IDiff', |
305 | + 'IPreviewDiff', |
306 | + 'ISourcePackageRecipe', |
307 | + 'ISourcePackageRecipeBuild', |
308 | + 'IStaticDiff', |
309 | + 'TooManyBuilds', |
310 | + ] |
311 | |
312 | # The exceptions are imported so that they can produce the special |
313 | # status code defined by webservice_error when they are raised. |
314 | @@ -33,5 +62,7 @@ |
315 | from lp.code.interfaces.sourcepackagerecipebuild import ( |
316 | ISourcePackageRecipeBuild, |
317 | ) |
318 | - |
319 | - |
320 | +# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular |
321 | +# import bugs. Break this up into a per-package thing. |
322 | +from canonical.launchpad.interfaces import _schema_circular_imports |
323 | +_schema_circular_imports |
324 | |
325 | === modified file 'lib/lp/hardwaredb/configure.zcml' |
326 | --- lib/lp/hardwaredb/configure.zcml 2010-02-02 17:12:29 +0000 |
327 | +++ lib/lp/hardwaredb/configure.zcml 2010-11-09 16:27:54 +0000 |
328 | @@ -2,6 +2,7 @@ |
329 | xmlns="http://namespaces.zope.org/zope" |
330 | xmlns:browser="http://namespaces.zope.org/browser" |
331 | xmlns:i18n="http://namespaces.zope.org/i18n" |
332 | + xmlns:webservice="http://namespaces.canonical.com/webservice" |
333 | xmlns:xmlrpc="http://namespaces.zope.org/xmlrpc" |
334 | i18n_domain="launchpad"> |
335 | <include |
336 | @@ -187,4 +188,6 @@ |
337 | <allow |
338 | interface="lp.hardwaredb.interfaces.hwdb.IHWSubmissionBugSet"/> |
339 | </securedutility> |
340 | -</configure> |
341 | \ No newline at end of file |
342 | + |
343 | + <webservice:register module="lp.hardwaredb.interfaces.webservice" /> |
344 | +</configure> |
345 | |
346 | === added file 'lib/lp/hardwaredb/interfaces/webservice.py' |
347 | --- lib/lp/hardwaredb/interfaces/webservice.py 1970-01-01 00:00:00 +0000 |
348 | +++ lib/lp/hardwaredb/interfaces/webservice.py 2010-11-09 16:27:54 +0000 |
349 | @@ -0,0 +1,42 @@ |
350 | +# Copyright 2010 Canonical Ltd. This software is licensed under the |
351 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
352 | + |
353 | +"""All the interfaces that are exposed through the webservice. |
354 | + |
355 | +There is a declaration in ZCML somewhere that looks like: |
356 | + <webservice:register module="lp.hardwaredb.interfaces.hwdb" /> |
357 | + |
358 | +which tells `lazr.restful` that it should look for webservice exports here. |
359 | +""" |
360 | + |
361 | +__all__ = [ |
362 | + 'IHWDBApplication', |
363 | + 'IHWDevice', |
364 | + 'IHWDeviceClass', |
365 | + 'IHWDriver', |
366 | + 'IHWDriverName', |
367 | + 'IHWDriverPackageName', |
368 | + 'IHWSubmission', |
369 | + 'IHWSubmissionDevice', |
370 | + 'IHWVendorID', |
371 | + 'IllegalQuery', |
372 | + 'ParameterError', |
373 | + ] |
374 | + |
375 | +from lp.hardwaredb.interfaces.hwdb import ( |
376 | + IHWDBApplication, |
377 | + IHWDevice, |
378 | + IHWDeviceClass, |
379 | + IHWDriver, |
380 | + IHWDriverName, |
381 | + IHWDriverPackageName, |
382 | + IHWSubmission, |
383 | + IHWSubmissionDevice, |
384 | + IHWVendorID, |
385 | + IllegalQuery, |
386 | + ParameterError, |
387 | + ) |
388 | +# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular |
389 | +# import bugs. Break this up into a per-package thing. |
390 | +from canonical.launchpad.interfaces import _schema_circular_imports |
391 | +_schema_circular_imports |
392 | |
393 | === modified file 'lib/lp/registry/configure.zcml' |
394 | --- lib/lp/registry/configure.zcml 2010-11-09 16:27:51 +0000 |
395 | +++ lib/lp/registry/configure.zcml 2010-11-09 16:27:54 +0000 |
396 | @@ -1862,11 +1862,8 @@ |
397 | interface="lp.registry.interfaces.personproduct.IPersonProduct"/> |
398 | </class> |
399 | |
400 | - <!-- Registers exceptions used in webservice defined in lp.registry. |
401 | - Other data is in module=canonical.launchpad.interfaces as defined in |
402 | - zcml there.--> |
403 | - |
404 | <webservice:register module="lp.registry.errors" /> |
405 | + <webservice:register module="lp.registry.interfaces.webservice" /> |
406 | |
407 | <adapter |
408 | provides="canonical.launchpad.webapp.interfaces.IBreadcrumb" |
409 | |
410 | === added file 'lib/lp/registry/interfaces/webservice.py' |
411 | --- lib/lp/registry/interfaces/webservice.py 1970-01-01 00:00:00 +0000 |
412 | +++ lib/lp/registry/interfaces/webservice.py 2010-11-09 16:27:54 +0000 |
413 | @@ -0,0 +1,106 @@ |
414 | +# Copyright 2010 Canonical Ltd. This software is licensed under the |
415 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
416 | + |
417 | +"""All the interfaces that are exposed through the webservice.""" |
418 | + |
419 | +__all__ = [ |
420 | + 'DerivationError', |
421 | + 'ICommercialSubscription', |
422 | + 'IDistribution', |
423 | + 'IDistributionMirror', |
424 | + 'IDistributionSet', |
425 | + 'IDistributionSourcePackage', |
426 | + 'IDistroSeries', |
427 | + 'IDistroSeriesDifference', |
428 | + 'IDistroSeriesDifferenceComment', |
429 | + 'IGPGKey', |
430 | + 'IHasMilestones', |
431 | + 'IIrcID', |
432 | + 'IJabberID', |
433 | + 'IMilestone', |
434 | + 'IPerson', |
435 | + 'IPersonSet', |
436 | + 'IPillar', |
437 | + 'IPillarNameSet', |
438 | + 'IProduct', |
439 | + 'IProductRelease', |
440 | + 'IProductReleaseFile', |
441 | + 'IProductSeries', |
442 | + 'IProductSet', |
443 | + 'IProjectGroup', |
444 | + 'IProjectGroupSet', |
445 | + 'ISSHKey', |
446 | + 'ISourcePackage', |
447 | + 'ISourcePackageName', |
448 | + 'IStructuralSubscription', |
449 | + 'IStructuralSubscriptionTarget', |
450 | + 'ITeam', |
451 | + 'ITeamMembership', |
452 | + 'IWikiName', |
453 | + 'PPACreationError', |
454 | + ] |
455 | + |
456 | +from lp.registry.interfaces.commercialsubscription import ( |
457 | + ICommercialSubscription, |
458 | + ) |
459 | +from lp.registry.interfaces.distribution import ( |
460 | + IDistribution, |
461 | + IDistributionSet, |
462 | + ) |
463 | +from lp.registry.interfaces.distributionmirror import IDistributionMirror |
464 | +from lp.registry.interfaces.distributionsourcepackage import ( |
465 | + IDistributionSourcePackage, |
466 | + ) |
467 | +from lp.registry.interfaces.distroseries import ( |
468 | + DerivationError, |
469 | + IDistroSeries, |
470 | + ) |
471 | +from lp.registry.interfaces.distroseriesdifference import ( |
472 | + IDistroSeriesDifference, |
473 | + ) |
474 | +from lp.registry.interfaces.distroseriesdifferencecomment import ( |
475 | + IDistroSeriesDifferenceComment, |
476 | + ) |
477 | +from lp.registry.interfaces.gpg import IGPGKey |
478 | +from lp.registry.interfaces.irc import IIrcID |
479 | +from lp.registry.interfaces.jabber import IJabberID |
480 | +from lp.registry.interfaces.milestone import ( |
481 | + IHasMilestones, |
482 | + IMilestone, |
483 | + ) |
484 | +from lp.registry.interfaces.person import ( |
485 | + IPerson, |
486 | + IPersonSet, |
487 | + ITeam, |
488 | + PPACreationError, |
489 | + ) |
490 | +from lp.registry.interfaces.pillar import ( |
491 | + IPillar, |
492 | + IPillarNameSet, |
493 | + ) |
494 | +from lp.registry.interfaces.product import ( |
495 | + IProduct, |
496 | + IProductSet, |
497 | + ) |
498 | +from lp.registry.interfaces.productrelease import ( |
499 | + IProductRelease, |
500 | + IProductReleaseFile, |
501 | + ) |
502 | +from lp.registry.interfaces.productseries import IProductSeries |
503 | +from lp.registry.interfaces.projectgroup import ( |
504 | + IProjectGroup, |
505 | + IProjectGroupSet, |
506 | + ) |
507 | +from lp.registry.interfaces.sourcepackage import ISourcePackage |
508 | +from lp.registry.interfaces.sourcepackagename import ISourcePackageName |
509 | +from lp.registry.interfaces.ssh import ISSHKey |
510 | +from lp.registry.interfaces.structuralsubscription import ( |
511 | + IStructuralSubscription, |
512 | + IStructuralSubscriptionTarget, |
513 | + ) |
514 | +from lp.registry.interfaces.teammembership import ITeamMembership |
515 | +from lp.registry.interfaces.wikiname import IWikiName |
516 | +# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular |
517 | +# import bugs. Break this up into a per-package thing. |
518 | +from canonical.launchpad.interfaces import _schema_circular_imports |
519 | +_schema_circular_imports |
520 | |
521 | === modified file 'lib/lp/services/worlddata/configure.zcml' |
522 | --- lib/lp/services/worlddata/configure.zcml 2010-02-20 03:00:48 +0000 |
523 | +++ lib/lp/services/worlddata/configure.zcml 2010-11-09 16:27:54 +0000 |
524 | @@ -5,6 +5,7 @@ |
525 | <configure |
526 | xmlns="http://namespaces.zope.org/zope" |
527 | xmlns:i18n="http://namespaces.zope.org/i18n" |
528 | + xmlns:webservice="http://namespaces.canonical.com/webservice" |
529 | i18n_domain="launchpad"> |
530 | <include file="vocabularies.zcml"/> |
531 | |
532 | @@ -57,4 +58,5 @@ |
533 | |
534 | <include package=".browser"/> |
535 | |
536 | + <webservice:register module="lp.services.worlddata.interfaces.webservice" /> |
537 | </configure> |
538 | |
539 | === added file 'lib/lp/services/worlddata/interfaces/webservice.py' |
540 | --- lib/lp/services/worlddata/interfaces/webservice.py 1970-01-01 00:00:00 +0000 |
541 | +++ lib/lp/services/worlddata/interfaces/webservice.py 2010-11-09 16:27:54 +0000 |
542 | @@ -0,0 +1,30 @@ |
543 | +# Copyright 2010 Canonical Ltd. This software is licensed under the |
544 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
545 | + |
546 | +"""All the interfaces that are exposed through the webservice. |
547 | + |
548 | +There is a declaration in ZCML somewhere that looks like: |
549 | + <webservice:register module="lp.services.worlddata.interfaces.webservice" /> |
550 | + |
551 | +which tells `lazr.restful` that it should look for webservice exports here. |
552 | +""" |
553 | + |
554 | +__all__ = [ |
555 | + 'ICountry', |
556 | + 'ICountrySet', |
557 | + 'ILanguage', |
558 | + 'ILanguageSet', |
559 | + ] |
560 | + |
561 | +from lp.services.worlddata.interfaces.country import ( |
562 | + ICountry, |
563 | + ICountrySet, |
564 | + ) |
565 | +from lp.services.worlddata.interfaces.language import ( |
566 | + ILanguage, |
567 | + ILanguageSet, |
568 | + ) |
569 | +# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular |
570 | +# import bugs. Break this up into a per-package thing. |
571 | +from canonical.launchpad.interfaces import _schema_circular_imports |
572 | +_schema_circular_imports |
573 | |
574 | === modified file 'lib/lp/soyuz/configure.zcml' |
575 | --- lib/lp/soyuz/configure.zcml 2010-11-04 13:13:24 +0000 |
576 | +++ lib/lp/soyuz/configure.zcml 2010-11-09 16:27:54 +0000 |
577 | @@ -6,6 +6,7 @@ |
578 | xmlns="http://namespaces.zope.org/zope" |
579 | xmlns:browser="http://namespaces.zope.org/browser" |
580 | xmlns:i18n="http://namespaces.zope.org/i18n" |
581 | + xmlns:webservice="http://namespaces.canonical.com/webservice" |
582 | xmlns:xmlrpc="http://namespaces.zope.org/xmlrpc" |
583 | i18n_domain="launchpad"> |
584 | <include |
585 | @@ -925,4 +926,7 @@ |
586 | <allow interface="lp.soyuz.interfaces.distributionjob.ISyncPackageJob" /> |
587 | <allow interface="lp.soyuz.interfaces.distributionjob.IDistributionJob" /> |
588 | </class> |
589 | + |
590 | + <webservice:register module="lp.soyuz.interfaces.webservice" /> |
591 | + |
592 | </configure> |
593 | |
594 | === added file 'lib/lp/soyuz/interfaces/webservice.py' |
595 | --- lib/lp/soyuz/interfaces/webservice.py 1970-01-01 00:00:00 +0000 |
596 | +++ lib/lp/soyuz/interfaces/webservice.py 2010-11-09 16:27:54 +0000 |
597 | @@ -0,0 +1,106 @@ |
598 | +# Copyright 2010 Canonical Ltd. This software is licensed under the |
599 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
600 | + |
601 | +"""All the interfaces that are exposed through the webservice. |
602 | + |
603 | +There is a declaration in ZCML somewhere that looks like: |
604 | + <webservice:register module="lp.soyuz.interfaces.webservice" /> |
605 | + |
606 | +which tells `lazr.restful` that it should look for webservice exports here. |
607 | +""" |
608 | + |
609 | +__all__ = [ |
610 | + 'AlreadySubscribed', |
611 | + 'ArchiveDisabled', |
612 | + 'ArchiveNotPrivate', |
613 | + 'CannotBeRescored', |
614 | + 'CannotCopy', |
615 | + 'CannotSwitchPrivacy', |
616 | + 'CannotUploadToArchive', |
617 | + 'CannotUploadToPPA', |
618 | + 'CannotUploadToPocket', |
619 | + 'ComponentNotFound', |
620 | + 'DistroSeriesNotFound', |
621 | + 'DuplicatePackagesetName', |
622 | + 'IArchive', |
623 | + 'IArchiveDependency', |
624 | + 'IArchivePermission', |
625 | + 'IArchiveSubscriber', |
626 | + 'IBinaryPackageBuild', |
627 | + 'IBinaryPackagePublishingHistory', |
628 | + 'IBinaryPackageReleaseDownloadCount', |
629 | + 'IDistroArchSeries', |
630 | + 'IPackageUpload', |
631 | + 'IPackageset', |
632 | + 'IPackagesetEdit', |
633 | + 'IPackagesetSet', |
634 | + 'IPackagesetViewOnly', |
635 | + 'ISourcePackagePublishingHistory', |
636 | + 'IncompatibleArguments', |
637 | + 'InsufficientUploadRights', |
638 | + 'InvalidComponent', |
639 | + 'InvalidPocketForPPA', |
640 | + 'InvalidPocketForPartnerArchive', |
641 | + 'NoRightsForArchive', |
642 | + 'NoRightsForComponent', |
643 | + 'NoSuchPPA', |
644 | + 'NoSuchPackageSet', |
645 | + 'NoTokensForTeams', |
646 | + 'PocketNotFound', |
647 | + 'VersionRequiresName', |
648 | + ] |
649 | + |
650 | +from lp.soyuz.interfaces.archive import ( |
651 | + AlreadySubscribed, |
652 | + ArchiveDisabled, |
653 | + ArchiveNotPrivate, |
654 | + CannotCopy, |
655 | + CannotSwitchPrivacy, |
656 | + CannotUploadToArchive, |
657 | + CannotUploadToPPA, |
658 | + CannotUploadToPocket, |
659 | + ComponentNotFound, |
660 | + DistroSeriesNotFound, |
661 | + IArchive, |
662 | + InsufficientUploadRights, |
663 | + InvalidComponent, |
664 | + InvalidPocketForPPA, |
665 | + InvalidPocketForPartnerArchive, |
666 | + NoRightsForArchive, |
667 | + NoRightsForComponent, |
668 | + NoSuchPPA, |
669 | + NoTokensForTeams, |
670 | + PocketNotFound, |
671 | + VersionRequiresName, |
672 | + ) |
673 | +from lp.soyuz.interfaces.archivedependency import IArchiveDependency |
674 | +from lp.soyuz.interfaces.archivepermission import IArchivePermission |
675 | +from lp.soyuz.interfaces.archivesubscriber import IArchiveSubscriber |
676 | +from lp.soyuz.interfaces.binarypackagebuild import ( |
677 | + CannotBeRescored, |
678 | + IBinaryPackageBuild, |
679 | + ) |
680 | +from lp.soyuz.interfaces.binarypackagerelease import ( |
681 | + IBinaryPackageReleaseDownloadCount, |
682 | + ) |
683 | +from lp.soyuz.interfaces.buildrecords import ( |
684 | + IncompatibleArguments, |
685 | + ) |
686 | +from lp.soyuz.interfaces.distroarchseries import IDistroArchSeries |
687 | +from lp.soyuz.interfaces.packageset import ( |
688 | + DuplicatePackagesetName, |
689 | + IPackagesetViewOnly, |
690 | + IPackagesetEdit, |
691 | + IPackageset, |
692 | + IPackagesetSet, |
693 | + NoSuchPackageSet, |
694 | + ) |
695 | +from lp.soyuz.interfaces.publishing import ( |
696 | + IBinaryPackagePublishingHistory, |
697 | + ISourcePackagePublishingHistory, |
698 | + ) |
699 | +from lp.soyuz.interfaces.queue import IPackageUpload |
700 | +# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular |
701 | +# import bugs. Break this up into a per-package thing. |
702 | +from canonical.launchpad.interfaces import _schema_circular_imports |
703 | +_schema_circular_imports |
704 | |
705 | === modified file 'lib/lp/translations/interfaces/webservice.py' |
706 | --- lib/lp/translations/interfaces/webservice.py 2010-10-29 10:17:14 +0000 |
707 | +++ lib/lp/translations/interfaces/webservice.py 2010-11-09 16:27:54 +0000 |
708 | @@ -3,7 +3,13 @@ |
709 | |
710 | # pylint: disable-msg=W0611 |
711 | |
712 | -"""All the interfaces that are exposed through the webservice.""" |
713 | +"""All the interfaces that are exposed through the webservice. |
714 | + |
715 | +There is a declaration in ZCML somewhere that looks like: |
716 | + <webservice:register module="lp.translations.interfaces.webservice" /> |
717 | + |
718 | +which tells `lazr.restful` that it should look for webservice exports here. |
719 | +""" |
720 | |
721 | __all__ = [ |
722 | 'IHasTranslationImports', |
723 | @@ -22,3 +28,7 @@ |
724 | ITranslationImportQueue, |
725 | ITranslationImportQueueEntry, |
726 | ) |
727 | +# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular |
728 | +# import bugs. Break this up into a per-package thing. |
729 | +from canonical.launchpad.interfaces import _schema_circular_imports |
730 | +_schema_circular_imports |
Not that this can't actually land without also killing off c.l.i. However, it makes sense as a partial review as part of lp:~jml/launchpad/interface-apocalypse