)]}'
{"novaclient/exceptions.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"3ce6033fc0dacbe2fba68f2f76e8e162a91df780","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        else:"},{"line_number":104,"context_line":"            slf.__getattribute__(attr)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    setattr(cls, \u0027__getattr__\u0027, deprecate_code_attribute)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    return cls(**kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_ff56d75a","line":106,"updated":"2014-05-19 19:31:32.000000000","message":"I don\u0027t really like this way of injecting methods in; couldn\u0027t we just add the logic to HttpError?  A property would probably be ideal for this.\n\nAlso, I believe there\u0027s a whole infrastructure for marking deprecations in oslo-incubator that would probably be better for the messaging side of this…","commit_id":"5280fd7adfd00de352c491f598c7a3301138ce79"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"57685f635380161b58e758c01e81c7f84cef9cb5","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        else:"},{"line_number":104,"context_line":"            slf.__getattribute__(attr)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    setattr(cls, \u0027__getattr__\u0027, deprecate_code_attribute)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    return cls(**kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_7f6f16fc","line":106,"in_reply_to":"7adec928_ff56d75a","updated":"2014-05-20 11:30:36.000000000","message":"I forgot about property, it should be much better. Thanks\n\noslo-incubator contains module `versionutils` with `deprecated` function[1], but it doesn\u0027t work with version tags(works only with OpenStack releases[2]), so we cannot use it for the current task.\n\n[1] - https://github.com/openstack/oslo-incubator/blob/master/openstack/common/versionutils.py#L30\n\n[2] - https://github.com/openstack/oslo-incubator/blob/master/openstack/common/versionutils.py#L62-L67","commit_id":"5280fd7adfd00de352c491f598c7a3301138ce79"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"d482e8af9e64ca2214a23076cd2ef27883f6ccb8","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                      \"\u0027http_status\u0027 instead of this one.\", UserWarning)"},{"line_number":100,"context_line":"        return slf.http_status"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    cls.code \u003d property(deprecate_code_attribute)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    return cls(**kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_d15d52ee","line":102,"updated":"2014-05-21 16:28:45.000000000","message":"I still really don\u0027t like this monkeypatching.  Why aren\u0027t you creating a new HttpError class extending novaclient.openstack.common.apiclient.exceptions.HttpError and adding the property that way?","commit_id":"c97c97de889dbfa9c63e871bc8e4350b4600a512"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"7afb8bcc7f3a2b23508fae765704a2fe91ae80e7","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                      \"\u0027http_status\u0027 instead of this one.\", UserWarning)"},{"line_number":100,"context_line":"        return slf.http_status"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    cls.code \u003d property(deprecate_code_attribute)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    return cls(**kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_af4bd329","line":102,"in_reply_to":"7adec928_4ab6d98b","updated":"2014-05-28 22:17:08.000000000","message":"OK, your reasoning is, er, reasonable, and I do prefer the monkeypatching be moved out of the function and into the top-level…","commit_id":"c97c97de889dbfa9c63e871bc8e4350b4600a512"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"1bb857c067cc701478f1c8411dae00948d07d7a8","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                      \"\u0027http_status\u0027 instead of this one.\", UserWarning)"},{"line_number":100,"context_line":"        return slf.http_status"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    cls.code \u003d property(deprecate_code_attribute)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    return cls(**kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_4ab6d98b","line":102,"in_reply_to":"7adec928_d15d52ee","updated":"2014-05-22 06:16:07.000000000","message":"All http-based exceptions are inherited from HttpError and it would be better if they all had this attribute.\n\nBased on the fact that exceptions fro oslo is used, we cannot modify HttpError in novaclient.openstack.common.apiclient.exceptions and we cannot change parent of http-based exceptions, so creation of HttpErrorWithCode will not give the desired result.\n\nMaybe, HttpError.code \u003d property(...) should be moved from `from_response` to root of this module, so import of novaclient.exceptions always will give all http-based exceptions with code attribute. What do you think about this way? I didn\u0027t do it by this way, because of thought that `code` and `http_status` attributes is needed primarily to determine what exception is returned by `from_response`.\n\nPS: In case that `code` attribute should not be added in common code, I cannot imagine any way to save this attribute for 2 releases without monkeypatching.","commit_id":"c97c97de889dbfa9c63e871bc8e4350b4600a512"}]}
