)]}'
{"swiftclient/client.py":[{"author":{"_account_id":11864,"name":"Ben Roble","email":"ben.roble@rackspace.com","username":"broble"},"change_message_id":"15097f1be3920f326d55e8799d1837d8bb222591","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            self.parsed_url.scheme,"},{"line_number":231,"context_line":"            self.parsed_url.netloc,"},{"line_number":232,"context_line":"            full_path)"},{"line_number":233,"context_line":"        self._is_resp_stream \u003d self.stream"},{"line_number":234,"context_line":"        self.resp \u003d self._request(method, url, headers\u003dheaders, data\u003ddata,"},{"line_number":235,"context_line":"                                  files\u003dfiles, **self.requests_args)"},{"line_number":236,"context_line":"        return self.resp"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_b8247160","line":233,"updated":"2014-08-29 16:29:38.000000000","message":"Why does this have to be reassigned in this func?","commit_id":"b90ea366b477d44cf734a69eb670931c8df715b2"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"d76c7e103cad3dfaecc5946835572e482e6469f1","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            self.parsed_url.scheme,"},{"line_number":231,"context_line":"            self.parsed_url.netloc,"},{"line_number":232,"context_line":"            full_path)"},{"line_number":233,"context_line":"        self._is_resp_stream \u003d self.stream"},{"line_number":234,"context_line":"        self.resp \u003d self._request(method, url, headers\u003dheaders, data\u003ddata,"},{"line_number":235,"context_line":"                                  files\u003dfiles, **self.requests_args)"},{"line_number":236,"context_line":"        return self.resp"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_5efc25b5","line":233,"in_reply_to":"1abeadc6_b8247160","updated":"2014-08-29 17:36:54.000000000","message":"stream is stored in requests_args and associated with the connection. It can be updated at any time. requests_args is used when establishing a new connection. _is_resp_stream is used to indicate if the response is a stream and is set when a request is made.\n\nstream: can be updated at any time and will effect the next request\n_is_resp_stream: indicates if the stored response is a stream and how to handle it\n\nIt is set here so the response can be handled correctly when it is read.","commit_id":"b90ea366b477d44cf734a69eb670931c8df715b2"},{"author":{"_account_id":11864,"name":"Ben Roble","email":"ben.roble@rackspace.com","username":"broble"},"change_message_id":"15097f1be3920f326d55e8799d1837d8bb222591","unresolved":false,"context_lines":[{"line_number":281,"context_line":"    if conn.stream:"},{"line_number":282,"context_line":"        body \u003d resp.read()"},{"line_number":283,"context_line":"    else:"},{"line_number":284,"context_line":"        body \u003d resp.content"},{"line_number":285,"context_line":"    http_log((url, method,), {}, resp, body)"},{"line_number":286,"context_line":"    url \u003d resp.getheader(\u0027x-storage-url\u0027)"},{"line_number":287,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_98309557","line":284,"updated":"2014-08-29 16:29:38.000000000","message":"I don\u0027t see why all these if conn.stream .... else clauses are needed since you use the partial function in getresponse. \n\nif its a stream, resp.read() \u003d self.resp.raw.read ....\nif its not, resp.read() \u003d str(content)\n\nso why is this if....else clause needed? (Unless I misinterpreted your usage of partial)","commit_id":"b90ea366b477d44cf734a69eb670931c8df715b2"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"d76c7e103cad3dfaecc5946835572e482e6469f1","unresolved":false,"context_lines":[{"line_number":281,"context_line":"    if conn.stream:"},{"line_number":282,"context_line":"        body \u003d resp.read()"},{"line_number":283,"context_line":"    else:"},{"line_number":284,"context_line":"        body \u003d resp.content"},{"line_number":285,"context_line":"    http_log((url, method,), {}, resp, body)"},{"line_number":286,"context_line":"    url \u003d resp.getheader(\u0027x-storage-url\u0027)"},{"line_number":287,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_9ef31d72","line":284,"in_reply_to":"1abeadc6_98309557","updated":"2014-08-29 17:36:54.000000000","message":"They are not needed. I was trying to be explicit and show intent. I should probably change this to be resp.raw.read() instead of resp.read().\n\nA little background:\n\nif stream is true:\n1) raw.read() returns data\n2) content returns None # nothing stored\n3) raw.read() returns None # nothing to read\n\nif stream is true:\n1) content returns data # reads the data and stores it in content\n2) raw.read() returns None # nothing to read\n3) content returns data\n\nif stream is false:\n1) raw.read() returns None # nothing to read\n2) content returns data\n3) content returns data\n\nBecause external code was using read() regardless of if streaming connection or not, I had to make read() behave the same when stream was enabled or disabled.","commit_id":"b90ea366b477d44cf734a69eb670931c8df715b2"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"d76c7e103cad3dfaecc5946835572e482e6469f1","unresolved":false,"context_lines":[{"line_number":917,"context_line":"        return parsed_response[\u0027headers\u0027], object_body"},{"line_number":918,"context_line":""},{"line_number":919,"context_line":"    with closing(conn.request(method, path, \u0027\u0027, headers)):"},{"line_number":920,"context_line":"        parsed_response \u003d _get_parsed_response()"},{"line_number":921,"context_line":"    return parsed_response"},{"line_number":922,"context_line":""},{"line_number":923,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_9ec15de6","line":920,"updated":"2014-08-29 17:36:54.000000000","message":"Is resp.close() being called before it can be read()? It doesn\u0027t seem to be behaving that way based on test results, but....","commit_id":"b90ea366b477d44cf734a69eb670931c8df715b2"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"d76c7e103cad3dfaecc5946835572e482e6469f1","unresolved":false,"context_lines":[{"line_number":1067,"context_line":"                                  http_response_content\u003dbody)"},{"line_number":1068,"context_line":"        return resp.getheader(\u0027etag\u0027, \u0027\u0027).strip(\u0027\"\u0027)"},{"line_number":1069,"context_line":""},{"line_number":1070,"context_line":"    with closing(conn.putrequest(path, headers\u003dheaders, data\u003ddata)):"},{"line_number":1071,"context_line":"        etag \u003d _get_etag()"},{"line_number":1072,"context_line":"    return etag"},{"line_number":1073,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_feb1718f","line":1070,"updated":"2014-08-29 17:36:54.000000000","message":"Is resp.close() being called before it can be read()? It doesn\u0027t seem to be behaving that way based on test results, but....","commit_id":"b90ea366b477d44cf734a69eb670931c8df715b2"},{"author":{"_account_id":11864,"name":"Ben Roble","email":"ben.roble@rackspace.com","username":"broble"},"change_message_id":"d8e53fe094762ffec3dfb20466206748d6b71ca2","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def _request(self, *arg, **kwarg):"},{"line_number":188,"context_line":"        \"\"\" Final wrapper before requests call, to be patched in tests \"\"\""},{"line_number":189,"context_line":"        self._resp_stream \u003d kwarg.get(\u0027stream\u0027, False)"},{"line_number":190,"context_line":"        return self.request_session.request(*arg, **kwarg)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def _encode_meta_headers(self, items):"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_bb5c944c","line":189,"updated":"2014-09-03 20:56:32.000000000","message":"Is this really the best place to set _resp_stream ?","commit_id":"85ab31c122d5016be98ba7e56dc6636e440ebe16"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"ab533f47c80abb3a0de98fb9336196b5ee6afc40","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def _request(self, *arg, **kwarg):"},{"line_number":188,"context_line":"        \"\"\" Final wrapper before requests call, to be patched in tests \"\"\""},{"line_number":189,"context_line":"        self._resp_stream \u003d kwarg.get(\u0027stream\u0027, False)"},{"line_number":190,"context_line":"        return self.request_session.request(*arg, **kwarg)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def _encode_meta_headers(self, items):"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_5e24765f","line":189,"in_reply_to":"fa98f980_bb5c944c","updated":"2014-09-03 21:17:26.000000000","message":"It needs to be set each time a request is made. If stream is set for the request, then it will be set for the response. The response needs to be handled differently based on the value of _resp_stream. This is the final wrapper before the requests call, so it makes sense to me to set it here.","commit_id":"85ab31c122d5016be98ba7e56dc6636e440ebe16"},{"author":{"_account_id":11864,"name":"Ben Roble","email":"ben.roble@rackspace.com","username":"broble"},"change_message_id":"d8e53fe094762ffec3dfb20466206748d6b71ca2","unresolved":false,"context_lines":[{"line_number":1595,"context_line":"                           stream\u003dstream,"},{"line_number":1596,"context_line":"                           )"},{"line_number":1597,"context_line":""},{"line_number":1598,"context_line":"    def get_capabilities(self, url\u003dNone, stream\u003dFalse):"},{"line_number":1599,"context_line":"        if not url:"},{"line_number":1600,"context_line":"            url, _ \u003d self.get_auth()"},{"line_number":1601,"context_line":"        scheme \u003d urlparse(url).scheme"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_3e2df295","line":1598,"updated":"2014-09-03 20:56:32.000000000","message":"Why include stream as a parameter in almost every single method? For a single HTTPConnection will the value of \"stream\" change often?","commit_id":"85ab31c122d5016be98ba7e56dc6636e440ebe16"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"ab533f47c80abb3a0de98fb9336196b5ee6afc40","unresolved":false,"context_lines":[{"line_number":1595,"context_line":"                           stream\u003dstream,"},{"line_number":1596,"context_line":"                           )"},{"line_number":1597,"context_line":""},{"line_number":1598,"context_line":"    def get_capabilities(self, url\u003dNone, stream\u003dFalse):"},{"line_number":1599,"context_line":"        if not url:"},{"line_number":1600,"context_line":"            url, _ \u003d self.get_auth()"},{"line_number":1601,"context_line":"        scheme \u003d urlparse(url).scheme"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_feec4abd","line":1598,"in_reply_to":"fa98f980_3e2df295","updated":"2014-09-03 21:17:26.000000000","message":"By default it only makes sense to enable stream when a large amount of data is being transmitted. This will be common for put_object and get_object, but not for the other calls. Therefore, these calls default to True while the rest default to False. The parameter allows the user to enable or disable stream for each call. However, the user can ignore this parameter and expect it to default to sensible values.\n\nAlso, worth mentioning: The stream really only affects the request/response which is unique to each call, so changing the value between calls is perfectly reasonable. Also, each call will create a new connection, if none is provided, which I expect is the typical use case.","commit_id":"85ab31c122d5016be98ba7e56dc6636e440ebe16"}]}
