)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bba772d2b08488ed7de0fef7ea220f7c999c3df1","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change set is a follow up to change set"},{"line_number":10,"context_line":"I653282a030d03362dfca0fd1026cebe920d54e37. In that change"},{"line_number":11,"context_line":"set it was released after merging that unicode values in"},{"line_number":12,"context_line":"Exceptions would break when cast to a str. This change set"},{"line_number":13,"context_line":"addresses that failure by using six.text_type instead of str."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bf659307_545008d5","line":11,"range":{"start_line":11,"start_character":11,"end_line":11,"end_character":19},"updated":"2018-04-05 20:50:05.000000000","message":"realized?","commit_id":"dd433ccb7e5942bd9c47c47131df6f55b33d1dec"},{"author":{"_account_id":22522,"name":"Tyler Blakeslee","email":"tblakes@us.ibm.com","username":"tblakes"},"change_message_id":"76ea6180d643d55fb3da351d04bd707cbfa6a9a1","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change set is a follow up to change set"},{"line_number":10,"context_line":"I653282a030d03362dfca0fd1026cebe920d54e37. In that change"},{"line_number":11,"context_line":"set it was released after merging that unicode values in"},{"line_number":12,"context_line":"Exceptions would break when cast to a str. This change set"},{"line_number":13,"context_line":"addresses that failure by using six.text_type instead of str."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bf659307_b497243b","line":11,"range":{"start_line":11,"start_character":11,"end_line":11,"end_character":19},"in_reply_to":"bf659307_545008d5","updated":"2018-04-05 21:04:30.000000000","message":"Done","commit_id":"dd433ccb7e5942bd9c47c47131df6f55b33d1dec"}],"nova/tests/unit/test_exception.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cb0307a7ac101181e1ba896adaf75e6e4d62f89f","unresolved":false,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def test_repr_exception_with_unicode(self):"},{"line_number":250,"context_line":"        class FakeNovaException(exception.NovaException):"},{"line_number":251,"context_line":"            msg_fmt \u003d u\"some message\""},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        mock_exc \u003d FakeNovaException(code\u003d500)"},{"line_number":254,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_f4eefc89","line":251,"updated":"2018-04-05 21:27:44.000000000","message":"Hmm, this doesn\u0027t cause a failure if I remove the code change, so we likely need a better test to recreate the issue we\u0027re trying to fix. Looking at another unicode test, I found that this will make it blow up with a UnicodeDecodeError:\n\n  b\"failed: \\xe9\\x94\\x99\\xe8\\xaf\\xaf\\xe3\\x80\\x82\"","commit_id":"88f1491afbc1393ca781bca6ebc9f9ee2537aa3e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"551979d50765b27b995249a38254444ed9b81fe4","unresolved":false,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def test_repr_exception_with_unicode(self):"},{"line_number":250,"context_line":"        class FakeNovaException(exception.NovaException):"},{"line_number":251,"context_line":"            msg_fmt \u003d u\"some message\""},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        mock_exc \u003d FakeNovaException(code\u003d500)"},{"line_number":254,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_945b0053","line":251,"in_reply_to":"bf659307_f4eefc89","updated":"2018-04-05 21:32:03.000000000","message":"Yep, good call. I\u0027ve seen this before. The message has to contain at least one item that will fail to decode in order for the test to do what we want.","commit_id":"88f1491afbc1393ca781bca6ebc9f9ee2537aa3e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a89f2164539de640609a37e73b0e61c058e0fd59","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        self.assertEqual(500, exc_kwargs.get(\u0027code\u0027))"},{"line_number":263,"context_line":"        self.assertEqual(b\u0027failed: \\xe9\\x94\\x99\\xe8\\xaf\\xaf\\xe3\\x80\\x82\u0027,"},{"line_number":264,"context_line":"                         eval_repr.get(\u0027message\u0027))"},{"line_number":265,"context_line":"        self.assertEqual(\u0027FakeNovaException\u0027, eval_repr.get(\u0027class\u0027))"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"class ConvertedExceptionTestCase(test.NoDBTestCase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_fab493f4","line":265,"updated":"2018-04-06 17:56:39.000000000","message":"I couldn\u0027t get this test to fail either after reverting the fix. First, I found that the unicode message needs to be something prefixed with \u0027u\u0027 in order to cause the problem I *thought* was going to happen:\n\n u\u0027failed: \\xe9\\x94\\x99\\xe8\\xaf\\xaf\\xe3\\x80\\x82\u0027\n\nbut then after that, the test still doesn\u0027t fail with the fix reverted.\n\nTesting interactively I found:\n\n \u003e\u003e\u003e str(u\u0027failed: \\xe9\\x94\\x99\\xe8\\xaf\\xaf\\xe3\\x80\\x82\u0027)\n Traceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n UnicodeEncodeError: \u0027ascii\u0027 codec can\u0027t encode characters in position 8-16: ordinal not in range(128)\n\nbut:\n\n \u003e\u003e\u003e d \u003d {\u0027class\u0027: \u0027FakeNovaException\u0027, \u0027kwargs\u0027: {\u0027code\u0027: 500}, \u0027message\u0027: u\u0027failed: \\xe9\\x94\\x99\\xe8\\xaf\\xaf\\xe3\\x80\\x82\u0027}\n \u003e\u003e\u003e str(d)\n\"{\u0027message\u0027: u\u0027failed: \\\\xe9\\\\x94\\\\x99\\\\xe8\\\\xaf\\\\xaf\\\\xe3\\\\x80\\\\x82\u0027, \u0027class\u0027: \u0027FakeNovaException\u0027, \u0027kwargs\u0027: {\u0027code\u0027: 500}}\"\n\nSo apparently when the unicode message is embedded in a dict, it won\u0027t blow up when str() is called on it.\n\nBased on this, it looks like we don\u0027t have a problem here and don\u0027t need this patch after all.","commit_id":"cf904190d428bb8644ed8893fad1a8ad05f0c054"}]}
