Merge lp:~sinzui/launchpad/import-person into lp:launchpad
- import-person
- Merge into devel
Proposed by
Curtis Hovey
Status: | Merged |
---|---|
Approved by: | Aaron Bentley |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~sinzui/launchpad/import-person |
Merge into: | lp:launchpad |
Diff against target: |
234 lines 4 files modified
lib/canonical/launchpad/database/__init__.py (+0/-2) lib/canonical/launchpad/doc/hwdb-device-tables.txt (+1/-1) lib/canonical/launchpad/zcml/hwdb.zcml (+23/-23) lib/canonical/launchpad/zcml/launchpadstatistic.zcml (+3/-3) |
To merge this branch: | bzr merge lp:~sinzui/launchpad/import-person |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Review via email: mp+12060@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote : | # |
Revision history for this message
Aaron Bentley (abentley) : | # |
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/database/__init__.py' | |||
2 | --- lib/canonical/launchpad/database/__init__.py 2009-08-27 07:05:16 +0000 | |||
3 | +++ lib/canonical/launchpad/database/__init__.py 2009-09-29 02:05:39 +0000 | |||
4 | @@ -58,7 +58,6 @@ | |||
5 | 58 | from canonical.launchpad.database.personnotification import * | 58 | from canonical.launchpad.database.personnotification import * |
6 | 59 | from canonical.launchpad.database.packaging import * | 59 | from canonical.launchpad.database.packaging import * |
7 | 60 | from canonical.launchpad.database.librarian import * | 60 | from canonical.launchpad.database.librarian import * |
8 | 61 | from canonical.launchpad.database.launchpadstatistic import * | ||
9 | 62 | from canonical.launchpad.database.binaryandsourcepackagename import * | 61 | from canonical.launchpad.database.binaryandsourcepackagename import * |
10 | 63 | from canonical.launchpad.database.message import * | 62 | from canonical.launchpad.database.message import * |
11 | 64 | from canonical.launchpad.database.structuralsubscription import * | 63 | from canonical.launchpad.database.structuralsubscription import * |
12 | @@ -66,4 +65,3 @@ | |||
13 | 66 | from canonical.launchpad.database.temporaryblobstorage import * | 65 | from canonical.launchpad.database.temporaryblobstorage import * |
14 | 67 | from canonical.launchpad.database.emailaddress import * | 66 | from canonical.launchpad.database.emailaddress import * |
15 | 68 | from canonical.launchpad.database.oauth import * | 67 | from canonical.launchpad.database.oauth import * |
16 | 69 | from canonical.launchpad.database.hwdb import * | ||
17 | 70 | 68 | ||
18 | === modified file 'lib/canonical/launchpad/doc/hwdb-device-tables.txt' | |||
19 | --- lib/canonical/launchpad/doc/hwdb-device-tables.txt 2009-08-14 13:03:36 +0000 | |||
20 | +++ lib/canonical/launchpad/doc/hwdb-device-tables.txt 2009-09-29 02:05:39 +0000 | |||
21 | @@ -1486,7 +1486,7 @@ | |||
22 | 1486 | names. Note that the package name value None (used in older submissions) | 1486 | names. Note that the package name value None (used in older submissions) |
23 | 1487 | is not included. | 1487 | is not included. |
24 | 1488 | 1488 | ||
26 | 1489 | >>> from canonical.launchpad.database import HWDriver | 1489 | >>> from canonical.launchpad.database.hwdb import HWDriver |
27 | 1490 | >>> store.add(HWDriver(name='foo', package_name=None)) | 1490 | >>> store.add(HWDriver(name='foo', package_name=None)) |
28 | 1491 | <HWDriver at... | 1491 | <HWDriver at... |
29 | 1492 | >>> for package_name in driver_set.all_package_names(): | 1492 | >>> for package_name in driver_set.all_package_names(): |
30 | 1493 | 1493 | ||
31 | === modified file 'lib/canonical/launchpad/zcml/hwdb.zcml' | |||
32 | --- lib/canonical/launchpad/zcml/hwdb.zcml 2009-08-14 13:03:36 +0000 | |||
33 | +++ lib/canonical/launchpad/zcml/hwdb.zcml 2009-09-29 02:05:39 +0000 | |||
34 | @@ -44,7 +44,7 @@ | |||
35 | 44 | template="../templates/hwdb-submit-hardware-data.pt" | 44 | template="../templates/hwdb-submit-hardware-data.pt" |
36 | 45 | /> | 45 | /> |
37 | 46 | 46 | ||
39 | 47 | <class class="canonical.launchpad.database.HWSubmission"> | 47 | <class class="canonical.launchpad.database.hwdb.HWSubmission"> |
40 | 48 | <require | 48 | <require |
41 | 49 | permission="launchpad.View" | 49 | permission="launchpad.View" |
42 | 50 | interface="canonical.launchpad.interfaces.IHWSubmission" | 50 | interface="canonical.launchpad.interfaces.IHWSubmission" |
43 | @@ -78,18 +78,18 @@ | |||
44 | 78 | /> | 78 | /> |
45 | 79 | 79 | ||
46 | 80 | <securedutility | 80 | <securedutility |
48 | 81 | class="canonical.launchpad.database.HWSubmissionSet" | 81 | class="canonical.launchpad.database.hwdb.HWSubmissionSet" |
49 | 82 | provides="canonical.launchpad.interfaces.IHWSubmissionSet"> | 82 | provides="canonical.launchpad.interfaces.IHWSubmissionSet"> |
50 | 83 | <allow interface="canonical.launchpad.interfaces.IHWSubmissionSet" /> | 83 | <allow interface="canonical.launchpad.interfaces.IHWSubmissionSet" /> |
51 | 84 | </securedutility> | 84 | </securedutility> |
52 | 85 | 85 | ||
54 | 86 | <class class="canonical.launchpad.database.HWSystemFingerprint"> | 86 | <class class="canonical.launchpad.database.hwdb.HWSystemFingerprint"> |
55 | 87 | <allow | 87 | <allow |
56 | 88 | interface="canonical.launchpad.interfaces.IHWSystemFingerprint" /> | 88 | interface="canonical.launchpad.interfaces.IHWSystemFingerprint" /> |
57 | 89 | </class> | 89 | </class> |
58 | 90 | 90 | ||
59 | 91 | <securedutility | 91 | <securedutility |
61 | 92 | class="canonical.launchpad.database.HWSystemFingerprintSet" | 92 | class="canonical.launchpad.database.hwdb.HWSystemFingerprintSet" |
62 | 93 | provides="canonical.launchpad.interfaces.IHWSystemFingerprintSet"> | 93 | provides="canonical.launchpad.interfaces.IHWSystemFingerprintSet"> |
63 | 94 | <allow | 94 | <allow |
64 | 95 | interface="canonical.launchpad.interfaces.IHWSystemFingerprintSet" /> | 95 | interface="canonical.launchpad.interfaces.IHWSystemFingerprintSet" /> |
65 | @@ -109,18 +109,18 @@ | |||
66 | 109 | <allow attributes="__call__" /> | 109 | <allow attributes="__call__" /> |
67 | 110 | </class> | 110 | </class> |
68 | 111 | 111 | ||
70 | 112 | <class class="canonical.launchpad.database.HWVendorName"> | 112 | <class class="canonical.launchpad.database.hwdb.HWVendorName"> |
71 | 113 | <allow interface="canonical.launchpad.interfaces.IHWVendorName" /> | 113 | <allow interface="canonical.launchpad.interfaces.IHWVendorName" /> |
72 | 114 | <allow attributes="id" /> | 114 | <allow attributes="id" /> |
73 | 115 | </class> | 115 | </class> |
74 | 116 | 116 | ||
75 | 117 | <securedutility | 117 | <securedutility |
77 | 118 | class="canonical.launchpad.database.HWVendorNameSet" | 118 | class="canonical.launchpad.database.hwdb.HWVendorNameSet" |
78 | 119 | provides="canonical.launchpad.interfaces.IHWVendorNameSet"> | 119 | provides="canonical.launchpad.interfaces.IHWVendorNameSet"> |
79 | 120 | <allow interface="canonical.launchpad.interfaces.IHWVendorNameSet" /> | 120 | <allow interface="canonical.launchpad.interfaces.IHWVendorNameSet" /> |
80 | 121 | </securedutility> | 121 | </securedutility> |
81 | 122 | 122 | ||
83 | 123 | <class class="canonical.launchpad.database.HWVendorID"> | 123 | <class class="canonical.launchpad.database.hwdb.HWVendorID"> |
84 | 124 | <require | 124 | <require |
85 | 125 | permission="launchpad.View" | 125 | permission="launchpad.View" |
86 | 126 | interface="canonical.launchpad.interfaces.IHWVendorID" /> | 126 | interface="canonical.launchpad.interfaces.IHWVendorID" /> |
87 | @@ -133,12 +133,12 @@ | |||
88 | 133 | /> | 133 | /> |
89 | 134 | 134 | ||
90 | 135 | <securedutility | 135 | <securedutility |
92 | 136 | class="canonical.launchpad.database.HWVendorIDSet" | 136 | class="canonical.launchpad.database.hwdb.HWVendorIDSet" |
93 | 137 | provides="canonical.launchpad.interfaces.IHWVendorIDSet"> | 137 | provides="canonical.launchpad.interfaces.IHWVendorIDSet"> |
94 | 138 | <allow interface="canonical.launchpad.interfaces.IHWVendorIDSet" /> | 138 | <allow interface="canonical.launchpad.interfaces.IHWVendorIDSet" /> |
95 | 139 | </securedutility> | 139 | </securedutility> |
96 | 140 | 140 | ||
98 | 141 | <class class="canonical.launchpad.database.HWDevice"> | 141 | <class class="canonical.launchpad.database.hwdb.HWDevice"> |
99 | 142 | <require | 142 | <require |
100 | 143 | permission="launchpad.View" | 143 | permission="launchpad.View" |
101 | 144 | interface="canonical.launchpad.interfaces.IHWDevice" /> | 144 | interface="canonical.launchpad.interfaces.IHWDevice" /> |
102 | @@ -151,24 +151,24 @@ | |||
103 | 151 | /> | 151 | /> |
104 | 152 | 152 | ||
105 | 153 | <securedutility | 153 | <securedutility |
107 | 154 | class="canonical.launchpad.database.HWDeviceSet" | 154 | class="canonical.launchpad.database.hwdb.HWDeviceSet" |
108 | 155 | provides="canonical.launchpad.interfaces.IHWDeviceSet"> | 155 | provides="canonical.launchpad.interfaces.IHWDeviceSet"> |
109 | 156 | <allow interface="canonical.launchpad.interfaces.IHWDeviceSet" /> | 156 | <allow interface="canonical.launchpad.interfaces.IHWDeviceSet" /> |
110 | 157 | </securedutility> | 157 | </securedutility> |
111 | 158 | 158 | ||
113 | 159 | <class class="canonical.launchpad.database.HWDeviceNameVariant"> | 159 | <class class="canonical.launchpad.database.hwdb.HWDeviceNameVariant"> |
114 | 160 | <allow interface= | 160 | <allow interface= |
115 | 161 | "canonical.launchpad.interfaces.IHWDeviceNameVariant" /> | 161 | "canonical.launchpad.interfaces.IHWDeviceNameVariant" /> |
116 | 162 | </class> | 162 | </class> |
117 | 163 | 163 | ||
118 | 164 | <securedutility | 164 | <securedutility |
120 | 165 | class="canonical.launchpad.database.HWDeviceNameVariantSet" | 165 | class="canonical.launchpad.database.hwdb.HWDeviceNameVariantSet" |
121 | 166 | provides="canonical.launchpad.interfaces.IHWDeviceNameVariantSet"> | 166 | provides="canonical.launchpad.interfaces.IHWDeviceNameVariantSet"> |
122 | 167 | <allow interface= | 167 | <allow interface= |
123 | 168 | "canonical.launchpad.interfaces.IHWDeviceNameVariantSet" /> | 168 | "canonical.launchpad.interfaces.IHWDeviceNameVariantSet" /> |
124 | 169 | </securedutility> | 169 | </securedutility> |
125 | 170 | 170 | ||
127 | 171 | <class class="canonical.launchpad.database.HWDriver"> | 171 | <class class="canonical.launchpad.database.hwdb.HWDriver"> |
128 | 172 | <require | 172 | <require |
129 | 173 | permission="launchpad.View" | 173 | permission="launchpad.View" |
130 | 174 | interface="canonical.launchpad.interfaces.IHWDriver" /> | 174 | interface="canonical.launchpad.interfaces.IHWDriver" /> |
131 | @@ -181,13 +181,13 @@ | |||
132 | 181 | /> | 181 | /> |
133 | 182 | 182 | ||
134 | 183 | <securedutility | 183 | <securedutility |
136 | 184 | class="canonical.launchpad.database.HWDriverSet" | 184 | class="canonical.launchpad.database.hwdb.HWDriverSet" |
137 | 185 | provides="canonical.launchpad.interfaces.IHWDriverSet"> | 185 | provides="canonical.launchpad.interfaces.IHWDriverSet"> |
138 | 186 | <allow | 186 | <allow |
139 | 187 | interface="canonical.launchpad.interfaces.IHWDriverSet" /> | 187 | interface="canonical.launchpad.interfaces.IHWDriverSet" /> |
140 | 188 | </securedutility> | 188 | </securedutility> |
141 | 189 | 189 | ||
143 | 190 | <class class="canonical.launchpad.database.HWDriverName"> | 190 | <class class="canonical.launchpad.database.hwdb.HWDriverName"> |
144 | 191 | <require | 191 | <require |
145 | 192 | permission="launchpad.View" | 192 | permission="launchpad.View" |
146 | 193 | interface="canonical.launchpad.interfaces.IHWDriverName" /> | 193 | interface="canonical.launchpad.interfaces.IHWDriverName" /> |
147 | @@ -199,7 +199,7 @@ | |||
148 | 199 | parent_utility="canonical.launchpad.interfaces.IHWDBApplication" | 199 | parent_utility="canonical.launchpad.interfaces.IHWDBApplication" |
149 | 200 | /> | 200 | /> |
150 | 201 | 201 | ||
152 | 202 | <class class="canonical.launchpad.database.HWDriverPackageName"> | 202 | <class class="canonical.launchpad.database.hwdb.HWDriverPackageName"> |
153 | 203 | <require | 203 | <require |
154 | 204 | permission="launchpad.View" | 204 | permission="launchpad.View" |
155 | 205 | interface="canonical.launchpad.interfaces.IHWDriverPackageName" /> | 205 | interface="canonical.launchpad.interfaces.IHWDriverPackageName" /> |
156 | @@ -211,20 +211,20 @@ | |||
157 | 211 | parent_utility="canonical.launchpad.interfaces.IHWDBApplication" | 211 | parent_utility="canonical.launchpad.interfaces.IHWDBApplication" |
158 | 212 | /> | 212 | /> |
159 | 213 | 213 | ||
161 | 214 | <class class="canonical.launchpad.database.HWDeviceDriverLink"> | 214 | <class class="canonical.launchpad.database.hwdb.HWDeviceDriverLink"> |
162 | 215 | <allow | 215 | <allow |
163 | 216 | interface="canonical.launchpad.interfaces.IHWDeviceDriverLink" /> | 216 | interface="canonical.launchpad.interfaces.IHWDeviceDriverLink" /> |
164 | 217 | <allow attributes="id" /> | 217 | <allow attributes="id" /> |
165 | 218 | </class> | 218 | </class> |
166 | 219 | 219 | ||
167 | 220 | <securedutility | 220 | <securedutility |
169 | 221 | class="canonical.launchpad.database.HWDeviceDriverLinkSet" | 221 | class="canonical.launchpad.database.hwdb.HWDeviceDriverLinkSet" |
170 | 222 | provides="canonical.launchpad.interfaces.IHWDeviceDriverLinkSet"> | 222 | provides="canonical.launchpad.interfaces.IHWDeviceDriverLinkSet"> |
171 | 223 | <allow | 223 | <allow |
172 | 224 | interface="canonical.launchpad.interfaces.IHWDeviceDriverLinkSet" /> | 224 | interface="canonical.launchpad.interfaces.IHWDeviceDriverLinkSet" /> |
173 | 225 | </securedutility> | 225 | </securedutility> |
174 | 226 | 226 | ||
176 | 227 | <class class="canonical.launchpad.database.HWDeviceClass"> | 227 | <class class="canonical.launchpad.database.hwdb.HWDeviceClass"> |
177 | 228 | <require permission="launchpad.View" | 228 | <require permission="launchpad.View" |
178 | 229 | interface="canonical.launchpad.interfaces.IHWDeviceClass" /> | 229 | interface="canonical.launchpad.interfaces.IHWDeviceClass" /> |
179 | 230 | </class> | 230 | </class> |
180 | @@ -242,7 +242,7 @@ | |||
181 | 242 | interface="canonical.launchpad.interfaces.IHWDeviceClassSet" /> | 242 | interface="canonical.launchpad.interfaces.IHWDeviceClassSet" /> |
182 | 243 | </securedutility> | 243 | </securedutility> |
183 | 244 | 244 | ||
185 | 245 | <class class="canonical.launchpad.database.HWSubmissionDevice"> | 245 | <class class="canonical.launchpad.database.hwdb.HWSubmissionDevice"> |
186 | 246 | <require | 246 | <require |
187 | 247 | permission="launchpad.View" | 247 | permission="launchpad.View" |
188 | 248 | interface="canonical.launchpad.interfaces.IHWSubmissionDevice" /> | 248 | interface="canonical.launchpad.interfaces.IHWSubmissionDevice" /> |
189 | @@ -255,20 +255,20 @@ | |||
190 | 255 | /> | 255 | /> |
191 | 256 | 256 | ||
192 | 257 | <securedutility | 257 | <securedutility |
194 | 258 | class="canonical.launchpad.database.HWSubmissionDeviceSet" | 258 | class="canonical.launchpad.database.hwdb.HWSubmissionDeviceSet" |
195 | 259 | provides="canonical.launchpad.interfaces.IHWSubmissionDeviceSet"> | 259 | provides="canonical.launchpad.interfaces.IHWSubmissionDeviceSet"> |
196 | 260 | <allow | 260 | <allow |
197 | 261 | interface="canonical.launchpad.interfaces.IHWSubmissionDeviceSet" /> | 261 | interface="canonical.launchpad.interfaces.IHWSubmissionDeviceSet" /> |
198 | 262 | </securedutility> | 262 | </securedutility> |
199 | 263 | 263 | ||
201 | 264 | <class class="canonical.launchpad.database.HWSubmissionBug"> | 264 | <class class="canonical.launchpad.database.hwdb.HWSubmissionBug"> |
202 | 265 | <allow | 265 | <allow |
203 | 266 | interface="canonical.launchpad.interfaces.IHWSubmissionBug" /> | 266 | interface="canonical.launchpad.interfaces.IHWSubmissionBug" /> |
204 | 267 | <allow attributes="id" /> | 267 | <allow attributes="id" /> |
205 | 268 | </class> | 268 | </class> |
206 | 269 | 269 | ||
207 | 270 | <securedutility | 270 | <securedutility |
209 | 271 | class="canonical.launchpad.database.HWSubmissionBugSet" | 271 | class="canonical.launchpad.database.hwdb.HWSubmissionBugSet" |
210 | 272 | provides="canonical.launchpad.interfaces.IHWSubmissionBugSet"> | 272 | provides="canonical.launchpad.interfaces.IHWSubmissionBugSet"> |
211 | 273 | <allow | 273 | <allow |
212 | 274 | interface="canonical.launchpad.interfaces.IHWSubmissionBugSet" /> | 274 | interface="canonical.launchpad.interfaces.IHWSubmissionBugSet" /> |
213 | 275 | 275 | ||
214 | === modified file 'lib/canonical/launchpad/zcml/launchpadstatistic.zcml' | |||
215 | --- lib/canonical/launchpad/zcml/launchpadstatistic.zcml 2009-09-18 13:24:29 +0000 | |||
216 | +++ lib/canonical/launchpad/zcml/launchpadstatistic.zcml 2009-09-29 02:05:39 +0000 | |||
217 | @@ -9,14 +9,14 @@ | |||
218 | 9 | i18n_domain="launchpad"> | 9 | i18n_domain="launchpad"> |
219 | 10 | 10 | ||
220 | 11 | <!-- LaunchpadStatistic --> | 11 | <!-- LaunchpadStatistic --> |
223 | 12 | <class class="canonical.launchpad.database.LaunchpadStatistic"> | 12 | <class class="canonical.launchpad.database.launchpadstatistic.LaunchpadStatistic"> |
224 | 13 | <allow interface="canonical.launchpad.interfaces.ILaunchpadStatistic" /> | 13 | <allow interface="canonical.launchpad.interfaces.launchpadstatistic.ILaunchpadStatistic" /> |
225 | 14 | </class> | 14 | </class> |
226 | 15 | 15 | ||
227 | 16 | 16 | ||
228 | 17 | <!-- LaunchpadStatisticSet --> | 17 | <!-- LaunchpadStatisticSet --> |
229 | 18 | <securedutility | 18 | <securedutility |
231 | 19 | class="canonical.launchpad.database.LaunchpadStatisticSet" | 19 | class="canonical.launchpad.database.launchpadstatistic.LaunchpadStatisticSet" |
232 | 20 | provides="canonical.launchpad.interfaces.ILaunchpadStatisticSet"> | 20 | provides="canonical.launchpad.interfaces.ILaunchpadStatisticSet"> |
233 | 21 | <allow interface="canonical.launchpad.interfaces.ILaunchpadStatisticSet" /> | 21 | <allow interface="canonical.launchpad.interfaces.ILaunchpadStatisticSet" /> |
234 | 22 | </securedutility> | 22 | </securedutility> |
This is my branch to fix imports.
lp:~sinzui/launchpad/import-person /bugs.launchpad .net/bugs/ import- person implementation: no one. I fixed it as I was triaging the bug
Diff size: 45
Launchpad bug: https:/
Test command: ./bin/py -c 'from lp.registry.model
Pre-
Target release: 3.1.0
= Fix imports =
./bin/py -c 'from lp.registry.model import person' fails due to circular import
== Rules ==
While trying to understand the scope of the bug I realised the problem was
in one of the unmigrated apps. After I fixed it, I searched for and fixed
all the locations that imported from database.
== Lint ==
Linting changed files: /launchpad/ database/ __init_ _.py /launchpad/ doc/hwdb- device- tables. txt /launchpad/ zcml/launchpads tatistic. zcml
lib/canonical
lib/canonical
lib/canonical
== Test ==
* lib/canonical/ launchpad/ doc/hwdb- device- tables. txt
* Fixed the import in the test.
== Implementation ==
* lib/canonical/ launchpad/ database/ __init_ _.py launchpad/ zcml/launchpads tatistic. zcml
* Removed the unneeded import
* lib/canonical/
* Fixed the import in ZCML.