)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"55edda6ab1d77a695bce6d011e28ba2ec648248c","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Python 3: encode unicode response bodies"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"WebOb disallows in py3K to set webob.Response.body to a unicode object,"},{"line_number":10,"context_line":"we should encode unicode bodies in such case."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ie0dc57fbe3ed9b19dac2e958de14387bc4c1a260"},{"line_number":13,"context_line":"Blueprint: neutron-python3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3a50d1a3_b5276062","line":10,"updated":"2015-07-31 13:41:22.000000000","message":"In fact, webob.Response provide an helper: the .text attribute :-)\n\nhttps://github.com/Pylons/webob/blob/1d82b53e7a8d444ef487546e30e72f7d35960330/webob/response.py#L404\n\nI \"discovered\" it today.","commit_id":"7184b6bdc4db6a1cfcacd47126ede712135a21a1"}],"neutron/tests/unit/api/test_extensions.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"c0f572d082b6ebce6b59edc3a0e9d64512a7fd4c","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        def extend_response_data(req, res):"},{"line_number":419,"context_line":"            data \u003d jsonutils.loads(res.body)"},{"line_number":420,"context_line":"            data[\u0027FOXNSOX:extended_key\u0027] \u003d req.GET.get(\u0027extended_key\u0027)"},{"line_number":421,"context_line":"            res.body \u003d wsgi.encode_body(jsonutils.dumps(data))"},{"line_number":422,"context_line":"            return res"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"        app \u003d self._setup_app_with_request_handler(extend_response_data, \u0027GET\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_02a2ac4b","line":421,"updated":"2015-08-10 14:38:14.000000000","message":"This is always a text-type.  Why do we need to call encode_body here?  Consider:\n\nres.body \u003d jsonutils.dumps(data).encode(\u0027utf8\u0027)\n\n?","commit_id":"a7e6223fea62e660dfb0e3cd5756bef9acfacd51"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4bc4c4df901a6eb80a75bb6e47e850dc3f01a8b2","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        def extend_response_data(req, res):"},{"line_number":419,"context_line":"            data \u003d jsonutils.loads(res.body)"},{"line_number":420,"context_line":"            data[\u0027FOXNSOX:extended_key\u0027] \u003d req.GET.get(\u0027extended_key\u0027)"},{"line_number":421,"context_line":"            res.body \u003d wsgi.encode_body(jsonutils.dumps(data))"},{"line_number":422,"context_line":"            return res"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"        app \u003d self._setup_app_with_request_handler(extend_response_data, \u0027GET\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_b16d319b","line":421,"in_reply_to":"1a4dcd0f_02a2ac4b","updated":"2015-08-10 21:49:08.000000000","message":"IMO, we should use the same pattern:\n\n  \u003cresponse\u003e.body \u003d wsgi.encode_body(...)\n\nto ensure response is always when encoded when needed.","commit_id":"a7e6223fea62e660dfb0e3cd5756bef9acfacd51"},{"author":{"_account_id":8344,"name":"fumihiko kakuma","email":"kakuma@valinux.co.jp","username":"kakuma"},"change_message_id":"969e587c1c99c5d5c4759a6b658b01d7377e27af","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        def extend_response_data(req, res):"},{"line_number":419,"context_line":"            data \u003d jsonutils.loads(res.body)"},{"line_number":420,"context_line":"            data[\u0027FOXNSOX:extended_key\u0027] \u003d req.GET.get(\u0027extended_key\u0027)"},{"line_number":421,"context_line":"            res.body \u003d wsgi.encode_body(jsonutils.dumps(data))"},{"line_number":422,"context_line":"            return res"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"        app \u003d self._setup_app_with_request_handler(extend_response_data, \u0027GET\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_c1532b38","line":421,"in_reply_to":"1a4dcd0f_b16d319b","updated":"2015-08-11 13:27:36.000000000","message":"I agree to Cedric. I think that it is simple.","commit_id":"a7e6223fea62e660dfb0e3cd5756bef9acfacd51"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"c0f572d082b6ebce6b59edc3a0e9d64512a7fd4c","unresolved":false,"context_lines":[{"line_number":444,"context_line":"        def _update_handler(req, res):"},{"line_number":445,"context_line":"            data \u003d jsonutils.loads(res.body)"},{"line_number":446,"context_line":"            data[\u0027uneditable\u0027] \u003d req.params[\u0027uneditable\u0027]"},{"line_number":447,"context_line":"            res.body \u003d wsgi.encode_body(jsonutils.dumps(data))"},{"line_number":448,"context_line":"            return res"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"        base_app \u003d webtest.TestApp(setup_base_app(self))"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_828ebcce","line":447,"updated":"2015-08-10 14:38:14.000000000","message":"Same as above here.","commit_id":"a7e6223fea62e660dfb0e3cd5756bef9acfacd51"}],"neutron/tests/unit/extensions/foxinsocks.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"c0f572d082b6ebce6b59edc3a0e9d64512a7fd4c","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            # You can use content type header to test for XML."},{"line_number":78,"context_line":"            data \u003d jsonutils.loads(res.body)"},{"line_number":79,"context_line":"            data[\u0027FOXNSOX:googoose\u0027] \u003d req.GET.get(\u0027chewing\u0027)"},{"line_number":80,"context_line":"            res.body \u003d wsgi.encode_body(jsonutils.dumps(data))"},{"line_number":81,"context_line":"            return res"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        req_ext1 \u003d extensions.RequestExtension(\u0027GET\u0027, \u0027/dummy_resources/:(id)\u0027,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_8d182d77","line":80,"updated":"2015-08-10 14:38:14.000000000","message":"Same comment as previous file about calling .encode(\u0027utf8\u0027) directly.","commit_id":"a7e6223fea62e660dfb0e3cd5756bef9acfacd51"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"c0f572d082b6ebce6b59edc3a0e9d64512a7fd4c","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            # You can use content type header to test for XML."},{"line_number":90,"context_line":"            data \u003d jsonutils.loads(res.body)"},{"line_number":91,"context_line":"            data[\u0027FOXNSOX:big_bands\u0027] \u003d \u0027Pig Bands!\u0027"},{"line_number":92,"context_line":"            res.body \u003d wsgi.encode_body(jsonutils.dumps(data))"},{"line_number":93,"context_line":"            return res"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        req_ext2 \u003d extensions.RequestExtension(\u0027GET\u0027, \u0027/dummy_resources/:(id)\u0027,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_4d29c588","line":92,"updated":"2015-08-10 14:38:14.000000000","message":"Same","commit_id":"a7e6223fea62e660dfb0e3cd5756bef9acfacd51"}],"neutron/wsgi.py":[{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"539bd5ba1c8fbac203bfa65a2d2b0affce329ead","unresolved":false,"context_lines":[{"line_number":98,"context_line":"    WebOb requires to encode unicode body used to update response body."},{"line_number":99,"context_line":"    \"\"\""},{"line_number":100,"context_line":"    if isinstance(body, six.text_type):"},{"line_number":101,"context_line":"        return body.encode()"},{"line_number":102,"context_line":"    return body"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_53423110","line":101,"updated":"2015-07-29 10:13:34.000000000","message":"Please explicit the encoding for Python 2: body.encode(\u0027utf-8\u0027). Python 2 uses ASCII by default.","commit_id":"e9a07585160b664961e12a57ef2452178f6d04c0"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"dbd1b973393a63986c770ceabfa5d55c368a83ae","unresolved":false,"context_lines":[{"line_number":98,"context_line":"    WebOb requires to encode unicode body used to update response body."},{"line_number":99,"context_line":"    \"\"\""},{"line_number":100,"context_line":"    if isinstance(body, six.text_type):"},{"line_number":101,"context_line":"        return body.encode()"},{"line_number":102,"context_line":"    return body"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_91799195","line":101,"in_reply_to":"3a50d1a3_53423110","updated":"2015-07-29 11:01:31.000000000","message":"Done","commit_id":"e9a07585160b664961e12a57ef2452178f6d04c0"}]}
