launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #26224
[Merge] ~cjwatson/launchpad:py3-soyuz-doctest-unicode-strings into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:py3-soyuz-doctest-unicode-strings into launchpad:master.
Commit message:
lp.soyuz: Fix u'...' doctest examples for Python 3
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/397522
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-soyuz-doctest-unicode-strings into launchpad:master.
diff --git a/lib/lp/soyuz/browser/tests/binarypackagerelease-views.txt b/lib/lp/soyuz/browser/tests/binarypackagerelease-views.txt
index a5b1c45..71a6416 100644
--- a/lib/lp/soyuz/browser/tests/binarypackagerelease-views.txt
+++ b/lib/lp/soyuz/browser/tests/binarypackagerelease-views.txt
@@ -5,10 +5,10 @@
>>> from lp.soyuz.model.binarypackagerelease import BinaryPackageRelease
>>> pmount_bin = BinaryPackageRelease.get(15)
- >>> pmount_bin.name
- u'pmount'
- >>> pmount_bin.version
- u'0.1-1'
+ >>> print(pmount_bin.name)
+ pmount
+ >>> print(pmount_bin.version)
+ 0.1-1
Get a "mock" request:
>>> mock_form = {}
@@ -46,9 +46,9 @@ question. In this case 'url' will be None, which indicates no link
should be rendered for this dependency.
>>> for dep in pmount_deps:
- ... dep.name, dep.operator, dep.version, dep.url
- (u'at', u'>=', u'3.14156', u'http://launchpad.test/ubuntu/hoary/i386/at')
- (u'linux-2.6.12', None, u'', u'http://launchpad.test/ubuntu/hoary/i386/linux-2.6.12')
- (u'tramp-package', None, u'', None)
+ ... print(pretty((dep.name, dep.operator, dep.version, dep.url)))
+ ('at', '>=', '3.14156', 'http://launchpad.test/ubuntu/hoary/i386/at')
+ ('linux-2.6.12', None, '', 'http://launchpad.test/ubuntu/hoary/i386/linux-2.6.12')
+ ('tramp-package', None, '', None)
Other relationship groups use the same mechanism.
diff --git a/lib/lp/soyuz/browser/tests/distribution-views.txt b/lib/lp/soyuz/browser/tests/distribution-views.txt
index 9fb4efc..c6eff7f 100644
--- a/lib/lp/soyuz/browser/tests/distribution-views.txt
+++ b/lib/lp/soyuz/browser/tests/distribution-views.txt
@@ -192,12 +192,14 @@ The DistributionPackageSearchView also has a helper property to
help templates print the list of distroseries that an exactly-matched
package is available in:
- >>> distro_pkg_search_view.distroseries_names
- {u'mozilla-firefox': u'warty'}
+ >>> for key, value in distro_pkg_search_view.distroseries_names.items():
+ ... print('%s: %s' % (key, value))
+ mozilla-firefox: warty
>>> distro_pkg_search_view = create_initialized_view(
... ubuntu, name="+search", form={'text': 'mozilla-firefox'})
- >>> distro_pkg_search_view.distroseries_names
- {u'mozilla-firefox': u'warty'}
+ >>> for key, value in distro_pkg_search_view.distroseries_names.items():
+ ... print('%s: %s' % (key, value))
+ mozilla-firefox: warty
Another helper on the DistributionPackageSearchView is the
matching_binary_names property which can be used by templates to get
@@ -206,8 +208,9 @@ package:
>>> distro_pkg_search_view = create_initialized_view(
... ubuntu, name="+search", form={'text': 'moz'})
- >>> distro_pkg_search_view.matching_binary_names
- {u'mozilla-firefox': u'mozilla-firefox, mozilla-firefox-data'}
+ >>> for key, value in distro_pkg_search_view.matching_binary_names.items():
+ ... print('%s: %s' % (key, value))
+ mozilla-firefox: mozilla-firefox, mozilla-firefox-data
The matching_binary_names property uses a protected helper method
'_listFirstFiveMatchingNames' which ensures only the first five matching
diff --git a/lib/lp/soyuz/browser/tests/distributionsourcepackagerelease-views.txt b/lib/lp/soyuz/browser/tests/distributionsourcepackagerelease-views.txt
index 99f425f..852e351 100644
--- a/lib/lp/soyuz/browser/tests/distributionsourcepackagerelease-views.txt
+++ b/lib/lp/soyuz/browser/tests/distributionsourcepackagerelease-views.txt
@@ -20,8 +20,8 @@ simply mimics the `DistributionSourcePackageRelease.title`.
>>> print(dspr.title)
testing-dspr 1.0 source package in ubuntutest
- >>> dspr_view.page_title
- u'testing-dspr 1.0 source package in ubuntutest'
+ >>> print(dspr_view.page_title)
+ testing-dspr 1.0 source package in ubuntutest
The 'files' property returns a list of files included in the source
upload encapsulated as `ProxiedSourceLibraryFileAlias` objects. Their
diff --git a/lib/lp/soyuz/browser/tests/publishing-views.txt b/lib/lp/soyuz/browser/tests/publishing-views.txt
index 536486a..549d8ba 100644
--- a/lib/lp/soyuz/browser/tests/publishing-views.txt
+++ b/lib/lp/soyuz/browser/tests/publishing-views.txt
@@ -35,8 +35,8 @@ the view property returns 'None provided.'
True
>>> print(view.context.removal_comment)
None
- >>> view.removal_comment
- u'None provided.'
+ >>> print(view.removal_comment)
+ None provided.
Otherwise the removal comment will be returned
@@ -62,11 +62,11 @@ for each file related with the alsa-utils source publication in ubuntu.
>>> view = create_initialized_view(alsa_pub, "+listing-archive-detailed")
- >>> view.published_source_and_binary_files
- [{'url': u'http://launchpad.test/ubuntutest/+archive/primary/+sourcefiles/alsa-utils-test/666/alsa-utils-test_666.dsc',
- 'class': 'source',
- 'filesize': 28,
- 'filename': u'alsa-utils-test_666.dsc'}]
+ >>> print(pretty(view.published_source_and_binary_files))
+ [{'class': 'source',
+ 'filename': 'alsa-utils-test_666.dsc',
+ 'filesize': 28,
+ 'url': 'http://launchpad.test/ubuntutest/+archive/primary/+sourcefiles/alsa-utils-test/666/alsa-utils-test_666.dsc'}]
'iceweasel' source in Celso's PPA contains binary files that can be
inspected.
@@ -80,19 +80,19 @@ inspected.
>>> ppa_source_view = create_initialized_view(
... iceweasel_source_pub, "+listing-archive-detailed")
- >>> ppa_source_view.published_source_and_binary_files
- [{'url': u'http://launchpad.test/~cprov/+archive/ubuntu/ppa/+sourcefiles/iceweasel/1.0/firefox_0.9.2.orig.tar.gz',
- 'class': 'source',
+ >>> print(pretty(ppa_source_view.published_source_and_binary_files))
+ [{'class': 'source',
+ 'filename': 'firefox_0.9.2.orig.tar.gz',
'filesize': 9922560,
- 'filename': u'firefox_0.9.2.orig.tar.gz'},
- {'url': u'http://launchpad.test/~cprov/+archive/ubuntu/ppa/+sourcefiles/iceweasel/1.0/iceweasel-1.0.dsc',
- 'class': 'source',
+ 'url': 'http://launchpad.test/~cprov/+archive/ubuntu/ppa/+sourcefiles/iceweasel/1.0/firefox_0.9.2.orig.tar.gz'},
+ {'class': 'source',
+ 'filename': 'iceweasel-1.0.dsc',
'filesize': 123,
- 'filename': u'iceweasel-1.0.dsc'},
- {'url': u'http://launchpad.test/~cprov/+archive/ubuntu/ppa/+files/mozilla-firefox_0.9_i386.deb',
- 'class': 'binary',
+ 'url': 'http://launchpad.test/~cprov/+archive/ubuntu/ppa/+sourcefiles/iceweasel/1.0/iceweasel-1.0.dsc'},
+ {'class': 'binary',
+ 'filename': 'mozilla-firefox_0.9_i386.deb',
'filesize': 3,
- 'filename': u'mozilla-firefox_0.9_i386.deb'}]
+ 'url': 'http://launchpad.test/~cprov/+archive/ubuntu/ppa/+files/mozilla-firefox_0.9_i386.deb'}]
Yet using SourcePackagePublishingView classes we can verify how it
allows the template to find out if it is a source or a binary
diff --git a/lib/lp/soyuz/browser/tests/sourcepackage-views.txt b/lib/lp/soyuz/browser/tests/sourcepackage-views.txt
index d7a45d0..398630a 100644
--- a/lib/lp/soyuz/browser/tests/sourcepackage-views.txt
+++ b/lib/lp/soyuz/browser/tests/sourcepackage-views.txt
@@ -39,8 +39,8 @@ Each pocket should only contain packages marked as PUBLISHED.
>>> for pub in pmount_view.published_by_pocket():
... pkg_versions = [
... (p['spr'].version, p['component_name']) for p in pub['packages']]
- ... print(pub['pocketdetails'].title, sorted(pkg_versions))
- Release [(u'0.1-2', u'main')]
+ ... print(pub['pocketdetails'].title, pretty(sorted(pkg_versions)))
+ Release [('0.1-2', 'main')]
Security []
Updates []
Proposed []
@@ -62,9 +62,9 @@ architecture independent and we don't know at this point, that's why we
have only on binary.
>>> for bin_name, archs in firefox_view.binaries().items():
- ... print(bin_name, archs)
- mozilla-firefox [u'hppa', u'i386']
- mozilla-firefox-data [u'hppa', u'i386']
+ ... print(bin_name, pretty(archs))
+ mozilla-firefox ['hppa', 'i386']
+ mozilla-firefox-data ['hppa', 'i386']
Check the formatted dependency lines provided by the view class, they
return a IPackageRelationshipSet object (see package-relationship.txt).
@@ -77,13 +77,13 @@ return a IPackageRelationshipSet object (see package-relationship.txt).
True
>>> for dep in firefox_parsed_depends:
- ... dep.name, dep.operator, dep.version, dep.url
- (u'gcc-3.4', u'>=', u'3.4.1-4sarge1', None)
- (u'gcc-3.4', u'<<', u'3.4.2', None)
- (u'gcc-3.4-base', None, u'', None)
- (u'libc6', u'>=', u'2.3.2.ds1-4', None)
- (u'libstdc++6-dev', u'>=', u'3.4.1-4sarge1', None)
- (u'pmount', None, u'', u'http://launchpad.test/ubuntu/warty/+package/pmount')
+ ... print(pretty((dep.name, dep.operator, dep.version, dep.url)))
+ ('gcc-3.4', '>=', '3.4.1-4sarge1', None)
+ ('gcc-3.4', '<<', '3.4.2', None)
+ ('gcc-3.4-base', None, '', None)
+ ('libc6', '>=', '2.3.2.ds1-4', None)
+ ('libstdc++6-dev', '>=', '3.4.1-4sarge1', None)
+ ('pmount', None, '', 'http://launchpad.test/ubuntu/warty/+package/pmount')
>>> firefox_parsed_dependsindep = firefox_view.builddependsindep
@@ -92,11 +92,11 @@ return a IPackageRelationshipSet object (see package-relationship.txt).
True
>>> for dep in firefox_parsed_dependsindep:
- ... dep.name, dep.operator, dep.version, dep.url
- (u'bacula-common', u'=', u'1.34.6-2', None)
- (u'bacula-director-common', u'=', u'1.34.6-2', None)
- (u'pmount', None, u'', u'http://launchpad.test/ubuntu/warty/+package/pmount')
- (u'postgresql-client', u'>=', u'7.4', None)
+ ... print(pretty((dep.name, dep.operator, dep.version, dep.url)))
+ ('bacula-common', '=', '1.34.6-2', None)
+ ('bacula-director-common', '=', '1.34.6-2', None)
+ ('pmount', None, '', 'http://launchpad.test/ubuntu/warty/+package/pmount')
+ ('postgresql-client', '>=', '7.4', None)
Ensure we have fixed bug 31039, by properly escape the
sourcepackagename before passing to regexp.
diff --git a/lib/lp/soyuz/doc/archive.txt b/lib/lp/soyuz/doc/archive.txt
index 5081248..4e7d2bd 100644
--- a/lib/lp/soyuz/doc/archive.txt
+++ b/lib/lp/soyuz/doc/archive.txt
@@ -107,8 +107,10 @@ Useful properties:
Inquire what Distribution Series this archive has published sources to:
- >>> [s.name for s in cprov_archive.series_with_sources]
- [u'breezy-autotest', u'warty']
+ >>> for s in cprov_archive.series_with_sources:
+ ... print(s.name)
+ breezy-autotest
+ warty
'purpose' is a read-only attribute, it can't and shouldn't be modified
once a IArchive is created. Changing those values would affect the way
@@ -172,7 +174,7 @@ We will create a COPY archive and modify its name.
>>> ubuntu = getUtility(IDistributionSet)['ubuntu']
>>> rebuild_owner = factory.makePerson(
- ... name='juergen', displayname=u'J\xc3\xbcrgen')
+ ... name='juergen', displayname=u'J\xfcrgen')
>>> rebuild_archive = getUtility(IArchiveSet).new(
... owner=rebuild_owner, purpose=ArchivePurpose.COPY,
... distribution=ubuntu, name='editable-rebuild',
@@ -211,8 +213,8 @@ Valid names work as expected.
Please note that copy archive displayname doesn't follow the name change.
- >>> rebuild_archive.displayname
- u'Copy archive editable-rebuild for J\xc3\xbcrgen'
+ >>> print(backslashreplace(rebuild_archive.displayname))
+ Copy archive editable-rebuild for J\xfcrgen
The "is_copy" property allows us to ask an archive whether it's a copy
archive.
@@ -688,14 +690,14 @@ This method can return build records for sources matching the given
>>> cd_lookup = cprov_archive.getBuildRecords(name=u'cd')
>>> cd_lookup.count()
1
- >>> cd_lookup[0].source_package_release.name
- u'cdrkit'
+ >>> print(cd_lookup[0].source_package_release.name)
+ cdrkit
>>> ice_lookup = cprov_archive.getBuildRecords(name=u'ice')
>>> ice_lookup.count()
1
- >>> ice_lookup[0].source_package_release.name
- u'iceweasel'
+ >>> print(ice_lookup[0].source_package_release.name)
+ iceweasel
>>> cprov_archive.getBuildRecords(name=u'foo').count()
0
@@ -1003,8 +1005,8 @@ corresponds to what we state in our policy, 2048 MiB:
An archive is also associated with a distribution. This can be found on
the distribution property. The default distribution is "ubuntu":
- >>> sandbox_archive.distribution.name
- u'ubuntu'
+ >>> print(sandbox_archive.distribution.name)
+ ubuntu
An Archive can be retrieved via IPerson.archive property:
diff --git a/lib/lp/soyuz/doc/archivepermission.txt b/lib/lp/soyuz/doc/archivepermission.txt
index a59742f..f3219d4 100644
--- a/lib/lp/soyuz/doc/archivepermission.txt
+++ b/lib/lp/soyuz/doc/archivepermission.txt
@@ -96,8 +96,9 @@ team are returned. This allows team-level permissions to be set.
>>> all_main_permissions = permission_set.uploadersForComponent(
... ubuntu.main_archive, main_component)
- >>> [permission.person.name for permission in all_main_permissions]
- [u'ubuntu-team']
+ >>> for permission in all_main_permissions:
+ ... print(permission.person.name)
+ ubuntu-team
>>> permission_set.checkAuthenticated(
... mark, ubuntu.main_archive, ArchivePermissionType.UPLOAD,
diff --git a/lib/lp/soyuz/doc/binarypackagerelease.txt b/lib/lp/soyuz/doc/binarypackagerelease.txt
index 54ee8a0..ecce05d 100644
--- a/lib/lp/soyuz/doc/binarypackagerelease.txt
+++ b/lib/lp/soyuz/doc/binarypackagerelease.txt
@@ -15,16 +15,18 @@ across build records.
Useful properties:
- >>> firefox_bin_release.name, firefox_bin_release.version
- (u'mozilla-firefox', u'0.9')
+ >>> print(firefox_bin_release.name)
+ mozilla-firefox
+ >>> print(firefox_bin_release.version)
+ 0.9
>>> from lp.registry.interfaces.distroseries import IDistroSeriesSet
>>> warty = getUtility(IDistroSeriesSet).get(1)
- >>> warty.name
- u'warty'
+ >>> print(warty.name)
+ warty
>>> hoary = getUtility(IDistroSeriesSet).get(3)
- >>> hoary.name
- u'hoary'
+ >>> print(hoary.name)
+ hoary
The IBinaryPackageNameSet.getNotNewByNames() returns all the
BinaryPackageName records for BinaryPackageReleases that are published
@@ -74,8 +76,10 @@ in ftp-master/queue tool and other scripts.
Display the current firefox component and section:
- >>> firefox_bin_release.component.name, firefox_bin_release.section.name
- (u'main', u'base')
+ >>> print(firefox_bin_release.component.name)
+ main
+ >>> print(firefox_bin_release.section.name)
+ base
Fetch brand new component, section and priority:
@@ -93,17 +97,23 @@ Override the current firefox with new component/section/priority:
Check if it got overridden correctly:
- >>> firefox_bin_release.component.name, firefox_bin_release.section.name, firefox_bin_release.priority.name
- (u'universe', u'mail', 'IMPORTANT')
+ >>> print(firefox_bin_release.component.name)
+ universe
+ >>> print(firefox_bin_release.section.name)
+ mail
+ >>> print(firefox_bin_release.priority.name)
+ IMPORTANT
Override again; ensure that only the changed item actually changes:
>>> new_sec = getUtility(ISectionSet)['net']
>>> firefox_bin_release.override(section=new_sec)
- >>> (firefox_bin_release.component.name,
- ... firefox_bin_release.section.name,
- ... firefox_bin_release.priority.name)
- (u'universe', u'net', 'IMPORTANT')
+ >>> print(firefox_bin_release.component.name)
+ universe
+ >>> print(firefox_bin_release.section.name)
+ net
+ >>> print(firefox_bin_release.priority.name)
+ IMPORTANT
Abort transaction to avoid error propagation of the new attributes:
diff --git a/lib/lp/soyuz/doc/distribution.txt b/lib/lp/soyuz/doc/distribution.txt
index 7852fc8..ea3f8db 100644
--- a/lib/lp/soyuz/doc/distribution.txt
+++ b/lib/lp/soyuz/doc/distribution.txt
@@ -35,11 +35,14 @@ Iteration over all PPAs
getAllPPAs method provides all returns, as the suggests, all PPAs for
the distribution in question:
- >>> [archive.owner.name for archive in ubuntu.getAllPPAs()]
- [u'cprov', u'mark', u'no-priv']
+ >>> for archive in ubuntu.getAllPPAs():
+ ... print(archive.owner.name)
+ cprov
+ mark
+ no-priv
- >>> [archive.owner.name for archive in debian.getAllPPAs()]
- []
+ >>> for archive in debian.getAllPPAs():
+ ... print(archive.owner.name)
Searching PPAs
@@ -65,8 +68,10 @@ There is only one 'active' PPA:
0
>>> result = ubuntu.searchPPAs()
- >>> [archive.owner.name for archive in result]
- [u'cprov', u'mark']
+ >>> for archive in result:
+ ... print(archive.owner.name)
+ cprov
+ mark
PPAs can be reached passing a filter matching (via fti) its description
and its 'contents description' (see package-cache.txt).
@@ -78,34 +83,44 @@ and its 'contents description' (see package-cache.txt).
no-priv: I am not allowed to say, I have no privs.
>>> result = ubuntu.searchPPAs(text=u'friend')
- >>> [archive.owner.name for archive in result]
- [u'cprov']
+ >>> for archive in result:
+ ... print(archive.owner.name)
+ cprov
>>> result = ubuntu.searchPPAs(text=u'oink')
- >>> [archive.owner.name for archive in result]
- []
+ >>> for archive in result:
+ ... print(archive.owner.name)
>>> result = ubuntu.searchPPAs(text=u'packages')
- >>> [archive.owner.name for archive in result]
- [u'cprov', u'mark']
+ >>> for archive in result:
+ ... print(archive.owner.name)
+ cprov
+ mark
>>> result = ubuntu.searchPPAs(text=u'help')
- >>> [archive.owner.name for archive in result]
- [u'cprov', u'mark']
+ >>> for archive in result:
+ ... print(archive.owner.name)
+ cprov
+ mark
Including 'inactive' PPAs:
>>> result = ubuntu.searchPPAs(show_inactive=True)
- >>> [archive.owner.name for archive in result]
- [u'cprov', u'mark', u'no-priv']
+ >>> for archive in result:
+ ... print(archive.owner.name)
+ cprov
+ mark
+ no-priv
>>> result = ubuntu.searchPPAs(text=u'priv', show_inactive=True)
- >>> [archive.owner.name for archive in result]
- [u'no-priv']
+ >>> for archive in result:
+ ... print(archive.owner.name)
+ no-priv
>>> result = ubuntu.searchPPAs(text=u'ubuntu', show_inactive=True)
- >>> [archive.owner.name for archive in result]
- [u'mark']
+ >>> for archive in result:
+ ... print(archive.owner.name)
+ mark
The searchPPAs() method only returns the PPAs of active users.
@@ -114,8 +129,8 @@ The searchPPAs() method only returns the PPAs of active users.
>>> no_priv.setAccountStatus(AccountStatus.SUSPENDED, None, 'spammer!')
>>> result = ubuntu.searchPPAs(text=u'priv', show_inactive=True)
- >>> [archive for archive in result]
- []
+ >>> for archive in result:
+ ... print(archive.owner.name)
>>> no_priv.setAccountStatus(AccountStatus.DEACTIVATED, None, 'oops')
>>> no_priv.setAccountStatus(AccountStatus.ACTIVE, None, 'login')
diff --git a/lib/lp/soyuz/doc/distroarchseries.txt b/lib/lp/soyuz/doc/distroarchseries.txt
index bcc3de1..027ce25 100644
--- a/lib/lp/soyuz/doc/distroarchseries.txt
+++ b/lib/lp/soyuz/doc/distroarchseries.txt
@@ -88,8 +88,8 @@ Check IDARBP provider
>>> verifyObject(IDistroArchSeriesBinaryPackage, pmount_hoary_i386)
True
- >>> pmount_hoary_i386.name
- u'pmount'
+ >>> print(pmount_hoary_i386.name)
+ pmount
Check some properties of DARBP meta class
@@ -109,8 +109,8 @@ Most recent published history row:
>>> IBinaryPackagePublishingHistory.providedBy(bpph)
True
- >>> bpph.section.name
- u'editors'
+ >>> print(bpph.section.name)
+ editors
Perform `post publication` override:
@@ -133,8 +133,10 @@ Perform `post publication` override:
Override information about 'pmount' is pending publication:
- >>> pub_hist[0].status.name, pub_hist[0].section.name
- ('PENDING', u'base')
+ >>> print(pub_hist[0].status.name)
+ PENDING
+ >>> print(pub_hist[0].section.name)
+ base
Supersede current publication:
diff --git a/lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt b/lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt
index 54d8cad..ff8f915 100644
--- a/lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt
+++ b/lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt
@@ -134,25 +134,25 @@ Then, we ensure that grabbing the current release of pmount and the old
release both are sane.
>>> current_release = pmount_hoary_i386.currentrelease
- >>> current_release.version
- u'cr98.34'
+ >>> print(current_release.version)
+ cr98.34
- >>> current_release.name
- u'pmount'
+ >>> print(current_release.name)
+ pmount
>>> old_release = pmount_hoary_i386['0.1-1']
- >>> old_release.version
- u'0.1-1'
+ >>> print(old_release.version)
+ 0.1-1
- >>> old_release.name
- u'pmount'
+ >>> print(old_release.name)
+ pmount
The source package that was used to build the current release is
available in the binary package's distro_source_package attribute.
>>> distro_source_package = firefox_hoary_i386.distro_source_package
- >>> distro_source_package.displayname
- u'mozilla-firefox in Ubuntu'
+ >>> print(distro_source_package.displayname)
+ mozilla-firefox in Ubuntu
If a given binary package doesn't have a current release, then the
distro_source_package attribute should return None.
@@ -171,14 +171,18 @@ Check the publishing record of packages returned by 'currentrelease' and
>>> pe.id == current_release.current_publishing_record.id
True
- >>> (pe.status.title,
- ... pe.distroarchseries.architecturetag)
- ('Published', u'i386')
+ >>> print(pe.status.title)
+ Published
+ >>> print(pe.distroarchseries.architecturetag)
+ i386
>>> old_pubrec = old_release.current_publishing_record
- >>> (old_pubrec.id , old_pubrec.status.title,
- ... old_pubrec.distroarchseries.architecturetag)
- (12, 'Published', u'i386')
+ >>> old_pubrec.id
+ 12
+ >>> print(old_pubrec.status.title)
+ Published
+ >>> print(old_pubrec.distroarchseries.architecturetag)
+ i386
Note that it is only really possible to have two packages in the
"Published" status if domination hasn't run yet.
@@ -260,10 +264,10 @@ us up to demonstrate bug 208233).
Now, if that bug is actually fixed, this works:
- >>> pmount_warty_i386.summary
- u'pmount shortdesc'
+ >>> print(pmount_warty_i386.summary)
+ pmount shortdesc
- >>> pmount_warty_i386.description
- u'pmount description'
+ >>> print(pmount_warty_i386.description)
+ pmount description
Yay!
diff --git a/lib/lp/soyuz/doc/distroseriesbinarypackage.txt b/lib/lp/soyuz/doc/distroseriesbinarypackage.txt
index 2aaffac..6830b83 100644
--- a/lib/lp/soyuz/doc/distroseriesbinarypackage.txt
+++ b/lib/lp/soyuz/doc/distroseriesbinarypackage.txt
@@ -51,8 +51,8 @@ distro series (ordered by architecture then datecreated):
The last published binary can also be accessed directly:
>>> last_published = firefox_dsbp.last_published
- >>> "%s %s" % (last_published.name, last_published.version)
- u'mozilla-firefox 1.0'
+ >>> print("%s %s" % (last_published.name, last_published.version))
+ mozilla-firefox 1.0
It also provides access to the last DistributionSourcePackageRelease:
@@ -64,10 +64,10 @@ then the summary and description fields reflect the situation:
>>> firefox_hoary_dsbp = ubuntu['hoary'].getBinaryPackage(
... firefox_bin_name)
- >>> firefox_hoary_dsbp.summary
- u'No summary available for mozilla-firefox in ubuntu hoary.'
- >>> firefox_hoary_dsbp.description
- u'No description available for mozilla-firefox in ubuntu hoary.'
+ >>> print(firefox_hoary_dsbp.summary)
+ No summary available for mozilla-firefox in ubuntu hoary.
+ >>> print(firefox_hoary_dsbp.description)
+ No description available for mozilla-firefox in ubuntu hoary.
If a DistroSeriesBinaryPackage doesn't have a publishing history (for
whatever reason), then last_published returns None.
diff --git a/lib/lp/soyuz/doc/distroseriesqueue-notify.txt b/lib/lp/soyuz/doc/distroseriesqueue-notify.txt
index 6676448..bc01590 100644
--- a/lib/lp/soyuz/doc/distroseriesqueue-notify.txt
+++ b/lib/lp/soyuz/doc/distroseriesqueue-notify.txt
@@ -165,10 +165,10 @@ The mail 'Bcc:' address is the uploader. The announcement has the
uploader and the Debian derivatives address for the package uploaded.
>>> for msg in msgs:
- ... print(extract_addresses(msg['Bcc']))
- [u'Root <root@localhost>']
- [u'Root <root@localhost>']
- [u'netapplet_derivatives@xxxxxxxxxxxxxxxxxxxxxx', u'Root <root@localhost>']
+ ... print(pretty(extract_addresses(msg['Bcc'])))
+ ['Root <root@localhost>']
+ ['Root <root@localhost>']
+ ['netapplet_derivatives@xxxxxxxxxxxxxxxxxxxxxx', 'Root <root@localhost>']
The mail 'From:' addresses are the uploader (for acknowledgements sent to
the uploader and the changer) and the changer.
diff --git a/lib/lp/soyuz/doc/distroseriesqueue.txt b/lib/lp/soyuz/doc/distroseriesqueue.txt
index 476b636..3fefc31 100644
--- a/lib/lp/soyuz/doc/distroseriesqueue.txt
+++ b/lib/lp/soyuz/doc/distroseriesqueue.txt
@@ -277,14 +277,14 @@ Let's check the IPerson entities related to this source upload:
>>> signed_src = signed_queue.sources[0].sourcepackagerelease
- >>> signed_src.creator.displayname
- u'Daniel Silverstone'
+ >>> print(signed_src.creator.displayname)
+ Daniel Silverstone
- >>> signed_src.maintainer.displayname
- u'Launchpad team'
+ >>> print(signed_src.maintainer.displayname)
+ Launchpad team
- >>> signed_queue.signing_key.owner.displayname
- u'Foo Bar'
+ >>> print(signed_queue.signing_key.owner.displayname)
+ Foo Bar
Based on this information we can conclude that source 'bar' is
maintained by 'Launchpad Team', was modified by 'Daniel Silverstone'
@@ -369,10 +369,14 @@ has a similar behaviour):
2
>>> dup_one, dup_two = list(dups)
- >>> dup_one.displayname, dup_one.displayversion
- (u'cnews', u'1.0')
- >>> dup_two.displayname, dup_two.displayversion
- (u'cnews', u'1.0')
+ >>> print(dup_one.displayname)
+ cnews
+ >>> print(dup_one.displayversion)
+ 1.0
+ >>> print(dup_two.displayname)
+ cnews
+ >>> print(dup_two.displayversion)
+ 1.0
The upload admin can not accept both since we check unique
(name, version) accross distribution:
diff --git a/lib/lp/soyuz/doc/package-diff.txt b/lib/lp/soyuz/doc/package-diff.txt
index 34e603b..520b12c 100644
--- a/lib/lp/soyuz/doc/package-diff.txt
+++ b/lib/lp/soyuz/doc/package-diff.txt
@@ -518,8 +518,8 @@ empty library file, which is what the user expects.
>>> print(diff.diff_content.filename)
staging_1.0-1_1.0-1.diff.gz
- >>> get_diff_results(diff)
- u''
+ >>> print(get_diff_results(diff))
+ <BLANKLINE>
Now we will simulate a version collision when generating the diff.
diff --git a/lib/lp/soyuz/doc/package-meta-classes.txt b/lib/lp/soyuz/doc/package-meta-classes.txt
index 99b2cea..1620ae9 100644
--- a/lib/lp/soyuz/doc/package-meta-classes.txt
+++ b/lib/lp/soyuz/doc/package-meta-classes.txt
@@ -19,17 +19,17 @@ DistributionSourcePackage class is tested in:
Combining Distribution and SourcePackageRelease:
>>> distribution = Distribution.get(1)
- >>> distribution.name
- u'ubuntu'
+ >>> print(distribution.name)
+ ubuntu
>>> src_name = SourcePackageName.selectOneBy(name='pmount')
- >>> src_name.name
- u'pmount'
+ >>> print(src_name.name)
+ pmount
>>> sourcepackagerelease = SourcePackageRelease.selectOneBy(
... sourcepackagenameID=src_name.id, version='0.1-1')
- >>> sourcepackagerelease.name
- u'pmount'
+ >>> print(sourcepackagerelease.name)
+ pmount
>>> from lp.testing import verifyObject
>>> dspr = DistributionSourcePackageRelease(distribution,
@@ -37,8 +37,8 @@ Combining Distribution and SourcePackageRelease:
>>> verifyObject(IDistributionSourcePackageRelease, dspr)
True
- >>> dspr.displayname
- u'pmount 0.1-1'
+ >>> print(dspr.displayname)
+ pmount 0.1-1
== Querying builds for DistributionSourcePackageRelease ==
diff --git a/lib/lp/soyuz/doc/publishing.txt b/lib/lp/soyuz/doc/publishing.txt
index 365028c..1e3e580 100644
--- a/lib/lp/soyuz/doc/publishing.txt
+++ b/lib/lp/soyuz/doc/publishing.txt
@@ -15,8 +15,10 @@ interesting one):
>>> spph = IStore(SourcePackagePublishingHistory).get(
... SourcePackagePublishingHistory, 8)
- >>> spph.sourcepackagerelease.name, spph.distroseries.name
- (u'pmount', u'hoary')
+ >>> print(spph.sourcepackagerelease.name)
+ pmount
+ >>> print(spph.distroseries.name)
+ hoary
None of the sources in the sample data are signed, so we can fake one here
to make sure verifyObject will work.
@@ -327,8 +329,8 @@ Files published are accessible via the files property:
>>> ISourcePackageReleaseFile.providedBy(any_pub_file)
True
- >>> spph.files[0].libraryfile.filename
- u'alsa-utils_1.0.8-1ubuntu1.dsc'
+ >>> print(spph.files[0].libraryfile.filename)
+ alsa-utils_1.0.8-1ubuntu1.dsc
Deletion and obsolescence
@@ -898,8 +900,9 @@ BinaryPackageFile and IBinaryPackagePublishingHistory
>>> IBinaryPackageFile.providedBy(any_file)
True
- >>> [pub_file.libraryfile.filename for pub_file in bpph.files]
- [u'mozilla-firefox_0.9_i386.deb']
+ >>> for pub_file in bpph.files:
+ ... print(pub_file.libraryfile.filename)
+ mozilla-firefox_0.9_i386.deb
Binary publishing records also have a download count, which contains
the number of downloads of this binary package release in this archive.
@@ -925,11 +928,12 @@ the number of downloads of this binary package release in this archive.
We can also use getDownloadCounts to find the raw download counts per
day and country.
- >>> [(b.day, b.country.name if b.country is not None else None)
- ... for b in bpph.getDownloadCounts()]
- [(datetime.date(2010, 2, 21), u'Australia'),
- (datetime.date(2010, 2, 21), u'United Kingdom'),
- (datetime.date(2010, 2, 19), None)]
+ >>> for b in bpph.getDownloadCounts():
+ ... print(b.day)
+ ... print(b.country.name if b.country is not None else None)
+ 2010-02-21 Australia
+ 2010-02-21 United Kingdom
+ 2010-02-19 None
getDownloadCounts lets us filter by date.
diff --git a/lib/lp/soyuz/doc/sourcepackagerelease.txt b/lib/lp/soyuz/doc/sourcepackagerelease.txt
index 4dc4558..90272db 100644
--- a/lib/lp/soyuz/doc/sourcepackagerelease.txt
+++ b/lib/lp/soyuz/doc/sourcepackagerelease.txt
@@ -16,10 +16,10 @@ Let's get one from the database:
>>> from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease
>>> spr = SourcePackageRelease.get(20)
- >>> spr.name
- u'pmount'
- >>> spr.version
- u'0.1-1'
+ >>> print(spr.name)
+ pmount
+ >>> print(spr.version)
+ 0.1-1
>>> spr.dateuploaded
datetime.datetime(2005, 3, 24, 20, 59, 31, 439579, tzinfo=<UTC>)
@@ -89,8 +89,10 @@ Check that the uploaded changesfile works:
Check ISourcePackageRelease.override() behaviour:
- >>> spr.component.name, spr.section.name
- (u'main', u'web')
+ >>> print(spr.component.name)
+ main
+ >>> print(spr.section.name)
+ web
>>> from lp.soyuz.interfaces.component import IComponentSet
>>> from lp.soyuz.interfaces.section import ISectionSet
@@ -102,8 +104,10 @@ pair:
>>> spr.override(component=new_comp, section=new_sec)
- >>> spr.component.name, spr.section.name
- (u'universe', u'mail')
+ >>> print(spr.component.name)
+ universe
+ >>> print(spr.section.name)
+ mail
Abort transaction to avoid error propagation of the new attributes:
@@ -163,14 +167,14 @@ ISourcePackageRelease, it will automatically set the
... build_conflicts=None, build_conflicts_indep=None,
... source_package_recipe_build=arg_recipebuild)
- >>> new_spr.upload_distroseries.name
- u'hoary'
- >>> new_spr.version
- u'0.0.99'
+ >>> print(new_spr.upload_distroseries.name)
+ hoary
+ >>> print(new_spr.version)
+ 0.0.99
>>> new_spr.upload_archive.id == hoary.main_archive.id
True
- >>> new_spr.copyright
- u'smashed debian/copyright ...'
+ >>> print(new_spr.copyright)
+ smashed debian/copyright ...
>>> new_spr.source_package_recipe_build == arg_recipebuild
True
@@ -181,8 +185,8 @@ Throw away the DB changes:
Let's get a sample SourcePackageRelease:
>>> spr_test = SourcePackageRelease.get(20)
- >>> spr_test.name
- u'pmount'
+ >>> print(spr_test.name)
+ pmount
== Package sizes ==
@@ -192,8 +196,8 @@ It returns the sum of the size of all files comprising the source package (in
kilo-bytes).
>>> spr = SourcePackageRelease.get(14)
- >>> spr.name
- u'mozilla-firefox'
+ >>> print(spr.name)
+ mozilla-firefox
>>> spr.getPackageSize()
9690.0
diff --git a/lib/lp/soyuz/doc/soyuz-files.txt b/lib/lp/soyuz/doc/soyuz-files.txt
index 607f748..d55db18 100644
--- a/lib/lp/soyuz/doc/soyuz-files.txt
+++ b/lib/lp/soyuz/doc/soyuz-files.txt
@@ -46,8 +46,8 @@ package for that release:
>>> verifyObject(ILibraryFileAlias, srcfile.libraryfile)
True
- >>> srcfile.libraryfile.filename
- u'firefox_0.9.2.orig.tar.gz'
+ >>> print(srcfile.libraryfile.filename)
+ firefox_0.9.2.orig.tar.gz
>>> srcfile.libraryfile.http_url
'http://.../3/firefox_0.9.2.orig.tar.gz'
@@ -64,8 +64,8 @@ instalable debian-format file:
>>> warty_i386_pmount_binpkg = warty['i386'].getBinaryPackage(
... 'pmount')['2:1.9-1']
- >>> warty_i386_pmount_binpkg.name
- u'pmount'
+ >>> print(warty_i386_pmount_binpkg.name)
+ pmount
>>> debfile = warty_i386_pmount_binpkg.files[0]
@@ -75,8 +75,8 @@ instalable debian-format file:
>>> verifyObject(ILibraryFileAlias, debfile.libraryfile)
True
- >>> debfile.libraryfile.filename
- u'pmount_1.9-1_all.deb'
+ >>> print(debfile.libraryfile.filename)
+ pmount_1.9-1_all.deb
>>> debfile.libraryfile.http_url
'http://.../37/pmount_1.9-1_all.deb'
diff --git a/lib/lp/soyuz/doc/soyuz-upload.txt b/lib/lp/soyuz/doc/soyuz-upload.txt
index 5c203f9..9c819ba 100644
--- a/lib/lp/soyuz/doc/soyuz-upload.txt
+++ b/lib/lp/soyuz/doc/soyuz-upload.txt
@@ -279,65 +279,67 @@ Now continue with the real upload.
Let's check if packages were uploaded correctly.
+ >>> from operator import attrgetter
>>> from lp.registry.model.sourcepackagename import SourcePackageName
>>> from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease
- >>> from pprint import pprint
>>> spn = SourcePackageName.selectOneBy(name="drdsl")
- >>> spn.name
- u'drdsl'
+ >>> print(spn.name)
+ drdsl
>>> spr = SourcePackageRelease.selectOneBy(sourcepackagenameID=spn.id)
- >>> spr.title
- u'drdsl - 1.2.0-0ubuntu1'
- >>> spr.name
- u'drdsl'
- >>> spr.version
- u'1.2.0-0ubuntu1'
- >>> spr.component.name
- u'multiverse'
- >>> spr.section.name
- u'comm'
- >>> spr.maintainer.displayname
- u'Matthias Klose'
- >>> pprint(sorted([sprf.libraryfile.filename for sprf in spr.files]))
- [u'drdsl_1.2.0-0ubuntu1.diff.gz',
- u'drdsl_1.2.0-0ubuntu1.dsc',
- u'drdsl_1.2.0.orig.tar.gz']
+ >>> print(spr.title)
+ drdsl - 1.2.0-0ubuntu1
+ >>> print(spr.name)
+ drdsl
+ >>> print(spr.version)
+ 1.2.0-0ubuntu1
+ >>> print(spr.component.name)
+ multiverse
+ >>> print(spr.section.name)
+ comm
+ >>> print(spr.maintainer.displayname)
+ Matthias Klose
+ >>> for sprf in sorted(spr.files, key=attrgetter('libraryfile.filename')):
+ ... print(sprf.libraryfile.filename)
+ drdsl_1.2.0-0ubuntu1.diff.gz
+ drdsl_1.2.0-0ubuntu1.dsc
+ drdsl_1.2.0.orig.tar.gz
>>> spr.format.name
'DPKG'
>>> spr.urgency.name
'LOW'
- >>> spr.upload_distroseries.name
- u'breezy-autotest'
+ >>> print(spr.upload_distroseries.name)
+ breezy-autotest
Same thing for etherwake:
>>> spn = SourcePackageName.selectOneBy(name="etherwake")
- >>> spn.name
- u'etherwake'
+ >>> print(spn.name)
+ etherwake
>>> spr = SourcePackageRelease.selectOneBy(sourcepackagenameID=spn.id)
- >>> spr.title
- u'etherwake - 1.08-1'
- >>> spr.name
- u'etherwake'
- >>> spr.version
- u'1.08-1'
- >>> spr.component.name
- u'universe'
- >>> spr.section.name
- u'net'
- >>> spr.maintainer.displayname
- u'Alain Schroeder'
- >>> pprint(sorted([sprf.libraryfile.filename for sprf in spr.files]))
- [u'etherwake_1.08-1.diff.gz',
- u'etherwake_1.08-1.dsc',
- u'etherwake_1.08.orig.tar.gz']
+ >>> print(spr.title)
+ etherwake - 1.08-1
+ >>> print(spr.name)
+ etherwake
+ >>> print(spr.version)
+ 1.08-1
+ >>> print(spr.component.name)
+ universe
+ >>> print(spr.section.name)
+ net
+ >>> print(spr.maintainer.displayname)
+ Alain Schroeder
+ >>> for sprf in sorted(spr.files, key=attrgetter('libraryfile.filename')):
+ ... print(sprf.libraryfile.filename)
+ etherwake_1.08-1.diff.gz
+ etherwake_1.08-1.dsc
+ etherwake_1.08.orig.tar.gz
>>> spr.format.name
'DPKG'
>>> spr.urgency.name
'LOW'
- >>> spr.upload_distroseries.name
- u'breezy-autotest'
+ >>> print(spr.upload_distroseries.name)
+ breezy-autotest
Check the four uploads all ended up where we expected.
diff --git a/lib/lp/soyuz/doc/vocabularies.txt b/lib/lp/soyuz/doc/vocabularies.txt
index 16ba328..de4d84f 100644
--- a/lib/lp/soyuz/doc/vocabularies.txt
+++ b/lib/lp/soyuz/doc/vocabularies.txt
@@ -85,9 +85,10 @@ both a source and binary package of that name.
... "mozilla-firefox")
>>> package_name_terms.count()
2
- >>> [(term.token, term.title) for term in package_name_terms]
- [('mozilla-firefox', u'mozilla-firefox'),
- ('mozilla-firefox-data', u'mozilla-firefox-data')]
+ >>> for term in package_name_terms:
+ ... print('%s: %s' % (term.token, term.title))
+ mozilla-firefox: mozilla-firefox
+ mozilla-firefox-data: mozilla-firefox-data
Searching for "mozilla" should return the binary package name above, and
the source package named "mozilla".
@@ -95,19 +96,21 @@ the source package named "mozilla".
>>> package_name_terms = package_name_vocabulary.searchForTerms("mozilla")
>>> package_name_terms.count()
3
- >>> [(term.token, term.title) for term in package_name_terms]
- [('mozilla', u'mozilla'),
- ('mozilla-firefox', u'mozilla-firefox'),
- ('mozilla-firefox-data', u'mozilla-firefox-data')]
+ >>> for term in package_name_terms:
+ ... print('%s: %s' % (term.token, term.title))
+ mozilla: mozilla
+ mozilla-firefox: mozilla-firefox
+ mozilla-firefox-data: mozilla-firefox-data
The search does a case-insensitive, substring match.
>>> package_name_terms = package_name_vocabulary.searchForTerms("lInuX")
>>> package_name_terms.count()
2
- >>> [(term.token, term.title) for term in package_name_terms]
- [('linux-2.6.12', u'linux-2.6.12'),
- ('linux-source-2.6.15', u'linux-source-2.6.15')]
+ >>> for term in package_name_terms:
+ ... print('%s: %s' % (term.token, term.title))
+ linux-2.6.12: linux-2.6.12
+ linux-source-2.6.15: linux-source-2.6.15
SourcePackageNameVocabulary
@@ -123,14 +126,17 @@ of any distribution.
>>> spn_terms = spn_vocabulary.searchForTerms("mozilla")
>>> len(spn_terms)
2
- >>> [(term.token, term.title) for term in spn_terms]
- [('mozilla', u'mozilla'), ('mozilla-firefox', u'mozilla-firefox')]
+ >>> for term in spn_terms:
+ ... print('%s: %s' % (term.token, term.title))
+ mozilla: mozilla
+ mozilla-firefox: mozilla-firefox
>>> spn_terms = spn_vocabulary.searchForTerms("pmount")
>>> len(spn_terms)
1
- >>> [(term.token, term.title) for term in spn_terms]
- [('pmount', u'pmount')]
+ >>> for term in spn_terms:
+ ... print('%s: %s' % (term.token, term.title))
+ pmount: pmount
Processor
@@ -164,8 +170,12 @@ collection. It provides the IHugeVocabulary interface.
Iterations over the PPA vocabulary will return on PPA archives.
- >>> sorted([term.value.owner.name for term in vocabulary])
- [u'cprov', u'mark', u'no-priv']
+ >>> from operator import attrgetter
+ >>> for term in sorted(vocabulary, key=attrgetter('value.owner.name')):
+ ... print(term.value.owner.name)
+ cprov
+ mark
+ no-priv
PPA vocabulary terms contain:
diff --git a/lib/lp/soyuz/stories/distribution/xx-distribution-packages.txt b/lib/lp/soyuz/stories/distribution/xx-distribution-packages.txt
index b157e26..d002d4e 100644
--- a/lib/lp/soyuz/stories/distribution/xx-distribution-packages.txt
+++ b/lib/lp/soyuz/stories/distribution/xx-distribution-packages.txt
@@ -396,8 +396,8 @@ release.
>>> print(extract_text(first_header_link))
1.0.9a-4ubuntu1
- >>> first_header_link.get('href')
- u'/ubuntu/+source/alsa-utils/1.0.9a-4ubuntu1'
+ >>> print(first_header_link.get('href'))
+ /ubuntu/+source/alsa-utils/1.0.9a-4ubuntu1
Following the header we get a body with the changelog in it. Note that
any email addreses in the changelog are obfuscated because we are not
diff --git a/lib/lp/soyuz/stories/webservice/xx-binary-package-publishing.txt b/lib/lp/soyuz/stories/webservice/xx-binary-package-publishing.txt
index 4c35b61..72af5ec 100644
--- a/lib/lp/soyuz/stories/webservice/xx-binary-package-publishing.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-binary-package-publishing.txt
@@ -249,9 +249,12 @@ But other URLs result in a 404.
getDailyDownloadTotals returns a dict mapping dates to total counts.
- >>> webservice.named_get(
- ... firefox['self_link'], 'getDailyDownloadTotals').jsonBody()
- {u'2010-02-21': 10, u'2010-02-23': 8}
+ >>> for key, value in webservice.named_get(
+ ... firefox['self_link'],
+ ... 'getDailyDownloadTotals').jsonBody().items():
+ ... print('%s: %d' % (key, value))
+ 2010-02-21: 10
+ 2010-02-23: 8
Overrides
diff --git a/lib/lp/soyuz/stories/webservice/xx-packageupload.txt b/lib/lp/soyuz/stories/webservice/xx-packageupload.txt
index e88c342..d30f1dc 100644
--- a/lib/lp/soyuz/stories/webservice/xx-packageupload.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-packageupload.txt
@@ -86,6 +86,6 @@ which is a list of URLs to librarian files:
>>> for entry in uploads['entries']:
... print(entry['display_name'])
- ... print(entry['custom_file_urls'])
+ ... print(pretty(entry['custom_file_urls']))
custom1, custom2
- [u'http://.../custom1', u'http://.../custom2']
+ ['http://.../custom1', 'http://.../custom2']
diff --git a/lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt b/lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt
index 4a8e1eb..0cfdd9c 100644
--- a/lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt
+++ b/lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt
@@ -146,9 +146,9 @@ publication to play with first.
sponsor_link: None
status: 'Pending'
- >>> webservice.named_get(
- ... pubs['entries'][0]['self_link'], 'changesFileUrl').jsonBody()
- u'http://.../~cprov/+archive/ubuntu/ppa/+files/testwebservice_666_source.changes'
+ >>> print(webservice.named_get(
+ ... pubs['entries'][0]['self_link'], 'changesFileUrl').jsonBody())
+ http://.../~cprov/+archive/ubuntu/ppa/+files/testwebservice_666_source.changes
Unsigned sources
@@ -353,14 +353,14 @@ Create a helper function to print the results:
... for id, summary in summaries.items():
... arch_tags = [build['arch_tag'] for build in summary['builds']]
... print("Source ID %s: %s (%s)" % (id, summary['status'],
- ... arch_tags))
+ ... pretty(arch_tags)))
The results contain an entry for each source ID, with the summary status
and a list of all the relevant builds for the summary:
>>> print_build_summaries(build_summaries)
- Source ID 27: FAILEDTOBUILD ([u'i386'])
- Source ID 28: FULLYBUILT_PENDING ([u'i386'])
+ Source ID 27: FAILEDTOBUILD (['i386'])
+ Source ID 28: FULLYBUILT_PENDING (['i386'])
Associated Files In The Librarian
@@ -375,12 +375,12 @@ for this package:
... entry['self_link'] for entry in pubs['entries']):
... source_urls = webservice.named_get(
... pub_link, 'sourceFileUrls').jsonBody()
- ... print(source_urls)
- [u'http://.../~cprov/+archive/ubuntu/ppa/+sourcefiles/cdrkit/1.0/foobar-1.0.dsc']
- [u'http://.../~cprov/+archive/ubuntu/ppa/+sourcefiles/iceweasel/1.0/firefox_0.9.2.orig.tar.gz',
- u'http://.../~cprov/+archive/ubuntu/ppa/+sourcefiles/iceweasel/1.0/iceweasel-1.0.dsc']
+ ... print(pretty(source_urls))
+ ['http://.../~cprov/+archive/ubuntu/ppa/+sourcefiles/cdrkit/1.0/foobar-1.0.dsc']
+ ['http://.../~cprov/+archive/ubuntu/ppa/+sourcefiles/iceweasel/1.0/firefox_0.9.2.orig.tar.gz',
+ 'http://.../~cprov/+archive/ubuntu/ppa/+sourcefiles/iceweasel/1.0/iceweasel-1.0.dsc']
[]
- [u'http://.../~cprov/+archive/ubuntu/ppa/+sourcefiles/testwebservice/666/testwebservice_666.dsc']
+ ['http://.../~cprov/+archive/ubuntu/ppa/+sourcefiles/testwebservice/666/testwebservice_666.dsc']
binaryFileUrls() is similar:
@@ -388,11 +388,11 @@ binaryFileUrls() is similar:
... entry['self_link'] for entry in pubs['entries']):
... binary_urls = webservice.named_get(
... pub_link, 'binaryFileUrls').jsonBody()
- ... print(binary_urls)
+ ... print(pretty(binary_urls))
[]
- [u'http://.../~cprov/+archive/ubuntu/ppa/+files/mozilla-firefox_0.9_i386.deb']
+ ['http://.../~cprov/+archive/ubuntu/ppa/+files/mozilla-firefox_0.9_i386.deb']
[]
- [u'http://.../~cprov/+archive/ubuntu/ppa/+files/testwebservice-bin_666_all.deb']
+ ['http://.../~cprov/+archive/ubuntu/ppa/+files/testwebservice-bin_666_all.deb']
changelogUrl() returns the URL of debian/changelog, if it's available in
the librarian.