)]}'
{"swift/common/bufferedhttp.py":[{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"69f6b5caea4f95555991eb8bf748450c942b13d4","unresolved":false,"context_lines":[{"line_number":44,"context_line":"httplib._MAXHEADERS \u003d constraints.MAX_HEADER_COUNT"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class BufferedHTTPResponse(HTTPResponse):"},{"line_number":48,"context_line":"    \"\"\"HTTPResponse class that buffers reading of headers\"\"\""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def __init__(self, sock, debuglevel\u003d0, strict\u003d0,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff6b8bd7_73ae7b2f","line":47,"range":{"start_line":47,"start_character":27,"end_line":47,"end_character":39},"updated":"2018-03-07 03:48:09.000000000","message":"started looking at the implementation of HTTPResponse in py3 and was wondering if this class is still needed?\nhttps://github.com/eventlet/eventlet/blob/master/eventlet/green/http/client.py#L272\nThoughts?","commit_id":"ebf290ae62377305d30b11f558805412a885d6be"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"69f6b5caea4f95555991eb8bf748450c942b13d4","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            return buf + HTTPResponse.read(self, smaller_amt)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def readline(self, size\u003d1024):"},{"line_number":118,"context_line":"        # You\u0027d think Python\u0027s httplib would provide this, but it doesn\u0027t."},{"line_number":119,"context_line":"        # It does, however, provide a comment in the HTTPResponse class:"},{"line_number":120,"context_line":"        #"},{"line_number":121,"context_line":"        #  # XXX It would be nice to have readline and __iter__ for this,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff6b8bd7_13761f08","line":118,"range":{"start_line":118,"start_character":10,"end_line":118,"end_character":74},"updated":"2018-03-07 03:48:09.000000000","message":"looks like it does for py3, should we use it?\nhttps://github.com/eventlet/eventlet/blob/master/eventlet/green/httplib.py#L15\nhttps://github.com/eventlet/eventlet/blob/master/eventlet/green/http/client.py#L722\n\nplus it looks like we get no code coverage from unit tests","commit_id":"ebf290ae62377305d30b11f558805412a885d6be"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"69f6b5caea4f95555991eb8bf748450c942b13d4","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                # in the Python source for details."},{"line_number":149,"context_line":"                self._real_socket.close()"},{"line_number":150,"context_line":"            else:"},{"line_number":151,"context_line":"                # Hopefully this is equivalent?"},{"line_number":152,"context_line":"                # TODO: verify that this does everything ^^^^ does for py2"},{"line_number":153,"context_line":"                self._real_socket._real_close()"},{"line_number":154,"context_line":"        self._real_socket \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff6b8bd7_800ad323","line":151,"updated":"2018-03-07 03:48:09.000000000","message":"looks equivalent to me, with some additional error handling:\nhttps://github.com/python/cpython/blob/3.6/Modules/socketmodule.c#L2755\nhttps://github.com/python/cpython/blob/2.7/Modules/socketmodule.c#L2038","commit_id":"ebf290ae62377305d30b11f558805412a885d6be"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"05c725ac8399ee173874572518ea60526e9aaaa1","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        # sock is an eventlet.greenio.GreenSocket"},{"line_number":54,"context_line":"        if six.PY2:"},{"line_number":55,"context_line":"            # sock.fd is a socket._socketobject"},{"line_number":56,"context_line":"            # sock.fd._sock is a socket._socket object, which is what we want."},{"line_number":57,"context_line":"            self._real_socket \u003d sock.fd._sock"},{"line_number":58,"context_line":"        else:"},{"line_number":59,"context_line":"            # sock.fd is a socket.socket, which should have a _real_close"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_f1a2f63f","line":56,"range":{"start_line":56,"start_character":33,"end_line":56,"end_character":47},"updated":"2018-08-01 19:09:28.000000000","message":"This comment is (slightly) inaccurate -- socket._socket is a module, not an object, and the _sock on a socket._socketobject is a _socket.socket:\n\n \u003e\u003e\u003e socket._socket\n \u003cmodule \u0027_socket\u0027 (built-in)\u003e\n \u003e\u003e\u003e s\u003dsocket.socket()\n \u003e\u003e\u003e s\n \u003csocket._socketobject object at 0x7ff136eb6910\u003e\n \u003e\u003e\u003e type(s._sock)\n \u003ctype \u0027_socket.socket\u0027\u003e","commit_id":"f96c2b17fcb705543c7349e64a8eaf36635b4dda"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"05c725ac8399ee173874572518ea60526e9aaaa1","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        self.chunk_left \u003d _UNKNOWN      # bytes left to read in current chunk"},{"line_number":75,"context_line":"        self.length \u003d _UNKNOWN          # number of bytes left in response"},{"line_number":76,"context_line":"        self.will_close \u003d _UNKNOWN      # conn will close at end of response"},{"line_number":77,"context_line":"        self._readline_buffer \u003d \u0027\u0027"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def expect_response(self):"},{"line_number":80,"context_line":"        if self.fp:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_120b0622","line":77,"range":{"start_line":77,"start_character":32,"end_line":77,"end_character":34},"updated":"2018-08-01 19:09:28.000000000","message":"bytes","commit_id":"f96c2b17fcb705543c7349e64a8eaf36635b4dda"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"05c725ac8399ee173874572518ea60526e9aaaa1","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            self.status \u003d status"},{"line_number":90,"context_line":"            self.reason \u003d reason.strip()"},{"line_number":91,"context_line":"            self.version \u003d 11"},{"line_number":92,"context_line":"            self.msg \u003d HTTPMessage(self.fp, 0)"},{"line_number":93,"context_line":"            self.msg.fp \u003d None"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def read(self, amt\u003dNone):"},{"line_number":96,"context_line":"        if not self._readline_buffer:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_72235aab","line":93,"range":{"start_line":92,"start_character":12,"end_line":93,"end_character":30},"updated":"2018-08-01 19:09:28.000000000","message":"This isn\u0027t quite right under py3... things get.. messy. Check out http.client.parse_headers instead?","commit_id":"f96c2b17fcb705543c7349e64a8eaf36635b4dda"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"05c725ac8399ee173874572518ea60526e9aaaa1","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            # Unbounded read: send anything we have buffered plus whatever"},{"line_number":101,"context_line":"            # is left."},{"line_number":102,"context_line":"            buffered \u003d self._readline_buffer"},{"line_number":103,"context_line":"            self._readline_buffer \u003d \u0027\u0027"},{"line_number":104,"context_line":"            return buffered + HTTPResponse.read(self, amt)"},{"line_number":105,"context_line":"        elif amt \u003c\u003d len(self._readline_buffer):"},{"line_number":106,"context_line":"            # Bounded read that we can satisfy entirely from our buffer"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_521e5e5e","line":103,"range":{"start_line":103,"start_character":36,"end_line":103,"end_character":38},"updated":"2018-08-01 19:09:28.000000000","message":"bytes","commit_id":"f96c2b17fcb705543c7349e64a8eaf36635b4dda"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"05c725ac8399ee173874572518ea60526e9aaaa1","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            # Bounded read that wants more bytes than we have"},{"line_number":112,"context_line":"            smaller_amt \u003d amt - len(self._readline_buffer)"},{"line_number":113,"context_line":"            buf \u003d self._readline_buffer"},{"line_number":114,"context_line":"            self._readline_buffer \u003d \u0027\u0027"},{"line_number":115,"context_line":"            return buf + HTTPResponse.read(self, smaller_amt)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def readline(self, size\u003d1024):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_b22c9294","line":114,"range":{"start_line":114,"start_character":36,"end_line":114,"end_character":38},"updated":"2018-08-01 19:09:28.000000000","message":"bytes","commit_id":"f96c2b17fcb705543c7349e64a8eaf36635b4dda"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"05c725ac8399ee173874572518ea60526e9aaaa1","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        #  # too."},{"line_number":123,"context_line":"        #"},{"line_number":124,"context_line":"        # Yes, it certainly would."},{"line_number":125,"context_line":"        while (\u0027\\n\u0027 not in self._readline_buffer"},{"line_number":126,"context_line":"               and len(self._readline_buffer) \u003c size):"},{"line_number":127,"context_line":"            read_size \u003d size - len(self._readline_buffer)"},{"line_number":128,"context_line":"            chunk \u003d HTTPResponse.read(self, read_size)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_d2290e83","line":125,"range":{"start_line":125,"start_character":15,"end_line":125,"end_character":19},"updated":"2018-08-01 19:09:28.000000000","message":"bytes","commit_id":"f96c2b17fcb705543c7349e64a8eaf36635b4dda"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"05c725ac8399ee173874572518ea60526e9aaaa1","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                break"},{"line_number":131,"context_line":"            self._readline_buffer +\u003d chunk"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        line, newline, rest \u003d self._readline_buffer.partition(\u0027\\n\u0027)"},{"line_number":134,"context_line":"        self._readline_buffer \u003d rest"},{"line_number":135,"context_line":"        return line + newline"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_924dd672","line":133,"range":{"start_line":133,"start_character":62,"end_line":133,"end_character":66},"updated":"2018-08-01 19:09:28.000000000","message":"bytes","commit_id":"f96c2b17fcb705543c7349e64a8eaf36635b4dda"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"05c725ac8399ee173874572518ea60526e9aaaa1","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            else:"},{"line_number":151,"context_line":"                # Hopefully this is equivalent?"},{"line_number":152,"context_line":"                # TODO: verify that this does everything ^^^^ does for py2"},{"line_number":153,"context_line":"                self._real_socket._real_close()"},{"line_number":154,"context_line":"        self._real_socket \u003d None"},{"line_number":155,"context_line":"        self.close()"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_ec2c5995","line":153,"updated":"2018-08-01 19:09:28.000000000","message":"\u003e Tim, please have a look at this: http://www.zaitcev.us/things/swift-c548727-2z.diff\n\nI\u0027m not sure that\u0027s really equivalent.\n\n\u003e it\u0027s just that the fp must be closed too before the OS fd gets closed\n\nIsn\u0027t that the case in py2 as well, though?\n\nI thought the point of nuke_from_orbit was to forcibly close the socket, regardless of who might be holding onto a reference or who else make have called makefile.\n\nTo that end, this seems to match that intent as well as I know how, given that it goes clear down to C-land and calls _socket.socket.close(), ignoring the _io_refs counting.","commit_id":"f96c2b17fcb705543c7349e64a8eaf36635b4dda"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"05c725ac8399ee173874572518ea60526e9aaaa1","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        self.close()"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def close(self):"},{"line_number":158,"context_line":"        HTTPResponse.close(self)"},{"line_number":159,"context_line":"        self.sock \u003d None"},{"line_number":160,"context_line":"        self._real_socket \u003d None"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_f12c3695","line":158,"range":{"start_line":158,"start_character":8,"end_line":158,"end_character":32},"updated":"2018-08-01 19:09:28.000000000","message":"If just calling self.fp.close() were enough, wouldn\u0027t this already cover that? See https://github.com/eventlet/eventlet/blob/v0.23.0/eventlet/green/http/client.py#L454-L464 Or was the order important (close fd, close _real_socket) important in your patch, Pete?","commit_id":"f96c2b17fcb705543c7349e64a8eaf36635b4dda"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"05c725ac8399ee173874572518ea60526e9aaaa1","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                                         skip_accept_encoding)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def getexpect(self):"},{"line_number":180,"context_line":"        response \u003d BufferedHTTPResponse(self.sock, strict\u003dself.strict,"},{"line_number":181,"context_line":"                                        method\u003dself._method)"},{"line_number":182,"context_line":"        response.expect_response()"},{"line_number":183,"context_line":"        return response"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_3275e286","line":180,"range":{"start_line":180,"start_character":58,"end_line":180,"end_character":69},"updated":"2018-08-01 19:09:28.000000000","message":"Per the 3.4 release notes,\n\n\u003e The strict argument to HTTPConnection and HTTPSConnection has been removed.","commit_id":"f96c2b17fcb705543c7349e64a8eaf36635b4dda"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"9ecc1f5c9d83952526a90c16975232169e6ae2b9","unresolved":false,"context_lines":[{"line_number":255,"context_line":"    else:"},{"line_number":256,"context_line":"        conn \u003d BufferedHTTPConnection(\u0027%s:%s\u0027 % (ipaddr, port))"},{"line_number":257,"context_line":"    if query_string:"},{"line_number":258,"context_line":"        path +\u003d \u0027?\u0027 + query_string"},{"line_number":259,"context_line":"    conn.path \u003d path"},{"line_number":260,"context_line":"    conn.putrequest(method, path, skip_host\u003d(headers and \u0027Host\u0027 in headers))"},{"line_number":261,"context_line":"    if headers:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_e852cd34","line":258,"updated":"2018-08-16 03:22:13.000000000","message":"It appears that we\u0027re adding unicode to path here. Regardless of the type of the query_string, the \u0027?\u0027 is a unicode literal in py3. However, if you look above, at line 238, the path is always bytes. Is this going to cause \"TypeError: can\u0027t concat str to bytes\"?","commit_id":"7387749753b76fd1c1ca17d44e106abaaf78fe7a"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"a05ba794b9c0353b02440ee93ad21a44786f0610","unresolved":false,"context_lines":[{"line_number":255,"context_line":"    else:"},{"line_number":256,"context_line":"        conn \u003d BufferedHTTPConnection(\u0027%s:%s\u0027 % (ipaddr, port))"},{"line_number":257,"context_line":"    if query_string:"},{"line_number":258,"context_line":"        path +\u003d \u0027?\u0027 + query_string"},{"line_number":259,"context_line":"    conn.path \u003d path"},{"line_number":260,"context_line":"    conn.putrequest(method, path, skip_host\u003d(headers and \u0027Host\u0027 in headers))"},{"line_number":261,"context_line":"    if headers:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_4b6e5bc9","line":258,"in_reply_to":"3f79a3b5_e852cd34","updated":"2018-08-16 03:39:20.000000000","message":"Never mind, I know what\u0027s going on. quote() always returns str, no matter what.","commit_id":"7387749753b76fd1c1ca17d44e106abaaf78fe7a"}],"test/unit/common/test_bufferedhttp.py":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"2c888eeea5fb75da0e5f2c8df0756b181e986f35","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                             b\u0027RESPONSE\u0027)"},{"line_number":57,"context_line":"                    fp.flush()"},{"line_number":58,"context_line":"                    line \u003d fp.readline()"},{"line_number":59,"context_line":"                    print(repr(line))"},{"line_number":60,"context_line":"                    path \u003d b\u0027/dev/\u0027 + expected_par + b\u0027/path/..%25/?omg\u0026no\u003d%7f\u0027"},{"line_number":61,"context_line":"                    self.assertEqual("},{"line_number":62,"context_line":"                        line,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_7270430a","line":59,"updated":"2018-07-05 03:35:29.000000000","message":"is this print() a debug leftover?","commit_id":"f96c2b17fcb705543c7349e64a8eaf36635b4dda"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"05c725ac8399ee173874572518ea60526e9aaaa1","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                             b\u0027RESPONSE\u0027)"},{"line_number":57,"context_line":"                    fp.flush()"},{"line_number":58,"context_line":"                    line \u003d fp.readline()"},{"line_number":59,"context_line":"                    print(repr(line))"},{"line_number":60,"context_line":"                    path \u003d b\u0027/dev/\u0027 + expected_par + b\u0027/path/..%25/?omg\u0026no\u003d%7f\u0027"},{"line_number":61,"context_line":"                    self.assertEqual("},{"line_number":62,"context_line":"                        line,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_f2c0ca7f","line":59,"in_reply_to":"5f7c97a3_7270430a","updated":"2018-08-01 19:09:28.000000000","message":"Yep, surely.","commit_id":"f96c2b17fcb705543c7349e64a8eaf36635b4dda"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"af52c23d5bcce9a92927cd795653fd5fbacd1807","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                             b\u0027RESPONSE\u0027)"},{"line_number":57,"context_line":"                    fp.flush()"},{"line_number":58,"context_line":"                    line \u003d fp.readline()"},{"line_number":59,"context_line":"                    print(repr(line))"},{"line_number":60,"context_line":"                    path \u003d b\u0027/dev/\u0027 + expected_par + b\u0027/path/..%25/?omg\u0026no\u003d%7f\u0027"},{"line_number":61,"context_line":"                    self.assertEqual("},{"line_number":62,"context_line":"                        line,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_cdbaf86c","line":59,"range":{"start_line":59,"start_character":31,"end_line":59,"end_character":35},"updated":"2018-08-22 09:50:25.000000000","message":"Looks like a debugging leftover?","commit_id":"2f04238360f9e5f2066bb331b04ca31121355443"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"bc4ac192afac8bcbe69df740c6a2dd02e880721d","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                             b\u0027RESPONSE\u0027)"},{"line_number":57,"context_line":"                    fp.flush()"},{"line_number":58,"context_line":"                    line \u003d fp.readline()"},{"line_number":59,"context_line":"                    print(repr(line))"},{"line_number":60,"context_line":"                    path \u003d b\u0027/dev/\u0027 + expected_par + b\u0027/path/..%25/?omg\u0026no\u003d%7f\u0027"},{"line_number":61,"context_line":"                    self.assertEqual("},{"line_number":62,"context_line":"                        line,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_7d7f9dde","line":59,"range":{"start_line":59,"start_character":31,"end_line":59,"end_character":35},"in_reply_to":"3f79a3b5_cdbaf86c","updated":"2018-08-24 00:16:39.000000000","message":"Done","commit_id":"2f04238360f9e5f2066bb331b04ca31121355443"}]}
