)]}'
{"swift/common/internal_client.py":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"feb8b20927a32ea3ab185d075bd27d127cd4e2f4","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        while True:"},{"line_number":289,"context_line":"            resp \u003d self.make_request("},{"line_number":290,"context_line":"                \u0027GET\u0027, \u0027%s?format\u003djson\u0026marker\u003d%s\u0026end_marker\u003d%s\u0026prefix\u003d%s\u0027 %"},{"line_number":291,"context_line":"                (path, bytes_to_wsgi(quote(marker)),"},{"line_number":292,"context_line":"                 bytes_to_wsgi(quote(end_marker)),"},{"line_number":293,"context_line":"                 bytes_to_wsgi(quote(prefix))),"},{"line_number":294,"context_line":"                {}, acceptable_statuses)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_573cc790","line":291,"updated":"2018-09-20 22:42:00.000000000","message":"Why not quote(marker).encode(\u0027ascii\u0027)? What is the encoding of the path in make_request() - wsgi or native platform string? They are indistinguishable over ASCII argument, so the code above works anyway, but I\u0027m concerned to the intent it communicates to the future reader.","commit_id":"e27a5be0b515b8b4f7388c7ff659e4f4584dc88f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a07b6aa2dbaddd26b4e5fb66bd7c81c69b43ec7e","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        while True:"},{"line_number":289,"context_line":"            resp \u003d self.make_request("},{"line_number":290,"context_line":"                \u0027GET\u0027, \u0027%s?format\u003djson\u0026marker\u003d%s\u0026end_marker\u003d%s\u0026prefix\u003d%s\u0027 %"},{"line_number":291,"context_line":"                (path, bytes_to_wsgi(quote(marker)),"},{"line_number":292,"context_line":"                 bytes_to_wsgi(quote(end_marker)),"},{"line_number":293,"context_line":"                 bytes_to_wsgi(quote(prefix))),"},{"line_number":294,"context_line":"                {}, acceptable_statuses)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_7adbea4c","line":291,"in_reply_to":"3f79a3b5_573cc790","updated":"2018-09-21 00:20:40.000000000","message":"The interpolated string gets passed straight into swob.Request.blank, so I was thinking in terms of a wsgi string.\n\n(Small diversion: swob is a little loosey-goosey, though. Passing a unicode in py2 it\u0027ll encode(\u0027utf8\u0027) for you, and passing bytes on py3 it\u0027ll decode(\u0027latin1\u0027).\n\nOnly we can\u0027t have a bytes path *here* on py3 because of the \"b\u0027...\u0027\" string issue. That\u0027s fine because the only callers to _iter_items use make_path which necessarily returns a quoted wsgi/native string. So we just need to make sure account and container are always native or unicode [or risk \"b\u0027...\u0027\"].)\n\nDoing something like quote(marker).decode(\u0027ascii\u0027) makes me nervous on py2 -- interpolating any unicode hoists the result to unicode, which means that a UTF-8-encoded path will hit a UnicodeDecodeError. But maybe that shouldn\u0027t be an issue because of the quoting in make_path? It\u0027d just mean an extra decode/encode cycle.\n\nI\u0027m pretty sure the *only* consistent, safe way to pass path to _iter_items is as a wsgi string, so forcing everything to bytes before quoting (to ensure that the output would be bytes) then using bytes_to_wsgi seemed to make sense. At the level of iter_containers or iter_objects, though, we need account and container to be native strings (or unicode, which is useful when loading JSON) to have make_path do the right thing.","commit_id":"e27a5be0b515b8b4f7388c7ff659e4f4584dc88f"}],"test/unit/common/middleware/helpers.py":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"feb8b20927a32ea3ab185d075bd27d127cd4e2f4","unresolved":false,"context_lines":[{"line_number":30,"context_line":"class LeakTrackingIter(object):"},{"line_number":31,"context_line":"    def __init__(self, inner_iter, mark_closed, path):"},{"line_number":32,"context_line":"        if isinstance(inner_iter, bytes):"},{"line_number":33,"context_line":"            inner_iter \u003d (inner_iter, )"},{"line_number":34,"context_line":"        self.inner_iter \u003d inner_iter"},{"line_number":35,"context_line":"        self.mark_closed \u003d mark_closed"},{"line_number":36,"context_line":"        self.path \u003d path"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_f7ae33e2","line":33,"updated":"2018-09-20 22:42:00.000000000","message":"not bad","commit_id":"e27a5be0b515b8b4f7388c7ff659e4f4584dc88f"}],"test/unit/common/test_internal_client.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9238e6041e02ff11afac7dccc2d7c9ebbe83e8ec","unresolved":false,"context_lines":[{"line_number":1616,"context_line":"                    self.assertEqual(scheme, args[0].type)"},{"line_number":1617,"context_line":"                else:"},{"line_number":1618,"context_line":"                    # TODO: figure out why this happens, whether py2 or py3 is"},{"line_number":1619,"context_line":"                    # messed up, whether we care, and what can be done about it"},{"line_number":1620,"context_line":"                    self.assertEqual(\u0027https\u0027, args[0].type)"},{"line_number":1621,"context_line":""},{"line_number":1622,"context_line":"        # class methods"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_f13cb193","line":1619,"updated":"2018-09-25 19:21:12.000000000","message":"I wrote up https://bugs.python.org/issue34698 about it -- we\u0027ll see if anyone bites. Maybe I should also write up a bug against swift, though, as a means of tracking issues to revisit before declaring py3 support?","commit_id":"e27a5be0b515b8b4f7388c7ff659e4f4584dc88f"}]}
