launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #26062
[Merge] ~cjwatson/launchpad:lazr.restful-1.0.0 into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:lazr.restful-1.0.0 into launchpad:master.
Commit message:
Upgrade to lazr.restful 1.0.0 and zope.publisher 6.0.0
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/396668
This adds Python 3 support for Launchpad's webservice infrastructure.
Dependencies MP: https://code.launchpad.net/~cjwatson/lp-source-dependencies/+git/lp-source-dependencies/+merge/396666
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:lazr.restful-1.0.0 into launchpad:master.
diff --git a/lib/lp/bugs/stories/webservice/xx-bug.txt b/lib/lp/bugs/stories/webservice/xx-bug.txt
index 66250c7..c0c7242 100644
--- a/lib/lp/bugs/stories/webservice/xx-bug.txt
+++ b/lib/lp/bugs/stories/webservice/xx-bug.txt
@@ -1198,7 +1198,7 @@ renamed bug tracker.
>>> pprint_entry(bug_tracker)
active: True
base_url: 'http://bugs.example.com/'
- base_url_aliases: [u'http://bugs.example.com/bugs/', u'http://www.example.com/bugtracker/']
+ base_url_aliases: ['http://bugs.example.com/bugs/', 'http://www.example.com/bugtracker/']
bug_tracker_type: 'Bugzilla'
contact_details: 'bob@xxxxxxxxxxx'
has_lp_plugin: None
diff --git a/lib/lp/registry/stories/webservice/xx-distroseries.txt b/lib/lp/registry/stories/webservice/xx-distroseries.txt
index e6ad345..8cf223f 100644
--- a/lib/lp/registry/stories/webservice/xx-distroseries.txt
+++ b/lib/lp/registry/stories/webservice/xx-distroseries.txt
@@ -66,7 +66,7 @@ For distroseries we publish a subset of its attributes.
bug_reported_acknowledgement: None
bug_reporting_guidelines: None
changeslist: 'hoary-changes@xxxxxxxxxx'
- component_names: [u'main', u'restricted']
+ component_names: ['main', 'restricted']
date_created: '2006-10-16T18:31:43.483559+00:00'
datereleased: None
description: 'Hoary is the ...
@@ -76,7 +76,7 @@ For distroseries we publish a subset of its attributes.
drivers_collection_link: 'http://.../ubuntu/hoary/drivers'
fullseriesname: 'Ubuntu Hoary'
include_long_descriptions: True
- index_compressors: [u'gzip', u'bzip2']
+ index_compressors: ['gzip', 'bzip2']
language_pack_full_export_requested: False
main_archive_link: 'http://.../ubuntu/+archive/primary'
name: 'hoary'
@@ -89,8 +89,7 @@ For distroseries we publish a subset of its attributes.
resource_type_link: ...
self_link: 'http://.../ubuntu/hoary'
status: 'Active Development'
- suite_names:
- [u'Release', u'Security', u'Updates', u'Proposed', u'Backports']
+ suite_names: ['Release', 'Security', 'Updates', 'Proposed', 'Backports']
summary: 'Hoary is the ...
supported: False
title: 'The Hoary Hedgehog Release'
diff --git a/lib/lp/registry/stories/webservice/xx-project-registry.txt b/lib/lp/registry/stories/webservice/xx-project-registry.txt
index c92b677..4b2a349 100644
--- a/lib/lp/registry/stories/webservice/xx-project-registry.txt
+++ b/lib/lp/registry/stories/webservice/xx-project-registry.txt
@@ -174,7 +174,7 @@ Projects are available at their canonical URL on the API virtual host.
is_permitted: True
license_approved: False
license_info: None
- licenses: [u'MIT / X / Expat Licence']
+ licenses: ['MIT / X / Expat Licence']
logo_link: 'http://.../firefox/logo'
name: 'firefox'
official_answers: True
@@ -1021,14 +1021,16 @@ Project release files
Project release files can be added to a project release using the API
'add_file' method.
+ >>> import io
+
>>> files_url = '/firefox/1.0/1.0.0/files'
>>> ff_100_files = webservice.get(files_url).jsonBody()
>>> print_self_link_of_entries(ff_100_files)
>>> pr_url = '/firefox/1.0/1.0.0'
>>> ff_100 = webservice.get(pr_url).jsonBody()
- >>> file_content=b"first attachment file content \xff"
- >>> sig_file_content=b"hash hash hash \xff"
+ >>> file_content=io.BytesIO(b"first attachment file content \xff")
+ >>> sig_file_content=io.BytesIO(b"hash hash hash \xff")
>>> response = webservice.named_post(ff_100['self_link'], 'add_file',
... filename='filename.txt',
... file_content=file_content,
@@ -1058,16 +1060,18 @@ And it has been uploaded correctly.
>>> login('bac@xxxxxxxxxxxxx')
>>> concrete_one_zero = getUtility(IProductSet)['firefox'].getRelease(
... '1.0.0')
- >>> concrete_one_zero.files[0].libraryfile.read() == file_content
+ >>> concrete_one_zero.files[0].libraryfile.read() == (
+ ... file_content.getvalue())
True
- >>> concrete_one_zero.files[0].signature.read() == sig_file_content
+ >>> concrete_one_zero.files[0].signature.read() == (
+ ... sig_file_content.getvalue())
True
>>> logout()
The file type and description are optional. If no signature is
available then it must be explicitly set to None.
- >>> file_content=b"second attachment file content"
+ >>> file_content=io.BytesIO(b"second attachment file content")
>>> response = webservice.named_post(ff_100['self_link'], 'add_file',
... filename='filename2.txt',
... file_content=file_content,
diff --git a/requirements/launchpad.txt b/requirements/launchpad.txt
index 2f43397..215976c 100644
--- a/requirements/launchpad.txt
+++ b/requirements/launchpad.txt
@@ -68,7 +68,7 @@ lazr.delegates==2.0.4
lazr.enum==1.2
lazr.jobrunner==0.16
lazr.lifecycle==1.2
-lazr.restful==0.23.0
+lazr.restful==1.0.0
lazr.restfulclient==0.14.3
lazr.sshserver==0.1.11
lazr.uri==1.0.5
@@ -83,6 +83,8 @@ mistune==0.8.3
mock==1.0.1
mocker==1.1.1
monotonic==1.5
+multipart==0.1.1; python_version < "3"
+multipart==0.2.3; python_version >= "3"
netaddr==0.7.19
oauth==1.0
oauthlib==3.1.0
@@ -177,6 +179,7 @@ zope.app.publication==4.3.1
zope.app.publisher==4.2.0
zope.app.server==4.0.0
zope.app.wsgi==4.3.0
+zope.publisher==6.0.0
zope.sendmail==5.1
zope.server==4.0.2
# lp:~launchpad-committers/zope.session:launchpad