)]}'
{"keystoneclient/baseclient.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7434479636a0870addb3e54c561f4b71355e0ebf","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"class HttpMethodsBase(object):"},{"line_number":15,"context_line":"    \"\"\"Add the HTTP method functions to simplify request handling.\"\"\""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    request_func \u003d \u0027request\u0027"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_a8b5bb32","line":15,"updated":"2014-06-09 03:45:32.000000000","message":"nit: Add the base HTTP method functions...","commit_id":"425179311416a7212ddcadc24be2bd2824449a08"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"7aa2b2748f5cb648a969538012179f5491945a8d","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"class HttpMethodsBase(object):"},{"line_number":15,"context_line":"    \"\"\"Add the HTTP method functions to simplify request handling.\"\"\""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    request_func \u003d \u0027request\u0027"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_b58f7d22","line":15,"in_reply_to":"1ae5cdf2_a8b5bb32","updated":"2014-06-10 22:50:50.000000000","message":"Done","commit_id":"425179311416a7212ddcadc24be2bd2824449a08"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"cd39493ba3a4e2e3dfbb16f20e8badc709f7e2b0","unresolved":false,"context_lines":[{"line_number":17,"context_line":"    request_func \u003d \u0027request\u0027"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    def _do_req(self, *args, **kwargs):"},{"line_number":20,"context_line":"        return getattr(self, self.request_func)(*args, **kwargs)"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    def head(self, url, **kwargs):"},{"line_number":23,"context_line":"        return self._do_req(url, \u0027HEAD\u0027, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_3562bbd8","line":20,"updated":"2014-06-10 00:52:55.000000000","message":"getattr could return None here if subclass does not implement request(). May want to consider making HttpMethodBase as an interface (metaclass).","commit_id":"425179311416a7212ddcadc24be2bd2824449a08"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"a990391e9cecb0d2454b6027ece6503e033a0a5e","unresolved":false,"context_lines":[{"line_number":17,"context_line":"    request_func \u003d \u0027request\u0027"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    def _do_req(self, *args, **kwargs):"},{"line_number":20,"context_line":"        return getattr(self, self.request_func)(*args, **kwargs)"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    def head(self, url, **kwargs):"},{"line_number":23,"context_line":"        return self._do_req(url, \u0027HEAD\u0027, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_c3ee188b","line":20,"in_reply_to":"1ae5cdf2_2f2a432c","updated":"2014-06-10 21:18:57.000000000","message":"If we are not going to enforce anything with the base class, can we at least have some meaningful handling. For example,\n\n request_method \u003d getattr(self, self.request_func)\n if request_method is None or not callable(request_method):\n     raise AttributeError(\u0027\"request\" function is either missing or not callable.\u0027)","commit_id":"425179311416a7212ddcadc24be2bd2824449a08"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"58aa10f22f1f3801d529001ede9dca43d591eacb","unresolved":false,"context_lines":[{"line_number":17,"context_line":"    request_func \u003d \u0027request\u0027"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    def _do_req(self, *args, **kwargs):"},{"line_number":20,"context_line":"        return getattr(self, self.request_func)(*args, **kwargs)"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    def head(self, url, **kwargs):"},{"line_number":23,"context_line":"        return self._do_req(url, \u0027HEAD\u0027, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_2f2a432c","line":20,"in_reply_to":"1ae5cdf2_3562bbd8","updated":"2014-06-10 20:13:37.000000000","message":"So the reason to do it this way is that you can define the request_func. For many existing classes they might want to redirect these to _cs_request (the authenticated request)\n\nThis is why there is the funny getattr based lookup in the first place and i can\u0027t therefore make it abstract.","commit_id":"425179311416a7212ddcadc24be2bd2824449a08"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"7aa2b2748f5cb648a969538012179f5491945a8d","unresolved":false,"context_lines":[{"line_number":17,"context_line":"    request_func \u003d \u0027request\u0027"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    def _do_req(self, *args, **kwargs):"},{"line_number":20,"context_line":"        return getattr(self, self.request_func)(*args, **kwargs)"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    def head(self, url, **kwargs):"},{"line_number":23,"context_line":"        return self._do_req(url, \u0027HEAD\u0027, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_5577193b","line":20,"in_reply_to":"1ae5cdf2_c3ee188b","updated":"2014-06-10 22:50:50.000000000","message":"Done","commit_id":"425179311416a7212ddcadc24be2bd2824449a08"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"99400538cca2a9523a91ac14f345dfc4babf1f46","unresolved":false,"context_lines":[{"line_number":20,"context_line":"        req_method \u003d getattr(self, self.request_func)"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"        if not req_method or not callable(req_method):"},{"line_number":23,"context_line":"            msg \u003d \u0027Invalid function: %s. Must be present and callable\u0027"},{"line_number":24,"context_line":"            raise AttributeError(msg)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"        return req_method(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_b734ddfb","line":23,"updated":"2014-06-11 02:59:15.000000000","message":"msg \u003d msg % (self.req_method)","commit_id":"c7eb3269765612fde1e835a8b37eb560173024e2"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"c8339d4a163f91127c17691c0840146a861d5a30","unresolved":false,"context_lines":[{"line_number":20,"context_line":"        req_method \u003d getattr(self, self.request_func)"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"        if not req_method or not callable(req_method):"},{"line_number":23,"context_line":"            msg \u003d \u0027Invalid function: %s. Must be present and callable\u0027"},{"line_number":24,"context_line":"            raise AttributeError(msg)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"        return req_method(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_e3a04692","line":23,"in_reply_to":"1ae5cdf2_b734ddfb","updated":"2014-06-11 23:14:43.000000000","message":"oops, Done.","commit_id":"c7eb3269765612fde1e835a8b37eb560173024e2"}],"keystoneclient/httpclient.py":[{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"066c5de02046dd0325e113b795c51cb6df91a839","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"class HTTPClient(baseclient.Client, base.BaseAuthPlugin):"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    request_func \u003d \u0027_cs_request\u0027"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    @utils.positional(enforcement\u003dutils.positional.WARN)"},{"line_number":61,"context_line":"    def __init__(self, username\u003dNone, tenant_id\u003dNone, tenant_name\u003dNone,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_ba03c60e","line":58,"updated":"2014-06-11 18:27:34.000000000","message":"You could have renamed the function, instead of this variable Just for consistentcy","commit_id":"c7eb3269765612fde1e835a8b37eb560173024e2"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"c8339d4a163f91127c17691c0840146a861d5a30","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"class HTTPClient(baseclient.Client, base.BaseAuthPlugin):"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    request_func \u003d \u0027_cs_request\u0027"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    @utils.positional(enforcement\u003dutils.positional.WARN)"},{"line_number":61,"context_line":"    def __init__(self, username\u003dNone, tenant_id\u003dNone, tenant_name\u003dNone,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_a39b9e64","line":58,"in_reply_to":"1ae5cdf2_ba03c60e","updated":"2014-06-11 23:14:43.000000000","message":"I would love to have, however that would change the expected behaviour of the different calls.\n\nIn httpclient using _cs_request means to do an authenticated request, where request is unauthenticated. get, post etc all are authenticated in this case, in the session etc it is different.","commit_id":"c7eb3269765612fde1e835a8b37eb560173024e2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"086def90de335963173b5a49f538ce928e54edd1","unresolved":false,"context_lines":[{"line_number":580,"context_line":""},{"line_number":581,"context_line":"        kwargs.setdefault(\u0027authenticated\u0027, None)"},{"line_number":582,"context_line":"        try:"},{"line_number":583,"context_line":"            return self.request(url, method, **kwargs)"},{"line_number":584,"context_line":"        except exceptions.MissingAuthPlugin:"},{"line_number":585,"context_line":"            _logger.info(\u0027Cannot get authenticated endpoint without an \u0027"},{"line_number":586,"context_line":"                         \u0027auth plugin\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_ae4c1143","line":583,"updated":"2014-06-14 16:38:59.000000000","message":"does anything besides this make an unauthenticated request? if not, it seems this patch should be simplified by combining def request and def _cs_request here, then nuking the assumption in the new base class that children should be able to change the request method.","commit_id":"de11a2f30abd412cbac9d8fbffc54085186edd43"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"198f55f233ed0f8fa9021f00cf5a3b5f8dd467c4","unresolved":false,"context_lines":[{"line_number":580,"context_line":""},{"line_number":581,"context_line":"        kwargs.setdefault(\u0027authenticated\u0027, None)"},{"line_number":582,"context_line":"        try:"},{"line_number":583,"context_line":"            return self.request(url, method, **kwargs)"},{"line_number":584,"context_line":"        except exceptions.MissingAuthPlugin:"},{"line_number":585,"context_line":"            _logger.info(\u0027Cannot get authenticated endpoint without an \u0027"},{"line_number":586,"context_line":"                         \u0027auth plugin\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_9ac83358","line":583,"in_reply_to":"1ae5cdf2_ae4c1143","updated":"2014-06-17 01:15:01.000000000","message":"That\u0027d be awesome. But you\u0027re changing the expected behaviour of a public method. That\u0027s a no-no and there are tests cases that will fail if i change it. \n\n(The test cases will fail because the expectation changed - but my point is that you change behaviour and that behaviour is reinforced by the unit tests.)","commit_id":"de11a2f30abd412cbac9d8fbffc54085186edd43"}]}
