)]}'
{"keystone/auth/controllers.py":[{"author":{"_account_id":16165,"name":"Chenhong Liu","email":"liuchenhong@unitedstack.com","username":"liuchenhong"},"change_message_id":"cba3a473886ae60a57b73324a60ea6b8f28eadfa","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        pass"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @versionutils.deprecated(as_of\u003dversionutils.deprecated.LIBERTY,"},{"line_number":58,"context_line":"                             in_favor_of\u003d\u0027entrypoints\u0027,"},{"line_number":59,"context_line":"                             what\u003d\u0027direct import of driver\u0027)"},{"line_number":60,"context_line":"    def _load_using_import(plugin_name):"},{"line_number":61,"context_line":"        return importutils.import_object(plugin_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a0c5dc1_2648535b","line":58,"updated":"2015-05-12 09:03:39.000000000","message":"\u0027entrypoints in setup.cfg\u0027 make it clearly.","commit_id":"e6e55245f8263d4142483a4c89ebe2b65f291779"},{"author":{"_account_id":16165,"name":"Chenhong Liu","email":"liuchenhong@unitedstack.com","username":"liuchenhong"},"change_message_id":"cba3a473886ae60a57b73324a60ea6b8f28eadfa","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @versionutils.deprecated(as_of\u003dversionutils.deprecated.LIBERTY,"},{"line_number":58,"context_line":"                             in_favor_of\u003d\u0027entrypoints\u0027,"},{"line_number":59,"context_line":"                             what\u003d\u0027direct import of driver\u0027)"},{"line_number":60,"context_line":"    def _load_using_import(plugin_name):"},{"line_number":61,"context_line":"        return importutils.import_object(plugin_name)"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a0c5dc1_e6d47b48","line":59,"updated":"2015-05-12 09:03:39.000000000","message":"\u0027direct import of driver using importlib\u0027","commit_id":"e6e55245f8263d4142483a4c89ebe2b65f291779"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"0cf421f2c42618b7a3a29727e6faa61186882ea9","unresolved":false,"context_lines":[{"line_number":43,"context_line":"AUTH_PLUGINS_LOADED \u003d False"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"def load_auth_method(method):"},{"line_number":47,"context_line":"    plugin_name \u003d CONF.auth[method]"},{"line_number":48,"context_line":"    try:"},{"line_number":49,"context_line":"        namespace \u003d \u0027keystone.auth.%s\u0027 % method"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_5c6d1798","line":46,"updated":"2015-05-27 15:39:43.000000000","message":"Is there a way to test this with config values for methods?","commit_id":"953623b29becf4c94fbd859399182429867b15a4"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"9433574b202138fafbed4599cdd712aa95e83e80","unresolved":false,"context_lines":[{"line_number":43,"context_line":"AUTH_PLUGINS_LOADED \u003d False"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"def load_auth_method(method):"},{"line_number":47,"context_line":"    plugin_name \u003d CONF.auth[method]"},{"line_number":48,"context_line":"    try:"},{"line_number":49,"context_line":"        namespace \u003d \u0027keystone.auth.%s\u0027 % method"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_0480f289","line":46,"in_reply_to":"7a016987_5c6d1798","updated":"2015-05-30 16:37:28.000000000","message":"Done","commit_id":"953623b29becf4c94fbd859399182429867b15a4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"0cf421f2c42618b7a3a29727e6faa61186882ea9","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                                                 invoke_on_load\u003dTrue)"},{"line_number":52,"context_line":"        return driver_manager.driver"},{"line_number":53,"context_line":"    except RuntimeError:"},{"line_number":54,"context_line":"        # Ignore failure to load driver using stevedore and continue on."},{"line_number":55,"context_line":"        pass"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @versionutils.deprecated(as_of\u003dversionutils.deprecated.LIBERTY,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_fc25e3ad","line":54,"updated":"2015-05-27 15:39:43.000000000","message":"Should we be logging something here? It might make the deprecation error below a little more clear since it\u0027s not completely clear to the user that we are trying Stevedore first, failing, and using a deprecated utility.","commit_id":"953623b29becf4c94fbd859399182429867b15a4"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"9433574b202138fafbed4599cdd712aa95e83e80","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                                                 invoke_on_load\u003dTrue)"},{"line_number":52,"context_line":"        return driver_manager.driver"},{"line_number":53,"context_line":"    except RuntimeError:"},{"line_number":54,"context_line":"        # Ignore failure to load driver using stevedore and continue on."},{"line_number":55,"context_line":"        pass"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @versionutils.deprecated(as_of\u003dversionutils.deprecated.LIBERTY,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_2793f05c","line":54,"in_reply_to":"7a016987_fc25e3ad","updated":"2015-05-30 16:37:28.000000000","message":"Done","commit_id":"953623b29becf4c94fbd859399182429867b15a4"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"2714af0d918b1fdebee57cee5579f03b63dcd829","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from oslo_config import cfg"},{"line_number":19,"context_line":"from oslo_log import log"},{"line_number":20,"context_line":"from oslo_serialization import jsonutils"},{"line_number":21,"context_line":"from oslo_utils import importutils"},{"line_number":22,"context_line":"from oslo_utils import timeutils"},{"line_number":23,"context_line":"import six"},{"line_number":24,"context_line":"import stevedore"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_f8a33941","line":21,"updated":"2015-05-31 04:49:49.000000000","message":"should we move this import inside the  method since it may not be always used?","commit_id":"b94e835ad3ce1bb105b5551a9e8441875fe3d65c"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"4cf36df45deee2fbcaa6cebb9c9bcbaf104f7615","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from oslo_config import cfg"},{"line_number":19,"context_line":"from oslo_log import log"},{"line_number":20,"context_line":"from oslo_serialization import jsonutils"},{"line_number":21,"context_line":"from oslo_utils import importutils"},{"line_number":22,"context_line":"from oslo_utils import timeutils"},{"line_number":23,"context_line":"import six"},{"line_number":24,"context_line":"import stevedore"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_e8b804ca","line":21,"in_reply_to":"7a016987_f8a33941","updated":"2015-05-31 14:52:03.000000000","message":"isn\u0027t always used? in the load_auth_method() the first attempt is to always use stevedore first","commit_id":"b94e835ad3ce1bb105b5551a9e8441875fe3d65c"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"784e915019d6e80cbfec550082e9cb9df6d3ef9d","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    plugin_name \u003d CONF.auth[method]"},{"line_number":48,"context_line":"    try:"},{"line_number":49,"context_line":"        namespace \u003d \u0027keystone.auth.%s\u0027 % method"},{"line_number":50,"context_line":"        driver_manager \u003d stevedore.DriverManager(namespace, plugin_name,"},{"line_number":51,"context_line":"                                                 invoke_on_load\u003dTrue)"},{"line_number":52,"context_line":"        return driver_manager.driver"},{"line_number":53,"context_line":"    except RuntimeError:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_98332562","line":50,"updated":"2015-05-31 04:27:08.000000000","message":"stevedore looks like it provides a great API!","commit_id":"b94e835ad3ce1bb105b5551a9e8441875fe3d65c"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"4cf36df45deee2fbcaa6cebb9c9bcbaf104f7615","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        namespace \u003d \u0027keystone.auth.%s\u0027 % method"},{"line_number":50,"context_line":"        driver_manager \u003d stevedore.DriverManager(namespace, plugin_name,"},{"line_number":51,"context_line":"                                                 invoke_on_load\u003dTrue)"},{"line_number":52,"context_line":"        return driver_manager.driver"},{"line_number":53,"context_line":"    except RuntimeError:"},{"line_number":54,"context_line":"        LOG.debug(\u0027Failed to load the %s driver (%s) using stevedore, will \u0027"},{"line_number":55,"context_line":"                  \u0027attempt to load using import_object instead.\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_28c3bc39","line":52,"updated":"2015-05-31 14:52:03.000000000","message":"why not extract this to a private method as too (lines 49 - 51)? the code would look much cleaner.","commit_id":"b94e835ad3ce1bb105b5551a9e8441875fe3d65c"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"784e915019d6e80cbfec550082e9cb9df6d3ef9d","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    @versionutils.deprecated(as_of\u003dversionutils.deprecated.LIBERTY,"},{"line_number":59,"context_line":"                             in_favor_of\u003d\u0027entrypoints\u0027,"},{"line_number":60,"context_line":"                             what\u003d\u0027direct import of driver\u0027)"},{"line_number":61,"context_line":"    def _load_using_import(plugin_name):"},{"line_number":62,"context_line":"        return importutils.import_object(plugin_name)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    return _load_using_import(plugin_name)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_18da9517","line":61,"updated":"2015-05-31 04:27:08.000000000","message":"So you created a private function so that you had a way to use the versions decorator. Very nice!  I\u0027m gonna remember that!","commit_id":"b94e835ad3ce1bb105b5551a9e8441875fe3d65c"}],"keystone/tests/unit/auth/test_controllers.py":[{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"a140205e8126266e468293734dfe3acf38178969","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        # stevedore.DriverManager returns an object with a `driver` attribute."},{"line_number":41,"context_line":"        fake_driver_manager \u003d mock.Mock()"},{"line_number":42,"context_line":"        driver_sentinel \u003d object()"},{"line_number":43,"context_line":"        fake_driver_manager.driver \u003d driver_sentinel"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        driver_manager_mock \u003d self.useFixture(mockpatch.PatchObject("},{"line_number":46,"context_line":"            stevedore, \u0027DriverManager\u0027, return_value\u003dfake_driver_manager)).mock"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_78a06942","line":43,"updated":"2015-05-31 04:35:43.000000000","message":"I feel like we should be stubbing the returns with stevedore\u0027s inbuilt test objects:\n\nhttps://github.com/openstack/stevedore/blob/master/stevedore/driver.py#L53","commit_id":"b94e835ad3ce1bb105b5551a9e8441875fe3d65c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f9d34c6dd70ac105d5b14d0b9d12809a2d321f8d","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        # stevedore.DriverManager returns an object with a `driver` attribute."},{"line_number":41,"context_line":"        fake_driver_manager \u003d mock.Mock()"},{"line_number":42,"context_line":"        driver_sentinel \u003d object()"},{"line_number":43,"context_line":"        fake_driver_manager.driver \u003d driver_sentinel"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        driver_manager_mock \u003d self.useFixture(mockpatch.PatchObject("},{"line_number":46,"context_line":"            stevedore, \u0027DriverManager\u0027, return_value\u003dfake_driver_manager)).mock"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_28f17c95","line":43,"in_reply_to":"7a016987_78a06942","updated":"2015-05-31 14:55:43.000000000","message":"I tried it in the next patch set. I\u0027m probably not doing it right, but I don\u0027t see any docs that say how to to it.","commit_id":"b94e835ad3ce1bb105b5551a9e8441875fe3d65c"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"784e915019d6e80cbfec550082e9cb9df6d3ef9d","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                                                    invoke_on_load\u003dTrue)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        self.assertIs(driver, driver_sentinel)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def test_load_auth_method_entrypoint_fails_import_works(self):"},{"line_number":57,"context_line":"        method \u003d uuid.uuid4().hex"},{"line_number":58,"context_line":"        plugin_name \u003d self.getUniqueString()"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_d8c99d27","line":55,"updated":"2015-05-31 04:27:08.000000000","message":"This is a really cool test case!  Looks like you set stevedore.DriverManager to throw a RuntimeError via mockpatch so you can test  the fallback case.  I love how you added this into the existing testcase.  This is serious craftsmanship!","commit_id":"b94e835ad3ce1bb105b5551a9e8441875fe3d65c"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"784e915019d6e80cbfec550082e9cb9df6d3ef9d","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        cf.register_opt(cfg.StrOpt(method), group\u003d\u0027auth\u0027)"},{"line_number":63,"context_line":"        cf.config(group\u003d\u0027auth\u0027, **{method: plugin_name})"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        # stevedore.DriverManager raises RuntimeError if it can\u0027t load the"},{"line_number":66,"context_line":"        # driver."},{"line_number":67,"context_line":"        self.useFixture(mockpatch.PatchObject("},{"line_number":68,"context_line":"            stevedore, \u0027DriverManager\u0027, side_effect\u003dRuntimeError))"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a016987_785bc986","line":65,"updated":"2015-05-31 04:27:08.000000000","message":"Nice comment! Very helpful","commit_id":"b94e835ad3ce1bb105b5551a9e8441875fe3d65c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"2a52942e86048544307d7c283a8d1ff70bbb2583","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from oslo_utils import importutils"},{"line_number":21,"context_line":"from oslotest import mockpatch"},{"line_number":22,"context_line":"import stevedore"},{"line_number":23,"context_line":"from stevedore import extension"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from keystone.auth import controllers"},{"line_number":26,"context_line":"from keystone.tests import unit"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_496f0cfc","line":23,"updated":"2015-06-10 19:38:57.000000000","message":"any reason to not just use the stevedore namespace imported above and just reference: \n\n    stevedore.extension","commit_id":"97a28e1d7020141ec36e5a868ec4045bbf8e03fa"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"b5559f4a02fac3317d29300614a3f9e1d7242e79","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from oslo_utils import importutils"},{"line_number":21,"context_line":"from oslotest import mockpatch"},{"line_number":22,"context_line":"import stevedore"},{"line_number":23,"context_line":"from stevedore import extension"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from keystone.auth import controllers"},{"line_number":26,"context_line":"from keystone.tests import unit"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_67eb05dd","line":23,"in_reply_to":"3afb71cf_496f0cfc","updated":"2015-06-11 01:12:03.000000000","message":"Since stevedore doesn\u0027t include \"extension\" in its __all__ [1], stevedore.extension isn\u0027t guaranteed to be available. It would only be available if another module happened to import it.\n\n[1] http://git.openstack.org/cgit/openstack/stevedore/tree/stevedore/__init__.py#n3","commit_id":"97a28e1d7020141ec36e5a868ec4045bbf8e03fa"}]}
