Merge lp:~brian-murray/ubuntu-archive-tools/more-python3 into lp:ubuntu-archive-tools
- more-python3
- Merge into trunk
Proposed by
Brian Murray
Status: | Merged |
---|---|
Merged at revision: | 1400 |
Proposed branch: | lp:~brian-murray/ubuntu-archive-tools/more-python3 |
Merge into: | lp:ubuntu-archive-tools |
Diff against target: |
661 lines (+60/-114) 27 files modified
architecture-mismatches (+1/-3) archive-cruft-check (+1/-3) bootstrap-package (+1/-2) copy-report (+3/-5) derive-distribution (+5/-9) get-distro-update-metrics (+3/-3) import-blacklist (+1/-3) iso-deb-size-compare (+4/-6) kernel-overrides (+4/-8) kernel_series.py (+8/-11) list-builds-on-tracker (+1/-1) nbs-report (+1/-3) orphaned-sources (+3/-7) package-subscribers (+1/-3) packageset-report (+1/-1) pocket-mismatches (+1/-3) point-release-snapshot (+1/-3) post-amis-to-iso-tracker (+1/-3) post-image-to-iso-tracker (+1/-1) priority-mismatches (+2/-4) promote-to-release (+1/-3) publish-image-set (+5/-7) queuediff (+5/-8) regression-proposed-bug-search (+2/-7) rescore-ppa-builds (+1/-3) sync-blacklist (+1/-3) utils.py (+1/-1) |
To merge this branch: | bzr merge lp:~brian-murray/ubuntu-archive-tools/more-python3 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Łukasz Zemczak | Pending | ||
Steve Langasek | Pending | ||
Review via email: mp+393198@code.launchpad.net |
Commit message
Move more tools to python3.
Description of the change
To post a comment you must log in.
- 1420. By Brian Murray
-
move package-subscribers to python3
- 1421. By Brian Murray
-
move priority-mismatches to python3
- 1422. By Brian Murray
-
move point-release-
snapshot to python3 - 1423. By Brian Murray
-
switch shebang for priority-mismatches and point-release-
snapshot - 1424. By Brian Murray
-
move pocket-mismatches to python3
- 1425. By Brian Murray
-
move kernel_series.py to python3
- 1426. By Brian Murray
-
move copy-report to python3
- 1427. By Brian Murray
-
Move architecture-
mismatches to python3
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'architecture-mismatches' |
2 | --- architecture-mismatches 2020-01-25 02:19:13 +0000 |
3 | +++ architecture-mismatches 2020-11-02 20:20:51 +0000 |
4 | @@ -1,4 +1,4 @@ |
5 | -#!/usr/bin/env python2.7 |
6 | +#!/usr/bin/python3 |
7 | |
8 | # Check for override mismatches between architectures |
9 | # Copyright (C) 2005, 2008, 2009, 2010, 2011, 2012 Canonical Ltd. |
10 | @@ -18,8 +18,6 @@ |
11 | # along with this program; if not, write to the Free Software |
12 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
13 | |
14 | -from __future__ import print_function |
15 | - |
16 | import atexit |
17 | from collections import defaultdict |
18 | import csv |
19 | |
20 | === modified file 'archive-cruft-check' |
21 | --- archive-cruft-check 2020-01-25 02:19:13 +0000 |
22 | +++ archive-cruft-check 2020-11-02 20:20:51 +0000 |
23 | @@ -1,9 +1,7 @@ |
24 | -#! /usr/bin/python2.7 |
25 | +#! /usr/bin/python3 |
26 | # Copyright 2009-2012 Canonical Ltd. This software is licensed under the |
27 | # GNU Affero General Public License version 3. |
28 | |
29 | -from __future__ import print_function |
30 | - |
31 | from collections import defaultdict |
32 | import logging |
33 | import optparse |
34 | |
35 | === modified file 'bootstrap-package' |
36 | --- bootstrap-package 2020-01-25 02:19:13 +0000 |
37 | +++ bootstrap-package 2020-11-02 20:20:51 +0000 |
38 | @@ -1,4 +1,4 @@ |
39 | -#! /usr/bin/python2.7 |
40 | +#! /usr/bin/python3 |
41 | |
42 | # Copyright (C) 2016 Canonical Ltd. |
43 | # Author: Colin Watson <cjwatson@ubuntu.com> |
44 | @@ -17,7 +17,6 @@ |
45 | |
46 | """Bootstrap a package build using injected build-dependencies.""" |
47 | |
48 | -from __future__ import print_function |
49 | import sys |
50 | |
51 | from optparse import ( |
52 | |
53 | === modified file 'copy-report' |
54 | --- copy-report 2020-01-25 02:19:13 +0000 |
55 | +++ copy-report 2020-11-02 20:20:51 +0000 |
56 | @@ -1,4 +1,4 @@ |
57 | -#! /usr/bin/env python2.7 |
58 | +#! /usr/bin/python3 |
59 | |
60 | from __future__ import print_function |
61 | |
62 | @@ -11,10 +11,8 @@ |
63 | import shutil |
64 | import subprocess |
65 | import tempfile |
66 | -try: |
67 | - from urllib.parse import unquote |
68 | -except ImportError: |
69 | - from urllib import unquote |
70 | + |
71 | +from urllib.parse import unquote |
72 | |
73 | import apt_pkg |
74 | from launchpadlib.launchpad import Launchpad |
75 | |
76 | === modified file 'derive-distribution' |
77 | --- derive-distribution 2020-01-25 02:19:13 +0000 |
78 | +++ derive-distribution 2020-11-02 20:20:51 +0000 |
79 | @@ -1,4 +1,4 @@ |
80 | -#! /usr/bin/python2.7 |
81 | +#! /usr/bin/python3 |
82 | |
83 | # Copyright (C) 2014 Canonical Ltd. |
84 | # Author: Colin Watson <cjwatson@ubuntu.com> |
85 | @@ -19,8 +19,6 @@ |
86 | |
87 | """Copy a subset of one distribution into a derived distribution.""" |
88 | |
89 | -from __future__ import print_function |
90 | - |
91 | import atexit |
92 | from collections import OrderedDict |
93 | from contextlib import closing, contextmanager |
94 | @@ -33,10 +31,8 @@ |
95 | import sys |
96 | import tempfile |
97 | import time |
98 | -try: |
99 | - from urllib.request import urlopen |
100 | -except ImportError: |
101 | - from urllib2 import urlopen |
102 | + |
103 | +from urllib.request import urlopen |
104 | |
105 | import apt_pkg |
106 | from dateutil import parser as dateutil_parser |
107 | @@ -217,7 +213,7 @@ |
108 | for inner_seed in germinator._inner_seeds(seed): |
109 | if inner_seed.name not in all_seeds: |
110 | all_seeds[inner_seed.name] = inner_seed |
111 | - for seed in all_seeds.values(): |
112 | + for seed in list(all_seeds.values()): |
113 | sources = seed._sourcepkgs | seed._build_sourcepkgs |
114 | for source in sources: |
115 | version = germinator._sources[source]["Version"] |
116 | @@ -275,7 +271,7 @@ |
117 | for source in germinator._sources: |
118 | self._versions[source] = germinator._sources[source]["Version"] |
119 | else: |
120 | - for flavour, seed_names in flavours.items(): |
121 | + for flavour, seed_names in list(flavours.items()): |
122 | logging.info("Germinating for %s/%s/%s", flavour, suite, arch) |
123 | self.germinateArchFlavour( |
124 | germinator, suite, arch, flavour, structures[flavour], |
125 | |
126 | === modified file 'get-distro-update-metrics' |
127 | --- get-distro-update-metrics 2020-01-25 02:19:13 +0000 |
128 | +++ get-distro-update-metrics 2020-11-02 20:20:51 +0000 |
129 | @@ -1,4 +1,4 @@ |
130 | -#! /usr/bin/python2.7 |
131 | +#! /usr/bin/python3 |
132 | # Copyright 2012 Canonical Ltd. |
133 | # |
134 | # This script will write update metrics for a given Ubuntu release in CSV |
135 | @@ -25,7 +25,7 @@ |
136 | [key, {'Updates': X, 'Security': X, 'Total': X}] record. |
137 | """ |
138 | logging.info('Writing metrics by %s to %s', key_name.lower(), filename) |
139 | - writer = csv.writer(open(filename, 'wb')) |
140 | + writer = csv.writer(open(filename, 'w')) |
141 | writer.writerow([key_name, 'Updates', 'Security', 'Total']) |
142 | for key, metrics in metrics: |
143 | writer.writerow( |
144 | @@ -105,7 +105,7 @@ |
145 | options.distribution, args[0]) |
146 | write_metrics_csv( |
147 | by_package_filename, 'Package', sorted( |
148 | - updates_by_package.items(), |
149 | + list(updates_by_package.items()), |
150 | key=lambda m: m[1]['Total'], reverse=True)) |
151 | |
152 | |
153 | |
154 | === modified file 'import-blacklist' |
155 | --- import-blacklist 2020-01-25 02:19:13 +0000 |
156 | +++ import-blacklist 2020-11-02 20:20:51 +0000 |
157 | @@ -1,4 +1,4 @@ |
158 | -#!/usr/bin/python2.7 |
159 | +#!/usr/bin/python3 |
160 | |
161 | # Copyright (C) 2011 Iain Lane |
162 | # Copyright (C) 2011 Stefano Rivera |
163 | @@ -15,8 +15,6 @@ |
164 | # You should have received a copy of the GNU General Public License |
165 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
166 | |
167 | -from __future__ import print_function, unicode_literals |
168 | - |
169 | from optparse import OptionParser |
170 | import re |
171 | |
172 | |
173 | === modified file 'iso-deb-size-compare' |
174 | --- iso-deb-size-compare 2020-01-25 02:19:13 +0000 |
175 | +++ iso-deb-size-compare 2020-11-02 20:20:51 +0000 |
176 | @@ -1,4 +1,4 @@ |
177 | -#!/usr/bin/python2.7 |
178 | +#!/usr/bin/python3 |
179 | # -*- coding: utf-8 -*- |
180 | |
181 | # Copyright (C) 2010, 2012 Canonical Ltd. |
182 | @@ -21,8 +21,6 @@ |
183 | # two releases or daily builds. Note that this only really works for |
184 | # alternates, since desktop CDs by and large just have one big squashfs image. |
185 | |
186 | -from __future__ import print_function |
187 | - |
188 | import subprocess |
189 | import sys |
190 | |
191 | @@ -62,7 +60,7 @@ |
192 | |
193 | print('== Removed packages ==') |
194 | sum = 0 |
195 | -for p, (v, s) in old_map.iteritems(): |
196 | +for p, (v, s) in old_map.items(): |
197 | if p not in new_map: |
198 | print('%s (%.1f MB)' % (p, s / 1000000.)) |
199 | sum += s |
200 | @@ -70,7 +68,7 @@ |
201 | |
202 | sum = 0 |
203 | print('\n== Added packages ==') |
204 | -for p, (v, s) in new_map.iteritems(): |
205 | +for p, (v, s) in new_map.items(): |
206 | if p not in old_map: |
207 | print('%s (%.1f MB)' % (p, s / 1000000.)) |
208 | sum += s |
209 | @@ -78,7 +76,7 @@ |
210 | |
211 | print('\n== Changed packages ==') |
212 | sum = 0 |
213 | -for p, (v, s) in old_map.iteritems(): |
214 | +for p, (v, s) in old_map.items(): |
215 | if p not in new_map: |
216 | continue |
217 | |
218 | |
219 | === modified file 'kernel-overrides' |
220 | --- kernel-overrides 2020-01-25 02:19:13 +0000 |
221 | +++ kernel-overrides 2020-11-02 20:20:51 +0000 |
222 | @@ -1,4 +1,4 @@ |
223 | -#! /usr/bin/python2.7 |
224 | +#! /usr/bin/python3 |
225 | |
226 | # Copyright (C) 2009, 2010, 2011, 2012 Canonical Ltd. |
227 | |
228 | @@ -16,8 +16,6 @@ |
229 | |
230 | """Apply suitable overrides to new kernel binaries, matching previous ones.""" |
231 | |
232 | -from __future__ import print_function |
233 | - |
234 | import atexit |
235 | from collections import defaultdict |
236 | from contextlib import closing |
237 | @@ -27,10 +25,8 @@ |
238 | import shutil |
239 | import sys |
240 | import tempfile |
241 | -try: |
242 | - from urllib.request import urlopen |
243 | -except ImportError: |
244 | - from urllib2 import urlopen |
245 | + |
246 | +from urllib.request import urlopen |
247 | |
248 | import apt_pkg |
249 | from launchpadlib.launchpad import Launchpad |
250 | @@ -175,7 +171,7 @@ |
251 | if binary["architecture"] not in current_binaries: |
252 | continue |
253 | current_binaries_arch = current_binaries[binary["architecture"]] |
254 | - for name, component in current_binaries_arch.items(): |
255 | + for name, component in list(current_binaries_arch.items()): |
256 | if (binary["component"] != component and |
257 | equal_except_abi(name, binary["name"], newabi)): |
258 | print("\t%s: %s -> %s" % |
259 | |
260 | === modified file 'kernel_series.py' |
261 | --- kernel_series.py 2020-01-25 02:19:13 +0000 |
262 | +++ kernel_series.py 2020-11-02 20:20:51 +0000 |
263 | @@ -1,10 +1,7 @@ |
264 | -#!/usr/bin/env python2.7 |
265 | +#!/usr/bin/python3 |
266 | # |
267 | |
268 | -try: |
269 | - from urllib.request import urlopen |
270 | -except ImportError: |
271 | - from urllib2 import urlopen |
272 | +from urllib.request import urlopen |
273 | |
274 | import os |
275 | import yaml |
276 | @@ -50,7 +47,7 @@ |
277 | return not self.__eq__(other) |
278 | |
279 | def __iter__(self): |
280 | - return iter(self._data.items()) |
281 | + return iter(list(self._data.items())) |
282 | |
283 | def __getitem__(self, which): |
284 | return self._data[which] |
285 | @@ -323,7 +320,7 @@ |
286 | result = [] |
287 | packages = self._data.get('packages') |
288 | if packages: |
289 | - for package_key, package in packages.items(): |
290 | + for package_key, package in list(packages.items()): |
291 | result.append(KernelPackageEntry(self._ks, self, package_key, package)) |
292 | return result |
293 | |
294 | @@ -339,7 +336,7 @@ |
295 | result = [] |
296 | snaps = self._data.get('snaps') |
297 | if snaps: |
298 | - for snap_key, snap in snaps.items(): |
299 | + for snap_key, snap in list(snaps.items()): |
300 | result.append(KernelSnapEntry(self._ks, self, snap_key, snap)) |
301 | return result |
302 | |
303 | @@ -524,7 +521,7 @@ |
304 | result = [] |
305 | sources = self._data.get('sources') |
306 | if sources: |
307 | - for source_key, source in sources.items(): |
308 | + for source_key, source in list(sources.items()): |
309 | result.append(KernelSourceEntry( |
310 | self._ks, self, source_key, source)) |
311 | return result |
312 | @@ -574,7 +571,7 @@ |
313 | |
314 | self._development_series = None |
315 | self._codename_to_series = {} |
316 | - for series_key, series in self._data.items(): |
317 | + for series_key, series in list(self._data.items()): |
318 | if not series: |
319 | continue |
320 | if series.get('development', False): |
321 | @@ -596,7 +593,7 @@ |
322 | def series(self): |
323 | return [KernelSeriesEntry(self, series_key, series, |
324 | defaults=self._defaults_series) |
325 | - for series_key, series in self._data.items()] |
326 | + for series_key, series in list(self._data.items())] |
327 | |
328 | def lookup_series(self, series=None, codename=None, development=False): |
329 | if not series and not codename and not development: |
330 | |
331 | === modified file 'list-builds-on-tracker' |
332 | --- list-builds-on-tracker 2020-01-25 02:19:13 +0000 |
333 | +++ list-builds-on-tracker 2020-11-02 20:20:51 +0000 |
334 | @@ -1,4 +1,4 @@ |
335 | -#!/usr/bin/python2.7 |
336 | +#!/usr/bin/python3 |
337 | # Copyright (C) 2012 Canonical Ltd. |
338 | |
339 | # This program is free software: you can redistribute it and/or modify |
340 | |
341 | === modified file 'nbs-report' |
342 | --- nbs-report 2020-10-23 15:03:51 +0000 |
343 | +++ nbs-report 2020-11-02 20:20:51 +0000 |
344 | @@ -1,4 +1,4 @@ |
345 | -#!/usr/bin/python2.7 |
346 | +#!/usr/bin/python3 |
347 | |
348 | # Copyright (C) 2011, 2012 Canonical Ltd. |
349 | # Author: Martin Pitt <martin.pitt@ubuntu.com> |
350 | @@ -19,8 +19,6 @@ |
351 | # Generate a HTML report of current NBS binary packages from a checkrdepends |
352 | # output directory |
353 | |
354 | -from __future__ import print_function |
355 | - |
356 | from collections import defaultdict |
357 | import csv |
358 | from optparse import OptionParser |
359 | |
360 | === modified file 'orphaned-sources' |
361 | --- orphaned-sources 2020-01-25 02:19:13 +0000 |
362 | +++ orphaned-sources 2020-11-02 20:20:51 +0000 |
363 | @@ -1,6 +1,4 @@ |
364 | -#! /usr/bin/python2.7 |
365 | - |
366 | -from __future__ import print_function |
367 | +#! /usr/bin/python3 |
368 | |
369 | import atexit |
370 | from contextlib import closing |
371 | @@ -9,10 +7,8 @@ |
372 | import shutil |
373 | import sys |
374 | import tempfile |
375 | -try: |
376 | - from urllib.request import urlretrieve |
377 | -except ImportError: |
378 | - from urllib import urlretrieve |
379 | + |
380 | +from urllib.request import urlretrieve |
381 | |
382 | import apt_pkg |
383 | from launchpadlib.launchpad import Launchpad |
384 | |
385 | === modified file 'package-subscribers' |
386 | --- package-subscribers 2020-07-23 08:22:44 +0000 |
387 | +++ package-subscribers 2020-11-02 20:20:51 +0000 |
388 | @@ -1,6 +1,4 @@ |
389 | -#! /usr/bin/python2.7 |
390 | - |
391 | -from __future__ import print_function |
392 | +#! /usr/bin/python3 |
393 | |
394 | import atexit |
395 | import bz2 |
396 | |
397 | === modified file 'packageset-report' |
398 | --- packageset-report 2020-01-25 02:19:13 +0000 |
399 | +++ packageset-report 2020-11-02 20:20:51 +0000 |
400 | @@ -1,4 +1,4 @@ |
401 | -#!/usr/bin/python2.7 |
402 | +#!/usr/bin/python3 |
403 | # -*- coding: utf-8 -*- |
404 | |
405 | # Copyright (C) 2013 Canonical Ltd. |
406 | |
407 | === modified file 'pocket-mismatches' |
408 | --- pocket-mismatches 2020-01-25 02:19:13 +0000 |
409 | +++ pocket-mismatches 2020-11-02 20:20:51 +0000 |
410 | @@ -1,4 +1,4 @@ |
411 | -#!/usr/bin/env python2.7 |
412 | +#!/usr/bin/python3 |
413 | |
414 | # Check for override mismatches between pockets |
415 | # Copyright (C) 2005, 2008, 2011, 2012 Canonical Ltd. |
416 | @@ -18,8 +18,6 @@ |
417 | # along with this program; if not, write to the Free Software |
418 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
419 | |
420 | -from __future__ import print_function |
421 | - |
422 | import atexit |
423 | from collections import defaultdict |
424 | import gzip |
425 | |
426 | === modified file 'point-release-snapshot' |
427 | --- point-release-snapshot 2020-01-25 02:19:13 +0000 |
428 | +++ point-release-snapshot 2020-11-02 20:20:51 +0000 |
429 | @@ -1,6 +1,4 @@ |
430 | -#! /usr/bin/env python2.7 |
431 | - |
432 | -from __future__ import print_function |
433 | +#! /usr/bin/python3 |
434 | |
435 | from optparse import OptionParser |
436 | import os |
437 | |
438 | === modified file 'post-amis-to-iso-tracker' |
439 | --- post-amis-to-iso-tracker 2020-01-25 02:19:13 +0000 |
440 | +++ post-amis-to-iso-tracker 2020-11-02 20:20:51 +0000 |
441 | @@ -1,4 +1,4 @@ |
442 | -#! /usr/bin/python2.7 |
443 | +#! /usr/bin/python3 |
444 | |
445 | # Copyright (C) 2010, 2011, 2012 Canonical Ltd. |
446 | |
447 | @@ -14,8 +14,6 @@ |
448 | # You should have received a copy of the GNU General Public License |
449 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
450 | |
451 | -from __future__ import print_function |
452 | - |
453 | import argparse |
454 | import os |
455 | import sys |
456 | |
457 | === modified file 'post-image-to-iso-tracker' |
458 | --- post-image-to-iso-tracker 2020-01-25 02:19:13 +0000 |
459 | +++ post-image-to-iso-tracker 2020-11-02 20:20:51 +0000 |
460 | @@ -1,4 +1,4 @@ |
461 | -#!/usr/bin/python2.7 |
462 | +#!/usr/bin/python3 |
463 | |
464 | # Copyright (C) 2011 Canonical Ltd. |
465 | # Author: Colin Watson <cjwatson@ubuntu.com> |
466 | |
467 | === modified file 'priority-mismatches' |
468 | --- priority-mismatches 2020-01-25 02:19:13 +0000 |
469 | +++ priority-mismatches 2020-11-02 20:20:51 +0000 |
470 | @@ -1,4 +1,4 @@ |
471 | -#!/usr/bin/env python2.7 |
472 | +#!/usr/bin/python3 |
473 | |
474 | # Synchronise package priorities with germinate output |
475 | # Copyright (C) 2005, 2009, 2010, 2011, 2012 Canonical Ltd. |
476 | @@ -25,8 +25,6 @@ |
477 | # i386, ia64, m68k, mips, mipsel, powerpc, s390, sparc |
478 | # <elmo> I hid it in the pool, being the cunning cabalist that I am |
479 | |
480 | -from __future__ import print_function |
481 | - |
482 | import atexit |
483 | from collections import defaultdict |
484 | import csv |
485 | @@ -144,7 +142,7 @@ |
486 | important_pkgs = [ |
487 | pkg for pkg in important_pkgs if not re_not_base.match(pkg)] |
488 | if standard_seed is not None: |
489 | - standard_pkgs = read_germinate(suite, arch, standard_seed).keys() |
490 | + standard_pkgs = list(read_germinate(suite, arch, standard_seed).keys()) |
491 | required_pkgs.sort() |
492 | important_pkgs.sort() |
493 | standard_pkgs.sort() |
494 | |
495 | === modified file 'promote-to-release' |
496 | --- promote-to-release 2020-01-25 02:19:13 +0000 |
497 | +++ promote-to-release 2020-11-02 20:20:51 +0000 |
498 | @@ -1,4 +1,4 @@ |
499 | -#! /usr/bin/python2.7 |
500 | +#! /usr/bin/python3 |
501 | |
502 | # Copyright (C) 2012 Canonical Ltd. |
503 | # Author: Colin Watson <cjwatson@ubuntu.com> |
504 | @@ -17,8 +17,6 @@ |
505 | |
506 | """Promote packages to release pocket based on britney output.""" |
507 | |
508 | -from __future__ import print_function |
509 | - |
510 | from optparse import OptionParser |
511 | import sys |
512 | |
513 | |
514 | === modified file 'publish-image-set' |
515 | --- publish-image-set 2020-10-21 12:47:17 +0000 |
516 | +++ publish-image-set 2020-11-02 20:20:51 +0000 |
517 | @@ -1,4 +1,4 @@ |
518 | -#!/usr/bin/python2.7 |
519 | +#!/usr/bin/python3 |
520 | # -*- coding: utf-8 -*- |
521 | |
522 | # Copyright (C) 2010, 2011, 2012 Canonical Ltd. |
523 | @@ -32,8 +32,6 @@ |
524 | # <releaseflag>: yes/no/poolonly/named (should appear on releases.u.c.?) |
525 | # <name>: name of the release (alpha-2, beta, etc.) |
526 | |
527 | -from __future__ import print_function |
528 | - |
529 | from collections import defaultdict |
530 | import optparse |
531 | import re |
532 | @@ -183,7 +181,7 @@ |
533 | project = 'ubuntu' |
534 | if 'Preinstalled' in product: |
535 | type = 'preinstalled-%s' % type |
536 | - if (ms.series_string == u'Focal' and |
537 | + if (ms.series_string == 'Focal' and |
538 | project == 'ubuntu' and type == 'server'): |
539 | project = 'ubuntu-server' |
540 | type = 'legacy-server' |
541 | @@ -306,9 +304,9 @@ |
542 | |
543 | print('\n## publish images:') |
544 | source_milestone = None |
545 | - for project, builds in info['build_map'].items(): |
546 | - for type, buildstamps in builds.items(): |
547 | - for buildstamp, arches in buildstamps.items(): |
548 | + for project, builds in list(info['build_map'].items()): |
549 | + for type, buildstamps in list(builds.items()): |
550 | + for buildstamp, arches in list(buildstamps.items()): |
551 | do_publish_release(opts, project, type, buildstamp, arches, |
552 | info['milestone_code'], info['stable']) |
553 | source_milestone = info['milestone_code'] |
554 | |
555 | === modified file 'queuediff' |
556 | --- queuediff 2020-10-23 19:29:46 +0000 |
557 | +++ queuediff 2020-11-02 20:20:51 +0000 |
558 | @@ -1,4 +1,4 @@ |
559 | -#!/usr/bin/python2.7 |
560 | +#!/usr/bin/python3 |
561 | |
562 | # Copyright (C) 2009, 2010, 2011, 2012 Canonical Ltd. |
563 | # Copyright (C) 2010 Scott Kitterman <scott@kitterman.com> |
564 | @@ -25,17 +25,14 @@ |
565 | queuediff -s hardy -b hal | view - |
566 | ''' |
567 | |
568 | -from __future__ import print_function |
569 | - |
570 | import gzip |
571 | import optparse |
572 | import re |
573 | import sys |
574 | -try: |
575 | - from urllib.parse import quote |
576 | - from urllib.request import urlopen, urlretrieve |
577 | -except ImportError: |
578 | - from urllib import quote, urlopen, urlretrieve |
579 | + |
580 | +from urllib.parse import quote |
581 | +from urllib.request import urlopen, urlretrieve |
582 | + |
583 | import webbrowser |
584 | |
585 | from launchpadlib.launchpad import Launchpad |
586 | |
587 | === modified file 'regression-proposed-bug-search' |
588 | --- regression-proposed-bug-search 2020-01-25 02:19:13 +0000 |
589 | +++ regression-proposed-bug-search 2020-11-02 20:20:51 +0000 |
590 | @@ -1,4 +1,4 @@ |
591 | -#!/usr/bin/python2.7 |
592 | +#!/usr/bin/python3 |
593 | |
594 | # Copyright (C) 2012 Canonical, Ltd. |
595 | # Author: Brian Murray <brian@canonical.com> |
596 | @@ -20,16 +20,11 @@ |
597 | # since the date the package was uploaded to proposed for apport and release |
598 | # tagged bugs that contain the version of the package from -proposed |
599 | |
600 | -from __future__ import print_function |
601 | - |
602 | import optparse |
603 | |
604 | from launchpadlib.launchpad import Launchpad |
605 | |
606 | -try: |
607 | - from urllib.request import urlopen |
608 | -except ImportError: |
609 | - from urllib import urlopen |
610 | +from urllib.request import urlopen |
611 | |
612 | |
613 | def bugs_from_changes(change_url): |
614 | |
615 | === modified file 'rescore-ppa-builds' |
616 | --- rescore-ppa-builds 2020-01-25 02:19:13 +0000 |
617 | +++ rescore-ppa-builds 2020-11-02 20:20:51 +0000 |
618 | @@ -1,4 +1,4 @@ |
619 | -#!/usr/bin/python2.7 |
620 | +#!/usr/bin/python3 |
621 | # Rescore all builds in a PPA. |
622 | # |
623 | # Copyright (C) 2012 Canonical Ltd. |
624 | @@ -16,8 +16,6 @@ |
625 | # You should have received a copy of the GNU General Public License |
626 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
627 | |
628 | -from __future__ import print_function |
629 | - |
630 | from optparse import OptionParser |
631 | |
632 | from launchpadlib.launchpad import Launchpad |
633 | |
634 | === modified file 'sync-blacklist' |
635 | --- sync-blacklist 2020-01-25 02:19:13 +0000 |
636 | +++ sync-blacklist 2020-11-02 20:20:51 +0000 |
637 | @@ -1,4 +1,4 @@ |
638 | -#!/usr/bin/python2.7 |
639 | +#!/usr/bin/python3 |
640 | |
641 | # Copyright (C) 2011 Iain Lane |
642 | # Copyright (C) 2011 Stefano Rivera |
643 | @@ -15,8 +15,6 @@ |
644 | # You should have received a copy of the GNU General Public License |
645 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
646 | |
647 | -from __future__ import print_function, unicode_literals |
648 | - |
649 | from optparse import OptionParser |
650 | |
651 | from launchpadlib.launchpad import Launchpad |
652 | |
653 | === modified file 'utils.py' |
654 | --- utils.py 2020-01-25 02:19:13 +0000 |
655 | +++ utils.py 2020-11-02 20:20:51 +0000 |
656 | @@ -1,4 +1,4 @@ |
657 | -#!/usr/bin/python2.7 |
658 | +#!/usr/bin/python3 |
659 | |
660 | # Copyright (C) 2019 Canonical Ltd. |
661 | # Author: Brian Murray <brian.murray@canonical.com> |