)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13463,"name":"Amaury Medeiros","email":"amaurymedeiros@gmail.com","username":"amaurymedeiros"},"change_message_id":"4f5d73d4336a8eb998e8ac64c83275f68d14837f","unresolved":false,"context_lines":[{"line_number":27,"context_line":"the assumption the caller has taken all responsibility for"},{"line_number":28,"context_line":"the stream.  But with Python2 if the caller allows us to"},{"line_number":29,"context_line":"default the I/O streams to sys.stdin, sys.stdout and"},{"line_number":30,"context_line":"sys.stderr we apply the locales encoding just as Pytyhon3"},{"line_number":31,"context_line":"would do. We also check to make sure the main Python program"},{"line_number":32,"context_line":"has not already already wrapped sys.stdin, sys.stdout and"},{"line_number":33,"context_line":"sys.stderr as this is a common recommendation."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"dada55a8_fef512ed","line":30,"range":{"start_line":30,"start_character":49,"end_line":30,"end_character":57},"updated":"2016-07-25 12:25:50.000000000","message":"nit: Python3","commit_id":"c70f5c95d13561a9d974307ada9b5c260dc2edd6"},{"author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"change_message_id":"949ad5b00a97e9aad4b46b3406ead3495f5b005c","unresolved":false,"context_lines":[{"line_number":27,"context_line":"the assumption the caller has taken all responsibility for"},{"line_number":28,"context_line":"the stream.  But with Python2 if the caller allows us to"},{"line_number":29,"context_line":"default the I/O streams to sys.stdin, sys.stdout and"},{"line_number":30,"context_line":"sys.stderr we apply the locales encoding just as Pytyhon3"},{"line_number":31,"context_line":"would do. We also check to make sure the main Python program"},{"line_number":32,"context_line":"has not already already wrapped sys.stdin, sys.stdout and"},{"line_number":33,"context_line":"sys.stderr as this is a common recommendation."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bacf61ea_e9872010","line":30,"range":{"start_line":30,"start_character":49,"end_line":30,"end_character":57},"in_reply_to":"dada55a8_fef512ed","updated":"2016-08-03 20:11:41.000000000","message":"Done","commit_id":"c70f5c95d13561a9d974307ada9b5c260dc2edd6"},{"author":{"_account_id":13463,"name":"Amaury Medeiros","email":"amaurymedeiros@gmail.com","username":"amaurymedeiros"},"change_message_id":"4f5d73d4336a8eb998e8ac64c83275f68d14837f","unresolved":false,"context_lines":[{"line_number":41,"context_line":"the patch to be skipped. Having the unit test supply a stream with and"},{"line_number":42,"context_line":"without the correct encoding is not interesting or"},{"line_number":43,"context_line":"meaningful. Properly testing this probably would require spawing a"},{"line_number":44,"context_line":"subshell but one can\u0027t use Pythons subcommand because the I/O streams"},{"line_number":45,"context_line":"are not attached to a TTY. One could set up a ptty (pseudo-terminal)"},{"line_number":46,"context_line":"but experience has shown ptty\u0027s to be non-portable across operating"},{"line_number":47,"context_line":"systems and environments, getting a ptty to work correctly in all"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"dada55a8_de364eb3","line":44,"range":{"start_line":44,"start_character":27,"end_line":44,"end_character":34},"updated":"2016-07-25 12:25:50.000000000","message":"nit: Python\u0027s","commit_id":"c70f5c95d13561a9d974307ada9b5c260dc2edd6"},{"author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"change_message_id":"949ad5b00a97e9aad4b46b3406ead3495f5b005c","unresolved":false,"context_lines":[{"line_number":41,"context_line":"the patch to be skipped. Having the unit test supply a stream with and"},{"line_number":42,"context_line":"without the correct encoding is not interesting or"},{"line_number":43,"context_line":"meaningful. Properly testing this probably would require spawing a"},{"line_number":44,"context_line":"subshell but one can\u0027t use Pythons subcommand because the I/O streams"},{"line_number":45,"context_line":"are not attached to a TTY. One could set up a ptty (pseudo-terminal)"},{"line_number":46,"context_line":"but experience has shown ptty\u0027s to be non-portable across operating"},{"line_number":47,"context_line":"systems and environments, getting a ptty to work correctly in all"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bacf61ea_c98a1c1a","line":44,"range":{"start_line":44,"start_character":27,"end_line":44,"end_character":34},"in_reply_to":"dada55a8_de364eb3","updated":"2016-08-03 20:11:41.000000000","message":"Done","commit_id":"c70f5c95d13561a9d974307ada9b5c260dc2edd6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4dcd7eb58d42f0f9765da89fff5e89533e960843","unresolved":false,"context_lines":[{"line_number":40,"context_line":"captured and examined. But supplying an I/O stream causes the code in"},{"line_number":41,"context_line":"the patch to be skipped. Having the unit test supply a stream with and"},{"line_number":42,"context_line":"without the correct encoding is not interesting or"},{"line_number":43,"context_line":"meaningful. Properly testing this probably would require spawing a"},{"line_number":44,"context_line":"subshell but one can\u0027t use Python\u0027s subcommand because the I/O streams"},{"line_number":45,"context_line":"are not attached to a TTY. One could set up a ptty (pseudo-terminal)"},{"line_number":46,"context_line":"but experience has shown ptty\u0027s to be non-portable across operating"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bacf61ea_0174e033","line":43,"updated":"2016-08-04 13:39:39.000000000","message":"I\u0027m not sure why the tests wouldn\u0027t be interesting or meaningful.\n\nA test that mocks sys.stdout and then passes None for the output could verify that the app sets up the encoding around sys.stdout properly. The same for the other cases.\n\nA test that passes a stream could verify that the stream is used as-is and not wrapped.\n\nThose are the cases, right?","commit_id":"aed61ec7e20810b268208e3ca30a1848e3855156"},{"author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"change_message_id":"c2515dc824ff4435998d8cc5d24333b6fe13c0a4","unresolved":false,"context_lines":[{"line_number":40,"context_line":"captured and examined. But supplying an I/O stream causes the code in"},{"line_number":41,"context_line":"the patch to be skipped. Having the unit test supply a stream with and"},{"line_number":42,"context_line":"without the correct encoding is not interesting or"},{"line_number":43,"context_line":"meaningful. Properly testing this probably would require spawing a"},{"line_number":44,"context_line":"subshell but one can\u0027t use Python\u0027s subcommand because the I/O streams"},{"line_number":45,"context_line":"are not attached to a TTY. One could set up a ptty (pseudo-terminal)"},{"line_number":46,"context_line":"but experience has shown ptty\u0027s to be non-portable across operating"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bacf61ea_7f328111","line":43,"in_reply_to":"bacf61ea_0174e033","updated":"2016-08-04 19:51:45.000000000","message":"I suppose this is a matter of perspective and what one is actually trying to accomplish. The patch is meant to address what occurs in a terminal session. To my thinking that is what the test should validate. But as it turns out that is a very difficult test to construct so that it will run in diverse platforms and environments.\n\nBut of course you\u0027re right, one could add tests that verify the stream is wrapped or not wrapped as per the passed parameters. What we really want to test is if when output is redirected do you get codec errors?\n\nI will add a test that ensures if None is passed the stream is wrapped and if stream parameter is not None it\u0027s not wrapped. I\u0027ll just point out this doesn\u0027t address whether the patch fixes the original problem.","commit_id":"aed61ec7e20810b268208e3ca30a1848e3855156"},{"author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"change_message_id":"f73627dd3ef92f8807955d9fcd432de1a95f4bed","unresolved":false,"context_lines":[{"line_number":40,"context_line":"captured and examined. But supplying an I/O stream causes the code in"},{"line_number":41,"context_line":"the patch to be skipped. Having the unit test supply a stream with and"},{"line_number":42,"context_line":"without the correct encoding is not interesting or"},{"line_number":43,"context_line":"meaningful. Properly testing this probably would require spawing a"},{"line_number":44,"context_line":"subshell but one can\u0027t use Python\u0027s subcommand because the I/O streams"},{"line_number":45,"context_line":"are not attached to a TTY. One could set up a ptty (pseudo-terminal)"},{"line_number":46,"context_line":"but experience has shown ptty\u0027s to be non-portable across operating"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bacf61ea_36a5cb46","line":43,"in_reply_to":"bacf61ea_7f328111","updated":"2016-08-04 23:57:51.000000000","message":"Done","commit_id":"aed61ec7e20810b268208e3ca30a1848e3855156"}],"cliff/app.py":[{"author":{"_account_id":13463,"name":"Amaury Medeiros","email":"amaurymedeiros@gmail.com","username":"amaurymedeiros"},"change_message_id":"4f5d73d4336a8eb998e8ac64c83275f68d14837f","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        # the assumption the caller has taken all responsibility for"},{"line_number":95,"context_line":"        # the stream.  But with Python2 if the caller allows us to"},{"line_number":96,"context_line":"        # default the I/O streams to sys.stdin, sys.stdout and"},{"line_number":97,"context_line":"        # sys.stderr we apply the locales encoding just as Pytyhon3"},{"line_number":98,"context_line":"        # would do. We also check to make sure the main Python program"},{"line_number":99,"context_line":"        # has not already already wrapped sys.stdin, sys.stdout and"},{"line_number":100,"context_line":"        # sys.stderr as this is a common recommendation."}],"source_content_type":"text/x-python","patch_set":2,"id":"dada55a8_de812e4f","line":97,"range":{"start_line":97,"start_character":59,"end_line":97,"end_character":67},"updated":"2016-07-25 12:25:50.000000000","message":"nit: Python3","commit_id":"c70f5c95d13561a9d974307ada9b5c260dc2edd6"},{"author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"change_message_id":"949ad5b00a97e9aad4b46b3406ead3495f5b005c","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        # the assumption the caller has taken all responsibility for"},{"line_number":95,"context_line":"        # the stream.  But with Python2 if the caller allows us to"},{"line_number":96,"context_line":"        # default the I/O streams to sys.stdin, sys.stdout and"},{"line_number":97,"context_line":"        # sys.stderr we apply the locales encoding just as Pytyhon3"},{"line_number":98,"context_line":"        # would do. We also check to make sure the main Python program"},{"line_number":99,"context_line":"        # has not already already wrapped sys.stdin, sys.stdout and"},{"line_number":100,"context_line":"        # sys.stderr as this is a common recommendation."}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_c9dfbc0a","line":97,"range":{"start_line":97,"start_character":59,"end_line":97,"end_character":67},"in_reply_to":"dada55a8_de812e4f","updated":"2016-08-03 20:11:41.000000000","message":"Done","commit_id":"c70f5c95d13561a9d974307ada9b5c260dc2edd6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"73b1f8ff2f060a0eb9865a88661acf0b98f62ada","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            encoding \u003d locale.getpreferredencoding()"},{"line_number":104,"context_line":"            if encoding:"},{"line_number":105,"context_line":"                if not (stdin or"},{"line_number":106,"context_line":"                        sys.stdin.__class__.__name__ \u003d\u003d \u0027StreamReader\u0027):"},{"line_number":107,"context_line":"                    stdin \u003d codecs.getreader(encoding)(sys.stdin)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"                if not (stdout or"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_96dfa20b","line":106,"updated":"2016-08-03 17:52:36.000000000","message":"Can we not test the type with isinstance()?","commit_id":"c70f5c95d13561a9d974307ada9b5c260dc2edd6"},{"author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"change_message_id":"949ad5b00a97e9aad4b46b3406ead3495f5b005c","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            encoding \u003d locale.getpreferredencoding()"},{"line_number":104,"context_line":"            if encoding:"},{"line_number":105,"context_line":"                if not (stdin or"},{"line_number":106,"context_line":"                        sys.stdin.__class__.__name__ \u003d\u003d \u0027StreamReader\u0027):"},{"line_number":107,"context_line":"                    stdin \u003d codecs.getreader(encoding)(sys.stdin)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"                if not (stdout or"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_bf91d648","line":106,"in_reply_to":"bacf61ea_7c93effa","updated":"2016-08-03 20:11:41.000000000","message":"I think it\u0027s OK if subclasses are included, in fact it\u0027s probably safer.","commit_id":"c70f5c95d13561a9d974307ada9b5c260dc2edd6"},{"author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"change_message_id":"949ad5b00a97e9aad4b46b3406ead3495f5b005c","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            encoding \u003d locale.getpreferredencoding()"},{"line_number":104,"context_line":"            if encoding:"},{"line_number":105,"context_line":"                if not (stdin or"},{"line_number":106,"context_line":"                        sys.stdin.__class__.__name__ \u003d\u003d \u0027StreamReader\u0027):"},{"line_number":107,"context_line":"                    stdin \u003d codecs.getreader(encoding)(sys.stdin)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"                if not (stdout or"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_3f1b261e","line":106,"in_reply_to":"bacf61ea_96dfa20b","updated":"2016-08-03 20:11:41.000000000","message":"Good suggestion Doug. Yes, isinstance() is better Python. I don\u0027t know what I was thinking when I wrote it. Done","commit_id":"c70f5c95d13561a9d974307ada9b5c260dc2edd6"},{"author":{"_account_id":13463,"name":"Amaury Medeiros","email":"amaurymedeiros@gmail.com","username":"amaurymedeiros"},"change_message_id":"6415421a9bce82d5919013116e31f6a70a6d0f6d","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            encoding \u003d locale.getpreferredencoding()"},{"line_number":104,"context_line":"            if encoding:"},{"line_number":105,"context_line":"                if not (stdin or"},{"line_number":106,"context_line":"                        sys.stdin.__class__.__name__ \u003d\u003d \u0027StreamReader\u0027):"},{"line_number":107,"context_line":"                    stdin \u003d codecs.getreader(encoding)(sys.stdin)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"                if not (stdout or"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_7c93effa","line":106,"in_reply_to":"bacf61ea_96dfa20b","updated":"2016-08-03 18:38:41.000000000","message":"isinstance(sys.stdin, StreamReader) will return true for StreamReader subclasses as well... is it wanted?","commit_id":"c70f5c95d13561a9d974307ada9b5c260dc2edd6"}],"cliff/tests/test_app.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"ed43593c16ff2e9b2aacca5eff51f37a2f4a31d2","unresolved":false,"context_lines":[{"line_number":5,"context_line":"except ImportError:"},{"line_number":6,"context_line":"    from io import StringIO"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"import codecs"},{"line_number":9,"context_line":"import locale"},{"line_number":10,"context_line":"import mock"},{"line_number":11,"context_line":"import six"},{"line_number":12,"context_line":"import sys"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_66a00043","line":9,"range":{"start_line":8,"start_character":0,"end_line":9,"end_character":13},"updated":"2016-08-05 20:46:25.000000000","message":"these are standard lib and should be lumped in with argparse","commit_id":"50d67088eabfde69db1d8d86d7f45f094611cf26"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"8338035e1b66273cbb7dbe7cde62a6d44357e921","unresolved":false,"context_lines":[{"line_number":5,"context_line":"except ImportError:"},{"line_number":6,"context_line":"    from io import StringIO"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"import codecs"},{"line_number":9,"context_line":"import locale"},{"line_number":10,"context_line":"import mock"},{"line_number":11,"context_line":"import six"},{"line_number":12,"context_line":"import sys"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_cd090433","line":9,"range":{"start_line":8,"start_character":0,"end_line":9,"end_character":13},"in_reply_to":"bacf61ea_417b26f5","updated":"2016-08-06 01:46:52.000000000","message":"no worries john, it was only a nit, and by the looks of other import orders of files in cliff, not relevant.","commit_id":"50d67088eabfde69db1d8d86d7f45f094611cf26"},{"author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"change_message_id":"6b17f955551c69db3e112a96fa891179e70641c5","unresolved":false,"context_lines":[{"line_number":5,"context_line":"except ImportError:"},{"line_number":6,"context_line":"    from io import StringIO"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"import codecs"},{"line_number":9,"context_line":"import locale"},{"line_number":10,"context_line":"import mock"},{"line_number":11,"context_line":"import six"},{"line_number":12,"context_line":"import sys"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_417b26f5","line":9,"range":{"start_line":8,"start_character":0,"end_line":9,"end_character":13},"in_reply_to":"bacf61ea_66a00043","updated":"2016-08-05 20:58:43.000000000","message":"Aren\u0027t they already grouped with the standard lib imports? mock, six, and sys all immediately follow. Could you clarify?\n\nI always get a bit confused over the requirement imports have to be alphabetically ordered because I\u0027m not sure what is being checked for ordering, the from module or the symbol being imported? It\u0027s been a while since I\u0027ve submitted patches to Openstack, did we relax the ordering requirement?","commit_id":"50d67088eabfde69db1d8d86d7f45f094611cf26"}]}
