Merge ~cjwatson/launchpad:snappy-future-imports into launchpad:master
- Git
- lp:~cjwatson/launchpad
- snappy-future-imports
- Merge into master
Proposed by
Colin Watson
Status: | Merged |
---|---|
Approved by: | Colin Watson |
Approved revision: | 941573e977e872cf5486819b6e6012def056b95e |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~cjwatson/launchpad:snappy-future-imports |
Merge into: | launchpad:master |
Diff against target: |
415 lines (+68/-38) 15 files modified
lib/lp/snappy/browser/hassnaps.py (+2/-0) lib/lp/snappy/browser/snap.py (+29/-27) lib/lp/snappy/browser/snapbuild.py (+2/-0) lib/lp/snappy/browser/snaplisting.py (+2/-0) lib/lp/snappy/browser/widgets/snaparchive.py (+3/-1) lib/lp/snappy/browser/widgets/storechannels.py (+5/-3) lib/lp/snappy/interfaces/snap.py (+8/-6) lib/lp/snappy/interfaces/snapbuild.py (+2/-0) lib/lp/snappy/interfaces/webservice.py (+2/-0) lib/lp/snappy/mail/snapbuild.py (+2/-0) lib/lp/snappy/model/snap.py (+2/-0) lib/lp/snappy/model/snapbuild.py (+2/-0) lib/lp/snappy/model/snapbuildbehaviour.py (+3/-1) lib/lp/snappy/validators/channels.py (+2/-0) lib/lp/snappy/vocabularies.py (+2/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Watson (community) | Approve | ||
Kristian Glass (community) | Approve | ||
Review via email: mp+373696@code.launchpad.net |
Commit message
Convert lp.snappy to preferred __future__ imports
Description of the change
To post a comment you must log in.
Revision history for this message
Kristian Glass (doismellburning) : | # |
review:
Approve
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote : | # |
Revision history for this message
Colin Watson (cjwatson) wrote : | # |
Self-approving to work around incorrect repository reviewer (which I've now fixed).
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/lib/lp/snappy/browser/hassnaps.py b/lib/lp/snappy/browser/hassnaps.py | |||
2 | index 2e2d1b0..9fa983d 100644 | |||
3 | --- a/lib/lp/snappy/browser/hassnaps.py | |||
4 | +++ b/lib/lp/snappy/browser/hassnaps.py | |||
5 | @@ -3,6 +3,8 @@ | |||
6 | 3 | 3 | ||
7 | 4 | """Mixins for browser classes for objects that implement IHasSnaps.""" | 4 | """Mixins for browser classes for objects that implement IHasSnaps.""" |
8 | 5 | 5 | ||
9 | 6 | from __future__ import absolute_import, print_function, unicode_literals | ||
10 | 7 | |||
11 | 6 | __metaclass__ = type | 8 | __metaclass__ = type |
12 | 7 | __all__ = [ | 9 | __all__ = [ |
13 | 8 | 'HasSnapsMenuMixin', | 10 | 'HasSnapsMenuMixin', |
14 | diff --git a/lib/lp/snappy/browser/snap.py b/lib/lp/snappy/browser/snap.py | |||
15 | index 557adfe..2461b29 100644 | |||
16 | --- a/lib/lp/snappy/browser/snap.py | |||
17 | +++ b/lib/lp/snappy/browser/snap.py | |||
18 | @@ -3,6 +3,8 @@ | |||
19 | 3 | 3 | ||
20 | 4 | """Snap views.""" | 4 | """Snap views.""" |
21 | 5 | 5 | ||
22 | 6 | from __future__ import absolute_import, print_function, unicode_literals | ||
23 | 7 | |||
24 | 6 | __metaclass__ = type | 8 | __metaclass__ = type |
25 | 7 | __all__ = [ | 9 | __all__ = [ |
26 | 8 | 'SnapAddView', | 10 | 'SnapAddView', |
27 | @@ -266,21 +268,21 @@ class SnapRequestBuildsView(LaunchpadFormView): | |||
28 | 266 | class schema(Interface): | 268 | class schema(Interface): |
29 | 267 | """Schema for requesting a build.""" | 269 | """Schema for requesting a build.""" |
30 | 268 | 270 | ||
32 | 269 | archive = Reference(IArchive, title=u'Source archive', required=True) | 271 | archive = Reference(IArchive, title='Source archive', required=True) |
33 | 270 | distro_arch_series = List( | 272 | distro_arch_series = List( |
34 | 271 | Choice(vocabulary='SnapDistroArchSeries'), | 273 | Choice(vocabulary='SnapDistroArchSeries'), |
36 | 272 | title=u'Architectures', required=True, | 274 | title='Architectures', required=True, |
37 | 273 | description=( | 275 | description=( |
41 | 274 | u'If you do not explicitly select any architectures, then ' | 276 | 'If you do not explicitly select any architectures, then the ' |
42 | 275 | u'the snap package will be built for all architectures ' | 277 | 'snap package will be built for all architectures allowed by ' |
43 | 276 | u'allowed by its configuration.')) | 278 | 'its configuration.')) |
44 | 277 | pocket = Choice( | 279 | pocket = Choice( |
46 | 278 | title=u'Pocket', vocabulary=PackagePublishingPocket, required=True, | 280 | title='Pocket', vocabulary=PackagePublishingPocket, required=True, |
47 | 279 | description=( | 281 | description=( |
50 | 280 | u'The package stream within the source distribution series ' | 282 | 'The package stream within the source distribution series to ' |
51 | 281 | u'to use when building the snap package.')) | 283 | 'use when building the snap package.')) |
52 | 282 | channels = Dict( | 284 | channels = Dict( |
54 | 283 | title=u'Source snap channels', key_type=TextLine(), required=True, | 285 | title='Source snap channels', key_type=TextLine(), required=True, |
55 | 284 | description=ISnap['auto_build_channels'].description) | 286 | description=ISnap['auto_build_channels'].description) |
56 | 285 | 287 | ||
57 | 286 | custom_widget_archive = SnapArchiveWidget | 288 | custom_widget_archive = SnapArchiveWidget |
58 | @@ -289,7 +291,7 @@ class SnapRequestBuildsView(LaunchpadFormView): | |||
59 | 289 | custom_widget_channels = SnapBuildChannelsWidget | 291 | custom_widget_channels = SnapBuildChannelsWidget |
60 | 290 | 292 | ||
61 | 291 | help_links = { | 293 | help_links = { |
63 | 292 | "pocket": u"/+help-snappy/snap-build-pocket.html", | 294 | "pocket": "/+help-snappy/snap-build-pocket.html", |
64 | 293 | } | 295 | } |
65 | 294 | 296 | ||
66 | 295 | @property | 297 | @property |
67 | @@ -343,8 +345,8 @@ class ISnapEditSchema(Interface): | |||
68 | 343 | ]) | 345 | ]) |
69 | 344 | store_distro_series = Choice( | 346 | store_distro_series = Choice( |
70 | 345 | vocabulary='BuildableSnappyDistroSeries', required=True, | 347 | vocabulary='BuildableSnappyDistroSeries', required=True, |
73 | 346 | title=u'Series') | 348 | title='Series') |
74 | 347 | vcs = Choice(vocabulary=VCSType, required=True, title=u'VCS') | 349 | vcs = Choice(vocabulary=VCSType, required=True, title='VCS') |
75 | 348 | 350 | ||
76 | 349 | # Each of these is only required if vcs has an appropriate value. Later | 351 | # Each of these is only required if vcs has an appropriate value. Later |
77 | 350 | # validation takes care of adjusting the required attribute. | 352 | # validation takes care of adjusting the required attribute. |
78 | @@ -408,7 +410,7 @@ class SnapAddView( | |||
79 | 408 | custom_widget_store_channels = StoreChannelsWidget | 410 | custom_widget_store_channels = StoreChannelsWidget |
80 | 409 | 411 | ||
81 | 410 | help_links = { | 412 | help_links = { |
83 | 411 | "auto_build_pocket": u"/+help-snappy/snap-build-pocket.html", | 413 | "auto_build_pocket": "/+help-snappy/snap-build-pocket.html", |
84 | 412 | } | 414 | } |
85 | 413 | 415 | ||
86 | 414 | def initialize(self): | 416 | def initialize(self): |
87 | @@ -427,9 +429,9 @@ class SnapAddView( | |||
88 | 427 | super(SnapAddView, self).setUpFields() | 429 | super(SnapAddView, self).setUpFields() |
89 | 428 | self.form_fields += self.createEnabledProcessors( | 430 | self.form_fields += self.createEnabledProcessors( |
90 | 429 | getUtility(IProcessorSet).getAll(), | 431 | getUtility(IProcessorSet).getAll(), |
94 | 430 | u"The architectures that this snap package builds for. Some " | 432 | "The architectures that this snap package builds for. Some " |
95 | 431 | u"architectures are restricted and may only be enabled or " | 433 | "architectures are restricted and may only be enabled or " |
96 | 432 | u"disabled by administrators.") | 434 | "disabled by administrators.") |
97 | 433 | 435 | ||
98 | 434 | def setUpWidgets(self): | 436 | def setUpWidgets(self): |
99 | 435 | """See `LaunchpadFormView`.""" | 437 | """See `LaunchpadFormView`.""" |
100 | @@ -608,19 +610,19 @@ class BaseSnapEditView(LaunchpadEditFormView, SnapAuthorizeMixin): | |||
101 | 608 | if owner is not None and owner.private: | 610 | if owner is not None and owner.private: |
102 | 609 | self.setFieldError( | 611 | self.setFieldError( |
103 | 610 | 'private' if 'private' in data else 'owner', | 612 | 'private' if 'private' in data else 'owner', |
105 | 611 | u'A public snap cannot have a private owner.') | 613 | 'A public snap cannot have a private owner.') |
106 | 612 | if 'private' in data or 'branch' in data: | 614 | if 'private' in data or 'branch' in data: |
107 | 613 | branch = data.get('branch', self.context.branch) | 615 | branch = data.get('branch', self.context.branch) |
108 | 614 | if branch is not None and branch.private: | 616 | if branch is not None and branch.private: |
109 | 615 | self.setFieldError( | 617 | self.setFieldError( |
110 | 616 | 'private' if 'private' in data else 'branch', | 618 | 'private' if 'private' in data else 'branch', |
112 | 617 | u'A public snap cannot have a private branch.') | 619 | 'A public snap cannot have a private branch.') |
113 | 618 | if 'private' in data or 'git_ref' in data: | 620 | if 'private' in data or 'git_ref' in data: |
114 | 619 | ref = data.get('git_ref', self.context.git_ref) | 621 | ref = data.get('git_ref', self.context.git_ref) |
115 | 620 | if ref is not None and ref.private: | 622 | if ref is not None and ref.private: |
116 | 621 | self.setFieldError( | 623 | self.setFieldError( |
117 | 622 | 'private' if 'private' in data else 'git_ref', | 624 | 'private' if 'private' in data else 'git_ref', |
119 | 623 | u'A public snap cannot have a private repository.') | 625 | 'A public snap cannot have a private repository.') |
120 | 624 | 626 | ||
121 | 625 | def _needStoreReauth(self, data): | 627 | def _needStoreReauth(self, data): |
122 | 626 | """Does this change require reauthorizing to the store?""" | 628 | """Does this change require reauthorizing to the store?""" |
123 | @@ -696,7 +698,7 @@ class SnapAdminView(BaseSnapEditView): | |||
124 | 696 | if not getFeatureFlag(SNAP_PRIVATE_FEATURE_FLAG): | 698 | if not getFeatureFlag(SNAP_PRIVATE_FEATURE_FLAG): |
125 | 697 | self.setFieldError( | 699 | self.setFieldError( |
126 | 698 | 'private', | 700 | 'private', |
128 | 699 | u'You do not have permission to create private snaps.') | 701 | 'You do not have permission to create private snaps.') |
129 | 700 | 702 | ||
130 | 701 | 703 | ||
131 | 702 | class SnapEditView(BaseSnapEditView, EnableProcessorsMixin): | 704 | class SnapEditView(BaseSnapEditView, EnableProcessorsMixin): |
132 | @@ -734,7 +736,7 @@ class SnapEditView(BaseSnapEditView, EnableProcessorsMixin): | |||
133 | 734 | custom_widget_store_channels = StoreChannelsWidget | 736 | custom_widget_store_channels = StoreChannelsWidget |
134 | 735 | 737 | ||
135 | 736 | help_links = { | 738 | help_links = { |
137 | 737 | "auto_build_pocket": u"/+help-snappy/snap-build-pocket.html", | 739 | "auto_build_pocket": "/+help-snappy/snap-build-pocket.html", |
138 | 738 | } | 740 | } |
139 | 739 | 741 | ||
140 | 740 | def setUpFields(self): | 742 | def setUpFields(self): |
141 | @@ -742,9 +744,9 @@ class SnapEditView(BaseSnapEditView, EnableProcessorsMixin): | |||
142 | 742 | super(SnapEditView, self).setUpFields() | 744 | super(SnapEditView, self).setUpFields() |
143 | 743 | self.form_fields += self.createEnabledProcessors( | 745 | self.form_fields += self.createEnabledProcessors( |
144 | 744 | self.context.available_processors, | 746 | self.context.available_processors, |
148 | 745 | u"The architectures that this snap package builds for. Some " | 747 | "The architectures that this snap package builds for. Some " |
149 | 746 | u"architectures are restricted and may only be enabled or " | 748 | "architectures are restricted and may only be enabled or " |
150 | 747 | u"disabled by administrators.") | 749 | "disabled by administrators.") |
151 | 748 | 750 | ||
152 | 749 | @property | 751 | @property |
153 | 750 | def initial_values(self): | 752 | def initial_values(self): |
154 | @@ -804,7 +806,7 @@ class SnapAuthorizeView(LaunchpadEditFormView): | |||
155 | 804 | """Schema for authorizing snap package uploads to the store.""" | 806 | """Schema for authorizing snap package uploads to the store.""" |
156 | 805 | 807 | ||
157 | 806 | discharge_macaroon = TextLine( | 808 | discharge_macaroon = TextLine( |
159 | 807 | title=u'Serialized discharge macaroon', required=True) | 809 | title='Serialized discharge macaroon', required=True) |
160 | 808 | 810 | ||
161 | 809 | render_context = False | 811 | render_context = False |
162 | 810 | 812 | ||
163 | @@ -842,13 +844,13 @@ class SnapAuthorizeView(LaunchpadEditFormView): | |||
164 | 842 | def complete_action(self, action, data): | 844 | def complete_action(self, action, data): |
165 | 843 | if not data.get('discharge_macaroon'): | 845 | if not data.get('discharge_macaroon'): |
166 | 844 | self.addError(structured( | 846 | self.addError(structured( |
168 | 845 | _(u'Uploads of %(snap)s to the store were not authorized.'), | 847 | _('Uploads of %(snap)s to the store were not authorized.'), |
169 | 846 | snap=self.context.name)) | 848 | snap=self.context.name)) |
170 | 847 | return | 849 | return |
171 | 848 | self.context.completeAuthorization( | 850 | self.context.completeAuthorization( |
172 | 849 | discharge_macaroon=data['discharge_macaroon']) | 851 | discharge_macaroon=data['discharge_macaroon']) |
173 | 850 | self.request.response.addInfoNotification(structured( | 852 | self.request.response.addInfoNotification(structured( |
175 | 851 | _(u'Uploads of %(snap)s to the store are now authorized.'), | 853 | _('Uploads of %(snap)s to the store are now authorized.'), |
176 | 852 | snap=self.context.name)) | 854 | snap=self.context.name)) |
177 | 853 | self.request.response.redirect(canonical_url(self.context)) | 855 | self.request.response.redirect(canonical_url(self.context)) |
178 | 854 | 856 | ||
179 | diff --git a/lib/lp/snappy/browser/snapbuild.py b/lib/lp/snappy/browser/snapbuild.py | |||
180 | index 190d07c..a485afd 100644 | |||
181 | --- a/lib/lp/snappy/browser/snapbuild.py | |||
182 | +++ b/lib/lp/snappy/browser/snapbuild.py | |||
183 | @@ -3,6 +3,8 @@ | |||
184 | 3 | 3 | ||
185 | 4 | """SnapBuild views.""" | 4 | """SnapBuild views.""" |
186 | 5 | 5 | ||
187 | 6 | from __future__ import absolute_import, print_function, unicode_literals | ||
188 | 7 | |||
189 | 6 | __metaclass__ = type | 8 | __metaclass__ = type |
190 | 7 | __all__ = [ | 9 | __all__ = [ |
191 | 8 | 'SnapBuildContextMenu', | 10 | 'SnapBuildContextMenu', |
192 | diff --git a/lib/lp/snappy/browser/snaplisting.py b/lib/lp/snappy/browser/snaplisting.py | |||
193 | index 608bece..e59fd29 100644 | |||
194 | --- a/lib/lp/snappy/browser/snaplisting.py | |||
195 | +++ b/lib/lp/snappy/browser/snaplisting.py | |||
196 | @@ -3,6 +3,8 @@ | |||
197 | 3 | 3 | ||
198 | 4 | """Base class view for snap listings.""" | 4 | """Base class view for snap listings.""" |
199 | 5 | 5 | ||
200 | 6 | from __future__ import absolute_import, print_function, unicode_literals | ||
201 | 7 | |||
202 | 6 | __metaclass__ = type | 8 | __metaclass__ = type |
203 | 7 | 9 | ||
204 | 8 | __all__ = [ | 10 | __all__ = [ |
205 | diff --git a/lib/lp/snappy/browser/widgets/snaparchive.py b/lib/lp/snappy/browser/widgets/snaparchive.py | |||
206 | index 441013f..e138664 100644 | |||
207 | --- a/lib/lp/snappy/browser/widgets/snaparchive.py | |||
208 | +++ b/lib/lp/snappy/browser/widgets/snaparchive.py | |||
209 | @@ -1,6 +1,8 @@ | |||
210 | 1 | # Copyright 2015-2019 Canonical Ltd. This software is licensed under the | 1 | # Copyright 2015-2019 Canonical Ltd. This software is licensed under the |
211 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). |
212 | 3 | 3 | ||
213 | 4 | from __future__ import absolute_import, print_function, unicode_literals | ||
214 | 5 | |||
215 | 4 | __metaclass__ = type | 6 | __metaclass__ = type |
216 | 5 | 7 | ||
217 | 6 | __all__ = [ | 8 | __all__ = [ |
218 | @@ -48,7 +50,7 @@ class SnapArchiveWidget(BrowserWidget, InputWidget): | |||
219 | 48 | return | 50 | return |
220 | 49 | fields = [ | 51 | fields = [ |
221 | 50 | Choice( | 52 | Choice( |
223 | 51 | __name__="ppa", title=u"PPA", required=True, vocabulary="PPA"), | 53 | __name__="ppa", title="PPA", required=True, vocabulary="PPA"), |
224 | 52 | ] | 54 | ] |
225 | 53 | for field in fields: | 55 | for field in fields: |
226 | 54 | setUpWidget( | 56 | setUpWidget( |
227 | diff --git a/lib/lp/snappy/browser/widgets/storechannels.py b/lib/lp/snappy/browser/widgets/storechannels.py | |||
228 | index b7e84db..2d4d665 100644 | |||
229 | --- a/lib/lp/snappy/browser/widgets/storechannels.py | |||
230 | +++ b/lib/lp/snappy/browser/widgets/storechannels.py | |||
231 | @@ -1,6 +1,8 @@ | |||
232 | 1 | # Copyright 2017-2018 Canonical Ltd. This software is licensed under the | 1 | # Copyright 2017-2018 Canonical Ltd. This software is licensed under the |
233 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). |
234 | 3 | 3 | ||
235 | 4 | from __future__ import absolute_import, print_function, unicode_literals | ||
236 | 5 | |||
237 | 4 | __metaclass__ = type | 6 | __metaclass__ = type |
238 | 5 | 7 | ||
239 | 6 | __all__ = [ | 8 | __all__ = [ |
240 | @@ -59,17 +61,17 @@ class StoreChannelsWidget(BrowserWidget, InputWidget): | |||
241 | 59 | return | 61 | return |
242 | 60 | fields = [ | 62 | fields = [ |
243 | 61 | TextLine( | 63 | TextLine( |
245 | 62 | __name__="track", title=u"Track", required=False, | 64 | __name__="track", title="Track", required=False, |
246 | 63 | description=_( | 65 | description=_( |
247 | 64 | "Track defines a series for your software. " | 66 | "Track defines a series for your software. " |
248 | 65 | "If not specified, the default track ('latest') is " | 67 | "If not specified, the default track ('latest') is " |
249 | 66 | "assumed.")), | 68 | "assumed.")), |
250 | 67 | List( | 69 | List( |
252 | 68 | __name__="risks", title=u"Risk", required=False, | 70 | __name__="risks", title="Risk", required=False, |
253 | 69 | value_type=Choice(vocabulary="SnapStoreChannel"), | 71 | value_type=Choice(vocabulary="SnapStoreChannel"), |
254 | 70 | description=_("Risks denote the stability of your software.")), | 72 | description=_("Risks denote the stability of your software.")), |
255 | 71 | TextLine( | 73 | TextLine( |
257 | 72 | __name__="branch", title=u"Branch", required=False, | 74 | __name__="branch", title="Branch", required=False, |
258 | 73 | description=_( | 75 | description=_( |
259 | 74 | "Branches provide users with an easy way to test bug " | 76 | "Branches provide users with an easy way to test bug " |
260 | 75 | "fixes. They are temporary and created on demand. If " | 77 | "fixes. They are temporary and created on demand. If " |
261 | diff --git a/lib/lp/snappy/interfaces/snap.py b/lib/lp/snappy/interfaces/snap.py | |||
262 | index 4471b79..70626c9 100644 | |||
263 | --- a/lib/lp/snappy/interfaces/snap.py | |||
264 | +++ b/lib/lp/snappy/interfaces/snap.py | |||
265 | @@ -3,6 +3,8 @@ | |||
266 | 3 | 3 | ||
267 | 4 | """Snap package interfaces.""" | 4 | """Snap package interfaces.""" |
268 | 5 | 5 | ||
269 | 6 | from __future__ import absolute_import, print_function, unicode_literals | ||
270 | 7 | |||
271 | 6 | __metaclass__ = type | 8 | __metaclass__ = type |
272 | 7 | 9 | ||
273 | 8 | __all__ = [ | 10 | __all__ = [ |
274 | @@ -112,14 +114,14 @@ from lp.soyuz.interfaces.archive import IArchive | |||
275 | 112 | from lp.soyuz.interfaces.distroarchseries import IDistroArchSeries | 114 | from lp.soyuz.interfaces.distroarchseries import IDistroArchSeries |
276 | 113 | 115 | ||
277 | 114 | 116 | ||
281 | 115 | SNAP_PRIVATE_FEATURE_FLAG = u"snap.allow_private" | 117 | SNAP_PRIVATE_FEATURE_FLAG = "snap.allow_private" |
282 | 116 | SNAP_SNAPCRAFT_CHANNEL_FEATURE_FLAG = u"snap.channels.snapcraft" | 118 | SNAP_SNAPCRAFT_CHANNEL_FEATURE_FLAG = "snap.channels.snapcraft" |
283 | 117 | SNAP_WEBHOOKS_FEATURE_FLAG = u"snap.webhooks.enabled" | 119 | SNAP_WEBHOOKS_FEATURE_FLAG = "snap.webhooks.enabled" |
284 | 118 | 120 | ||
285 | 119 | 121 | ||
286 | 120 | SNAP_TESTING_FLAGS = { | 122 | SNAP_TESTING_FLAGS = { |
289 | 121 | SNAP_PRIVATE_FEATURE_FLAG: u"on", | 123 | SNAP_PRIVATE_FEATURE_FLAG: "on", |
290 | 122 | SNAP_WEBHOOKS_FEATURE_FLAG: u"on", | 124 | SNAP_WEBHOOKS_FEATURE_FLAG: "on", |
291 | 123 | } | 125 | } |
292 | 124 | 126 | ||
293 | 125 | 127 | ||
294 | @@ -330,7 +332,7 @@ class ISnapBuildRequest(Interface): | |||
295 | 330 | 332 | ||
296 | 331 | archive = Reference( | 333 | archive = Reference( |
297 | 332 | IArchive, | 334 | IArchive, |
299 | 333 | title=u"The source archive for builds produced by this request", | 335 | title="The source archive for builds produced by this request", |
300 | 334 | required=True, readonly=True) | 336 | required=True, readonly=True) |
301 | 335 | 337 | ||
302 | 336 | channels = Dict( | 338 | channels = Dict( |
303 | diff --git a/lib/lp/snappy/interfaces/snapbuild.py b/lib/lp/snappy/interfaces/snapbuild.py | |||
304 | index 3eaaae8..fdd9c86 100644 | |||
305 | --- a/lib/lp/snappy/interfaces/snapbuild.py | |||
306 | +++ b/lib/lp/snappy/interfaces/snapbuild.py | |||
307 | @@ -3,6 +3,8 @@ | |||
308 | 3 | 3 | ||
309 | 4 | """Snap package build interfaces.""" | 4 | """Snap package build interfaces.""" |
310 | 5 | 5 | ||
311 | 6 | from __future__ import absolute_import, print_function, unicode_literals | ||
312 | 7 | |||
313 | 6 | __metaclass__ = type | 8 | __metaclass__ = type |
314 | 7 | 9 | ||
315 | 8 | __all__ = [ | 10 | __all__ = [ |
316 | diff --git a/lib/lp/snappy/interfaces/webservice.py b/lib/lp/snappy/interfaces/webservice.py | |||
317 | index 30def61..b978965 100644 | |||
318 | --- a/lib/lp/snappy/interfaces/webservice.py | |||
319 | +++ b/lib/lp/snappy/interfaces/webservice.py | |||
320 | @@ -9,6 +9,8 @@ There is a declaration in ZCML somewhere that looks like: | |||
321 | 9 | which tells `lazr.restful` that it should look for webservice exports here. | 9 | which tells `lazr.restful` that it should look for webservice exports here. |
322 | 10 | """ | 10 | """ |
323 | 11 | 11 | ||
324 | 12 | from __future__ import absolute_import, print_function, unicode_literals | ||
325 | 13 | |||
326 | 12 | __all__ = [ | 14 | __all__ = [ |
327 | 13 | 'ISnap', | 15 | 'ISnap', |
328 | 14 | 'ISnapBase', | 16 | 'ISnapBase', |
329 | diff --git a/lib/lp/snappy/mail/snapbuild.py b/lib/lp/snappy/mail/snapbuild.py | |||
330 | index fa85a34..1f36e75 100644 | |||
331 | --- a/lib/lp/snappy/mail/snapbuild.py | |||
332 | +++ b/lib/lp/snappy/mail/snapbuild.py | |||
333 | @@ -1,6 +1,8 @@ | |||
334 | 1 | # Copyright 2015-2017 Canonical Ltd. This software is licensed under the | 1 | # Copyright 2015-2017 Canonical Ltd. This software is licensed under the |
335 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). |
336 | 3 | 3 | ||
337 | 4 | from __future__ import absolute_import, print_function, unicode_literals | ||
338 | 5 | |||
339 | 4 | __metaclass__ = type | 6 | __metaclass__ = type |
340 | 5 | __all__ = [ | 7 | __all__ = [ |
341 | 6 | 'SnapBuildMailer', | 8 | 'SnapBuildMailer', |
342 | diff --git a/lib/lp/snappy/model/snap.py b/lib/lp/snappy/model/snap.py | |||
343 | index 681b735..18eee6e 100644 | |||
344 | --- a/lib/lp/snappy/model/snap.py | |||
345 | +++ b/lib/lp/snappy/model/snap.py | |||
346 | @@ -1,6 +1,8 @@ | |||
347 | 1 | # Copyright 2015-2019 Canonical Ltd. This software is licensed under the | 1 | # Copyright 2015-2019 Canonical Ltd. This software is licensed under the |
348 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). |
349 | 3 | 3 | ||
350 | 4 | from __future__ import absolute_import, print_function, unicode_literals | ||
351 | 5 | |||
352 | 4 | __metaclass__ = type | 6 | __metaclass__ = type |
353 | 5 | __all__ = [ | 7 | __all__ = [ |
354 | 6 | 'Snap', | 8 | 'Snap', |
355 | diff --git a/lib/lp/snappy/model/snapbuild.py b/lib/lp/snappy/model/snapbuild.py | |||
356 | index f21d4c7..0415c66 100644 | |||
357 | --- a/lib/lp/snappy/model/snapbuild.py | |||
358 | +++ b/lib/lp/snappy/model/snapbuild.py | |||
359 | @@ -1,6 +1,8 @@ | |||
360 | 1 | # Copyright 2015-2019 Canonical Ltd. This software is licensed under the | 1 | # Copyright 2015-2019 Canonical Ltd. This software is licensed under the |
361 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). |
362 | 3 | 3 | ||
363 | 4 | from __future__ import absolute_import, print_function, unicode_literals | ||
364 | 5 | |||
365 | 4 | __metaclass__ = type | 6 | __metaclass__ = type |
366 | 5 | __all__ = [ | 7 | __all__ = [ |
367 | 6 | 'SnapBuild', | 8 | 'SnapBuild', |
368 | diff --git a/lib/lp/snappy/model/snapbuildbehaviour.py b/lib/lp/snappy/model/snapbuildbehaviour.py | |||
369 | index 8e61925..cda3cff 100644 | |||
370 | --- a/lib/lp/snappy/model/snapbuildbehaviour.py | |||
371 | +++ b/lib/lp/snappy/model/snapbuildbehaviour.py | |||
372 | @@ -6,6 +6,8 @@ | |||
373 | 6 | Dispatches snap package build jobs to build-farm slaves. | 6 | Dispatches snap package build jobs to build-farm slaves. |
374 | 7 | """ | 7 | """ |
375 | 8 | 8 | ||
376 | 9 | from __future__ import absolute_import, print_function, unicode_literals | ||
377 | 10 | |||
378 | 9 | __metaclass__ = type | 11 | __metaclass__ = type |
379 | 10 | __all__ = [ | 12 | __all__ = [ |
380 | 11 | 'SnapBuildBehaviour', | 13 | 'SnapBuildBehaviour', |
381 | @@ -169,7 +171,7 @@ class SnapBuildBehaviour(BuildFarmJobBehaviourBase): | |||
382 | 169 | # "git clone -b" doesn't accept full ref names. If this becomes | 171 | # "git clone -b" doesn't accept full ref names. If this becomes |
383 | 170 | # a problem then we could change launchpad-buildd to do "git | 172 | # a problem then we could change launchpad-buildd to do "git |
384 | 171 | # clone" followed by "git checkout" instead. | 173 | # clone" followed by "git checkout" instead. |
386 | 172 | if build.snap.git_path != u"HEAD": | 174 | if build.snap.git_path != "HEAD": |
387 | 173 | args["git_path"] = build.snap.git_ref.name | 175 | args["git_path"] = build.snap.git_ref.name |
388 | 174 | else: | 176 | else: |
389 | 175 | raise CannotBuild( | 177 | raise CannotBuild( |
390 | diff --git a/lib/lp/snappy/validators/channels.py b/lib/lp/snappy/validators/channels.py | |||
391 | index f6ed93e..f091857 100644 | |||
392 | --- a/lib/lp/snappy/validators/channels.py | |||
393 | +++ b/lib/lp/snappy/validators/channels.py | |||
394 | @@ -3,6 +3,8 @@ | |||
395 | 3 | 3 | ||
396 | 4 | """Validators for the .store_channels attribute.""" | 4 | """Validators for the .store_channels attribute.""" |
397 | 5 | 5 | ||
398 | 6 | from __future__ import absolute_import, print_function, unicode_literals | ||
399 | 7 | |||
400 | 6 | __metaclass__ = type | 8 | __metaclass__ = type |
401 | 7 | 9 | ||
402 | 8 | from zope.schema.vocabulary import getVocabularyRegistry | 10 | from zope.schema.vocabulary import getVocabularyRegistry |
403 | diff --git a/lib/lp/snappy/vocabularies.py b/lib/lp/snappy/vocabularies.py | |||
404 | index 61e5872..331088a 100644 | |||
405 | --- a/lib/lp/snappy/vocabularies.py | |||
406 | +++ b/lib/lp/snappy/vocabularies.py | |||
407 | @@ -3,6 +3,8 @@ | |||
408 | 3 | 3 | ||
409 | 4 | """Snappy vocabularies.""" | 4 | """Snappy vocabularies.""" |
410 | 5 | 5 | ||
411 | 6 | from __future__ import absolute_import, print_function, unicode_literals | ||
412 | 7 | |||
413 | 6 | __metaclass__ = type | 8 | __metaclass__ = type |
414 | 7 | 9 | ||
415 | 8 | __all__ = [ | 10 | __all__ = [ |
Voting criteria not met /jenkins. ols.canonical. com/online- services/ job/launchpad/ 10/
https:/