)]}'
{"rally/plugins/openstack/wrappers/glance.py":[{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"a633cc22d80bb9493f53468a692552899e1dbe83","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            if os.path.isfile(image_location):"},{"line_number":168,"context_line":"                image_data \u003d open(image_location)"},{"line_number":169,"context_line":"            else:"},{"line_number":170,"context_line":"                response \u003d requests.get(image_location, stream\u003dTrue)"},{"line_number":171,"context_line":"                image_data \u003d response.raw"},{"line_number":172,"context_line":"            self.client.images.upload(image.id, image_data)"},{"line_number":173,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_f3ea2e73","line":170,"updated":"2016-03-31 08:57:50.000000000","message":"But response anyway would be stored in memory... So did we fix an issues that pointed in commit message. Also This will work much slower and we will not able to interrupt connection until it will finish. From docs \"Requests cannot release the connection back to the pool unless you consume all the data or call Response.close\"","commit_id":"f05c249b00e97ec93f3a1347c47dd888cf7584b2"},{"author":{"_account_id":12637,"name":"Srinivas Sakhamuri","email":"srini.openstack@gmail.com","username":"srsakhamuri"},"change_message_id":"65b2a0acd551cccf6f6ea2b6e3e0c5c5213df8c4","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            if os.path.isfile(image_location):"},{"line_number":168,"context_line":"                image_data \u003d open(image_location)"},{"line_number":169,"context_line":"            else:"},{"line_number":170,"context_line":"                response \u003d requests.get(image_location, stream\u003dTrue)"},{"line_number":171,"context_line":"                image_data \u003d response.raw"},{"line_number":172,"context_line":"            self.client.images.upload(image.id, image_data)"},{"line_number":173,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_33a3f101","line":170,"in_reply_to":"ba0121b8_3e946d41","updated":"2016-03-31 14:43:59.000000000","message":"I don\u0027t understand. here is how \u0027stream\u0027 param is used, http://docs.python-requests.org/en/master/user/advanced/#body-content-workflow","commit_id":"f05c249b00e97ec93f3a1347c47dd888cf7584b2"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"bd51d3646d033f72287c28791ca1fabd836b90d9","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            if os.path.isfile(image_location):"},{"line_number":168,"context_line":"                image_data \u003d open(image_location)"},{"line_number":169,"context_line":"            else:"},{"line_number":170,"context_line":"                response \u003d requests.get(image_location, stream\u003dTrue)"},{"line_number":171,"context_line":"                image_data \u003d response.raw"},{"line_number":172,"context_line":"            self.client.images.upload(image.id, image_data)"},{"line_number":173,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_3e946d41","line":170,"in_reply_to":"ba0121b8_f3ea2e73","updated":"2016-03-31 09:06:44.000000000","message":"How about to add `stream` to kwargs?","commit_id":"f05c249b00e97ec93f3a1347c47dd888cf7584b2"},{"author":{"_account_id":12637,"name":"Srinivas Sakhamuri","email":"srini.openstack@gmail.com","username":"srsakhamuri"},"change_message_id":"65b2a0acd551cccf6f6ea2b6e3e0c5c5213df8c4","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            if os.path.isfile(image_location):"},{"line_number":168,"context_line":"                image_data \u003d open(image_location)"},{"line_number":169,"context_line":"            else:"},{"line_number":170,"context_line":"                response \u003d requests.get(image_location, stream\u003dTrue)"},{"line_number":171,"context_line":"                image_data \u003d response.raw"},{"line_number":172,"context_line":"            self.client.images.upload(image.id, image_data)"},{"line_number":173,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_c02d7da9","line":170,"in_reply_to":"ba0121b8_f3ea2e73","updated":"2016-03-31 14:43:59.000000000","message":"Yes this has fixed image upload issue that we are seeing. Response is streamed with httpresponse handle to server. good point on response.close","commit_id":"f05c249b00e97ec93f3a1347c47dd888cf7584b2"},{"author":{"_account_id":7369,"name":"Sergey Skripnick","email":"sskripnick@mirantis.com","username":"redixin"},"change_message_id":"0d28f8bb7bf663b818add55e1f18ff72dea5f218","unresolved":false,"context_lines":[{"line_number":169,"context_line":"                image_data \u003d open(image_location)"},{"line_number":170,"context_line":"            else:"},{"line_number":171,"context_line":"                response \u003d requests.get(image_location,"},{"line_number":172,"context_line":"                                        stream\u003dkwargs.get(\"stream\", True))"},{"line_number":173,"context_line":"                image_data \u003d response.raw"},{"line_number":174,"context_line":"            self.client.images.upload(image.id, image_data)"},{"line_number":175,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a061dce_9404ec7e","line":172,"updated":"2016-04-05 04:04:26.000000000","message":"response.raw is not working if stream\u003dFalse.\n\nI wonder why Roman suggested to make \"stream\" optional. It is completely okay to use stream\u003dTrue. It definitely fixes memory usage issue.","commit_id":"5b4e3eac12fa2f33205b9e171ef25ee119b22d02"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"8fb956fde80cc1b96dc22e2f2b14420c76812454","unresolved":false,"context_lines":[{"line_number":169,"context_line":"                image_data \u003d open(image_location)"},{"line_number":170,"context_line":"            else:"},{"line_number":171,"context_line":"                response \u003d requests.get(image_location,"},{"line_number":172,"context_line":"                                        stream\u003dkwargs.get(\"stream\", True))"},{"line_number":173,"context_line":"                image_data \u003d response.raw"},{"line_number":174,"context_line":"            self.client.images.upload(image.id, image_data)"},{"line_number":175,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a061dce_b919177c","line":172,"in_reply_to":"9a061dce_9404ec7e","updated":"2016-04-05 11:05:07.000000000","message":"Okey, possibly Chris have bad internet connection. And usage of response.raw requires stream\u003dTrue [0] then lets keep as it was. Without optional usage, hardcoded. Sorry for misleading!\n[0] http://docs.python-requests.org/en/master/api/#requests.Response.raw","commit_id":"5b4e3eac12fa2f33205b9e171ef25ee119b22d02"}]}
