Merge lp:~mwhudson/launchpad/no-more-__used_for__ into lp:launchpad
- no-more-__used_for__
- Merge into devel
Proposed by
Michael Hudson-Doyle
Status: | Merged |
---|---|
Approved by: | Jonathan Lange |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11290 |
Proposed branch: | lp:~mwhudson/launchpad/no-more-__used_for__ |
Merge into: | lp:launchpad |
Diff against target: |
527 lines (+4/-80) 26 files modified
lib/canonical/launchpad/browser/librarian.py (+0/-6) lib/canonical/launchpad/webapp/tales.py (+0/-3) lib/canonical/lazr/doc/menus.txt (+0/-5) lib/lp/answers/browser/faq.py (+0/-2) lib/lp/blueprints/browser/specification.py (+0/-4) lib/lp/blueprints/browser/sprint.py (+1/-3) lib/lp/blueprints/interfaces/specificationdependency.py (+0/-1) lib/lp/bugs/browser/bugbranch.py (+0/-2) lib/lp/bugs/browser/cve.py (+0/-2) lib/lp/code/browser/branch.py (+0/-4) lib/lp/code/browser/branchlisting.py (+0/-4) lib/lp/code/browser/branchmergeproposal.py (+0/-7) lib/lp/code/browser/codeimport.py (+0/-2) lib/lp/code/browser/codeimportmachine.py (+0/-2) lib/lp/code/browser/codereviewcomment.py (+0/-1) lib/lp/code/browser/sourcepackagerecipelisting.py (+1/-6) lib/lp/registry/browser/codeofconduct.py (+2/-6) lib/lp/registry/browser/product.py (+0/-2) lib/lp/registry/browser/productrelease.py (+0/-1) lib/lp/soyuz/browser/archive.py (+0/-3) lib/lp/soyuz/browser/build.py (+0/-4) lib/lp/soyuz/browser/builder.py (+0/-4) lib/lp/soyuz/browser/publishing.py (+0/-2) lib/lp/soyuz/browser/queue.py (+0/-1) lib/lp/soyuz/browser/sourceslist.py (+0/-1) lib/lp/translations/browser/product.py (+0/-2) |
To merge this branch: | bzr merge lp:~mwhudson/launchpad/no-more-__used_for__ |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Lange (community) | Approve | ||
Review via email:
|
Commit message
Remove the no longer relevant __used_for__ attribute from some view classes
Description of the change
Hi,
This _very exciting_ branch removes the __used_for__ declarations from all our browser code. Apparently they're a relic of an old way Zope used to do things, so I deleted them all.
Cheers,
mwh
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Jonathan Lange (jml) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'lib/canonical/launchpad/browser/librarian.py' | |||
2 | --- lib/canonical/launchpad/browser/librarian.py 2010-03-26 19:19:49 +0000 | |||
3 | +++ lib/canonical/launchpad/browser/librarian.py 2010-08-04 04:11:08 +0000 | |||
4 | @@ -46,8 +46,6 @@ | |||
5 | 46 | http://launchpad.net/firefox/1.0./1.0.0/+download/firefox-1.0.0.tgz. | 46 | http://launchpad.net/firefox/1.0./1.0.0/+download/firefox-1.0.0.tgz. |
6 | 47 | """ | 47 | """ |
7 | 48 | 48 | ||
8 | 49 | __used_for__ = ILibraryFileAlias | ||
9 | 50 | |||
10 | 51 | def initialize(self): | 49 | def initialize(self): |
11 | 52 | """Redirect the request to the URL of the file in the Librarian.""" | 50 | """Redirect the request to the URL of the file in the Librarian.""" |
12 | 53 | # Redirect based on the scheme of the request, as set by Apache in the | 51 | # Redirect based on the scheme of the request, as set by Apache in the |
13 | @@ -65,8 +63,6 @@ | |||
14 | 65 | class LibraryFileAliasMD5View(LaunchpadView): | 63 | class LibraryFileAliasMD5View(LaunchpadView): |
15 | 66 | """View to show the MD5 digest for a librarian file.""" | 64 | """View to show the MD5 digest for a librarian file.""" |
16 | 67 | 65 | ||
17 | 68 | __used_for__ = ILibraryFileAlias | ||
18 | 69 | |||
19 | 70 | def render(self): | 66 | def render(self): |
20 | 71 | """Return the plain text MD5 signature""" | 67 | """Return the plain text MD5 signature""" |
21 | 72 | self.request.response.setHeader('Content-type', 'text/plain') | 68 | self.request.response.setHeader('Content-type', 'text/plain') |
22 | @@ -81,8 +77,6 @@ | |||
23 | 81 | """ | 77 | """ |
24 | 82 | implements(IBrowserPublisher) | 78 | implements(IBrowserPublisher) |
25 | 83 | 79 | ||
26 | 84 | __used_for__ = ILibraryFileAlias | ||
27 | 85 | |||
28 | 86 | def getFileContents(self): | 80 | def getFileContents(self): |
29 | 87 | # Reset system proxy setting if it exists. The urllib2 default | 81 | # Reset system proxy setting if it exists. The urllib2 default |
30 | 88 | # opener is cached that's why it has to be re-installed after | 82 | # opener is cached that's why it has to be re-installed after |
31 | 89 | 83 | ||
32 | === modified file 'lib/canonical/launchpad/webapp/tales.py' | |||
33 | --- lib/canonical/launchpad/webapp/tales.py 2010-06-08 15:57:09 +0000 | |||
34 | +++ lib/canonical/launchpad/webapp/tales.py 2010-08-04 04:11:08 +0000 | |||
35 | @@ -290,7 +290,6 @@ | |||
36 | 290 | 290 | ||
37 | 291 | """ | 291 | """ |
38 | 292 | implements(ITraversable) | 292 | implements(ITraversable) |
39 | 293 | __used_for__ = IBrowserApplicationRequest | ||
40 | 294 | 293 | ||
41 | 295 | def __init__(self, request): | 294 | def __init__(self, request): |
42 | 296 | self.form = request.form | 295 | self.form = request.form |
43 | @@ -340,8 +339,6 @@ | |||
44 | 340 | """Adapter from IApplicationRequest to IRequestAPI.""" | 339 | """Adapter from IApplicationRequest to IRequestAPI.""" |
45 | 341 | implements(IRequestAPI) | 340 | implements(IRequestAPI) |
46 | 342 | 341 | ||
47 | 343 | __used_for__ = IApplicationRequest | ||
48 | 344 | |||
49 | 345 | def __init__(self, request): | 342 | def __init__(self, request): |
50 | 346 | self.request = request | 343 | self.request = request |
51 | 347 | 344 | ||
52 | 348 | 345 | ||
53 | === modified file 'lib/canonical/lazr/doc/menus.txt' | |||
54 | --- lib/canonical/lazr/doc/menus.txt 2010-02-23 13:36:51 +0000 | |||
55 | +++ lib/canonical/lazr/doc/menus.txt 2010-08-04 04:11:08 +0000 | |||
56 | @@ -105,26 +105,21 @@ | |||
57 | 105 | 105 | ||
58 | 106 | >>> class RecipeIndexView(LaunchpadView): | 106 | >>> class RecipeIndexView(LaunchpadView): |
59 | 107 | ... """View for summary of a recipe on the cookery facet.""" | 107 | ... """View for summary of a recipe on the cookery facet.""" |
60 | 108 | ... __used_for__ = IRecipe | ||
61 | 109 | 108 | ||
62 | 110 | >>> class RecipeEditInstructionsView(LaunchpadView): | 109 | >>> class RecipeEditInstructionsView(LaunchpadView): |
63 | 111 | ... """View for editing recipe instructions on the cookery facet.""" | 110 | ... """View for editing recipe instructions on the cookery facet.""" |
64 | 112 | ... __used_for__ = IRecipe | ||
65 | 113 | ... implements(IRecipeEditMenuMarker) | 111 | ... implements(IRecipeEditMenuMarker) |
66 | 114 | 112 | ||
67 | 115 | >>> class RecipeEditIngredientsView(LaunchpadView): | 113 | >>> class RecipeEditIngredientsView(LaunchpadView): |
68 | 116 | ... """View for editing recipe ingedients on the cookery facet.""" | 114 | ... """View for editing recipe ingedients on the cookery facet.""" |
69 | 117 | ... __used_for__ = IRecipe | ||
70 | 118 | ... implements(IRecipeEditMenuMarker) | 115 | ... implements(IRecipeEditMenuMarker) |
71 | 119 | 116 | ||
72 | 120 | >>> class RecipeReadJournalView(LaunchpadView): | 117 | >>> class RecipeReadJournalView(LaunchpadView): |
73 | 121 | ... """View for reading a recipe's journal on the cookery facet.""" | 118 | ... """View for reading a recipe's journal on the cookery facet.""" |
74 | 122 | ... __used_for__ = IRecipe | ||
75 | 123 | ... implements(IRecipeJournalMenuMarker) | 119 | ... implements(IRecipeJournalMenuMarker) |
76 | 124 | 120 | ||
77 | 125 | >>> class RecipeQuestionsAllView(LaunchpadView): | 121 | >>> class RecipeQuestionsAllView(LaunchpadView): |
78 | 126 | ... """View for all questions of a recipe on the questions facet.""" | 122 | ... """View for all questions of a recipe on the questions facet.""" |
79 | 127 | ... __used_for__ = IRecipe | ||
80 | 128 | 123 | ||
81 | 129 | # Monkey patch the interfaces and views into the cookingexample module. | 124 | # Monkey patch the interfaces and views into the cookingexample module. |
82 | 130 | >>> cookingexample.IRecipeEditMenuMarker = IRecipeEditMenuMarker | 125 | >>> cookingexample.IRecipeEditMenuMarker = IRecipeEditMenuMarker |
83 | 131 | 126 | ||
84 | === modified file 'lib/lp/answers/browser/faq.py' | |||
85 | --- lib/lp/answers/browser/faq.py 2009-10-31 15:04:48 +0000 | |||
86 | +++ lib/lp/answers/browser/faq.py 2010-08-04 04:11:08 +0000 | |||
87 | @@ -57,8 +57,6 @@ | |||
88 | 57 | class FAQView(LaunchpadView): | 57 | class FAQView(LaunchpadView): |
89 | 58 | """View for the FAQ index.""" | 58 | """View for the FAQ index.""" |
90 | 59 | 59 | ||
91 | 60 | __used_for__ = IFAQ | ||
92 | 61 | |||
93 | 62 | @property | 60 | @property |
94 | 63 | def label(self): | 61 | def label(self): |
95 | 64 | return self.context.title | 62 | return self.context.title |
96 | 65 | 63 | ||
97 | === modified file 'lib/lp/blueprints/browser/specification.py' | |||
98 | --- lib/lp/blueprints/browser/specification.py 2009-11-11 15:54:20 +0000 | |||
99 | +++ lib/lp/blueprints/browser/specification.py 2010-08-04 04:11:08 +0000 | |||
100 | @@ -424,8 +424,6 @@ | |||
101 | 424 | class SpecificationSimpleView(LaunchpadView): | 424 | class SpecificationSimpleView(LaunchpadView): |
102 | 425 | """Used to render portlets and listing items that need browser code.""" | 425 | """Used to render portlets and listing items that need browser code.""" |
103 | 426 | 426 | ||
104 | 427 | __used_for__ = ISpecification | ||
105 | 428 | |||
106 | 429 | @cachedproperty | 427 | @cachedproperty |
107 | 430 | def feedbackrequests(self): | 428 | def feedbackrequests(self): |
108 | 431 | if self.user is None: | 429 | if self.user is None: |
109 | @@ -457,8 +455,6 @@ | |||
110 | 457 | class SpecificationView(SpecificationSimpleView): | 455 | class SpecificationView(SpecificationSimpleView): |
111 | 458 | """Used to render the main view of a specification.""" | 456 | """Used to render the main view of a specification.""" |
112 | 459 | 457 | ||
113 | 460 | __used_for__ = ISpecification | ||
114 | 461 | |||
115 | 462 | @property | 458 | @property |
116 | 463 | def label(self): | 459 | def label(self): |
117 | 464 | return self.context.title | 460 | return self.context.title |
118 | 465 | 461 | ||
119 | === modified file 'lib/lp/blueprints/browser/sprint.py' | |||
120 | --- lib/lp/blueprints/browser/sprint.py 2009-11-09 04:24:09 +0000 | |||
121 | +++ lib/lp/blueprints/browser/sprint.py 2010-08-04 04:11:08 +0000 | |||
122 | @@ -140,8 +140,6 @@ | |||
123 | 140 | 140 | ||
124 | 141 | class SprintView(HasSpecificationsView, LaunchpadView): | 141 | class SprintView(HasSpecificationsView, LaunchpadView): |
125 | 142 | 142 | ||
126 | 143 | __used_for__ = ISprint | ||
127 | 144 | |||
128 | 145 | implements(IMajorHeadingView) | 143 | implements(IMajorHeadingView) |
129 | 146 | 144 | ||
130 | 147 | # XXX Michael Nelson 20090923 bug=435255 | 145 | # XXX Michael Nelson 20090923 bug=435255 |
131 | @@ -149,7 +147,7 @@ | |||
132 | 149 | # a second h1 to display. But as this view implements IMajorHeadingView | 147 | # a second h1 to display. But as this view implements IMajorHeadingView |
133 | 150 | # it should not include an h1 below the app buttons. | 148 | # it should not include an h1 below the app buttons. |
134 | 151 | label = None | 149 | label = None |
136 | 152 | 150 | ||
137 | 153 | @property | 151 | @property |
138 | 154 | def page_title(self): | 152 | def page_title(self): |
139 | 155 | return '%s (sprint or meeting)' % self.context.title | 153 | return '%s (sprint or meeting)' % self.context.title |
140 | 156 | 154 | ||
141 | === modified file 'lib/lp/blueprints/interfaces/specificationdependency.py' | |||
142 | --- lib/lp/blueprints/interfaces/specificationdependency.py 2009-06-25 00:00:26 +0000 | |||
143 | +++ lib/lp/blueprints/interfaces/specificationdependency.py 2010-08-04 04:11:08 +0000 | |||
144 | @@ -46,7 +46,6 @@ | |||
145 | 46 | 46 | ||
146 | 47 | class SpecDependencyIsAlsoRemoval: | 47 | class SpecDependencyIsAlsoRemoval: |
147 | 48 | implements(ISpecificationDependencyRemoval) | 48 | implements(ISpecificationDependencyRemoval) |
148 | 49 | __used_for__ = ISpecificationDependency | ||
149 | 50 | 49 | ||
150 | 51 | def __init__(self, specdep): | 50 | def __init__(self, specdep): |
151 | 52 | self.specdep = specdep | 51 | self.specdep = specdep |
152 | 53 | 52 | ||
153 | === modified file 'lib/lp/bugs/browser/bugbranch.py' | |||
154 | --- lib/lp/bugs/browser/bugbranch.py 2009-11-14 10:03:57 +0000 | |||
155 | +++ lib/lp/bugs/browser/bugbranch.py 2010-08-04 04:11:08 +0000 | |||
156 | @@ -95,8 +95,6 @@ | |||
157 | 95 | class BugBranchView(LaunchpadView): | 95 | class BugBranchView(LaunchpadView): |
158 | 96 | """Simple view to cache related branch information.""" | 96 | """Simple view to cache related branch information.""" |
159 | 97 | 97 | ||
160 | 98 | __used_for__ = IBugBranch | ||
161 | 99 | |||
162 | 100 | @cachedproperty | 98 | @cachedproperty |
163 | 101 | def merge_proposals(self): | 99 | def merge_proposals(self): |
164 | 102 | """Return a list of active proposals for the branch.""" | 100 | """Return a list of active proposals for the branch.""" |
165 | 103 | 101 | ||
166 | === modified file 'lib/lp/bugs/browser/cve.py' | |||
167 | --- lib/lp/bugs/browser/cve.py 2010-05-21 13:45:56 +0000 | |||
168 | +++ lib/lp/bugs/browser/cve.py 2010-08-04 04:11:08 +0000 | |||
169 | @@ -116,8 +116,6 @@ | |||
170 | 116 | 116 | ||
171 | 117 | class CveSetView: | 117 | class CveSetView: |
172 | 118 | 118 | ||
173 | 119 | __used_for__ = ICveSet | ||
174 | 120 | |||
175 | 121 | def __init__(self, context, request): | 119 | def __init__(self, context, request): |
176 | 122 | self.context = context | 120 | self.context = context |
177 | 123 | self.request = request | 121 | self.request = request |
178 | 124 | 122 | ||
179 | === modified file 'lib/lp/code/browser/branch.py' | |||
180 | --- lib/lp/code/browser/branch.py 2010-08-02 02:51:42 +0000 | |||
181 | +++ lib/lp/code/browser/branch.py 2010-08-04 04:11:08 +0000 | |||
182 | @@ -326,8 +326,6 @@ | |||
183 | 326 | 326 | ||
184 | 327 | class BranchView(LaunchpadView, FeedsMixin): | 327 | class BranchView(LaunchpadView, FeedsMixin): |
185 | 328 | 328 | ||
186 | 329 | __used_for__ = IBranch | ||
187 | 330 | |||
188 | 331 | feed_types = ( | 329 | feed_types = ( |
189 | 332 | BranchFeedLink, | 330 | BranchFeedLink, |
190 | 333 | ) | 331 | ) |
191 | @@ -1155,8 +1153,6 @@ | |||
192 | 1155 | class BranchMergeQueueView(LaunchpadView): | 1153 | class BranchMergeQueueView(LaunchpadView): |
193 | 1156 | """The view used to render the merge queue for a branch.""" | 1154 | """The view used to render the merge queue for a branch.""" |
194 | 1157 | 1155 | ||
195 | 1158 | __used_for__ = IBranch | ||
196 | 1159 | |||
197 | 1160 | @cachedproperty | 1156 | @cachedproperty |
198 | 1161 | def merge_queue(self): | 1157 | def merge_queue(self): |
199 | 1162 | """Get the merge queue and check visibility.""" | 1158 | """Get the merge queue and check visibility.""" |
200 | 1163 | 1159 | ||
201 | === modified file 'lib/lp/code/browser/branchlisting.py' | |||
202 | --- lib/lp/code/browser/branchlisting.py 2010-05-28 01:44:13 +0000 | |||
203 | +++ lib/lp/code/browser/branchlisting.py 2010-08-04 04:11:08 +0000 | |||
204 | @@ -1037,14 +1037,10 @@ | |||
205 | 1037 | class PersonCodeSummaryView(LaunchpadView): | 1037 | class PersonCodeSummaryView(LaunchpadView): |
206 | 1038 | """A view to render the code page summary for a person.""" | 1038 | """A view to render the code page summary for a person.""" |
207 | 1039 | 1039 | ||
208 | 1040 | __used_for__ = IPerson | ||
209 | 1041 | |||
210 | 1042 | 1040 | ||
211 | 1043 | class PersonProductCodeSummaryView(PersonCodeSummaryView): | 1041 | class PersonProductCodeSummaryView(PersonCodeSummaryView): |
212 | 1044 | """A view to render the code page summary for a `PersonProduct`.""" | 1042 | """A view to render the code page summary for a `PersonProduct`.""" |
213 | 1045 | 1043 | ||
214 | 1046 | __used_for__ = IPersonProduct | ||
215 | 1047 | |||
216 | 1048 | @property | 1044 | @property |
217 | 1049 | def person(self): | 1045 | def person(self): |
218 | 1050 | """Return the person from the context.""" | 1046 | """Return the person from the context.""" |
219 | 1051 | 1047 | ||
220 | === modified file 'lib/lp/code/browser/branchmergeproposal.py' | |||
221 | --- lib/lp/code/browser/branchmergeproposal.py 2010-06-17 01:16:30 +0000 | |||
222 | +++ lib/lp/code/browser/branchmergeproposal.py 2010-08-04 04:11:08 +0000 | |||
223 | @@ -550,7 +550,6 @@ | |||
224 | 550 | implements(IBranchMergeProposalActionMenu) | 550 | implements(IBranchMergeProposalActionMenu) |
225 | 551 | 551 | ||
226 | 552 | label = "Proposal to merge branch" | 552 | label = "Proposal to merge branch" |
227 | 553 | __used_for__ = IBranchMergeProposal | ||
228 | 554 | schema = ClaimButton | 553 | schema = ClaimButton |
229 | 555 | 554 | ||
230 | 556 | @action('Claim', name='claim') | 555 | @action('Claim', name='claim') |
231 | @@ -782,8 +781,6 @@ | |||
232 | 782 | class BranchMergeProposalVoteView(LaunchpadView): | 781 | class BranchMergeProposalVoteView(LaunchpadView): |
233 | 783 | """The view used for the tables of votes and requested reviews.""" | 782 | """The view used for the tables of votes and requested reviews.""" |
234 | 784 | 783 | ||
235 | 785 | __used_for__ = IBranchMergeProposal | ||
236 | 786 | |||
237 | 787 | @property | 784 | @property |
238 | 788 | def show_table(self): | 785 | def show_table(self): |
239 | 789 | """Should the reviewer table be shown at all? | 786 | """Should the reviewer table be shown at all? |
240 | @@ -1238,8 +1235,6 @@ | |||
241 | 1238 | class BranchMergeProposalSubscribersView(LaunchpadView): | 1235 | class BranchMergeProposalSubscribersView(LaunchpadView): |
242 | 1239 | """Used to show the pagelet subscribers on the main proposal page.""" | 1236 | """Used to show the pagelet subscribers on the main proposal page.""" |
243 | 1240 | 1237 | ||
244 | 1241 | __used_for__ = IBranchMergeProposal | ||
245 | 1242 | |||
246 | 1243 | def initialize(self): | 1238 | def initialize(self): |
247 | 1244 | """See `LaunchpadView`.""" | 1239 | """See `LaunchpadView`.""" |
248 | 1245 | # Get the subscribers and dump them into two sets. | 1240 | # Get the subscribers and dump them into two sets. |
249 | @@ -1451,8 +1446,6 @@ | |||
250 | 1451 | class FormatPreviewDiffView(LaunchpadView, DiffRenderingMixin): | 1446 | class FormatPreviewDiffView(LaunchpadView, DiffRenderingMixin): |
251 | 1452 | """A simple view to render a diff formatted nicely.""" | 1447 | """A simple view to render a diff formatted nicely.""" |
252 | 1453 | 1448 | ||
253 | 1454 | __used_for__ = IPreviewDiff | ||
254 | 1455 | |||
255 | 1456 | @property | 1449 | @property |
256 | 1457 | def preview_diff(self): | 1450 | def preview_diff(self): |
257 | 1458 | return self.context | 1451 | return self.context |
258 | 1459 | 1452 | ||
259 | === modified file 'lib/lp/code/browser/codeimport.py' | |||
260 | --- lib/lp/code/browser/codeimport.py 2010-08-02 03:12:02 +0000 | |||
261 | +++ lib/lp/code/browser/codeimport.py 2010-08-04 04:11:08 +0000 | |||
262 | @@ -595,8 +595,6 @@ | |||
263 | 595 | class CodeImportMachineView(LaunchpadView): | 595 | class CodeImportMachineView(LaunchpadView): |
264 | 596 | """The view for the page that shows all the import machines.""" | 596 | """The view for the page that shows all the import machines.""" |
265 | 597 | 597 | ||
266 | 598 | __used_for__ = ICodeImportSet | ||
267 | 599 | |||
268 | 600 | label = "Import machines for Launchpad" | 598 | label = "Import machines for Launchpad" |
269 | 601 | 599 | ||
270 | 602 | @property | 600 | @property |
271 | 603 | 601 | ||
272 | === modified file 'lib/lp/code/browser/codeimportmachine.py' | |||
273 | --- lib/lp/code/browser/codeimportmachine.py 2010-04-23 03:36:24 +0000 | |||
274 | +++ lib/lp/code/browser/codeimportmachine.py 2010-08-04 04:11:08 +0000 | |||
275 | @@ -56,8 +56,6 @@ | |||
276 | 56 | class CodeImportMachineSetView(LaunchpadView): | 56 | class CodeImportMachineSetView(LaunchpadView): |
277 | 57 | """The view for the page that shows all the import machines.""" | 57 | """The view for the page that shows all the import machines.""" |
278 | 58 | 58 | ||
279 | 59 | __used_for__ = ICodeImportMachineSet | ||
280 | 60 | |||
281 | 61 | label = "Import machines for Launchpad" | 59 | label = "Import machines for Launchpad" |
282 | 62 | 60 | ||
283 | 63 | @property | 61 | @property |
284 | 64 | 62 | ||
285 | === modified file 'lib/lp/code/browser/codereviewcomment.py' | |||
286 | --- lib/lp/code/browser/codereviewcomment.py 2010-02-19 19:16:32 +0000 | |||
287 | +++ lib/lp/code/browser/codereviewcomment.py 2010-08-04 04:11:08 +0000 | |||
288 | @@ -113,7 +113,6 @@ | |||
289 | 113 | 113 | ||
290 | 114 | class CodeReviewCommentView(LaunchpadView): | 114 | class CodeReviewCommentView(LaunchpadView): |
291 | 115 | """Standard view of a CodeReviewComment""" | 115 | """Standard view of a CodeReviewComment""" |
292 | 116 | __used_for__ = ICodeReviewComment | ||
293 | 117 | 116 | ||
294 | 118 | page_title = "Code review comment" | 117 | page_title = "Code review comment" |
295 | 119 | 118 | ||
296 | 120 | 119 | ||
297 | === modified file 'lib/lp/code/browser/sourcepackagerecipelisting.py' | |||
298 | --- lib/lp/code/browser/sourcepackagerecipelisting.py 2010-06-15 18:24:04 +0000 | |||
299 | +++ lib/lp/code/browser/sourcepackagerecipelisting.py 2010-08-04 04:11:08 +0000 | |||
300 | @@ -50,18 +50,13 @@ | |||
301 | 50 | 50 | ||
302 | 51 | class BranchRecipeListingView(RecipeListingView): | 51 | class BranchRecipeListingView(RecipeListingView): |
303 | 52 | 52 | ||
304 | 53 | __used_for__ = IBranch | ||
305 | 54 | |||
306 | 55 | branch_enabled = False | 53 | branch_enabled = False |
307 | 56 | 54 | ||
308 | 57 | 55 | ||
309 | 58 | class PersonRecipeListingView(RecipeListingView): | 56 | class PersonRecipeListingView(RecipeListingView): |
310 | 59 | 57 | ||
311 | 60 | __used_for__ = IPerson | ||
312 | 61 | |||
313 | 62 | owner_enabled = False | 58 | owner_enabled = False |
314 | 63 | 59 | ||
315 | 64 | 60 | ||
316 | 65 | class ProductRecipeListingView(RecipeListingView): | 61 | class ProductRecipeListingView(RecipeListingView): |
319 | 66 | 62 | pass | |
318 | 67 | __used_for__ = IProduct | ||
320 | 68 | 63 | ||
321 | === modified file 'lib/lp/registry/browser/codeofconduct.py' | |||
322 | --- lib/lp/registry/browser/codeofconduct.py 2009-09-15 20:20:20 +0000 | |||
323 | +++ lib/lp/registry/browser/codeofconduct.py 2010-08-04 04:11:08 +0000 | |||
324 | @@ -35,6 +35,8 @@ | |||
325 | 35 | ICodeOfConduct, ICodeOfConductConf, ICodeOfConductSet, | 35 | ICodeOfConduct, ICodeOfConductConf, ICodeOfConductSet, |
326 | 36 | ISignedCodeOfConduct, ISignedCodeOfConductSet) | 36 | ISignedCodeOfConduct, ISignedCodeOfConductSet) |
327 | 37 | from lp.registry.interfaces.person import IPerson | 37 | from lp.registry.interfaces.person import IPerson |
328 | 38 | |||
329 | 39 | |||
330 | 38 | class SignedCodeOfConductSetNavigation(GetitemNavigation): | 40 | class SignedCodeOfConductSetNavigation(GetitemNavigation): |
331 | 39 | 41 | ||
332 | 40 | usedfor = ISignedCodeOfConductSet | 42 | usedfor = ISignedCodeOfConductSet |
333 | @@ -183,8 +185,6 @@ | |||
334 | 183 | class SignedCodeOfConductAckView(AddView): | 185 | class SignedCodeOfConductAckView(AddView): |
335 | 184 | """Acknowledge a Paper Submitted CoC.""" | 186 | """Acknowledge a Paper Submitted CoC.""" |
336 | 185 | 187 | ||
337 | 186 | __used_for__ = ICodeOfConduct | ||
338 | 187 | |||
339 | 188 | def __init__(self, context, request): | 188 | def __init__(self, context, request): |
340 | 189 | self.context = context | 189 | self.context = context |
341 | 190 | self.request = request | 190 | self.request = request |
342 | @@ -261,8 +261,6 @@ | |||
343 | 261 | * set active. | 261 | * set active. |
344 | 262 | """ | 262 | """ |
345 | 263 | 263 | ||
346 | 264 | __used_for__ = ISignedCodeOfConduct | ||
347 | 265 | |||
348 | 266 | def __init__(self, context, request): | 264 | def __init__(self, context, request): |
349 | 267 | self.context = context | 265 | self.context = context |
350 | 268 | self.request = request | 266 | self.request = request |
351 | @@ -304,8 +302,6 @@ | |||
352 | 304 | * clear active. | 302 | * clear active. |
353 | 305 | """ | 303 | """ |
354 | 306 | 304 | ||
355 | 307 | __used_for__ = ISignedCodeOfConduct | ||
356 | 308 | |||
357 | 309 | def __init__(self, context, request): | 305 | def __init__(self, context, request): |
358 | 310 | self.context = context | 306 | self.context = context |
359 | 311 | self.request = request | 307 | self.request = request |
360 | 312 | 308 | ||
361 | === modified file 'lib/lp/registry/browser/product.py' | |||
362 | --- lib/lp/registry/browser/product.py 2010-08-03 12:41:29 +0000 | |||
363 | +++ lib/lp/registry/browser/product.py 2010-08-04 04:11:08 +0000 | |||
364 | @@ -909,7 +909,6 @@ | |||
365 | 909 | class ProductView(HasAnnouncementsView, SortSeriesMixin, FeedsMixin, | 909 | class ProductView(HasAnnouncementsView, SortSeriesMixin, FeedsMixin, |
366 | 910 | ProductDownloadFileMixin, UsesLaunchpadMixin): | 910 | ProductDownloadFileMixin, UsesLaunchpadMixin): |
367 | 911 | 911 | ||
368 | 912 | __used_for__ = IProduct | ||
369 | 913 | implements(IProductActionMenu, IEditableContextTitle) | 912 | implements(IProductActionMenu, IEditableContextTitle) |
370 | 914 | 913 | ||
371 | 915 | def __init__(self, context, request): | 914 | def __init__(self, context, request): |
372 | @@ -1239,7 +1238,6 @@ | |||
373 | 1239 | SortSeriesMixin, | 1238 | SortSeriesMixin, |
374 | 1240 | ProductDownloadFileMixin): | 1239 | ProductDownloadFileMixin): |
375 | 1241 | """View class for the product's file downloads page.""" | 1240 | """View class for the product's file downloads page.""" |
376 | 1242 | __used_for__ = IProduct | ||
377 | 1243 | 1241 | ||
378 | 1244 | batch_size = config.launchpad.download_batch_size | 1242 | batch_size = config.launchpad.download_batch_size |
379 | 1245 | 1243 | ||
380 | 1246 | 1244 | ||
381 | === modified file 'lib/lp/registry/browser/productrelease.py' | |||
382 | --- lib/lp/registry/browser/productrelease.py 2010-01-22 03:17:00 +0000 | |||
383 | +++ lib/lp/registry/browser/productrelease.py 2010-08-04 04:11:08 +0000 | |||
384 | @@ -333,7 +333,6 @@ | |||
385 | 333 | 333 | ||
386 | 334 | class ProductReleaseView(LaunchpadView, ProductDownloadFileMixin): | 334 | class ProductReleaseView(LaunchpadView, ProductDownloadFileMixin): |
387 | 335 | """View for ProductRelease overview.""" | 335 | """View for ProductRelease overview.""" |
388 | 336 | __used_for__ = IProductRelease | ||
389 | 337 | 336 | ||
390 | 338 | def initialize(self): | 337 | def initialize(self): |
391 | 339 | self.form = self.request.form | 338 | self.form = self.request.form |
392 | 340 | 339 | ||
393 | === modified file 'lib/lp/soyuz/browser/archive.py' | |||
394 | --- lib/lp/soyuz/browser/archive.py 2010-08-02 02:13:52 +0000 | |||
395 | +++ lib/lp/soyuz/browser/archive.py 2010-08-04 04:11:08 +0000 | |||
396 | @@ -807,7 +807,6 @@ | |||
397 | 807 | Implements useful actions and collects useful sets for the page template. | 807 | Implements useful actions and collects useful sets for the page template. |
398 | 808 | """ | 808 | """ |
399 | 809 | 809 | ||
400 | 810 | __used_for__ = IArchive | ||
401 | 811 | implements(IArchiveIndexActionsMenu) | 810 | implements(IArchiveIndexActionsMenu) |
402 | 812 | 811 | ||
403 | 813 | def initialize(self): | 812 | def initialize(self): |
404 | @@ -1819,8 +1818,6 @@ | |||
405 | 1819 | class ArchiveBuildsView(ArchiveViewBase, BuildRecordsView): | 1818 | class ArchiveBuildsView(ArchiveViewBase, BuildRecordsView): |
406 | 1820 | """Build Records View for IArchive.""" | 1819 | """Build Records View for IArchive.""" |
407 | 1821 | 1820 | ||
408 | 1822 | __used_for__ = IHasBuildRecords | ||
409 | 1823 | |||
410 | 1824 | # The archive builds view presents all package builds (binary | 1821 | # The archive builds view presents all package builds (binary |
411 | 1825 | # or source package recipe builds). | 1822 | # or source package recipe builds). |
412 | 1826 | binary_only = False | 1823 | binary_only = False |
413 | 1827 | 1824 | ||
414 | === modified file 'lib/lp/soyuz/browser/build.py' | |||
415 | --- lib/lp/soyuz/browser/build.py 2010-08-02 02:23:26 +0000 | |||
416 | +++ lib/lp/soyuz/browser/build.py 2010-08-04 04:11:08 +0000 | |||
417 | @@ -143,7 +143,6 @@ | |||
418 | 143 | 143 | ||
419 | 144 | class BuildView(LaunchpadView): | 144 | class BuildView(LaunchpadView): |
420 | 145 | """Auxiliary view class for IBinaryPackageBuild""" | 145 | """Auxiliary view class for IBinaryPackageBuild""" |
421 | 146 | __used_for__ = IBinaryPackageBuild | ||
422 | 147 | 146 | ||
423 | 148 | @property | 147 | @property |
424 | 149 | def label(self): | 148 | def label(self): |
425 | @@ -234,8 +233,6 @@ | |||
426 | 234 | class BuildRetryView(BuildView): | 233 | class BuildRetryView(BuildView): |
427 | 235 | """View class for retrying `IBinaryPackageBuild`s""" | 234 | """View class for retrying `IBinaryPackageBuild`s""" |
428 | 236 | 235 | ||
429 | 237 | __used_for__ = IBinaryPackageBuild | ||
430 | 238 | |||
431 | 239 | @property | 236 | @property |
432 | 240 | def label(self): | 237 | def label(self): |
433 | 241 | return 'Retry %s' % self.context.title | 238 | return 'Retry %s' % self.context.title |
434 | @@ -348,7 +345,6 @@ | |||
435 | 348 | template/builds-list.pt and callsite details in Builder, Distribution, | 345 | template/builds-list.pt and callsite details in Builder, Distribution, |
436 | 349 | DistroSeries, DistroArchSeries and SourcePackage view classes. | 346 | DistroSeries, DistroArchSeries and SourcePackage view classes. |
437 | 350 | """ | 347 | """ |
438 | 351 | __used_for__ = IHasBuildRecords | ||
439 | 352 | 348 | ||
440 | 353 | page_title = 'Builds' | 349 | page_title = 'Builds' |
441 | 354 | 350 | ||
442 | 355 | 351 | ||
443 | === modified file 'lib/lp/soyuz/browser/builder.py' | |||
444 | --- lib/lp/soyuz/browser/builder.py 2010-08-02 02:13:52 +0000 | |||
445 | +++ lib/lp/soyuz/browser/builder.py 2010-08-04 04:11:08 +0000 | |||
446 | @@ -118,7 +118,6 @@ | |||
447 | 118 | 118 | ||
448 | 119 | class BuilderSetView(LaunchpadView): | 119 | class BuilderSetView(LaunchpadView): |
449 | 120 | """Default BuilderSet view class.""" | 120 | """Default BuilderSet view class.""" |
450 | 121 | __used_for__ = IBuilderSet | ||
451 | 122 | 121 | ||
452 | 123 | @property | 122 | @property |
453 | 124 | def label(self): | 123 | def label(self): |
454 | @@ -235,7 +234,6 @@ | |||
455 | 235 | 234 | ||
456 | 236 | Implements useful actions for the page template. | 235 | Implements useful actions for the page template. |
457 | 237 | """ | 236 | """ |
458 | 238 | __used_for__ = IBuilder | ||
459 | 239 | 237 | ||
460 | 240 | @property | 238 | @property |
461 | 241 | def current_build_duration(self): | 239 | def current_build_duration(self): |
462 | @@ -262,8 +260,6 @@ | |||
463 | 262 | class BuilderHistoryView(BuildRecordsView): | 260 | class BuilderHistoryView(BuildRecordsView): |
464 | 263 | """This class exists only to override the page_title.""" | 261 | """This class exists only to override the page_title.""" |
465 | 264 | 262 | ||
466 | 265 | __used_for__ = IBuilder | ||
467 | 266 | |||
468 | 267 | page_title = 'Build history' | 263 | page_title = 'Build history' |
469 | 268 | binary_only = False | 264 | binary_only = False |
470 | 269 | 265 | ||
471 | 270 | 266 | ||
472 | === modified file 'lib/lp/soyuz/browser/publishing.py' | |||
473 | --- lib/lp/soyuz/browser/publishing.py 2010-05-14 08:45:43 +0000 | |||
474 | +++ lib/lp/soyuz/browser/publishing.py 2010-08-04 04:11:08 +0000 | |||
475 | @@ -194,7 +194,6 @@ | |||
476 | 194 | 194 | ||
477 | 195 | class SourcePublishingRecordView(BasePublishingRecordView): | 195 | class SourcePublishingRecordView(BasePublishingRecordView): |
478 | 196 | """View class for `ISourcePackagePublishingHistory`.""" | 196 | """View class for `ISourcePackagePublishingHistory`.""" |
479 | 197 | __used_for__ = ISourcePackagePublishingHistory | ||
480 | 198 | 197 | ||
481 | 199 | @cachedproperty | 198 | @cachedproperty |
482 | 200 | def build_status_summary(self): | 199 | def build_status_summary(self): |
483 | @@ -354,7 +353,6 @@ | |||
484 | 354 | 353 | ||
485 | 355 | class BinaryPublishingRecordView(BasePublishingRecordView): | 354 | class BinaryPublishingRecordView(BasePublishingRecordView): |
486 | 356 | """View class for `IBinaryPackagePublishingHistory`.""" | 355 | """View class for `IBinaryPackagePublishingHistory`.""" |
487 | 357 | __used_for__ = IBinaryPackagePublishingHistory | ||
488 | 358 | 356 | ||
489 | 359 | def wasCopied(self): | 357 | def wasCopied(self): |
490 | 360 | """Whether or not a binary is published in its original location. | 358 | """Whether or not a binary is published in its original location. |
491 | 361 | 359 | ||
492 | === modified file 'lib/lp/soyuz/browser/queue.py' | |||
493 | --- lib/lp/soyuz/browser/queue.py 2010-08-02 02:13:52 +0000 | |||
494 | +++ lib/lp/soyuz/browser/queue.py 2010-08-04 04:11:08 +0000 | |||
495 | @@ -46,7 +46,6 @@ | |||
496 | 46 | template/distroseries-queue.pt and callsite details in DistroSeries | 46 | template/distroseries-queue.pt and callsite details in DistroSeries |
497 | 47 | view classes. | 47 | view classes. |
498 | 48 | """ | 48 | """ |
499 | 49 | __used_for__ = IHasQueueItems | ||
500 | 50 | 49 | ||
501 | 51 | def setupQueueList(self): | 50 | def setupQueueList(self): |
502 | 52 | """Setup a batched queue list. | 51 | """Setup a batched queue list. |
503 | 53 | 52 | ||
504 | === modified file 'lib/lp/soyuz/browser/sourceslist.py' | |||
505 | --- lib/lp/soyuz/browser/sourceslist.py 2009-09-07 14:54:34 +0000 | |||
506 | +++ lib/lp/soyuz/browser/sourceslist.py 2010-08-04 04:11:08 +0000 | |||
507 | @@ -31,7 +31,6 @@ | |||
508 | 31 | class SourcesListEntriesView(LaunchpadView): | 31 | class SourcesListEntriesView(LaunchpadView): |
509 | 32 | """Renders sources.list entries with a Javascript menu.""" | 32 | """Renders sources.list entries with a Javascript menu.""" |
510 | 33 | 33 | ||
511 | 34 | __used_for__ = SourcesListEntries | ||
512 | 35 | template = ViewPageTemplateFile('../templates/sources-list-entries.pt') | 34 | template = ViewPageTemplateFile('../templates/sources-list-entries.pt') |
513 | 36 | 35 | ||
514 | 37 | def __init__(self, context, request, initially_without_selection=False, | 36 | def __init__(self, context, request, initially_without_selection=False, |
515 | 38 | 37 | ||
516 | === modified file 'lib/lp/translations/browser/product.py' | |||
517 | --- lib/lp/translations/browser/product.py 2010-02-17 09:33:38 +0000 | |||
518 | +++ lib/lp/translations/browser/product.py 2010-08-04 04:11:08 +0000 | |||
519 | @@ -82,8 +82,6 @@ | |||
520 | 82 | 82 | ||
521 | 83 | class ProductView(LaunchpadView): | 83 | class ProductView(LaunchpadView): |
522 | 84 | 84 | ||
523 | 85 | __used_for__ = IProduct | ||
524 | 86 | |||
525 | 87 | label = "Translation overview" | 85 | label = "Translation overview" |
526 | 88 | 86 | ||
527 | 89 | @cachedproperty | 87 | @cachedproperty |