)]}'
{"monasca_api/tests/test_a_repository.py":[{"author":{"_account_id":24903,"name":"Hongtao Zhang","email":"changhungtao@126.com","username":"ZhangHongtao"},"change_message_id":"2566a17e8c3d0d26fcac502a84c4609b632eb879","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import datetime"},{"line_number":18,"context_line":"import time"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import six"},{"line_number":21,"context_line":"import fixtures"},{"line_number":22,"context_line":"from oslo_config import cfg"},{"line_number":23,"context_line":"from oslo_config import fixture as fixture_config"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a1ff146_228325ce","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":10},"updated":"2017-03-15 05:49:13.000000000","message":"pep8 ERROR?","commit_id":"c9552ed776bd704f0d45d5619355d06b050652c8"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"86d25258c358e810b3de21b30902437ee49d109a","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import datetime"},{"line_number":18,"context_line":"import time"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import six"},{"line_number":21,"context_line":"import fixtures"},{"line_number":22,"context_line":"from oslo_config import cfg"},{"line_number":23,"context_line":"from oslo_config import fixture as fixture_config"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a1ff146_2805c7c1","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":10},"in_reply_to":"3a1ff146_228325ce","updated":"2017-03-15 06:13:04.000000000","message":"might be, but more importantly is to make Py35 and other gates green. I can fix that on side but focus is on Py35","commit_id":"c9552ed776bd704f0d45d5619355d06b050652c8"}],"monasca_api/tests/test_versions.py":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"2b6e59114ba39142241ad7804e742ddb6514d121","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        if six.PY3:"},{"line_number":37,"context_line":"            res \u003d result[0].decode(\u0027utf-8\u0027)"},{"line_number":38,"context_line":"        else:"},{"line_number":39,"context_line":"            res \u003d result[0]"},{"line_number":40,"context_line":"        response \u003d json.loads(res)"},{"line_number":41,"context_line":"        self.assertIsInstance(response, dict)"},{"line_number":42,"context_line":"        self.assertTrue(set([\u0027links\u0027, \u0027elements\u0027]) \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_76e580da","line":39,"updated":"2017-01-28 01:16:03.000000000","message":"I don\u0027t think this was the right way to resolve this. It result should always be utf-8, independent of whether python 2 or 3 is used. \n\nThe result returned when using Python 3, happens to be utf-8, because the API returns the default for Python 3, which also happens to be utf-8.\n\nBut, I think there is a bug in the Python 2. The Python 2 result happens to be ASCII, because that is the result.\n\nI think the proper case us that both Python 2 and 3, should expect utf-8 as the result.\n\nThe result in the Versions resource, which currently does not specify utf-8, should be modified to always return utf-8.","commit_id":"9353ed20b3e15c2c043ff88b30d818290757b57a"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"937d2bcfe91d23695e5c46f4b3ab6aba08e98d29","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        if six.PY3:"},{"line_number":37,"context_line":"            res \u003d result[0].decode(\u0027utf-8\u0027)"},{"line_number":38,"context_line":"        else:"},{"line_number":39,"context_line":"            res \u003d result[0]"},{"line_number":40,"context_line":"        response \u003d json.loads(res)"},{"line_number":41,"context_line":"        self.assertIsInstance(response, dict)"},{"line_number":42,"context_line":"        self.assertTrue(set([\u0027links\u0027, \u0027elements\u0027]) \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_a35de97a","line":39,"in_reply_to":"3a461143_76e580da","updated":"2017-01-28 03:39:17.000000000","message":"Just in case my previous comment wasn\u0027t that readable.\n\nI think there is a bug in the Versions resource. Currently, depending on whether Python 2 or 3 is used, the result that is returned will be ASCII or utf-8. However, the result encoding should be independent of the language and always return utf-8.\n\nThe code that is in this unit test now tries to test for Python 2 or Python 3. I think the code that is in this unit test should always use decode(\u0027utf-8\u0027). So, keep line 37 in this unit test, but delete lines 36, 37 and 39.\n\nAdditionally, the code that is in the Versions resource, should always return a utf-8 encoded result.","commit_id":"9353ed20b3e15c2c043ff88b30d818290757b57a"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"3ccee471b944061f0a14f58dee0d28662d4b0fec","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        if six.PY3:"},{"line_number":37,"context_line":"            res \u003d result[0].decode(\u0027utf-8\u0027)"},{"line_number":38,"context_line":"        else:"},{"line_number":39,"context_line":"            res \u003d result[0]"},{"line_number":40,"context_line":"        response \u003d json.loads(res)"},{"line_number":41,"context_line":"        self.assertIsInstance(response, dict)"},{"line_number":42,"context_line":"        self.assertTrue(set([\u0027links\u0027, \u0027elements\u0027]) \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_1a95283e","line":39,"in_reply_to":"3a461143_a35de97a","updated":"2017-01-30 09:01:21.000000000","message":"yeah, but there\u0027s no decode method for string in Py3, right ? And every string in Python3 is already unicode, so that\u0027s why it should only make sense to decode it if the code is Py2","commit_id":"9353ed20b3e15c2c043ff88b30d818290757b57a"}],"monasca_api/v2/reference/versions.py":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"2b6e59114ba39142241ad7804e742ddb6514d121","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    def on_get(self, req, res, version_id\u003dNone):"},{"line_number":44,"context_line":"        path \u003d req.uri"},{"line_number":45,"context_line":"        if six.PY2 and isinstance(req.uri, six.text_type):"},{"line_number":46,"context_line":"            path \u003d path.decode(\u0027utf\u003d8\u0027)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        result \u003d {"},{"line_number":49,"context_line":"            \u0027links\u0027: [{"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_36069886","line":46,"updated":"2017-01-28 01:16:03.000000000","message":"I think the request uri should always be encoded as utf-8.","commit_id":"9353ed20b3e15c2c043ff88b30d818290757b57a"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"2b6e59114ba39142241ad7804e742ddb6514d121","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        if six.PY2 and isinstance(req.uri, six.text_type):"},{"line_number":46,"context_line":"            path \u003d path.decode(\u0027utf\u003d8\u0027)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        result \u003d {"},{"line_number":49,"context_line":"            \u0027links\u0027: [{"},{"line_number":50,"context_line":"                \u0027rel\u0027: \u0027self\u0027,"},{"line_number":51,"context_line":"                \u0027href\u0027: path"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_161c3cc0","line":48,"updated":"2017-01-28 01:16:03.000000000","message":"I think utf-8 should always be specified for the result.\n\nCurrently, the result is dependent on whether python 2 or python 3 is used. But, the result is being sent over http. We should always use utf-8.","commit_id":"9353ed20b3e15c2c043ff88b30d818290757b57a"}]}
