)]}'
{"keystone/common/dependency.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1241be3f6d2eb13d720162ede9ece6ea3b68c507","unresolved":false,"context_lines":[{"line_number":55,"context_line":"def get_provider(name, optional\u003dGET_REQUIRED):"},{"line_number":56,"context_line":"    if optional is GET_REQUIRED:"},{"line_number":57,"context_line":"        return REGISTRY[name][0]"},{"line_number":58,"context_line":"    return REGISTRY.get(name, (None, None))[0]"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class UnresolvableDependencyException(Exception):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_92c83c58","line":58,"updated":"2014-12-15 17:40:28.000000000","message":"Do we have existing test cases that test this?","commit_id":"f0977706e31e53c495122d936a1fed5f953d4905"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"9b082a63d872fc6302e7123ae6ebbcc1b21ffdd2","unresolved":false,"context_lines":[{"line_number":55,"context_line":"def get_provider(name, optional\u003dGET_REQUIRED):"},{"line_number":56,"context_line":"    if optional is GET_REQUIRED:"},{"line_number":57,"context_line":"        return REGISTRY[name][0]"},{"line_number":58,"context_line":"    return REGISTRY.get(name, (None, None))[0]"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class UnresolvableDependencyException(Exception):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_805c66ef","line":58,"in_reply_to":"3a961159_92c83c58","updated":"2014-12-15 18:48:06.000000000","message":"added some tests specific to this method.","commit_id":"f0977706e31e53c495122d936a1fed5f953d4905"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"d450184006f1cd7b220567c370b7a077b3c16c18","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"def _set_provider(name, provider):"},{"line_number":44,"context_line":"    where_registered \u003d _REGISTRY.get(name, (None, None))[1]"},{"line_number":45,"context_line":"    if where_registered:"},{"line_number":46,"context_line":"        raise Exception(\u0027%s already has a registered provider, at\\n%s\u0027 %"},{"line_number":47,"context_line":"                        (name, \u0027\u0027.join(where_registered)))"}],"source_content_type":"text/x-python","patch_set":20,"id":"da86d52c_b6a688a9","line":44,"updated":"2015-02-18 06:22:39.000000000","message":"a comment explaining the logic here would go a long way for reviewers and future contributors","commit_id":"e0de25363a1ce4f3aa6192ae340ef1be6f32706c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e60488d2046cd78d4a1acd3e2626339d6353b169","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"def _set_provider(name, provider):"},{"line_number":44,"context_line":"    where_registered \u003d _REGISTRY.get(name, (None, None))[1]"},{"line_number":45,"context_line":"    if where_registered:"},{"line_number":46,"context_line":"        raise Exception(\u0027%s already has a registered provider, at\\n%s\u0027 %"},{"line_number":47,"context_line":"                        (name, \u0027\u0027.join(where_registered)))"}],"source_content_type":"text/x-python","patch_set":20,"id":"da86d52c_d4e04199","line":44,"in_reply_to":"da86d52c_b6a688a9","updated":"2015-02-18 15:56:54.000000000","message":"I changed the code so maybe it\u0027s more self-explanatory.","commit_id":"e0de25363a1ce4f3aa6192ae340ef1be6f32706c"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"40a79bf6974bf99883f34b4aa9b0fef10b9bf0cc","unresolved":false,"context_lines":[{"line_number":43,"context_line":"def _set_provider(name, provider):"},{"line_number":44,"context_line":"    where_registered \u003d _REGISTRY.get(name, (None, None))[1]"},{"line_number":45,"context_line":"    if where_registered:"},{"line_number":46,"context_line":"        raise Exception(\u0027%s already has a registered provider, at\\n%s\u0027 %"},{"line_number":47,"context_line":"                        (name, \u0027\u0027.join(where_registered)))"},{"line_number":48,"context_line":"    _REGISTRY[name] \u003d (provider, traceback.format_stack())"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"da86d52c_feaabb83","line":46,"updated":"2015-02-17 13:20:17.000000000","message":"IMO \"assert not where_registered, msg\" would look better here.","commit_id":"e0de25363a1ce4f3aa6192ae340ef1be6f32706c"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"236153215d045ab614a710e1bb2a9845b0d1a613","unresolved":false,"context_lines":[{"line_number":43,"context_line":"def _set_provider(name, provider):"},{"line_number":44,"context_line":"    where_registered \u003d _REGISTRY.get(name, (None, None))[1]"},{"line_number":45,"context_line":"    if where_registered:"},{"line_number":46,"context_line":"        raise Exception(\u0027%s already has a registered provider, at\\n%s\u0027 %"},{"line_number":47,"context_line":"                        (name, \u0027\u0027.join(where_registered)))"},{"line_number":48,"context_line":"    _REGISTRY[name] \u003d (provider, traceback.format_stack())"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"da86d52c_646c7a9e","line":46,"in_reply_to":"da86d52c_01265068","updated":"2015-02-17 14:04:37.000000000","message":"Asserts should be used to test conditions that should never happen. The purpose is to crash early in the case of a corrupt program state -- http://stackoverflow.com/questions/944592/best-practice-for-python-assert . There is also UsingAssertionsEffectively in Python wiki that suggests this usage.","commit_id":"e0de25363a1ce4f3aa6192ae340ef1be6f32706c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e60488d2046cd78d4a1acd3e2626339d6353b169","unresolved":false,"context_lines":[{"line_number":43,"context_line":"def _set_provider(name, provider):"},{"line_number":44,"context_line":"    where_registered \u003d _REGISTRY.get(name, (None, None))[1]"},{"line_number":45,"context_line":"    if where_registered:"},{"line_number":46,"context_line":"        raise Exception(\u0027%s already has a registered provider, at\\n%s\u0027 %"},{"line_number":47,"context_line":"                        (name, \u0027\u0027.join(where_registered)))"},{"line_number":48,"context_line":"    _REGISTRY[name] \u003d (provider, traceback.format_stack())"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"da86d52c_f450e52d","line":46,"in_reply_to":"da86d52c_646c7a9e","updated":"2015-02-18 15:56:54.000000000","message":"The stackoverflow page is full of conflicting advice. I prefer to not use assertions because they can be disabled.","commit_id":"e0de25363a1ce4f3aa6192ae340ef1be6f32706c"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"2588609ac9e54d5879f7b96469da5dfc82eae88e","unresolved":false,"context_lines":[{"line_number":43,"context_line":"def _set_provider(name, provider):"},{"line_number":44,"context_line":"    where_registered \u003d _REGISTRY.get(name, (None, None))[1]"},{"line_number":45,"context_line":"    if where_registered:"},{"line_number":46,"context_line":"        raise Exception(\u0027%s already has a registered provider, at\\n%s\u0027 %"},{"line_number":47,"context_line":"                        (name, \u0027\u0027.join(where_registered)))"},{"line_number":48,"context_line":"    _REGISTRY[name] \u003d (provider, traceback.format_stack())"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"da86d52c_01265068","line":46,"in_reply_to":"da86d52c_feaabb83","updated":"2015-02-17 13:43:56.000000000","message":"Assertions are for tests mostly. IMHO using them in the code is not a good thing...","commit_id":"e0de25363a1ce4f3aa6192ae340ef1be6f32706c"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"01b7ea0c1925a09ce3148788012a7dfdc876398e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    if where_registered:"},{"line_number":46,"context_line":"        raise Exception(\u0027%s already has a registered provider, at\\n%s\u0027 %"},{"line_number":47,"context_line":"                        (name, \u0027\u0027.join(where_registered)))"},{"line_number":48,"context_line":"    _REGISTRY[name] \u003d (provider, traceback.format_stack())"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"GET_REQUIRED \u003d object()"}],"source_content_type":"text/x-python","patch_set":25,"id":"ba7be1f8_fef05ecb","line":48,"updated":"2015-02-20 06:59:57.000000000","message":"clever!","commit_id":"91f43f30ecb1f62218004d632daba246c9003eca"}],"keystone/contrib/federation/routers.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"4d6e7bfa500a437a77c239c78a35dc5d67384e54","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        return \"/OS-FEDERATION/%s\" % suffix"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def add_routes(self, mapper):"},{"line_number":84,"context_line":"        auth_controller \u003d controllers.Auth()"},{"line_number":85,"context_line":"        idp_controller \u003d controllers.IdentityProvider()"},{"line_number":86,"context_line":"        protocol_controller \u003d controllers.FederationProtocol()"},{"line_number":87,"context_line":"        mapping_controller \u003d controllers.MappingController()"}],"source_content_type":"text/x-python","patch_set":25,"id":"ba7be1f8_8e3718b0","line":84,"updated":"2015-02-20 19:32:07.000000000","message":"move this change into a separate commit.","commit_id":"91f43f30ecb1f62218004d632daba246c9003eca"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"c91a8fb8c6352cb5c52c22b7242b4ef074b34bbe","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        return \"/OS-FEDERATION/%s\" % suffix"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def add_routes(self, mapper):"},{"line_number":84,"context_line":"        auth_controller \u003d controllers.Auth()"},{"line_number":85,"context_line":"        idp_controller \u003d controllers.IdentityProvider()"},{"line_number":86,"context_line":"        protocol_controller \u003d controllers.FederationProtocol()"},{"line_number":87,"context_line":"        mapping_controller \u003d controllers.MappingController()"}],"source_content_type":"text/x-python","patch_set":25,"id":"ba7be1f8_ae7e9ce2","line":84,"in_reply_to":"ba7be1f8_8e3718b0","updated":"2015-02-20 19:41:34.000000000","message":"i made this it\u0027s own patch","commit_id":"91f43f30ecb1f62218004d632daba246c9003eca"}],"keystone/contrib/oauth1/routers.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7714f0a87c4037ca1e8ed542718aae80a7cc29d5","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from keystone.contrib.oauth1 import controllers"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"oauth1 \u003d oauth1  # Use the import for pep8"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"build_resource_relation \u003d functools.partial("}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_6463c71a","line":24,"updated":"2014-12-17 15:05:07.000000000","message":"suggest removing this and replacing with: \n\n     from keystone.contrib import oauth1  # noqa\n\nThen we don\u0027t need to have an assignment for the sake of having an assignment","commit_id":"16610e0b4bcc113782c3035efbeb1fd5b1d82f7a"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"535b05c2e2d82a8c29ecf0be56b3fe7a03344645","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from keystone.contrib.oauth1 import controllers"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"oauth1 \u003d oauth1  # Use the import for pep8"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"build_resource_relation \u003d functools.partial("}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_9f61dcaa","line":24,"in_reply_to":"3a961159_6463c71a","updated":"2014-12-17 15:16:46.000000000","message":"Done","commit_id":"16610e0b4bcc113782c3035efbeb1fd5b1d82f7a"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"01b7ea0c1925a09ce3148788012a7dfdc876398e","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    def add_routes(self, mapper):"},{"line_number":68,"context_line":"        # This is needed for dependency injection,"},{"line_number":69,"context_line":"        # it loads the OAuth driver which registers it as a dependency."},{"line_number":70,"context_line":"        oauth1.Manager()"},{"line_number":71,"context_line":"        consumer_controller \u003d controllers.ConsumerCrudV3()"},{"line_number":72,"context_line":"        access_token_controller \u003d controllers.AccessTokenCrudV3()"},{"line_number":73,"context_line":"        access_token_roles_controller \u003d controllers.AccessTokenRolesV3()"}],"source_content_type":"text/x-python","patch_set":25,"id":"ba7be1f8_be7b4628","side":"PARENT","line":70,"updated":"2015-02-20 06:59:57.000000000","message":"we don\u0027t have to add it to backends? https://github.com/openstack/keystone/blob/master/keystone/backends.py","commit_id":"dda64d3ca7a6dd420278463f4a5fce96022f98b3"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"8816f1aa57b4c39b3cd7f7635a595c5e64ab4ccc","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    def add_routes(self, mapper):"},{"line_number":68,"context_line":"        # This is needed for dependency injection,"},{"line_number":69,"context_line":"        # it loads the OAuth driver which registers it as a dependency."},{"line_number":70,"context_line":"        oauth1.Manager()"},{"line_number":71,"context_line":"        consumer_controller \u003d controllers.ConsumerCrudV3()"},{"line_number":72,"context_line":"        access_token_controller \u003d controllers.AccessTokenCrudV3()"},{"line_number":73,"context_line":"        access_token_roles_controller \u003d controllers.AccessTokenRolesV3()"}],"source_content_type":"text/x-python","patch_set":25,"id":"ba7be1f8_3e2bd6ec","side":"PARENT","line":70,"in_reply_to":"ba7be1f8_be7b4628","updated":"2015-02-20 07:09:02.000000000","message":"it\u0027s actually done in the follow up patch","commit_id":"dda64d3ca7a6dd420278463f4a5fce96022f98b3"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"4d6e7bfa500a437a77c239c78a35dc5d67384e54","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    \"\"\""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def add_routes(self, mapper):"},{"line_number":67,"context_line":"        consumer_controller \u003d controllers.ConsumerCrudV3()"},{"line_number":68,"context_line":"        access_token_controller \u003d controllers.AccessTokenCrudV3()"},{"line_number":69,"context_line":"        access_token_roles_controller \u003d controllers.AccessTokenRolesV3()"},{"line_number":70,"context_line":"        oauth_controller \u003d controllers.OAuthControllerV3()"}],"source_content_type":"text/x-python","patch_set":25,"id":"ba7be1f8_8e5e38e8","line":67,"updated":"2015-02-20 19:32:07.000000000","message":"move this change into a separate commit","commit_id":"91f43f30ecb1f62218004d632daba246c9003eca"}],"keystone/tests/unit/common/test_injection.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7714f0a87c4037ca1e8ed542718aae80a7cc29d5","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        self.assertRaises(KeyError, dependency.get_provider, provider_name)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def test_get_provider_not_provided_optional(self):"},{"line_number":289,"context_line":"        # If no provider and provider is required then fails."},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        provider_name \u003d uuid.uuid4().hex"},{"line_number":292,"context_line":"        self.assertIsNone(dependency.get_provider(provider_name,"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_64182785","line":289,"updated":"2014-12-17 15:05:07.000000000","message":"this comment doesn\u0027t seem to describe the same behavior as the test name. I don\u0027t think this fails, since the provider is optional?","commit_id":"16610e0b4bcc113782c3035efbeb1fd5b1d82f7a"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"535b05c2e2d82a8c29ecf0be56b3fe7a03344645","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        self.assertRaises(KeyError, dependency.get_provider, provider_name)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def test_get_provider_not_provided_optional(self):"},{"line_number":289,"context_line":"        # If no provider and provider is required then fails."},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        provider_name \u003d uuid.uuid4().hex"},{"line_number":292,"context_line":"        self.assertIsNone(dependency.get_provider(provider_name,"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_3f0388b9","line":289,"in_reply_to":"3a961159_64182785","updated":"2014-12-17 15:16:46.000000000","message":"Done","commit_id":"16610e0b4bcc113782c3035efbeb1fd5b1d82f7a"}],"keystone/tests/unit/test_token_provider.py":[{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"01b7ea0c1925a09ce3148788012a7dfdc876398e","unresolved":false,"context_lines":[{"line_number":738,"context_line":"    def test_supported_token_providers(self):"},{"line_number":739,"context_line":"        # test default config"},{"line_number":740,"context_line":""},{"line_number":741,"context_line":"        dependency.reset()"},{"line_number":742,"context_line":"        self.assertIsInstance(token.provider.Manager().driver,"},{"line_number":743,"context_line":"                              uuid.Provider)"},{"line_number":744,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"ba7be1f8_3e883622","line":741,"updated":"2015-02-20 06:59:57.000000000","message":"this test is screaming out for refactor :)\n\nPerhaps a clever for loop, in a follow-on patch?","commit_id":"91f43f30ecb1f62218004d632daba246c9003eca"}],"keystone/tests/unit/test_v3_oauth1.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"4d6e7bfa500a437a77c239c78a35dc5d67384e54","unresolved":false,"context_lines":[{"line_number":239,"context_line":""},{"line_number":240,"context_line":"class OAuthFlowTests(OAuth1Tests):"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def auth_plugin_config_override(self):"},{"line_number":243,"context_line":"        methods \u003d [\u0027password\u0027, \u0027token\u0027, \u0027oauth1\u0027]"},{"line_number":244,"context_line":"        method_classes \u003d {"},{"line_number":245,"context_line":"            \u0027password\u0027: \u0027keystone.auth.plugins.password.Password\u0027,"}],"source_content_type":"text/x-python","patch_set":25,"id":"ba7be1f8_2e6f0c94","line":242,"updated":"2015-02-20 19:32:07.000000000","message":"How does removing this even work? load_backends doesn\u0027t load oauth_api does it?","commit_id":"91f43f30ecb1f62218004d632daba246c9003eca"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"c91a8fb8c6352cb5c52c22b7242b4ef074b34bbe","unresolved":false,"context_lines":[{"line_number":239,"context_line":""},{"line_number":240,"context_line":"class OAuthFlowTests(OAuth1Tests):"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def auth_plugin_config_override(self):"},{"line_number":243,"context_line":"        methods \u003d [\u0027password\u0027, \u0027token\u0027, \u0027oauth1\u0027]"},{"line_number":244,"context_line":"        method_classes \u003d {"},{"line_number":245,"context_line":"            \u0027password\u0027: \u0027keystone.auth.plugins.password.Password\u0027,"}],"source_content_type":"text/x-python","patch_set":25,"id":"ba7be1f8_eeb094f6","line":242,"in_reply_to":"ba7be1f8_2e6f0c94","updated":"2015-02-20 19:41:34.000000000","message":"the dependency mechanisms are smart enough to pick it up","commit_id":"91f43f30ecb1f62218004d632daba246c9003eca"}]}
