Merge ~cjwatson/launchpad:py3-archiveuploader-doctests-future-imports into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 53a0c5f277cc89a4db68e245f5831f2d5991561e
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:py3-archiveuploader-doctests-future-imports
Merge into: launchpad:master
Diff against target: 530 lines (+71/-69)
11 files modified
lib/lp/archiveuploader/tests/meta-data-custom-files.txt (+1/-1)
lib/lp/archiveuploader/tests/nascentupload-announcements.txt (+7/-5)
lib/lp/archiveuploader/tests/nascentupload-closing-bugs.txt (+5/-5)
lib/lp/archiveuploader/tests/nascentupload-ddebs.txt (+13/-13)
lib/lp/archiveuploader/tests/nascentupload-epoch-handling.txt (+2/-2)
lib/lp/archiveuploader/tests/nascentupload-packageset.txt (+4/-4)
lib/lp/archiveuploader/tests/nascentupload.txt (+22/-22)
lib/lp/archiveuploader/tests/nascentuploadfile.txt (+12/-12)
lib/lp/archiveuploader/tests/static-translations.txt (+1/-1)
lib/lp/archiveuploader/tests/test_nascentupload_documentation.py (+1/-1)
lib/lp/archiveuploader/tests/upload-path-parsing.txt (+3/-3)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+398454@code.launchpad.net

Commit message

Convert lp.archiveuploader doctests to __future__ imports

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

Self-approving: this is just more tedious print_function and unicode_literals stuff.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/lib/lp/archiveuploader/tests/meta-data-custom-files.txt b/lib/lp/archiveuploader/tests/meta-data-custom-files.txt
index a5d2d54..cf3042d 100644
--- a/lib/lp/archiveuploader/tests/meta-data-custom-files.txt
+++ b/lib/lp/archiveuploader/tests/meta-data-custom-files.txt
@@ -16,6 +16,6 @@ PackageUploadCustomFormat.META_DATA.
16 ... filepath="", checksums={}, size=1, priority_name="", policy=None,16 ... filepath="", checksums={}, size=1, priority_name="", policy=None,
17 ... component_and_section="main/raw-meta-data", logger=None)17 ... component_and_section="main/raw-meta-data", logger=None)
1818
19 >>> print custom_upload_file.custom_type.name19 >>> print(custom_upload_file.custom_type.name)
20 META_DATA20 META_DATA
2121
diff --git a/lib/lp/archiveuploader/tests/nascentupload-announcements.txt b/lib/lp/archiveuploader/tests/nascentupload-announcements.txt
index 4557415..7f9ed4a 100644
--- a/lib/lp/archiveuploader/tests/nascentupload-announcements.txt
+++ b/lib/lp/archiveuploader/tests/nascentupload-announcements.txt
@@ -45,7 +45,7 @@ A helper function to examine emails that were sent:
4545
46 >>> def print_addrlist(field):46 >>> def print_addrlist(field):
47 ... for entry in sorted([addr.strip() for addr in field.split(',')]):47 ... for entry in sorted([addr.strip() for addr in field.split(',')]):
48 ... print entry48 ... print(entry)
4949
50Import the test keys to use 'insecure' policy.50Import the test keys to use 'insecure' policy.
5151
@@ -647,10 +647,12 @@ permitted, but RFC2047-encoded. UTF-8 in the mail content is preserved.
647 >>> len(msgs)647 >>> len(msgs)
648 3648 3
649649
650 >>> [message['From'].replace('\n ', ' ') for message in msgs]650 >>> for message in msgs:
651 ['Root <root@localhost>', 'Root <root@localhost>',651 ... print(message['From'].replace('\n ', ' '))
652 '=?utf-8?q?Non-ascii_changed-by_=C4=8Ciha=C5=99?=652 Root <root@localhost>
653 <daniel.silverstone@canonical.com>']653 Root <root@localhost>
654 =?utf-8?q?Non-ascii_changed-by_=C4=8Ciha=C5=99?=
655 <daniel.silverstone@canonical.com>
654656
655UTF-8 text in the changes file that is sent on the email is preserved657UTF-8 text in the changes file that is sent on the email is preserved
656in the MIME encoding. Please note also that the person that signed the658in the MIME encoding. Please note also that the person that signed the
diff --git a/lib/lp/archiveuploader/tests/nascentupload-closing-bugs.txt b/lib/lp/archiveuploader/tests/nascentupload-closing-bugs.txt
index 91db6b5..8ce0f8c 100644
--- a/lib/lp/archiveuploader/tests/nascentupload-closing-bugs.txt
+++ b/lib/lp/archiveuploader/tests/nascentupload-closing-bugs.txt
@@ -48,8 +48,8 @@ Check the current status of the bug we are supposed to fix:
48Inspect the current bugtasks for bug #6:48Inspect the current bugtasks for bug #6:
4949
50 >>> for bugtask in the_bug.bugtasks:50 >>> for bugtask in the_bug.bugtasks:
51 ... print bugtask.title51 ... print(bugtask.title)
52 ... print bugtask.status.name52 ... print(bugtask.status.name)
53 Bug #6 in Mozilla Firefox: "Firefox crashes when ...53 Bug #6 in Mozilla Firefox: "Firefox crashes when ...
54 NEW54 NEW
55 Bug #6 in bar (Ubuntu): "Firefox crashes when ...55 Bug #6 in bar (Ubuntu): "Firefox crashes when ...
@@ -81,7 +81,7 @@ This new version fixes bug #6 according its changesfiles:
81 >>> print(six.ensure_str(bar2_src.changes._dict['Launchpad-bugs-fixed']))81 >>> print(six.ensure_str(bar2_src.changes._dict['Launchpad-bugs-fixed']))
82 682 6
8383
84 >>> print bar2_src.changes.changes_comment84 >>> print(bar2_src.changes.changes_comment)
85 bar (1.0-2) breezy; urgency=low85 bar (1.0-2) breezy; urgency=low
86 <BLANKLINE>86 <BLANKLINE>
87 * A second upload to ensure that binary overrides of _all work87 * A second upload to ensure that binary overrides of _all work
@@ -103,8 +103,8 @@ FIXRELEASED and bug notification are generated:
103 >>> the_bug = getUtility(IBugSet).get(6)103 >>> the_bug = getUtility(IBugSet).get(6)
104104
105 >>> for bugtask in the_bug.bugtasks:105 >>> for bugtask in the_bug.bugtasks:
106 ... print bugtask.title106 ... print(bugtask.title)
107 ... print bugtask.status.name107 ... print(bugtask.status.name)
108 Bug #6 in Mozilla Firefox: "Firefox crashes when ...108 Bug #6 in Mozilla Firefox: "Firefox crashes when ...
109 NEW109 NEW
110 Bug #6 in bar (Ubuntu): "Firefox crashes when ...110 Bug #6 in bar (Ubuntu): "Firefox crashes when ...
diff --git a/lib/lp/archiveuploader/tests/nascentupload-ddebs.txt b/lib/lp/archiveuploader/tests/nascentupload-ddebs.txt
index ad3ab13..980d78d 100644
--- a/lib/lp/archiveuploader/tests/nascentupload-ddebs.txt
+++ b/lib/lp/archiveuploader/tests/nascentupload-ddebs.txt
@@ -33,7 +33,7 @@ it is in the queue awaiting overrides and acceptance.
33 ... 'suite/debug_1.0-1/debug_1.0-1_source.changes')33 ... 'suite/debug_1.0-1/debug_1.0-1_source.changes')
34 >>> src.process()34 >>> src.process()
35 >>> result = src.do_accept()35 >>> result = src.do_accept()
36 >>> print src.queue_root.status.name36 >>> print(src.queue_root.status.name)
37 NEW37 NEW
38 >>> transaction.commit()38 >>> transaction.commit()
3939
@@ -41,13 +41,13 @@ We don't really care where the source ends up, so we just accept the
41default overrides. It is now pending publication.41default overrides. It is now pending publication.
4242
43 >>> src.queue_root.acceptFromQueue()43 >>> src.queue_root.acceptFromQueue()
44 >>> print src.queue_root.status.name44 >>> print(src.queue_root.status.name)
45 DONE45 DONE
4646
47 >>> src_pub = src.queue_root.archive.getPublishedSources(47 >>> src_pub = src.queue_root.archive.getPublishedSources(
48 ... name='debug', version='1.0-1', exact_match=True).one()48 ... name='debug', version='1.0-1', exact_match=True).one()
4949
50 >>> print src_pub.displayname, src_pub.status.name50 >>> print(src_pub.displayname, src_pub.status.name)
51 debug 1.0-1 in hoary PENDING51 debug 1.0-1 in hoary PENDING
5252
53At this point a deb and a ddeb, produced during a normal build53At this point a deb and a ddeb, produced during a normal build
@@ -61,7 +61,7 @@ Because the DEB is new, the binary upload is held in NEW.
6161
62 >>> bin.process()62 >>> bin.process()
63 >>> result = bin.do_accept()63 >>> result = bin.do_accept()
64 >>> print bin.queue_root.status.name64 >>> print(bin.queue_root.status.name)
65 NEW65 NEW
6666
67This upload has one build with two binaries: a DEB and its corresponding67This upload has one build with two binaries: a DEB and its corresponding
@@ -70,9 +70,9 @@ DDEB.
70 >>> build = bin.queue_root.builds[0].build70 >>> build = bin.queue_root.builds[0].build
71 >>> build.binarypackages.count()71 >>> build.binarypackages.count()
72 272 2
73 >>> print build.binarypackages[0].binpackageformat.name73 >>> print(build.binarypackages[0].binpackageformat.name)
74 DEB74 DEB
75 >>> print build.binarypackages[1].binpackageformat.name75 >>> print(build.binarypackages[1].binpackageformat.name)
76 DDEB76 DDEB
77 >>> build.binarypackages[0].debug_package == build.binarypackages[1]77 >>> build.binarypackages[0].debug_package == build.binarypackages[1]
78 True78 True
@@ -95,7 +95,7 @@ We override the binary to main/devel, and accept it into the archive.
95 True95 True
96 >>> bin.queue_root.acceptFromQueue()96 >>> bin.queue_root.acceptFromQueue()
9797
98 >>> print bin.queue_root.status.name98 >>> print(bin.queue_root.status.name)
99 ACCEPTED99 ACCEPTED
100100
101 >>> switch_dbuser(config.uploadqueue.dbuser)101 >>> switch_dbuser(config.uploadqueue.dbuser)
@@ -108,9 +108,9 @@ We override the binary to main/devel, and accept it into the archive.
108Now, both, binary and debug-symbol packages are pending publication.108Now, both, binary and debug-symbol packages are pending publication.
109109
110 >>> for bin_pub in bin_pubs:110 >>> for bin_pub in bin_pubs:
111 ... print '%s %s %s %s' % (111 ... print('%s %s %s %s' % (
112 ... bin_pub.displayname, bin_pub.status.name,112 ... bin_pub.displayname, bin_pub.status.name,
113 ... bin_pub.component.name, bin_pub.section.name)113 ... bin_pub.component.name, bin_pub.section.name))
114 debug-bin 1.0-1 in hoary i386 PENDING main devel114 debug-bin 1.0-1 in hoary i386 PENDING main devel
115 debug-bin-dbgsym 1.0-1 in hoary i386 PENDING main devel115 debug-bin-dbgsym 1.0-1 in hoary i386 PENDING main devel
116116
@@ -123,18 +123,18 @@ The DDEB is stored appropriately in the database.
123 >>> [deb_pub, ddeb_pub] = bin_pubs123 >>> [deb_pub, ddeb_pub] = bin_pubs
124 >>> ddeb = ddeb_pub.binarypackagerelease124 >>> ddeb = ddeb_pub.binarypackagerelease
125125
126 >>> print ddeb.title126 >>> print(ddeb.title)
127 debug-bin-dbgsym-1.0-1127 debug-bin-dbgsym-1.0-1
128128
129The corresponding `BinaryPackageRelease` is recorded with DDEB format.129The corresponding `BinaryPackageRelease` is recorded with DDEB format.
130130
131 >>> print ddeb.binpackageformat.name131 >>> print(ddeb.binpackageformat.name)
132 DDEB132 DDEB
133133
134And its corresponding file is also stored as DDEB filetype.134And its corresponding file is also stored as DDEB filetype.
135135
136 >>> for bin_file in ddeb.files:136 >>> for bin_file in ddeb.files:
137 ... print bin_file.libraryfile.filename, bin_file.filetype.name137 ... print(bin_file.libraryfile.filename, bin_file.filetype.name)
138 debug-bin-dbgsym_1.0-1_i386.ddeb DDEB138 debug-bin-dbgsym_1.0-1_i386.ddeb DDEB
139139
140140
@@ -150,5 +150,5 @@ rejected.
150 >>> bin.process()150 >>> bin.process()
151 >>> bin.is_rejected151 >>> bin.is_rejected
152 True152 True
153 >>> print bin.rejection_message153 >>> print(bin.rejection_message)
154 Orphaned debug packages: not-debug-bin-dbgsym 1.0-1 (i386)154 Orphaned debug packages: not-debug-bin-dbgsym 1.0-1 (i386)
diff --git a/lib/lp/archiveuploader/tests/nascentupload-epoch-handling.txt b/lib/lp/archiveuploader/tests/nascentupload-epoch-handling.txt
index 1ba7b85..45190aa 100644
--- a/lib/lp/archiveuploader/tests/nascentupload-epoch-handling.txt
+++ b/lib/lp/archiveuploader/tests/nascentupload-epoch-handling.txt
@@ -17,7 +17,7 @@ pocket.
17 >>> ubuntu = getUtility(IDistributionSet)['ubuntu']17 >>> ubuntu = getUtility(IDistributionSet)['ubuntu']
18 >>> hoary = ubuntu.getSeries('hoary')18 >>> hoary = ubuntu.getSeries('hoary')
1919
20 >>> print hoary.status.name20 >>> print(hoary.status.name)
21 DEVELOPMENT21 DEVELOPMENT
2222
2323
@@ -68,7 +68,7 @@ Upload 'epoched' bar version:
68 >>> bar_src_upload = getUploadForSource(68 >>> bar_src_upload = getUploadForSource(
69 ... 'suite/bar_1.0-1_epoched/bar_1.0-1_source.changes')69 ... 'suite/bar_1.0-1_epoched/bar_1.0-1_source.changes')
70 >>> bar_src_upload.process()70 >>> bar_src_upload.process()
71 >>> print bar_src_upload.rejection_message71 >>> print(bar_src_upload.rejection_message)
72 File bar_1.0-1.diff.gz already exists in Primary Archive for Ubuntu72 File bar_1.0-1.diff.gz already exists in Primary Archive for Ubuntu
73 Linux, but uploaded version has different contents. See more73 Linux, but uploaded version has different contents. See more
74 information about this error in74 information about this error in
diff --git a/lib/lp/archiveuploader/tests/nascentupload-packageset.txt b/lib/lp/archiveuploader/tests/nascentupload-packageset.txt
index a3b7b62..6ad0c8f 100644
--- a/lib/lp/archiveuploader/tests/nascentupload-packageset.txt
+++ b/lib/lp/archiveuploader/tests/nascentupload-packageset.txt
@@ -40,7 +40,7 @@ This time the upload will fail because the ACLs don't let
40 >>> bar_failed.process()40 >>> bar_failed.process()
41 >>> bar_failed.is_rejected41 >>> bar_failed.is_rejected
42 True42 True
43 >>> print bar_failed.rejection_message43 >>> print(bar_failed.rejection_message)
44 The signer of this package has no upload rights to this distribution's44 The signer of this package has no upload rights to this distribution's
45 primary archive. Did you mean to upload to a PPA?45 primary archive. Did you mean to upload to a PPA?
4646
@@ -112,7 +112,7 @@ Let's retry the upload.
112 >>> bar_failed.process()112 >>> bar_failed.process()
113 >>> bar_failed.is_rejected113 >>> bar_failed.is_rejected
114 True114 True
115 >>> print bar_failed.rejection_message115 >>> print(bar_failed.rejection_message)
116 The signer of this package is lacking the upload rights for the source116 The signer of this package is lacking the upload rights for the source
117 package, component or package set in question.117 package, component or package set in question.
118118
@@ -135,7 +135,7 @@ Add 'bar' to the 'foo' package set.
135Now 'bar' is included by the 'foo' package set.135Now 'bar' is included by the 'foo' package set.
136136
137 >>> [ps] = ps_set.setsIncludingSource('bar', direct_inclusion=True)137 >>> [ps] = ps_set.setsIncludingSource('bar', direct_inclusion=True)
138 >>> print ps.name138 >>> print(ps.name)
139 foo-pkg-set139 foo-pkg-set
140140
141name16 has no package set based upload privileges for 'bar' yet.141name16 has no package set based upload privileges for 'bar' yet.
@@ -169,5 +169,5 @@ With the authorization above the upload should work again.
169 >>> bar2.is_rejected169 >>> bar2.is_rejected
170 False170 False
171171
172 >>> print bar2.rejection_message172 >>> print(bar2.rejection_message)
173173
diff --git a/lib/lp/archiveuploader/tests/nascentupload.txt b/lib/lp/archiveuploader/tests/nascentupload.txt
index 37f6836..20fb5f1 100644
--- a/lib/lp/archiveuploader/tests/nascentupload.txt
+++ b/lib/lp/archiveuploader/tests/nascentupload.txt
@@ -60,7 +60,7 @@ on that.
60 lp.archiveuploader.nascentupload.EarlyReturnUploadError: An error occurred that prevented further processing.60 lp.archiveuploader.nascentupload.EarlyReturnUploadError: An error occurred that prevented further processing.
61 >>> nonexistent.is_rejected61 >>> nonexistent.is_rejected
62 True62 True
63 >>> print nonexistent.rejection_message63 >>> print(nonexistent.rejection_message)
64 Unable to read DOES-NOT-EXIST: ...64 Unable to read DOES-NOT-EXIST: ...
6565
66 >>> quodlibet = NascentUpload.from_changesfile_path(66 >>> quodlibet = NascentUpload.from_changesfile_path(
@@ -68,7 +68,7 @@ on that.
68 ... anything_policy, DevNullLogger())68 ... anything_policy, DevNullLogger())
69 >>> quodlibet.process()69 >>> quodlibet.process()
70 >>> for f in quodlibet.changes.files:70 >>> for f in quodlibet.changes.files:
71 ... print f.filename, f71 ... print(f.filename, f)
72 quodlibet_0.13.1-1_all.deb <...DebBinaryUploadFile...>72 quodlibet_0.13.1-1_all.deb <...DebBinaryUploadFile...>
73 quodlibet-ext_0.13.1-1_i386.deb <...DebBinaryUploadFile...>73 quodlibet-ext_0.13.1-1_i386.deb <...DebBinaryUploadFile...>
7474
@@ -119,7 +119,7 @@ is 'native' (only a TARBALL, no diff + orig) or 'has_orig' (uses ORIG
119119
120 >>> ed_source_upload.process()120 >>> ed_source_upload.process()
121 >>> for f in ed_source_upload.changes.files:121 >>> for f in ed_source_upload.changes.files:
122 ... print f.filename, f122 ... print(f.filename, f)
123 ed_0.2-20.dsc <...DSCFile...>123 ed_0.2-20.dsc <...DSCFile...>
124 ed_0.2-20.diff.gz <...SourceUploadFile...>124 ed_0.2-20.diff.gz <...SourceUploadFile...>
125 ed_0.2.orig.tar.gz <...SourceUploadFile...>125 ed_0.2.orig.tar.gz <...SourceUploadFile...>
@@ -129,7 +129,7 @@ try and parse the maintainer for it:
129129
130 >>> ed_source_upload.changes.signer is None130 >>> ed_source_upload.changes.signer is None
131 True131 True
132 >>> print ed_source_upload.changes.maintainer132 >>> print(ed_source_upload.changes.maintainer)
133 None133 None
134134
135ed_source upload is *sourceful*:135ed_source upload is *sourceful*:
@@ -177,7 +177,7 @@ Let's try a simple binary upload:
177177
178 >>> ed_binary_upload.process()178 >>> ed_binary_upload.process()
179 >>> for f in ed_binary_upload.changes.files:179 >>> for f in ed_binary_upload.changes.files:
180 ... print f.filename, f180 ... print(f.filename, f)
181 ed_0.2-20_i386.deb <...DebBinaryUploadFile...>181 ed_0.2-20_i386.deb <...DebBinaryUploadFile...>
182182
183ed_binary is *binaryful*:183ed_binary is *binaryful*:
@@ -209,7 +209,7 @@ parse the maintainer for them either:
209209
210 >>> ed_binary_upload.changes.signer is None210 >>> ed_binary_upload.changes.signer is None
211 True211 True
212 >>> print ed_binary_upload.changes.maintainer212 >>> print(ed_binary_upload.changes.maintainer)
213 None213 None
214214
215Other ChangesFile information are also checked across the uploads215Other ChangesFile information are also checked across the uploads
@@ -228,7 +228,7 @@ should match the files target architectures:
228 >>> ed_mismatched_upload.process()228 >>> ed_mismatched_upload.process()
229229
230 >>> for f in ed_mismatched_upload.changes.files:230 >>> for f in ed_mismatched_upload.changes.files:
231 ... print f.filename, f231 ... print(f.filename, f)
232 ed_0.2-20_i386.deb <...DebBinaryUploadFile...>232 ed_0.2-20_i386.deb <...DebBinaryUploadFile...>
233233
234 >>> for a in ed_mismatched_upload.changes.architectures:234 >>> for a in ed_mismatched_upload.changes.architectures:
@@ -238,7 +238,7 @@ should match the files target architectures:
238Since the changesfile specify that only 'amd64' will be used and238Since the changesfile specify that only 'amd64' will be used and
239there is a file that depends on 'i386' the upload is rejected:239there is a file that depends on 'i386' the upload is rejected:
240240
241 >>> print ed_mismatched_upload.rejection_message241 >>> print(ed_mismatched_upload.rejection_message)
242 ed_0.2-20_i386.deb: control file lists arch as 'i386' which isn't in the242 ed_0.2-20_i386.deb: control file lists arch as 'i386' which isn't in the
243 changes file.243 changes file.
244244
@@ -331,7 +331,7 @@ Retrive the just-inserted SourcePackageRelease correspondent to 'ed'
331Check if we have rebuid the change's author line properly (as331Check if we have rebuid the change's author line properly (as
332mentioned in bug # 30621)332mentioned in bug # 30621)
333333
334 >>> print ed_spr.changelog_entry #doctest: -NORMALIZE_WHITESPACE334 >>> print(ed_spr.changelog_entry) #doctest: -NORMALIZE_WHITESPACE
335 ed (0.2-20) unstable; urgency=low335 ed (0.2-20) unstable; urgency=low
336 <BLANKLINE>336 <BLANKLINE>
337 * Move to dpatch; existing non-debian/ changes split into337 * Move to dpatch; existing non-debian/ changes split into
@@ -383,7 +383,7 @@ The content of 'debian/copyright' is stored as the 'copyright'
383attribute of SourcePackageRelease (note that its content is filtered383attribute of SourcePackageRelease (note that its content is filtered
384with encoding.guess()).384with encoding.guess()).
385385
386 >>> print ed_spr.copyright386 >>> print(ed_spr.copyright)
387 This is Debian GNU's prepackaged version of the FSF's GNU ed387 This is Debian GNU's prepackaged version of the FSF's GNU ed
388 ...388 ...
389 by the Foundation.389 by the Foundation.
@@ -420,7 +420,7 @@ On the absence of debian/copyright a warning is issued in the upload
420processing log messages, then it can be further checked in Soyuz420processing log messages, then it can be further checked in Soyuz
421production mailbox.421production mailbox.
422422
423 >>> print nocopyright_src.warning_message423 >>> print(nocopyright_src.warning_message)
424 <BLANKLINE>424 <BLANKLINE>
425 Upload Warnings:425 Upload Warnings:
426 No copyright file found.426 No copyright file found.
@@ -484,7 +484,7 @@ The upload will be rejected.
484 >>> ed_src_dup.is_rejected484 >>> ed_src_dup.is_rejected
485 True485 True
486486
487 >>> print ed_src_dup.rejection_message487 >>> print(ed_src_dup.rejection_message)
488 The source ed - 0.2-20 is already accepted in ubuntu/hoary and you488 The source ed - 0.2-20 is already accepted in ubuntu/hoary and you
489 cannot upload the same version within the same distribution. You489 cannot upload the same version within the same distribution. You
490 have to modify the source version and re-upload.490 have to modify the source version and re-upload.
@@ -652,14 +652,14 @@ overridden by the changesfile:
652652
653 >>> success = ed_src.do_accept()653 >>> success = ed_src.do_accept()
654654
655 >>> print ed_src.queue_root.pocket.name655 >>> print(ed_src.queue_root.pocket.name)
656 UPDATES656 UPDATES
657657
658Even though this went to a pocket and thus would be unapproved rather658Even though this went to a pocket and thus would be unapproved rather
659than accepted, the ed upload ought still make it to NEW instead of659than accepted, the ed upload ought still make it to NEW instead of
660unapproved.660unapproved.
661661
662 >>> print ed_src.queue_root.status.name662 >>> print(ed_src.queue_root.status.name)
663 NEW663 NEW
664664
665And pop it back to development now that we're done665And pop it back to development now that we're done
@@ -676,7 +676,7 @@ Check the uploader behaviour against a missing orig.tar.gz file,
676 >>> ed21_src.process()676 >>> ed21_src.process()
677 >>> ed21_src.is_rejected677 >>> ed21_src.is_rejected
678 True678 True
679 >>> print ed21_src.rejection_message+"\nEND"679 >>> print(ed21_src.rejection_message+"\nEND")
680 Unable to find ed_0.2.orig.tar.gz in upload or distribution.680 Unable to find ed_0.2.orig.tar.gz in upload or distribution.
681 Files specified in DSC are broken or missing, skipping package unpack681 Files specified in DSC are broken or missing, skipping package unpack
682 verification.682 verification.
@@ -762,15 +762,15 @@ record is a placeholder one, we used the second key):
762762
763 >>> name16 = getUtility(IPersonSet).getByName('name16')763 >>> name16 = getUtility(IPersonSet).getByName('name16')
764 >>> uploader_key = name16.gpg_keys[1]764 >>> uploader_key = name16.gpg_keys[1]
765 >>> print uploader_key.fingerprint765 >>> print(uploader_key.fingerprint)
766 340CA3BB270E2716C9EE0B768E7EB7086C64A8C5766 340CA3BB270E2716C9EE0B768E7EB7086C64A8C5
767767
768Both, DSC and changesfile are signed with Name16's second key.768Both, DSC and changesfile are signed with Name16's second key.
769769
770 >>> print bar_ok.changes.dsc.signingkey.fingerprint770 >>> print(bar_ok.changes.dsc.signingkey.fingerprint)
771 340CA3BB270E2716C9EE0B768E7EB7086C64A8C5771 340CA3BB270E2716C9EE0B768E7EB7086C64A8C5
772772
773 >>> print bar_ok.changes.signingkey.fingerprint773 >>> print(bar_ok.changes.signingkey.fingerprint)
774 340CA3BB270E2716C9EE0B768E7EB7086C64A8C5774 340CA3BB270E2716C9EE0B768E7EB7086C64A8C5
775775
776Let's modify the current ACL rules for ubuntu, moving the upload776Let's modify the current ACL rules for ubuntu, moving the upload
@@ -795,7 +795,7 @@ This time the upload will fail because the ACLs don't let
795 >>> bar_failed.process()795 >>> bar_failed.process()
796 >>> bar_failed.is_rejected796 >>> bar_failed.is_rejected
797 True797 True
798 >>> print bar_failed.rejection_message798 >>> print(bar_failed.rejection_message)
799 The signer of this package has no upload rights to this distribution's799 The signer of this package has no upload rights to this distribution's
800 primary archive. Did you mean to upload to a PPA?800 primary archive. Did you mean to upload to a PPA?
801801
@@ -808,10 +808,10 @@ for further checks:
808 >>> verifyObject(IGPGKey, bar_failed.changes.signingkey)808 >>> verifyObject(IGPGKey, bar_failed.changes.signingkey)
809 True809 True
810810
811 >>> print bar_failed.changes.dsc.signingkey.fingerprint811 >>> print(bar_failed.changes.dsc.signingkey.fingerprint)
812 340CA3BB270E2716C9EE0B768E7EB7086C64A8C5812 340CA3BB270E2716C9EE0B768E7EB7086C64A8C5
813813
814 >>> print bar_failed.changes.signingkey.fingerprint814 >>> print(bar_failed.changes.signingkey.fingerprint)
815 340CA3BB270E2716C9EE0B768E7EB7086C64A8C5815 340CA3BB270E2716C9EE0B768E7EB7086C64A8C5
816816
817The ACL rules also enable us to specify that a user has a817The ACL rules also enable us to specify that a user has a
@@ -840,7 +840,7 @@ Now try the "bar" upload:
840 >>> bar2.is_rejected840 >>> bar2.is_rejected
841 False841 False
842842
843 >>> print bar2.rejection_message843 >>> print(bar2.rejection_message)
844844
845845
846Uploads to copy archives846Uploads to copy archives
diff --git a/lib/lp/archiveuploader/tests/nascentuploadfile.txt b/lib/lp/archiveuploader/tests/nascentuploadfile.txt
index 85a2ac7..7af20da 100644
--- a/lib/lp/archiveuploader/tests/nascentuploadfile.txt
+++ b/lib/lp/archiveuploader/tests/nascentuploadfile.txt
@@ -126,7 +126,7 @@ we can deal with the errors later:
126At this point we can inspect the list of files contained in the upload.126At this point we can inspect the list of files contained in the upload.
127127
128 >>> for uploaded_file in ed_binary_changes.files:128 >>> for uploaded_file in ed_binary_changes.files:
129 ... print uploaded_file.filename129 ... print(uploaded_file.filename)
130 ed_0.2-20_i386.deb130 ed_0.2-20_i386.deb
131131
132 >>> for f in ed_binary_changes.binary_package_files:132 >>> for f in ed_binary_changes.binary_package_files:
@@ -181,14 +181,14 @@ regexp, even though it isn't actually a source file:
181181
182 >>> from lp.archiveuploader.utils import re_issource182 >>> from lp.archiveuploader.utils import re_issource
183 >>> src_match = re_issource.match('dist-upgrader_1.0.tar.gz')183 >>> src_match = re_issource.match('dist-upgrader_1.0.tar.gz')
184 >>> src_match.group(0)184 >>> print(src_match.group(0))
185 'dist-upgrader_1.0.tar.gz'185 dist-upgrader_1.0.tar.gz
186 >>> src_match.group(1)186 >>> print(src_match.group(1))
187 'dist-upgrader'187 dist-upgrader
188 >>> src_match.group(2)188 >>> print(src_match.group(2))
189 '1.0'189 1.0
190 >>> src_match.group(3)190 >>> print(src_match.group(3))
191 'tar.gz'191 tar.gz
192192
193That's why we recognize them by identifying a set of custom sections:193That's why we recognize them by identifying a set of custom sections:
194194
@@ -444,7 +444,7 @@ Sub-DSCFiles are DSCUploadedFile objects.
444We can also inspect the list of files declared in this DSC:444We can also inspect the list of files declared in this DSC:
445445
446 >>> for dsc_file in ed_source_dsc.files:446 >>> for dsc_file in ed_source_dsc.files:
447 ... print dsc_file.filename447 ... print(dsc_file.filename)
448 ed_0.2.orig.tar.gz448 ed_0.2.orig.tar.gz
449 ed_0.2-20.diff.gz449 ed_0.2-20.diff.gz
450450
@@ -514,7 +514,7 @@ being too new:
514 ... 'main/editors', 'important', 'foo', '1.2', ed_binary_changes,514 ... 'main/editors', 'important', 'foo', '1.2', ed_binary_changes,
515 ... old_only_policy, DevNullLogger())515 ... old_only_policy, DevNullLogger())
516 >>> list(ed_binary_deb.verifyDebTimestamp())516 >>> list(ed_binary_deb.verifyDebTimestamp())
517 [UploadError('ed_0.2-20_i386.deb:517 [UploadError(...'ed_0.2-20_i386.deb:
518 has 26 file(s) with a time stamp too far into the future518 has 26 file(s) with a time stamp too far into the future
519 (e.g. control [Thu Jan 3 19:29:01 2008]).',)]519 (e.g. control [Thu Jan 3 19:29:01 2008]).',)]
520520
@@ -529,6 +529,6 @@ being too new:
529 ... 'main/editors', 'important', 'foo', '1.2', ed_binary_changes,529 ... 'main/editors', 'important', 'foo', '1.2', ed_binary_changes,
530 ... new_only_policy, DevNullLogger())530 ... new_only_policy, DevNullLogger())
531 >>> list(ed_binary_deb.verify())531 >>> list(ed_binary_deb.verify())
532 [UploadError('ed_0.2-20_i386.deb:532 [UploadError(...'ed_0.2-20_i386.deb:
533 has 26 file(s) with a time stamp too far in the past533 has 26 file(s) with a time stamp too far in the past
534 (e.g. control [Thu Jan 3 19:29:01 2008]).',)]534 (e.g. control [Thu Jan 3 19:29:01 2008]).',)]
diff --git a/lib/lp/archiveuploader/tests/static-translations.txt b/lib/lp/archiveuploader/tests/static-translations.txt
index a6e9ef2..52b7a25 100644
--- a/lib/lp/archiveuploader/tests/static-translations.txt
+++ b/lib/lp/archiveuploader/tests/static-translations.txt
@@ -14,7 +14,7 @@ PackageUploadCustomFormat.STATIC_TRANSLATIONS.
14 ... filepath="", checksums={}, size=1, priority_name="", policy=None,14 ... filepath="", checksums={}, size=1, priority_name="", policy=None,
15 ... component_and_section="main/raw-translations-static", logger=None)15 ... component_and_section="main/raw-translations-static", logger=None)
1616
17 >>> print custom_upload_file.custom_type.name17 >>> print(custom_upload_file.custom_type.name)
18 STATIC_TRANSLATIONS18 STATIC_TRANSLATIONS
1919
20Static translations tarballs are not published, they only exist in the20Static translations tarballs are not published, they only exist in the
diff --git a/lib/lp/archiveuploader/tests/test_nascentupload_documentation.py b/lib/lp/archiveuploader/tests/test_nascentupload_documentation.py
index 646d7b4..bc18b56 100644
--- a/lib/lp/archiveuploader/tests/test_nascentupload_documentation.py
+++ b/lib/lp/archiveuploader/tests/test_nascentupload_documentation.py
@@ -65,7 +65,7 @@ def testGlobalsSetup(test):
65 We can use the getUpload* without unnecessary imports.65 We can use the getUpload* without unnecessary imports.
66 """66 """
67 import_public_test_keys()67 import_public_test_keys()
68 setGlobs(test)68 setGlobs(test, future=True)
69 test.globs['getUploadForSource'] = getUploadForSource69 test.globs['getUploadForSource'] = getUploadForSource
70 test.globs['getUploadForBinary'] = getUploadForBinary70 test.globs['getUploadForBinary'] = getUploadForBinary
71 test.globs['getPPAUploadForSource'] = getPPAUploadForSource71 test.globs['getPPAUploadForSource'] = getPPAUploadForSource
diff --git a/lib/lp/archiveuploader/tests/upload-path-parsing.txt b/lib/lp/archiveuploader/tests/upload-path-parsing.txt
index 17e8ba9..ea7666e 100644
--- a/lib/lp/archiveuploader/tests/upload-path-parsing.txt
+++ b/lib/lp/archiveuploader/tests/upload-path-parsing.txt
@@ -14,9 +14,9 @@ in several scenarios.
14 >>> def check_upload(relative_path):14 >>> def check_upload(relative_path):
15 ... (distribution, suite_name, archive) = parse_upload_path(15 ... (distribution, suite_name, archive) = parse_upload_path(
16 ... relative_path)16 ... relative_path)
17 ... print 'Archive: %s' % archive.name17 ... print('Archive: %s' % archive.name)
18 ... print 'Distribution: %s' % distribution.name18 ... print('Distribution: %s' % distribution.name)
19 ... print 'Suite: %s' % suite_name19 ... print('Suite: %s' % suite_name)
2020
2121
22== Distribution uploads ==22== Distribution uploads ==

Subscribers

People subscribed via source and target branches

to status/vote changes: