)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"34979356d1f0aa9d8d04da47ae03c1a43cd8aa5a","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"To make sure all object types available in the tree are imported (and"},{"line_number":21,"context_line":"registered) before the test case is executed, we need to import all"},{"line_number":22,"context_line":"modules under neutron.objects. Instead of maintaining the list of"},{"line_number":23,"context_line":"modules with objects to import somewhere, inspect the list of those"},{"line_number":24,"context_line":"modules dynamically, assuming they are all located under"},{"line_number":25,"context_line":"neutron/objects/ subtree."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3afc51ec_d8de793e","line":22,"updated":"2016-03-14 15:10:13.000000000","message":"I\u0027d rather be less magic-y because that can be prone to some wierd behavior.","commit_id":"b248be43b6c49b12f0b8917c4aebd024497f3176"}],"neutron/objects/__init__.py":[{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"c924580073125b67b3fb67676ba7e5417460affe","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"\u0027\u0027\u0027This module registers all objects in the oslo.versionedobjects registry.\u0027\u0027\u0027"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import os"},{"line_number":16,"context_line":"import sys"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_1bb41b80","line":13,"range":{"start_line":13,"start_character":15,"end_line":13,"end_character":24},"updated":"2016-03-03 11:02:50.000000000","message":"Nit: Should this be s/registers/loads ?","commit_id":"16859b4c4598b985b060f1faaf6424dde6af0c14"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"5cdb75d0ae9002519dc0579927b69c95f08314d4","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"\u0027\u0027\u0027This module registers all objects in the oslo.versionedobjects registry.\u0027\u0027\u0027"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import os"},{"line_number":16,"context_line":"import sys"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_e63264f1","line":13,"range":{"start_line":13,"start_character":15,"end_line":13,"end_character":24},"in_reply_to":"7af24918_1bb41b80","updated":"2016-03-03 14:36:05.000000000","message":"It actually registers, because every object defined in the tree should use the registration decorator to be registered in the OVO registry.","commit_id":"16859b4c4598b985b060f1faaf6424dde6af0c14"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"ea197d2ea2925a075b29830cc953d691d57fecf0","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import neutron  # noqa"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"__modules \u003d []"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def _import_modules(topdir):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_fa353746","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":14},"updated":"2016-03-14 12:28:06.000000000","message":"Is this used anywhere?","commit_id":"6787b02eacde319ff0bbdf7feb25fa7b1381c444"}],"neutron/tests/tools.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9571864f42eeff55e5c98ff201a7bee6ec2a063a","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"            module \u003d \u0027.\u0027.join([import_base, module])"},{"line_number":211,"context_line":"            if module not in sys.modules:"},{"line_number":212,"context_line":"                __import__(module, locals(), globals())"},{"line_number":213,"context_line":"            modules.append(module)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        for dir_ in dirs:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1af94dfe_a100e8ab","line":212,"updated":"2016-03-15 16:18:51.000000000","message":"__import__ accepts globals before locals. Perhaps we\u0027re better off using https://docs.python.org/2/library/importlib.html#importlib.import_module.","commit_id":"7c9eacc5fb9f2cb86edf8c315e0fcdcdb2787d78"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"7b6f3f852ff9458170abcf1daba77ee026883db9","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"            module \u003d \u0027.\u0027.join([import_base, module])"},{"line_number":211,"context_line":"            if module not in sys.modules:"},{"line_number":212,"context_line":"                importlib.import_module(module)"},{"line_number":213,"context_line":"            modules.append(module)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        for dir_ in dirs:"}],"source_content_type":"text/x-python","patch_set":12,"id":"1af94dfe_c12094fa","line":212,"updated":"2016-03-15 16:23:31.000000000","message":"You\u0027re probably need to import it \u003dp","commit_id":"a5f4722879ace713d097eb3fc87fbcfab2d39a84"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"18849708c34d9841ed50f1f1fa74e32d6e4358af","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                continue"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"            import_base \u003d root.replace(\u0027/\u0027, \u0027.\u0027)"},{"line_number":204,"context_line":"            print(root)"},{"line_number":205,"context_line":"            print(os.path.dirname(neutron.__file__))"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"            # NOTE(ihrachys): in Python3, or when we are not located in the"},{"line_number":208,"context_line":"            # directory containing neutron code, __file__ is absolute, so we"}],"source_content_type":"text/x-python","patch_set":15,"id":"1af94dfe_19abff75","line":205,"range":{"start_line":204,"start_character":11,"end_line":205,"end_character":52},"updated":"2016-03-15 22:01:11.000000000","message":"Those prints are required?","commit_id":"88598e9a87c2234c062f2f8b3abd29c41c2b8e7b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fbacac0324f9c87cf7bd328095131e9c0dba243b","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                continue"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"            import_base \u003d root.replace(\u0027/\u0027, \u0027.\u0027)"},{"line_number":204,"context_line":"            print(root)"},{"line_number":205,"context_line":"            print(os.path.dirname(neutron.__file__))"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"            # NOTE(ihrachys): in Python3, or when we are not located in the"},{"line_number":208,"context_line":"            # directory containing neutron code, __file__ is absolute, so we"}],"source_content_type":"text/x-python","patch_set":15,"id":"1af94dfe_948876e9","line":205,"range":{"start_line":204,"start_character":11,"end_line":205,"end_character":52},"in_reply_to":"1af94dfe_19abff75","updated":"2016-03-15 22:32:26.000000000","message":"Done","commit_id":"88598e9a87c2234c062f2f8b3abd29c41c2b8e7b"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"986829868097c00966133d1b5749b22e411fa7bc","unresolved":false,"context_lines":[{"line_number":26,"context_line":"import mock"},{"line_number":27,"context_line":"import six"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"import neutron  # noqa"},{"line_number":30,"context_line":"from neutron.api.v2 import attributes"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"1af94dfe_c426b967","line":29,"range":{"start_line":29,"start_character":15,"end_line":29,"end_character":22},"updated":"2016-03-16 10:42:11.000000000","message":"Is this needed as we actually use the module?","commit_id":"ca8f69c1bb214b132b8e664573d9f8abc1824694"}],"neutron/tests/unit/objects/test_objects.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"4080915e99234909eb401af383c5a1117db9bac4","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            if module not in sys.modules:"},{"line_number":56,"context_line":"                __import__(module, locals(), globals())"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        for dir_ in dirs:"},{"line_number":59,"context_line":"            _import_modules(dir_)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3afc51ec_e1a0e045","line":58,"updated":"2016-03-14 15:57:49.000000000","message":"You can use iglob to avoid a recursive _import_modules, IMO it reduces cognitive load and improves readability.","commit_id":"b248be43b6c49b12f0b8917c4aebd024497f3176"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a64d3ed0970f62b01e86c56d4152b6cf98dffe5a","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            if module not in sys.modules:"},{"line_number":56,"context_line":"                __import__(module, locals(), globals())"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        for dir_ in dirs:"},{"line_number":59,"context_line":"            _import_modules(dir_)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3afc51ec_f2cb8ca3","line":58,"in_reply_to":"3afc51ec_e1a0e045","updated":"2016-03-14 16:29:39.000000000","message":"iglob won\u0027t give us indeterminate number of directories.","commit_id":"b248be43b6c49b12f0b8917c4aebd024497f3176"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"34979356d1f0aa9d8d04da47ae03c1a43cd8aa5a","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                __import__(module, locals(), globals())"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        for dir_ in dirs:"},{"line_number":59,"context_line":"            _import_modules(dir_)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"class TestObjectVersions(test_base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3afc51ec_98835156","line":59,"updated":"2016-03-14 15:10:13.000000000","message":"I wonder if someone evil creates a symlink here to the top directory just for fun.","commit_id":"b248be43b6c49b12f0b8917c4aebd024497f3176"}],"neutron/tests/unit/tests/test_tools.py":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"e3c0c69b1b7d2f49136a96d4f8195d7deed810a7","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class ImportModulesRecursivelyTestCase(base.BaseTestCase):"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    def test_object_modules(self):"},{"line_number":23,"context_line":"        modules \u003d tools.import_modules_recursively("},{"line_number":24,"context_line":"            os.path.dirname(objects.__file__))"},{"line_number":25,"context_line":"        self.assertIn(\u0027neutron.objects.qos.policy\u0027, modules)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_fbdc6f48","line":22,"updated":"2016-03-15 11:20:12.000000000","message":"a test for a tool, nice :)","commit_id":"2302eba4799535d3a5547d8329049dac9abbce1c"}]}
