)]}'
{"openstack/common/strutils.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"43e1c280e1d75228279f77a885f6cfd80a8c4287","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    if hasattr(encoding, \u0027lower\u0027):"},{"line_number":187,"context_line":"        encoding \u003d encoding.lower()"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    if isinstance(text, six.text_type) and encoding !\u003d incoming:"},{"line_number":190,"context_line":"        return text.encode(encoding, errors)"},{"line_number":191,"context_line":"    elif text and encoding !\u003d incoming:"},{"line_number":192,"context_line":"        # Decode text before encoding it with `encoding`"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_19f7f55b","line":189,"updated":"2014-08-05 18:31:17.000000000","message":"Isn\u0027t calling encode with the same encoding a noop?  Just wondering why this was added.","commit_id":"56cb7b02e384031b4dce3dc483031cd5718be102"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"368a1a1da683550f91b3c3072adcbe2150a8349f","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    if hasattr(encoding, \u0027lower\u0027):"},{"line_number":187,"context_line":"        encoding \u003d encoding.lower()"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    if isinstance(text, six.text_type) and encoding !\u003d incoming:"},{"line_number":190,"context_line":"        return text.encode(encoding, errors)"},{"line_number":191,"context_line":"    elif text and encoding !\u003d incoming:"},{"line_number":192,"context_line":"        # Decode text before encoding it with `encoding`"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_248bb06a","line":189,"in_reply_to":"baada198_19f7f55b","updated":"2014-08-05 18:51:46.000000000","message":"It does encode in any case, otherwise there would not be a bug. This was added to avoid encode when we already have desired encoding.\nJust try it, there are different responses with change and without.","commit_id":"56cb7b02e384031b4dce3dc483031cd5718be102"}],"tests/unit/test_strutils.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"43e1c280e1d75228279f77a885f6cfd80a8c4287","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        self.assertEqual(six.u(\u0027foo\u0027), safe_decode(b\u0027foo\u0027))"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def test_safe_encode_none_instead_of_text(self):"},{"line_number":170,"context_line":"        self.assertRaises(TypeError, strutils.safe_encode, None)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_safe_encode_bool_instead_of_text(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_7912b1b4","line":169,"updated":"2014-08-05 18:31:17.000000000","message":"These test additions seem unrelated to this fix.  I\u0027d prefer to see them done as their own commit so they don\u0027t get lost if we would happen to need to revert this for some reason.","commit_id":"56cb7b02e384031b4dce3dc483031cd5718be102"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"368a1a1da683550f91b3c3072adcbe2150a8349f","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        self.assertEqual(six.u(\u0027foo\u0027), safe_decode(b\u0027foo\u0027))"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def test_safe_encode_none_instead_of_text(self):"},{"line_number":170,"context_line":"        self.assertRaises(TypeError, strutils.safe_encode, None)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_safe_encode_bool_instead_of_text(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_04186c1e","line":169,"in_reply_to":"baada198_7912b1b4","updated":"2014-08-05 18:51:46.000000000","message":"Why tests should not be reverted too in mentioned case? Logic changed, tests rewrited.\nIf separate them,  it does not mean at all, that tests will be merged too. Also, part of tests should be changed with change of method in one commit.","commit_id":"56cb7b02e384031b4dce3dc483031cd5718be102"}]}
