)]}'
{"keystoneclient/client.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"f90a67e47788c6a923e1052095463beb8c5ed928","unresolved":false,"context_lines":[{"line_number":362,"context_line":"        if resp.text:"},{"line_number":363,"context_line":"            try:"},{"line_number":364,"context_line":"                body \u003d json.loads(resp.text)"},{"line_number":365,"context_line":"            except (ValueError, TypeError):"},{"line_number":366,"context_line":"                body \u003d None"},{"line_number":367,"context_line":"                _logger.debug(\"Could not decode JSON from body: %s\""},{"line_number":368,"context_line":"                              % resp.text)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2F8KE%3D","line":365,"updated":"2013-03-20 03:26:31.000000000","message":"how do you produce a type error here?","commit_id":"aad9d6860bed87826572f97680dce1113a927fb9"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"f17b5a610998fc3ff6f0458b9ab81205e3461132","unresolved":false,"context_lines":[{"line_number":362,"context_line":"        if resp.text:"},{"line_number":363,"context_line":"            try:"},{"line_number":364,"context_line":"                body \u003d json.loads(resp.text)"},{"line_number":365,"context_line":"            except (ValueError, TypeError):"},{"line_number":366,"context_line":"                body \u003d None"},{"line_number":367,"context_line":"                _logger.debug(\"Could not decode JSON from body: %s\""},{"line_number":368,"context_line":"                              % resp.text)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2F8HI%3D","line":365,"in_reply_to":"AAAAOH%2F%2F8KE%3D","updated":"2013-03-20 04:30:57.000000000","message":"In my Ubuntu 64-bit VM, I got TypeError instead of ValueError when loading non-JSON string.","commit_id":"aad9d6860bed87826572f97680dce1113a927fb9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"f90a67e47788c6a923e1052095463beb8c5ed928","unresolved":false,"context_lines":[{"line_number":374,"context_line":"            _logger.debug("},{"line_number":375,"context_line":"                \"Request returned failure status: %s\","},{"line_number":376,"context_line":"                resp.status_code)"},{"line_number":377,"context_line":"            raise exceptions.from_response(resp, body)"},{"line_number":378,"context_line":"        elif resp.status_code in (301, 302, 305):"},{"line_number":379,"context_line":"            # Redirected. Reissue the request to the new location."},{"line_number":380,"context_line":"            return self.request(resp.headers[\u0027location\u0027], method, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2F8J8%3D","line":377,"updated":"2013-03-20 03:26:31.000000000","message":"the body could now be null instead of returning resp.text, which could contain something useful","commit_id":"aad9d6860bed87826572f97680dce1113a927fb9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b0981fa259d42829dbe2bcdb9c7b9fda42891317","unresolved":false,"context_lines":[{"line_number":374,"context_line":"            _logger.debug("},{"line_number":375,"context_line":"                \"Request returned failure status: %s\","},{"line_number":376,"context_line":"                resp.status_code)"},{"line_number":377,"context_line":"            raise exceptions.from_response(resp, body)"},{"line_number":378,"context_line":"        elif resp.status_code in (301, 302, 305):"},{"line_number":379,"context_line":"            # Redirected. Reissue the request to the new location."},{"line_number":380,"context_line":"            return self.request(resp.headers[\u0027location\u0027], method, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2F7Y8%3D","line":377,"in_reply_to":"AAAAOH%2F%2F8GQ%3D","updated":"2013-03-20 17:11:20.000000000","message":"the works -- exceptions.from_response() appears to expect both a dict or plain text already","commit_id":"aad9d6860bed87826572f97680dce1113a927fb9"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"0b586547a9810b8163bac5f63b1ac4886e839b9b","unresolved":false,"context_lines":[{"line_number":374,"context_line":"            _logger.debug("},{"line_number":375,"context_line":"                \"Request returned failure status: %s\","},{"line_number":376,"context_line":"                resp.status_code)"},{"line_number":377,"context_line":"            raise exceptions.from_response(resp, body)"},{"line_number":378,"context_line":"        elif resp.status_code in (301, 302, 305):"},{"line_number":379,"context_line":"            # Redirected. Reissue the request to the new location."},{"line_number":380,"context_line":"            return self.request(resp.headers[\u0027location\u0027], method, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2F8GQ%3D","line":377,"in_reply_to":"AAAAOH%2F%2F8HA%3D","updated":"2013-03-20 05:01:09.000000000","message":"how about just changing this to  body \u003d\u003e \"body or response.text\" to keep the old behavior?","commit_id":"aad9d6860bed87826572f97680dce1113a927fb9"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"f17b5a610998fc3ff6f0458b9ab81205e3461132","unresolved":false,"context_lines":[{"line_number":374,"context_line":"            _logger.debug("},{"line_number":375,"context_line":"                \"Request returned failure status: %s\","},{"line_number":376,"context_line":"                resp.status_code)"},{"line_number":377,"context_line":"            raise exceptions.from_response(resp, body)"},{"line_number":378,"context_line":"        elif resp.status_code in (301, 302, 305):"},{"line_number":379,"context_line":"            # Redirected. Reissue the request to the new location."},{"line_number":380,"context_line":"            return self.request(resp.headers[\u0027location\u0027], method, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2F8HA%3D","line":377,"in_reply_to":"AAAAOH%2F%2F8J8%3D","updated":"2013-03-20 04:30:57.000000000","message":"problem is exceptions.from_response is expecting body to be either a JSON object or None. Perhaps the *right* fix should be in from_response() where it can deal with both JSON and text?","commit_id":"aad9d6860bed87826572f97680dce1113a927fb9"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"c1eb9c644448e52419952e90bbbe0c0caa79e54c","unresolved":false,"context_lines":[{"line_number":362,"context_line":"        if resp.text:"},{"line_number":363,"context_line":"            try:"},{"line_number":364,"context_line":"                body \u003d json.loads(resp.text)"},{"line_number":365,"context_line":"            except (ValueError, TypeError):"},{"line_number":366,"context_line":"                body \u003d None"},{"line_number":367,"context_line":"                _logger.debug(\"Could not decode JSON from body: %s\""},{"line_number":368,"context_line":"                              % resp.text)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOX%2F%2F80c%3D","line":365,"updated":"2013-04-04 19:53:16.000000000","message":"suggest put this change in a separate commit.","commit_id":"f19161bf9a19a454ebf597ff4f2c2cf3f65d5153"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"bb723b2df1123eef68af69b37bab7bcdf3016a5e","unresolved":false,"context_lines":[{"line_number":362,"context_line":"        if resp.text:"},{"line_number":363,"context_line":"            try:"},{"line_number":364,"context_line":"                body \u003d json.loads(resp.text)"},{"line_number":365,"context_line":"            except (ValueError, TypeError):"},{"line_number":366,"context_line":"                body \u003d None"},{"line_number":367,"context_line":"                _logger.debug(\"Could not decode JSON from body: %s\""},{"line_number":368,"context_line":"                              % resp.text)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2F%2FZ8%3D","line":365,"in_reply_to":"AAAAOX%2F%2F80c%3D","updated":"2013-04-08 23:08:43.000000000","message":"You\u0027ll get either ValueError or TypeError depending on which part of resp.text the json parser blows up on. Putting them into a separate commit doesn\u0027t make much sense.","commit_id":"f19161bf9a19a454ebf597ff4f2c2cf3f65d5153"}],"tests/test_http.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"e6ed6b6567444181562e1725fafdf0fdb77b0cba","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        err_response \u003d {"},{"line_number":59,"context_line":"            \"error\": {"},{"line_number":60,"context_line":"                \"message\": \"Error message string\","},{"line_number":61,"context_line":"                \"details\": \"Error details string\""},{"line_number":62,"context_line":"            }"},{"line_number":63,"context_line":"        }"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOH%2F%2F4Cs%3D","line":61,"updated":"2013-03-22 15:25:23.000000000","message":"our error responses have code, title and message attributes, so i\u0027m nto sure what this is imitating, if anything?","commit_id":"59b9988080faf17cd3d9e53631213dcb55d7af60"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"7184484e9261987cbd71d82489da56a96b0c938d","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        err_response \u003d {"},{"line_number":59,"context_line":"            \"error\": {"},{"line_number":60,"context_line":"                \"message\": \"Error message string\","},{"line_number":61,"context_line":"                \"details\": \"Error details string\""},{"line_number":62,"context_line":"            }"},{"line_number":63,"context_line":"        }"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOH%2F%2F3Wo%3D","line":61,"in_reply_to":"AAAAOH%2F%2F4Cs%3D","updated":"2013-03-22 21:41:53.000000000","message":"Fixed in the next patch to match the keystone exception.","commit_id":"59b9988080faf17cd3d9e53631213dcb55d7af60"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"89302f67d043e408ce0c92bf3b18607dae77ddd7","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                # Automatic JSON parsing"},{"line_number":54,"context_line":"                self.assertEqual(body, {\"hi\": \"there\"})"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def test_get_error(self):"},{"line_number":57,"context_line":"        cl \u003d get_authed_client()"},{"line_number":58,"context_line":"        err_response \u003d {"},{"line_number":59,"context_line":"            \"error\": {"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOX%2F%2F80U%3D","line":56,"updated":"2013-04-04 19:54:45.000000000","message":"why changing this test? Does it not have to work the old way anymore?\n\nsuggest add a new test rather than changing one.","commit_id":"f19161bf9a19a454ebf597ff4f2c2cf3f65d5153"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"d0f0f3705b100529535046e1847712e9640e3957","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                # Automatic JSON parsing"},{"line_number":54,"context_line":"                self.assertEqual(body, {\"hi\": \"there\"})"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def test_get_error(self):"},{"line_number":57,"context_line":"        cl \u003d get_authed_client()"},{"line_number":58,"context_line":"        err_response \u003d {"},{"line_number":59,"context_line":"            \"error\": {"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOX%2F%2F8mo%3D","line":56,"in_reply_to":"AAAAOX%2F%2F80U%3D","updated":"2013-04-04 21:07:20.000000000","message":"It is the same test as before, to check the expected exception raised. This has just been enhanced to also inspect the message of the exception.","commit_id":"f19161bf9a19a454ebf597ff4f2c2cf3f65d5153"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"376c974dcdae8ba6af1204d70f925da2769d06c0","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                # Automatic JSON parsing"},{"line_number":54,"context_line":"                self.assertEqual(body, {\"hi\": \"there\"})"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def test_get_error(self):"},{"line_number":57,"context_line":"        cl \u003d get_authed_client()"},{"line_number":58,"context_line":"        err_response \u003d {"},{"line_number":59,"context_line":"            \"error\": {"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2F%2F1A%3D","line":56,"in_reply_to":"AAAAOX%2F%2F8lI%3D","updated":"2013-04-08 19:47:22.000000000","message":"Testing with the evil plaintext string is wrong to begin with, keystone won\u0027t be sending plaintext in the response.","commit_id":"f19161bf9a19a454ebf597ff4f2c2cf3f65d5153"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1a4efb4e46d13e08ddbc9beb7d644fd0103843e6","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                # Automatic JSON parsing"},{"line_number":54,"context_line":"                self.assertEqual(body, {\"hi\": \"there\"})"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def test_get_error(self):"},{"line_number":57,"context_line":"        cl \u003d get_authed_client()"},{"line_number":58,"context_line":"        err_response \u003d {"},{"line_number":59,"context_line":"            \"error\": {"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOX%2F%2F8lI%3D","line":56,"in_reply_to":"AAAAOX%2F%2F8mo%3D","updated":"2013-04-04 21:13:31.000000000","message":"it\u0027s also been changed to pass a json string for text and not an evil plaintext string, see line 67. I don\u0027t think we want to lose the test for evil plaintext strings.","commit_id":"f19161bf9a19a454ebf597ff4f2c2cf3f65d5153"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e2993e2a3a4d96ab5de678c47af83fdae238674f","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                # Automatic JSON parsing"},{"line_number":54,"context_line":"                self.assertEqual(body, {\"hi\": \"there\"})"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def test_get_error(self):"},{"line_number":57,"context_line":"        cl \u003d get_authed_client()"},{"line_number":58,"context_line":"        err_response \u003d {"},{"line_number":59,"context_line":"            \"error\": {"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2F%2Fek%3D","line":56,"in_reply_to":"AAAAOn%2F%2F%2F1A%3D","updated":"2013-04-08 22:28:27.000000000","message":"it might not be the Keystone server responding to the request, for example if the request goes through a proxy or if the client is misconfigured. The keystone client should be able to gracefully handle these responses, too.","commit_id":"f19161bf9a19a454ebf597ff4f2c2cf3f65d5153"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"bb723b2df1123eef68af69b37bab7bcdf3016a5e","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                # Automatic JSON parsing"},{"line_number":54,"context_line":"                self.assertEqual(body, {\"hi\": \"there\"})"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def test_get_error(self):"},{"line_number":57,"context_line":"        cl \u003d get_authed_client()"},{"line_number":58,"context_line":"        err_response \u003d {"},{"line_number":59,"context_line":"            \"error\": {"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2F%2FZM%3D","line":56,"in_reply_to":"AAAAOn%2F%2F%2Fek%3D","updated":"2013-04-08 23:08:43.000000000","message":"With this patch, Keystone client will handle the response correctly. You\u0027ll get either TypeError or ValueError. Originally, the \"evil plaintext string\" was a positive test and it didn\u0027t correctly test the real Keystone response. The mocked response was an imaginary Keystone response. :)\n\nLin is simply correcting it.","commit_id":"f19161bf9a19a454ebf597ff4f2c2cf3f65d5153"},{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"103d5a9c2330a3580c2885c49ad8d3c6f79b30bc","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                self.assertEqual(body, {\"hi\": \"there\"})"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def test_get_error(self):"},{"line_number":57,"context_line":"        cl \u003d get_authed_client()"},{"line_number":58,"context_line":"        err_response \u003d {"},{"line_number":59,"context_line":"            \"error\": {"},{"line_number":60,"context_line":"                \"code\": 400,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2F2Po%3D","line":57,"updated":"2013-04-18 01:58:38.000000000","message":"the plaintext response is critical to catch in the response, as that\u0027s the common response that you\u0027ll see if you have  a timeout behind a proxy service, such as HAProxy. This test *should not* be lost. Another test is perfectly acceptable.","commit_id":"f19161bf9a19a454ebf597ff4f2c2cf3f65d5153"}]}
