)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"4612a4064249ed43d082484eb9fe524bab38f9e3","unresolved":false,"context_lines":[{"line_number":11,"context_line":"It works perfectly fine when accessing the API directly using"},{"line_number":12,"context_line":"e.g. curl."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"However, keystoneclient stubmles on the non-ascii keys because"},{"line_number":15,"context_line":"it tries to set this as an attribute for the resource class and fails"},{"line_number":16,"context_line":"because Python 2.7 does not support non-ascii identifiers:"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a8bc5a2_f74badae","line":14,"updated":"2016-09-22 13:28:28.000000000","message":"stumbles?","commit_id":"4151db0176a8fcad5baed258d7531adce9c52c43"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"5734f6fa6fe077e76f817a98c332f53461be8872","unresolved":false,"context_lines":[{"line_number":11,"context_line":"It works perfectly fine when accessing the API directly using"},{"line_number":12,"context_line":"e.g. curl."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"However, keystoneclient stubmles on the non-ascii keys because"},{"line_number":15,"context_line":"it tries to set this as an attribute for the resource class and fails"},{"line_number":16,"context_line":"because Python 2.7 does not support non-ascii identifiers:"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a8bc5a2_de74e19d","line":14,"in_reply_to":"5a8bc5a2_f74badae","updated":"2016-09-23 04:48:49.000000000","message":"Done","commit_id":"4151db0176a8fcad5baed258d7531adce9c52c43"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"4612a4064249ed43d082484eb9fe524bab38f9e3","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"https://docs.python.org/2.7/reference/lexical_analysis.html#identifiers"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"So cange the logic to skip setting non-ascii attributes; they are still"},{"line_number":21,"context_line":"available in the dict representation."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Closes-Bug: #1626403"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a8bc5a2_77d6bdc6","line":20,"updated":"2016-09-22 13:28:28.000000000","message":"change?","commit_id":"4151db0176a8fcad5baed258d7531adce9c52c43"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"5734f6fa6fe077e76f817a98c332f53461be8872","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"https://docs.python.org/2.7/reference/lexical_analysis.html#identifiers"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"So cange the logic to skip setting non-ascii attributes; they are still"},{"line_number":21,"context_line":"available in the dict representation."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Closes-Bug: #1626403"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a8bc5a2_1e6f29c6","line":20,"in_reply_to":"5a8bc5a2_77d6bdc6","updated":"2016-09-23 04:48:49.000000000","message":"Done","commit_id":"4151db0176a8fcad5baed258d7531adce9c52c43"}],"keystoneclient/base.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"b3a8c99ee0ac11ed30f2b1ae864c80e70d369d92","unresolved":false,"context_lines":[{"line_number":479,"context_line":"    def _add_details(self, info):"},{"line_number":480,"context_line":"        for (k, v) in six.iteritems(info):"},{"line_number":481,"context_line":"            try:"},{"line_number":482,"context_line":"                try:"},{"line_number":483,"context_line":"                    setattr(self, k, v)"},{"line_number":484,"context_line":"                except UnicodeEncodeError:"},{"line_number":485,"context_line":"                    pass"},{"line_number":486,"context_line":"                self._info[k] \u003d v"},{"line_number":487,"context_line":"            except AttributeError:  # nosec(cjschaef): we already defined the"},{"line_number":488,"context_line":"                # attribute on the class"},{"line_number":489,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_6774279c","line":486,"range":{"start_line":482,"start_character":16,"end_line":486,"end_character":33},"updated":"2016-09-23 00:56:50.000000000","message":"okay, so the key/value pair won\u0027t be available in the base resource, but it\u0027ll still be set on the server side. \n\ni\u0027m assuming this resolves your OSC bug.","commit_id":"4151db0176a8fcad5baed258d7531adce9c52c43"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"4612a4064249ed43d082484eb9fe524bab38f9e3","unresolved":false,"context_lines":[{"line_number":490,"context_line":""},{"line_number":491,"context_line":"    def __getattr__(self, k):"},{"line_number":492,"context_line":"        \"\"\"Checking attrbiute existence.\"\"\""},{"line_number":493,"context_line":"        if k not in self.__dict__:"},{"line_number":494,"context_line":"            # NOTE(bcwaldon): disallow lazy-loading if already loaded once"},{"line_number":495,"context_line":"            if not self.is_loaded():"},{"line_number":496,"context_line":"                self.get()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_d7815191","line":493,"updated":"2016-09-22 13:28:28.000000000","message":"Is there any need to deal with the places that work with those dynamically set attributes?","commit_id":"4151db0176a8fcad5baed258d7531adce9c52c43"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"5734f6fa6fe077e76f817a98c332f53461be8872","unresolved":false,"context_lines":[{"line_number":490,"context_line":""},{"line_number":491,"context_line":"    def __getattr__(self, k):"},{"line_number":492,"context_line":"        \"\"\"Checking attrbiute existence.\"\"\""},{"line_number":493,"context_line":"        if k not in self.__dict__:"},{"line_number":494,"context_line":"            # NOTE(bcwaldon): disallow lazy-loading if already loaded once"},{"line_number":495,"context_line":"            if not self.is_loaded():"},{"line_number":496,"context_line":"                self.get()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_5e55314e","line":493,"in_reply_to":"5a8bc5a2_d7815191","updated":"2016-09-23 04:48:49.000000000","message":"I assume not because we don\u0027t let these \"bogus\" attributes to creep in.","commit_id":"4151db0176a8fcad5baed258d7531adce9c52c43"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"ee077a0741f2b1c690687636ab284f9540d70cd8","unresolved":false,"context_lines":[{"line_number":482,"context_line":"                try:"},{"line_number":483,"context_line":"                    setattr(self, k, v)"},{"line_number":484,"context_line":"                except UnicodeEncodeError:"},{"line_number":485,"context_line":"                    pass"},{"line_number":486,"context_line":"                self._info[k] \u003d v"},{"line_number":487,"context_line":"            except AttributeError:  # nosec(cjschaef): we already defined the"},{"line_number":488,"context_line":"                # attribute on the class"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a8bc5a2_18964b4c","line":485,"updated":"2016-09-23 12:10:34.000000000","message":"please add a comment here explaining the reasoning behind catching and passing this exception - although it is clear for us in this review, it won\u0027t for other people reading the source code in the future.","commit_id":"d01f3d98e5187364914f23d467ee39098da58637"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"e009d4722fe9b955d0131938eb8d8e5f322065ec","unresolved":false,"context_lines":[{"line_number":482,"context_line":"                try:"},{"line_number":483,"context_line":"                    setattr(self, k, v)"},{"line_number":484,"context_line":"                except UnicodeEncodeError:"},{"line_number":485,"context_line":"                    pass"},{"line_number":486,"context_line":"                self._info[k] \u003d v"},{"line_number":487,"context_line":"            except AttributeError:  # nosec(cjschaef): we already defined the"},{"line_number":488,"context_line":"                # attribute on the class"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a8bc5a2_1007daca","line":485,"in_reply_to":"5a8bc5a2_18964b4c","updated":"2016-09-24 18:22:47.000000000","message":"Done","commit_id":"d01f3d98e5187364914f23d467ee39098da58637"}],"keystoneclient/tests/unit/test_base.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"4612a4064249ed43d082484eb9fe524bab38f9e3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# coding\u003dutf-8"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_aa6538e2","line":1,"updated":"2016-09-22 13:28:28.000000000","message":"This isn\u0027t the same as our normal utf-8 declaration and was causing my own tooling issues. Can we make it the same? Also you can remove the newline below it.\n\n# -*- coding: utf-8 -*-","commit_id":"4151db0176a8fcad5baed258d7531adce9c52c43"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"5734f6fa6fe077e76f817a98c332f53461be8872","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# coding\u003dutf-8"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_fe9efdb6","line":1,"in_reply_to":"5a8bc5a2_aa6538e2","updated":"2016-09-23 04:48:49.000000000","message":"Done","commit_id":"4151db0176a8fcad5baed258d7531adce9c52c43"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"ee077a0741f2b1c690687636ab284f9540d70cd8","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        r \u003d base.Resource(None, r_dict)"},{"line_number":106,"context_line":"        self.assertEqual(r.name, \"foobar\")"},{"line_number":107,"context_line":"        self.assertEqual(r.to_dict(), r_dict)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"class ManagerTest(utils.TestCase):"},{"line_number":111,"context_line":"    body \u003d {\"hello\": {\"hi\": 1}}"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a8bc5a2_18a48ba4","line":108,"updated":"2016-09-23 12:10:34.000000000","message":"also verify the unicode keys weren\u0027t set?","commit_id":"d01f3d98e5187364914f23d467ee39098da58637"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"e009d4722fe9b955d0131938eb8d8e5f322065ec","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        r \u003d base.Resource(None, r_dict)"},{"line_number":106,"context_line":"        self.assertEqual(r.name, \"foobar\")"},{"line_number":107,"context_line":"        self.assertEqual(r.to_dict(), r_dict)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"class ManagerTest(utils.TestCase):"},{"line_number":111,"context_line":"    body \u003d {\"hello\": {\"hi\": 1}}"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a8bc5a2_7012de0a","line":108,"in_reply_to":"5a8bc5a2_18a48ba4","updated":"2016-09-24 18:22:47.000000000","message":"This wasn\u0027t done for two reasons: 1. When we\u0027ll try to \u0027hasattr\u0027 or \u0027getattr\u0027 on that in the test, we\u0027ll still get UnicodeDecodeError, so I don\u0027t see a quick way to check this; 2. The point of the patch is actually not to completely forbid non-ascii attributes, but only not to fail on them if given Python version does not support them. If we add such a check, it will fail for Python that does support Unicode identifiers; that\u0027s probably not what we want to achieve.","commit_id":"d01f3d98e5187364914f23d467ee39098da58637"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"6eb48f1718f804bb7d0bda41567ee587d397db37","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        r \u003d base.Resource(None, r_dict)"},{"line_number":106,"context_line":"        self.assertEqual(r.name, \"foobar\")"},{"line_number":107,"context_line":"        self.assertEqual(r.to_dict(), r_dict)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"class ManagerTest(utils.TestCase):"},{"line_number":111,"context_line":"    body \u003d {\"hello\": {\"hi\": 1}}"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a8bc5a2_7939e2f1","line":108,"in_reply_to":"5a8bc5a2_7012de0a","updated":"2016-09-25 16:04:27.000000000","message":"right, you could add a condition for the Python version (which is not that great).\n\nA nice way to do the same thing is to check the len() of r_dict.","commit_id":"d01f3d98e5187364914f23d467ee39098da58637"}]}
