)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"89335c608c4d99c08d8997c5b6fee9ce7b29a187","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fixed the tests in the `glance.tests.integration` module. Enabled"},{"line_number":10,"context_line":"them to run for py35 job in tox.ini. All changes are related to"},{"line_number":11,"context_line":"string/bytes object differences in python 2.5 vs 3.5."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I26aae0c518fe84c9967461a3b9fef02bc0c17923"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da36d5c6_8802010a","line":11,"updated":"2017-02-21 17:10:45.000000000","message":"Why is Python 2.5 relevant here?","commit_id":"ebff4376c662574022649b354d02817062685b46"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"a821b7005459c07a0d8def254bdab84cde3988fa","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fixed the tests in the `glance.tests.integration` module. Enabled"},{"line_number":10,"context_line":"them to run for py35 job in tox.ini. All changes are related to"},{"line_number":11,"context_line":"string/bytes object differences in python 2.5 vs 3.5."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I26aae0c518fe84c9967461a3b9fef02bc0c17923"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da36d5c6_33e34a07","line":11,"in_reply_to":"da36d5c6_8802010a","updated":"2017-02-21 17:50:39.000000000","message":"Typo, will change to 2.7","commit_id":"ebff4376c662574022649b354d02817062685b46"}],"glance/api/v2/tasks.py":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"89335c608c4d99c08d8997c5b6fee9ce7b29a187","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def _inject_location_header(self, response, task):"},{"line_number":251,"context_line":"        location \u003d self._get_task_location(task)"},{"line_number":252,"context_line":"        response.headers[\u0027Location\u0027] \u003d location"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def _get_task_location(self, task):"},{"line_number":255,"context_line":"        return \u0027/v2/tasks/%s\u0027 % task.task_id"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_882be193","line":252,"updated":"2017-02-21 17:10:45.000000000","message":"Again, this is significant. Have you verified this does not regress a known bug?","commit_id":"ebff4376c662574022649b354d02817062685b46"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"a821b7005459c07a0d8def254bdab84cde3988fa","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def _inject_location_header(self, response, task):"},{"line_number":251,"context_line":"        location \u003d self._get_task_location(task)"},{"line_number":252,"context_line":"        response.headers[\u0027Location\u0027] \u003d location"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def _get_task_location(self, task):"},{"line_number":255,"context_line":"        return \u0027/v2/tasks/%s\u0027 % task.task_id"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_b3e01ace","line":252,"in_reply_to":"da36d5c6_882be193","updated":"2017-02-21 17:50:39.000000000","message":"Aside from passing all the tests locally and all the gates, what else can I do to verify this? I checked the git blame history for this code and it\u0027s been this way from the very beginning. So this was not a change introduce to fix a known bug.\n\nAssuming existing test coverage is sufficient (which seems to be a safe assumption, given that this failed in py35), I think this does not introduce a new bug either.","commit_id":"ebff4376c662574022649b354d02817062685b46"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"7b59861242a45b715e6b4978781684fc5fa7174f","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def _inject_location_header(self, response, task):"},{"line_number":251,"context_line":"        location \u003d self._get_task_location(task)"},{"line_number":252,"context_line":"        response.headers[\u0027Location\u0027] \u003d location"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def _get_task_location(self, task):"},{"line_number":255,"context_line":"        return \u0027/v2/tasks/%s\u0027 % task.task_id"}],"source_content_type":"text/x-python","patch_set":2,"id":"da36d5c6_139b7473","line":252,"updated":"2017-02-22 20:18:55.000000000","message":"I\u0027m not actually convinced our test coverage is sufficient to prevent the possible regression here.","commit_id":"2f11c71ab6c31bdb16bd148e39687ed09e42dd11"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"c1cd2cc99154e4144945e6e650cbab89bc1d64ae","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def _inject_location_header(self, response, task):"},{"line_number":251,"context_line":"        location \u003d self._get_task_location(task)"},{"line_number":252,"context_line":"        response.headers[\u0027Location\u0027] \u003d location"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def _get_task_location(self, task):"},{"line_number":255,"context_line":"        return \u0027/v2/tasks/%s\u0027 % task.task_id"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_2bf9cac7","line":252,"in_reply_to":"da36d5c6_139b7473","updated":"2017-03-09 21:42:14.000000000","message":"I would support adding additional test coverage in this change set, as a \"while you are here\" improvement.","commit_id":"2f11c71ab6c31bdb16bd148e39687ed09e42dd11"}],"glance/tests/integration/legacy_functional/base.py":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"89335c608c4d99c08d8997c5b6fee9ce7b29a187","unresolved":false,"context_lines":[{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def _load_paste_app(self, name, flavor, conf):"},{"line_number":204,"context_line":"        conf_file_path \u003d os.path.join(self.test_dir, \u0027%s-paste.ini\u0027 % name)"},{"line_number":205,"context_line":"        with open(conf_file_path, \u0027w\u0027) as conf_file:"},{"line_number":206,"context_line":"            conf_file.write(conf)"},{"line_number":207,"context_line":"            conf_file.flush()"},{"line_number":208,"context_line":"        return config.load_paste_app(name, flavor\u003dflavor,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_a818a585","line":205,"updated":"2017-02-21 17:10:45.000000000","message":"This is significant. Have you verified this won\u0027t cause issues on Python 2.7?","commit_id":"ebff4376c662574022649b354d02817062685b46"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"a821b7005459c07a0d8def254bdab84cde3988fa","unresolved":false,"context_lines":[{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def _load_paste_app(self, name, flavor, conf):"},{"line_number":204,"context_line":"        conf_file_path \u003d os.path.join(self.test_dir, \u0027%s-paste.ini\u0027 % name)"},{"line_number":205,"context_line":"        with open(conf_file_path, \u0027w\u0027) as conf_file:"},{"line_number":206,"context_line":"            conf_file.write(conf)"},{"line_number":207,"context_line":"            conf_file.flush()"},{"line_number":208,"context_line":"        return config.load_paste_app(name, flavor\u003dflavor,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_53dc3e12","line":205,"in_reply_to":"da36d5c6_a818a585","updated":"2017-02-21 17:50:39.000000000","message":"Yes, this passed the py27 job.","commit_id":"ebff4376c662574022649b354d02817062685b46"}],"glance/tests/integration/legacy_functional/test_v1_api.py":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"89335c608c4d99c08d8997c5b6fee9ce7b29a187","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        # 2. POST /images with public image named Image1"},{"line_number":48,"context_line":"        # attribute and no custom properties. Verify a 200 OK is returned"},{"line_number":49,"context_line":"        image_data \u003d (\"*\" * FIVE_KB).encode()"},{"line_number":50,"context_line":"        headers \u003d minimal_headers(\u0027Image1\u0027)"},{"line_number":51,"context_line":"        path \u003d \"/v1/images\""},{"line_number":52,"context_line":"        response, content \u003d self.http.request(path, \u0027POST\u0027, headers\u003dheaders,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_08161155","line":49,"updated":"2017-02-21 17:10:45.000000000","message":"In a different patch you were doing\n\n     b\"*\" * FIVE_KB\n\nWhy did you do it differently here?","commit_id":"ebff4376c662574022649b354d02817062685b46"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"a821b7005459c07a0d8def254bdab84cde3988fa","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        # 2. POST /images with public image named Image1"},{"line_number":48,"context_line":"        # attribute and no custom properties. Verify a 200 OK is returned"},{"line_number":49,"context_line":"        image_data \u003d (\"*\" * FIVE_KB).encode()"},{"line_number":50,"context_line":"        headers \u003d minimal_headers(\u0027Image1\u0027)"},{"line_number":51,"context_line":"        path \u003d \"/v1/images\""},{"line_number":52,"context_line":"        response, content \u003d self.http.request(path, \u0027POST\u0027, headers\u003dheaders,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_33f42a86","line":49,"in_reply_to":"da36d5c6_08161155","updated":"2017-02-21 17:50:39.000000000","message":"No reason, other than it was done on different days :). I\u0027ll fix this patch for consistency.","commit_id":"ebff4376c662574022649b354d02817062685b46"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"89335c608c4d99c08d8997c5b6fee9ce7b29a187","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        self.assertEqual(image_data, content.encode())"},{"line_number":104,"context_line":"        self.assertEqual(hashlib.md5(image_data).hexdigest(),"},{"line_number":105,"context_line":"                         hashlib.md5(content.encode()).hexdigest())"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        # 5. GET /images"},{"line_number":108,"context_line":"        # Verify no public images"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_280d953e","line":105,"updated":"2017-02-21 17:10:45.000000000","message":"Bare encode\u0027s are *bad*. Choose an encoding, e.g., ascii, utf-8, etc.","commit_id":"ebff4376c662574022649b354d02817062685b46"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"a821b7005459c07a0d8def254bdab84cde3988fa","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        self.assertEqual(image_data, content.encode())"},{"line_number":104,"context_line":"        self.assertEqual(hashlib.md5(image_data).hexdigest(),"},{"line_number":105,"context_line":"                         hashlib.md5(content.encode()).hexdigest())"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        # 5. GET /images"},{"line_number":108,"context_line":"        # Verify no public images"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_f35d327a","line":105,"in_reply_to":"da36d5c6_280d953e","updated":"2017-02-21 17:50:39.000000000","message":"Done","commit_id":"ebff4376c662574022649b354d02817062685b46"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"89335c608c4d99c08d8997c5b6fee9ce7b29a187","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        self.assertEqual(image_id, response[\u0027x-image-meta-id\u0027])"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"        # 4. PUT image with image data, verify 200 returned"},{"line_number":293,"context_line":"        image_data \u003d (\"*\" * FIVE_KB).encode()"},{"line_number":294,"context_line":"        headers \u003d {\u0027Content-Type\u0027: \u0027application/octet-stream\u0027}"},{"line_number":295,"context_line":"        path \u003d \"/v1/images/%s\" % (image_id)"},{"line_number":296,"context_line":"        response, content \u003d self.http.request(path, \u0027PUT\u0027, headers\u003dheaders,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_4808092e","line":293,"updated":"2017-02-21 17:10:45.000000000","message":"Same as above","commit_id":"ebff4376c662574022649b354d02817062685b46"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"a821b7005459c07a0d8def254bdab84cde3988fa","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        self.assertEqual(image_id, response[\u0027x-image-meta-id\u0027])"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"        # 4. PUT image with image data, verify 200 returned"},{"line_number":293,"context_line":"        image_data \u003d (\"*\" * FIVE_KB).encode()"},{"line_number":294,"context_line":"        headers \u003d {\u0027Content-Type\u0027: \u0027application/octet-stream\u0027}"},{"line_number":295,"context_line":"        path \u003d \"/v1/images/%s\" % (image_id)"},{"line_number":296,"context_line":"        response, content \u003d self.http.request(path, \u0027PUT\u0027, headers\u003dheaders,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_1355664f","line":293,"in_reply_to":"da36d5c6_4808092e","updated":"2017-02-21 17:50:39.000000000","message":"Done","commit_id":"ebff4376c662574022649b354d02817062685b46"}],"glance/tests/integration/v2/base.py":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"89335c608c4d99c08d8997c5b6fee9ce7b29a187","unresolved":false,"context_lines":[{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def _load_paste_app(self, name, flavor, conf):"},{"line_number":199,"context_line":"        conf_file_path \u003d os.path.join(self.test_dir, \u0027%s-paste.ini\u0027 % name)"},{"line_number":200,"context_line":"        with open(conf_file_path, \u0027w\u0027) as conf_file:"},{"line_number":201,"context_line":"            conf_file.write(conf)"},{"line_number":202,"context_line":"            conf_file.flush()"},{"line_number":203,"context_line":"        return config.load_paste_app(name, flavor\u003dflavor,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_68078d1c","line":200,"updated":"2017-02-21 17:10:45.000000000","message":"Same concern as above","commit_id":"ebff4376c662574022649b354d02817062685b46"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"a821b7005459c07a0d8def254bdab84cde3988fa","unresolved":false,"context_lines":[{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def _load_paste_app(self, name, flavor, conf):"},{"line_number":199,"context_line":"        conf_file_path \u003d os.path.join(self.test_dir, \u0027%s-paste.ini\u0027 % name)"},{"line_number":200,"context_line":"        with open(conf_file_path, \u0027w\u0027) as conf_file:"},{"line_number":201,"context_line":"            conf_file.write(conf)"},{"line_number":202,"context_line":"            conf_file.flush()"},{"line_number":203,"context_line":"        return config.load_paste_app(name, flavor\u003dflavor,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_738f82cc","line":200,"in_reply_to":"da36d5c6_68078d1c","updated":"2017-02-21 17:50:39.000000000","message":"I\u0027ve verified that this passes py27 job. This will also become obvious once the CI jobs complete.","commit_id":"ebff4376c662574022649b354d02817062685b46"}],"glance/tests/utils.py":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"89335c608c4d99c08d8997c5b6fee9ce7b29a187","unresolved":false,"context_lines":[{"line_number":628,"context_line":"    def request(self, uri, method\u003d\"GET\", body\u003dNone, headers\u003dNone):"},{"line_number":629,"context_line":"        req \u003d webob.Request.blank(uri, method\u003dmethod, headers\u003dheaders)"},{"line_number":630,"context_line":"        if body:"},{"line_number":631,"context_line":"            if type(body) is str:"},{"line_number":632,"context_line":"                req.body \u003d body.encode()"},{"line_number":633,"context_line":"            else:"},{"line_number":634,"context_line":"                req.body \u003d body"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_c81b197f","line":631,"updated":"2017-02-21 17:10:45.000000000","message":"You should not use this comparison. Instead do\n\n    req.body \u003d body\n    if isinstance(body, str):\n        req.body \u003d body.encode(\u0027utf-8\u0027)\n\nAlso, on Python 2.7, str is bytes which means str.encode() -\u003e str. I think what you want to check for is six.text_type","commit_id":"ebff4376c662574022649b354d02817062685b46"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"a821b7005459c07a0d8def254bdab84cde3988fa","unresolved":false,"context_lines":[{"line_number":628,"context_line":"    def request(self, uri, method\u003d\"GET\", body\u003dNone, headers\u003dNone):"},{"line_number":629,"context_line":"        req \u003d webob.Request.blank(uri, method\u003dmethod, headers\u003dheaders)"},{"line_number":630,"context_line":"        if body:"},{"line_number":631,"context_line":"            if type(body) is str:"},{"line_number":632,"context_line":"                req.body \u003d body.encode()"},{"line_number":633,"context_line":"            else:"},{"line_number":634,"context_line":"                req.body \u003d body"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_f3153249","line":631,"in_reply_to":"da36d5c6_c81b197f","updated":"2017-02-21 17:50:39.000000000","message":"Done","commit_id":"ebff4376c662574022649b354d02817062685b46"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"89335c608c4d99c08d8997c5b6fee9ce7b29a187","unresolved":false,"context_lines":[{"line_number":633,"context_line":"            else:"},{"line_number":634,"context_line":"                req.body \u003d body"},{"line_number":635,"context_line":"        resp \u003d req.get_response(self.app)"},{"line_number":636,"context_line":"        return Httplib2WebobResponse(resp), resp.body.decode()"},{"line_number":637,"context_line":""},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"class Httplib2WebobResponse(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_e8129d61","line":636,"updated":"2017-02-21 17:10:45.000000000","message":"Just like bare encode()s, bare decode()s are also bad.","commit_id":"ebff4376c662574022649b354d02817062685b46"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"a821b7005459c07a0d8def254bdab84cde3988fa","unresolved":false,"context_lines":[{"line_number":633,"context_line":"            else:"},{"line_number":634,"context_line":"                req.body \u003d body"},{"line_number":635,"context_line":"        resp \u003d req.get_response(self.app)"},{"line_number":636,"context_line":"        return Httplib2WebobResponse(resp), resp.body.decode()"},{"line_number":637,"context_line":""},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"class Httplib2WebobResponse(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_130d663e","line":636,"in_reply_to":"da36d5c6_e8129d61","updated":"2017-02-21 17:50:39.000000000","message":"Done","commit_id":"ebff4376c662574022649b354d02817062685b46"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"7b59861242a45b715e6b4978781684fc5fa7174f","unresolved":false,"context_lines":[{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    def request(self, uri, method\u003d\"GET\", body\u003dNone, headers\u003dNone):"},{"line_number":629,"context_line":"        req \u003d webob.Request.blank(uri, method\u003dmethod, headers\u003dheaders)"},{"line_number":630,"context_line":"        if isinstance(body, str):"},{"line_number":631,"context_line":"            req.body \u003d body.encode(\u0027utf-8\u0027)"},{"line_number":632,"context_line":"        else:"},{"line_number":633,"context_line":"            req.body \u003d body"}],"source_content_type":"text/x-python","patch_set":2,"id":"da36d5c6_73ae7082","line":630,"updated":"2017-02-22 20:18:55.000000000","message":"Again, I\u0027m not convinced this is what we want to do in the case of Python 2.7.","commit_id":"2f11c71ab6c31bdb16bd148e39687ed09e42dd11"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"c1cd2cc99154e4144945e6e650cbab89bc1d64ae","unresolved":false,"context_lines":[{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    def request(self, uri, method\u003d\"GET\", body\u003dNone, headers\u003dNone):"},{"line_number":629,"context_line":"        req \u003d webob.Request.blank(uri, method\u003dmethod, headers\u003dheaders)"},{"line_number":630,"context_line":"        if isinstance(body, str):"},{"line_number":631,"context_line":"            req.body \u003d body.encode(\u0027utf-8\u0027)"},{"line_number":632,"context_line":"        else:"},{"line_number":633,"context_line":"            req.body \u003d body"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_2b4b8a2b","line":630,"in_reply_to":"da36d5c6_73ae7082","updated":"2017-03-09 21:42:14.000000000","message":"I\u0027m not sure what you\u0027re looking for Ian. \n\nIt seems like we only need to act in the case that we are in py3. I\u0027m probably fouling this completely but would this be simpler as:\n\nif six.PY3:\n  req.body \u003d req.body.decode(\u0027utf-8\u0027)\n\nDoes that address the issue better or is using something like six.string_type or such a better way to flag this?","commit_id":"2f11c71ab6c31bdb16bd148e39687ed09e42dd11"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"db4d687d15470f6386e1373a107e815189ebde96","unresolved":false,"context_lines":[{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    def request(self, uri, method\u003d\"GET\", body\u003dNone, headers\u003dNone):"},{"line_number":629,"context_line":"        req \u003d webob.Request.blank(uri, method\u003dmethod, headers\u003dheaders)"},{"line_number":630,"context_line":"        if isinstance(body, str):"},{"line_number":631,"context_line":"            req.body \u003d body.encode(\u0027utf-8\u0027)"},{"line_number":632,"context_line":"        else:"},{"line_number":633,"context_line":"            req.body \u003d body"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ffa3b31_84fe6a03","line":630,"range":{"start_line":630,"start_character":11,"end_line":630,"end_character":33},"updated":"2017-04-13 20:56:07.000000000","message":"Why not:\n    if six.PY2:\n\nThis will help maintain consistency.","commit_id":"b75a0fcc59457b8c66e97d6ff649e73f23c95e64"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"5cc6fe24e43616cb263523a3560b42ea39c3fd01","unresolved":false,"context_lines":[{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    def request(self, uri, method\u003d\"GET\", body\u003dNone, headers\u003dNone):"},{"line_number":629,"context_line":"        req \u003d webob.Request.blank(uri, method\u003dmethod, headers\u003dheaders)"},{"line_number":630,"context_line":"        if isinstance(body, str):"},{"line_number":631,"context_line":"            req.body \u003d body.encode(\u0027utf-8\u0027)"},{"line_number":632,"context_line":"        else:"},{"line_number":633,"context_line":"            req.body \u003d body"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ffa3b31_87fe6c03","line":630,"range":{"start_line":630,"start_character":11,"end_line":630,"end_character":33},"in_reply_to":"7ffa3b31_84fe6a03","updated":"2017-04-13 21:31:24.000000000","message":"I saw 3 different types of body: bytes, string, and empty (None). The problem in PY3 only arose for the latter case, so this seemed like the best way to achieve consistent behavior in both PY2 and PY3.","commit_id":"b75a0fcc59457b8c66e97d6ff649e73f23c95e64"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"b366ef6e06560c7c93076d9cbc07f4404321439a","unresolved":false,"context_lines":[{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    def request(self, uri, method\u003d\"GET\", body\u003dNone, headers\u003dNone):"},{"line_number":629,"context_line":"        req \u003d webob.Request.blank(uri, method\u003dmethod, headers\u003dheaders)"},{"line_number":630,"context_line":"        if isinstance(body, str):"},{"line_number":631,"context_line":"            req.body \u003d body.encode(\u0027utf-8\u0027)"},{"line_number":632,"context_line":"        else:"},{"line_number":633,"context_line":"            req.body \u003d body"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ffa3b31_72932051","line":630,"range":{"start_line":630,"start_character":11,"end_line":630,"end_character":33},"in_reply_to":"7ffa3b31_87fe6c03","updated":"2017-04-13 22:40:35.000000000","message":"Thanks for clarifying Alex.","commit_id":"b75a0fcc59457b8c66e97d6ff649e73f23c95e64"}]}
