)]}'
{"keystonemiddleware/auth_token/_request.py":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"465c762e047cc4edb90065d11e7437f6d0f54dd3","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        except KeyError:"},{"line_number":33,"context_line":"            # TODO(dolph): Is this intended to catch a non-existent service"},{"line_number":34,"context_line":"            # name? If so, why would a service not have a name? The except is"},{"line_number":35,"context_line":"            # either unnecessary or working around a bug."},{"line_number":36,"context_line":"            pass"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # now convert the endpoints. Because in v3 we specify region per"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_55707072","line":35,"updated":"2015-09-14 20:56:39.000000000","message":"Perhaps we should do:\n\n  v2_service[\u0027name\u0027] \u003d v3_service.get(\u0027name\u0027, \u0027\u0027)\n\nor just allow it to be a None? I don\u0027t like this TODO lingering around. It looks superfluous to handle things this way.","commit_id":"639fe976a21095c425191afcf6a032e858c03e31"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"d4bb806e6fa116ed34ab4868a7cc82a1678b8f6b","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        except KeyError:"},{"line_number":33,"context_line":"            # TODO(dolph): Is this intended to catch a non-existent service"},{"line_number":34,"context_line":"            # name? If so, why would a service not have a name? The except is"},{"line_number":35,"context_line":"            # either unnecessary or working around a bug."},{"line_number":36,"context_line":"            pass"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # now convert the endpoints. Because in v3 we specify region per"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_295b3556","line":35,"in_reply_to":"ba15a1d1_11e6ece7","updated":"2015-10-12 19:51:31.000000000","message":"That changes the behavior of the code and thus the resulting API ... based on an assumption / hunch. This is supposed to be a refactor to improve readability.","commit_id":"639fe976a21095c425191afcf6a032e858c03e31"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"6c8016cce7ce97a966b0c61c0fae7f55dabcb873","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        except KeyError:"},{"line_number":33,"context_line":"            # TODO(dolph): Is this intended to catch a non-existent service"},{"line_number":34,"context_line":"            # name? If so, why would a service not have a name? The except is"},{"line_number":35,"context_line":"            # either unnecessary or working around a bug."},{"line_number":36,"context_line":"            pass"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # now convert the endpoints. Because in v3 we specify region per"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_11e6ece7","line":35,"in_reply_to":"ba15a1d1_55707072","updated":"2015-09-17 21:09:39.000000000","message":"this approach is very reasonable, and we can remove the ugly try/catch","commit_id":"639fe976a21095c425191afcf6a032e858c03e31"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"465c762e047cc4edb90065d11e7437f6d0f54dd3","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        v2_endpoints_by_region \u003d {}"},{"line_number":42,"context_line":"        for v3_endpoint in v3_service.get(\u0027endpoints\u0027, []):"},{"line_number":43,"context_line":"            # NOTE(dolph): Why would a v3 endpoint not have a region? The"},{"line_number":44,"context_line":"            # .get() is either unnecessary or working around a bug."},{"line_number":45,"context_line":"            region \u003d v3_endpoint.get(\u0027region\u0027)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"            v2_endpoint \u003d v2_endpoints_by_region.setdefault(region, {})"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_7526d469","line":44,"updated":"2015-09-14 20:56:39.000000000","message":"I think this is because you can have a service with no endpoints attached to it. The bug is an artifact of how the data is joined from the two separate tables. it should just default to [] inherently.","commit_id":"639fe976a21095c425191afcf6a032e858c03e31"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"4e3d93ad9df62818ca66e6cd9262208fe3b2aded","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        v2_endpoints_by_region \u003d {}"},{"line_number":42,"context_line":"        for v3_endpoint in v3_service.get(\u0027endpoints\u0027, []):"},{"line_number":43,"context_line":"            # NOTE(dolph): Why would a v3 endpoint not have a region? The"},{"line_number":44,"context_line":"            # .get() is either unnecessary or working around a bug."},{"line_number":45,"context_line":"            region \u003d v3_endpoint.get(\u0027region\u0027)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"            v2_endpoint \u003d v2_endpoints_by_region.setdefault(region, {})"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_81f25d6e","line":44,"in_reply_to":"7a2fa921_090c3941","updated":"2015-10-12 21:04:43.000000000","message":"it has to be unnecessary, doesn\u0027t it? In which case we should change this to v3_endpoint[\u0027region\u0027] and remove the if statement testing the result.","commit_id":"639fe976a21095c425191afcf6a032e858c03e31"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"d4bb806e6fa116ed34ab4868a7cc82a1678b8f6b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        v2_endpoints_by_region \u003d {}"},{"line_number":42,"context_line":"        for v3_endpoint in v3_service.get(\u0027endpoints\u0027, []):"},{"line_number":43,"context_line":"            # NOTE(dolph): Why would a v3 endpoint not have a region? The"},{"line_number":44,"context_line":"            # .get() is either unnecessary or working around a bug."},{"line_number":45,"context_line":"            region \u003d v3_endpoint.get(\u0027region\u0027)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"            v2_endpoint \u003d v2_endpoints_by_region.setdefault(region, {})"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_090c3941","line":44,"in_reply_to":"ba15a1d1_7526d469","updated":"2015-10-12 19:51:31.000000000","message":"I\u0027m referring to .get(\u0027region\u0027) below the comment - it sounds like you\u0027re explaining .get(\u0027endpoints\u0027, []).","commit_id":"639fe976a21095c425191afcf6a032e858c03e31"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"9d921ccaf90ae485fea736a36ff0da37773c75f2","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            region \u003d v3_endpoint.get(\u0027region\u0027)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"            v2_endpoint \u003d v2_endpoints_by_region.setdefault(region, {})"},{"line_number":48,"context_line":"            if region:"},{"line_number":49,"context_line":"                v2_endpoint[region][\u0027region\u0027] \u003d region"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"            interface_name \u003d v3_endpoint[\u0027interface\u0027].lower() + \u0027URL\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_a75ae281","line":48,"updated":"2015-09-15 14:21:29.000000000","message":"I don\u0027t think we need this \u0027if region\u0027 check. But if we do, the preceding line needs to be pulled into it, lest we add a None key to v2_endpoints_by_region","commit_id":"639fe976a21095c425191afcf6a032e858c03e31"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"4e3d93ad9df62818ca66e6cd9262208fe3b2aded","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            region \u003d v3_endpoint.get(\u0027region\u0027)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"            v2_endpoint \u003d v2_endpoints_by_region.setdefault(region, {})"},{"line_number":48,"context_line":"            if region:"},{"line_number":49,"context_line":"                v2_endpoint[region][\u0027region\u0027] \u003d region"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"            interface_name \u003d v3_endpoint[\u0027interface\u0027].lower() + \u0027URL\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_a148b9cd","line":48,"in_reply_to":"7a2fa921_54088828","updated":"2015-10-12 21:04:43.000000000","message":"but that .get(\u0027region\u0027) shouldn\u0027t be there, should it? Is there some chance of v3_endpoint.get(\u0027region\u0027) returning None or an empty string? I thought a non-empty region name was required. If one of those is possible, which one, or are both possible? Shouldn\u0027t we check for None vs. empty string explicitly? Would you want to handle them the same way here? And wouldn\u0027t the v2_endpoint assignment need to move inside the if statement should that check remain?","commit_id":"639fe976a21095c425191afcf6a032e858c03e31"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"d4bb806e6fa116ed34ab4868a7cc82a1678b8f6b","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            region \u003d v3_endpoint.get(\u0027region\u0027)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"            v2_endpoint \u003d v2_endpoints_by_region.setdefault(region, {})"},{"line_number":48,"context_line":"            if region:"},{"line_number":49,"context_line":"                v2_endpoint[region][\u0027region\u0027] \u003d region"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"            interface_name \u003d v3_endpoint[\u0027interface\u0027].lower() + \u0027URL\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_54088828","line":48,"in_reply_to":"ba15a1d1_a75ae281","updated":"2015-10-12 19:51:31.000000000","message":"We need the region check in the current code due to the .get(\u0027region\u0027) that precedes it.","commit_id":"639fe976a21095c425191afcf6a032e858c03e31"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"9d921ccaf90ae485fea736a36ff0da37773c75f2","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"            v2_endpoint \u003d v2_endpoints_by_region.setdefault(region, {})"},{"line_number":48,"context_line":"            if region:"},{"line_number":49,"context_line":"                v2_endpoint[region][\u0027region\u0027] \u003d region"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"            interface_name \u003d v3_endpoint[\u0027interface\u0027].lower() + \u0027URL\u0027"},{"line_number":52,"context_line":"            v2_endpoint[interface_name] \u003d v3_endpoint[\u0027url\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_67c5aa8c","line":49,"updated":"2015-09-15 14:21:29.000000000","message":"s/v2_endpoint[region]/v2_endpoint/","commit_id":"639fe976a21095c425191afcf6a032e858c03e31"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"4e3d93ad9df62818ca66e6cd9262208fe3b2aded","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"            v2_endpoint \u003d v2_endpoints_by_region.setdefault(region, {})"},{"line_number":48,"context_line":"            if region:"},{"line_number":49,"context_line":"                v2_endpoint[region][\u0027region\u0027] \u003d region"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"            interface_name \u003d v3_endpoint[\u0027interface\u0027].lower() + \u0027URL\u0027"},{"line_number":52,"context_line":"            v2_endpoint[interface_name] \u003d v3_endpoint[\u0027url\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_61870113","line":49,"in_reply_to":"7a2fa921_34370ce5","updated":"2015-10-12 21:04:43.000000000","message":"you can use either v2_endpoint[\u0027region\u0027] or v2_endpoints_by_regions[region][\u0027region\u0027] here... they are equivalent. The first is much shorter and I would say preferred.","commit_id":"639fe976a21095c425191afcf6a032e858c03e31"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"d4bb806e6fa116ed34ab4868a7cc82a1678b8f6b","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"            v2_endpoint \u003d v2_endpoints_by_region.setdefault(region, {})"},{"line_number":48,"context_line":"            if region:"},{"line_number":49,"context_line":"                v2_endpoint[region][\u0027region\u0027] \u003d region"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"            interface_name \u003d v3_endpoint[\u0027interface\u0027].lower() + \u0027URL\u0027"},{"line_number":52,"context_line":"            v2_endpoint[interface_name] \u003d v3_endpoint[\u0027url\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_34370ce5","line":49,"in_reply_to":"ba15a1d1_67c5aa8c","updated":"2015-10-12 19:51:31.000000000","message":"Rather, I think this should have been v2_endpoints_by_region but it\u0027s alarming that no tests failed.","commit_id":"639fe976a21095c425191afcf6a032e858c03e31"}]}
