Merge lp:~leonardr/lazr.restful/0.9.5.1 into lp:lazr.restful

Proposed by Leonard Richardson
Status: Merged
Approved by: Gary Poster
Approved revision: 65
Merge reported by: Leonard Richardson
Merged at revision: not available
Proposed branch: lp:~leonardr/lazr.restful/0.9.5.1
Merge into: lp:lazr.restful
Diff against target: 40 lines
2 files modified
src/lazr/restful/NEWS.txt (+11/-0)
src/lazr/restful/version.txt (+4/-0)
To merge this branch: bzr merge lp:~leonardr/lazr.restful/0.9.5.1
Reviewer Review Type Date Requested Status
Gary Poster Approve
Review via email: mp+13860@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Leonard Richardson (leonardr) wrote :

This is branched from revision 64 of lazr.restful, which was the basis for version 0.9.5. It backports the fix for bug 387297 to version 0.9.5.

(The only difference between revision 64 and a tarball of 0.9.5 is that in revision 64's NEWS.txt, the name of the version is still "Development", not 0.9.5.)

Revision history for this message
Leonard Richardson (leonardr) wrote :

The original fix to this bug shows up as part of revision 80.

Revision history for this message
Leonard Richardson (leonardr) wrote :

=== modified file 'src/lazr/restful/_resource.py'
--- src/lazr/restful/_resource.py 2009-08-11 16:40:43 +0000
+++ src/lazr/restful/_resource.py 2009-10-23 17:17:29 +0000
@@ -882,7 +882,7 @@
             self.request.response.setStatus(415)
             return None, 'Expected a media type of %s.' % self.JSON_TYPE
         try:
- h = simplejson.loads(unicode(representation))
+ h = simplejson.loads(representation.decode('utf-8'))
         except ValueError:
             self.request.response.setStatus(400)
             return None, "Entity-body was not a well-formed JSON document."

=== modified file 'src/lazr/restful/docs/webservice.txt'
--- src/lazr/restful/docs/webservice.txt 2009-08-11 18:36:20 +0000
+++ src/lazr/restful/docs/webservice.txt 2009-10-23 17:17:29 +0000
@@ -1819,11 +1819,13 @@

 A PATCH request will automatically result in a modification event
 being sent out about the modified object, which means that
-modify_cookbook() will be run. Here, we modify the name of one of the
-cookbooks.
+modify_cookbook() will be run. Here, we modify the name and the
+cuisine of one of the cookbooks. Note that the cuisine contains
+non-ASCII characters.

     >>> headers = {'CONTENT_TYPE' : 'application/json'}
- >>> body = '{"name" : "The Joy of Cooking (revised)"}'
+ >>> body = '''{"name" : "The Joy of Cooking (revised)",
+ ... "cuisine" : "\xd7\x97\xd7\x95\xd7\x9e\xd7\x95\xd7\xa1"}'''

     >>> patch_request = create_web_service_request(
     ... '/beta/cookbooks/The%20Joy%20of%20Cooking', body=body,

Revision history for this message
Gary Poster (gary) wrote :

Thank you

Gary

review: Approve
lp:~leonardr/lazr.restful/0.9.5.1 updated
66. By Leonard Richardson

Updated version and NEWS.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/lazr/restful/NEWS.txt'
2--- src/lazr/restful/NEWS.txt 2009-10-21 14:42:43 +0000
3+++ src/lazr/restful/NEWS.txt 2009-10-23 17:44:11 +0000
4@@ -2,6 +2,7 @@
5 NEWS for lazr.restful
6 =====================
7
8+<<<<<<< TREE
9 0.9.15 (2009-10-21)
10 ===================
11
12@@ -70,6 +71,16 @@
13
14 0.9.5 (2009-08-26)
15 ==================
16+=======
17+0.9.5.1 (2009-10-23)
18+====================
19+
20+Backported a fix for a bug that prevented some incoming strings from
21+being loaded by simplejson.
22+
23+0.9.5 (2009-08-26)
24+==================
25+>>>>>>> MERGE-SOURCE
26
27 Added a function that generates a basic WSGI application, given a
28 service root class, a publication class, and a response class.
29
30=== modified file 'src/lazr/restful/_resource.py'
31=== modified file 'src/lazr/restful/docs/webservice.txt'
32=== modified file 'src/lazr/restful/version.txt'
33--- src/lazr/restful/version.txt 2009-10-21 14:42:43 +0000
34+++ src/lazr/restful/version.txt 2009-10-23 17:44:11 +0000
35@@ -1,1 +1,5 @@
36+<<<<<<< TREE
37 0.9.15
38+=======
39+0.9.5.1
40+>>>>>>> MERGE-SOURCE

Subscribers

People subscribed via source and target branches