)]}'
{"nova/api/openstack/compute/__init__.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"3daadfb35612af3fa21e47237a2b600ad0834f4a","unresolved":false,"context_lines":[{"line_number":34,"context_line":"from nova.api.openstack.compute import limits"},{"line_number":35,"context_line":"from nova.api.openstack.compute import servers"},{"line_number":36,"context_line":"from nova.api.openstack.compute import server_metadata"},{"line_number":37,"context_line":"from nova.api.openstack.compute import versions"},{"line_number":38,"context_line":"from nova.api.openstack import wsgi"},{"line_number":39,"context_line":"from nova import flags"},{"line_number":40,"context_line":"from nova import log as logging"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAD3%2F%2F%2BNU%3D","side":"PARENT","line":37,"updated":"2012-01-13 21:20:33.000000000","message":"Looks like a number of these imports won\u0027t be used anymore.","commit_id":"6c898e6abf44caa176790e9cd4505aeed145397c"}],"nova/api/openstack/v2/servers.py":[{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"d49ceda976193d25755234ea80bef3dad22b8c69","unresolved":false,"context_lines":[{"line_number":819,"context_line":"    @wsgi.action(\u0027revertResize\u0027)"},{"line_number":820,"context_line":"    @exception.novaclient_converter"},{"line_number":821,"context_line":"    @scheduler_api.redirect_handler"},{"line_number":822,"context_line":"    def _action_revert_resize(self, req, id, body):"},{"line_number":823,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":824,"context_line":"        instance \u003d self._get_server(context, id)"},{"line_number":825,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2BcQ%3D","line":822,"updated":"2012-01-13 01:05:03.000000000","message":"Whew, that\u0027s a lot of decorators stacked up.\n\nThat\u0027s going to run afoul of Mark Washenberger\u0027s proposed HACKING change (if it\u0027s adopted), so just thought I\u0027d mention that. \n\nYou way want to jump into that discussion since this is a concrete counter-example that could facilitate that discussion:\n\nhttps://review.openstack.org/#change,2966","commit_id":"c98434f052c5503b517127e2f938688954184228"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"01a92ec9795012dee62082bb89e9154f78237130","unresolved":false,"context_lines":[{"line_number":819,"context_line":"    @wsgi.action(\u0027revertResize\u0027)"},{"line_number":820,"context_line":"    @exception.novaclient_converter"},{"line_number":821,"context_line":"    @scheduler_api.redirect_handler"},{"line_number":822,"context_line":"    def _action_revert_resize(self, req, id, body):"},{"line_number":823,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":824,"context_line":"        instance \u003d self._get_server(context, id)"},{"line_number":825,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2BVA%3D","line":822,"in_reply_to":"AAAAD3%2F%2F%2Ba4%3D","updated":"2012-01-13 16:24:20.000000000","message":"Only thing I can think of is to try to make a single decorator that does @wsgi.response(), @wsgi.serializers(), @wsgi.deserializers(), @wsgi.action(), and @wsgi.extends.  And if that sounds like a mouthful, well...","commit_id":"c98434f052c5503b517127e2f938688954184228"},{"author":{"_account_id":642,"name":"Matt Dietz","email":"matthew.dietz@gmail.com","username":"cerberus"},"change_message_id":"e283678ef957b837af97b8d4800273ac4e82fa2f","unresolved":false,"context_lines":[{"line_number":819,"context_line":"    @wsgi.action(\u0027revertResize\u0027)"},{"line_number":820,"context_line":"    @exception.novaclient_converter"},{"line_number":821,"context_line":"    @scheduler_api.redirect_handler"},{"line_number":822,"context_line":"    def _action_revert_resize(self, req, id, body):"},{"line_number":823,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":824,"context_line":"        instance \u003d self._get_server(context, id)"},{"line_number":825,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2Ba4%3D","line":822,"in_reply_to":"AAAAD3%2F%2F%2BcQ%3D","updated":"2012-01-13 05:45:06.000000000","message":"Agree with Rick here: What\u0027s the contingency if it\u0027s decided this is a no-no?","commit_id":"c98434f052c5503b517127e2f938688954184228"}],"nova/api/openstack/wsgi.py":[{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"d49ceda976193d25755234ea80bef3dad22b8c69","unresolved":false,"context_lines":[{"line_number":863,"context_line":""},{"line_number":864,"context_line":"        return deserializer().deserialize(body)"},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"    def preproc_extensions(self, extensions, request, action_args):"},{"line_number":867,"context_line":"        # List of callables for post-processing extensions"},{"line_number":868,"context_line":"        post \u003d []"},{"line_number":869,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2Bd4%3D","line":866,"updated":"2012-01-13 01:05:03.000000000","message":"Harking back to a comment on the last MP I reviewed:\n\nWould you be cool with changing this to\n\n`pre_processing_extensions`","commit_id":"c98434f052c5503b517127e2f938688954184228"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"82f845ed087c12f6a90e2f4f7b7145f87e86cdc9","unresolved":false,"context_lines":[{"line_number":863,"context_line":""},{"line_number":864,"context_line":"        return deserializer().deserialize(body)"},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"    def preproc_extensions(self, extensions, request, action_args):"},{"line_number":867,"context_line":"        # List of callables for post-processing extensions"},{"line_number":868,"context_line":"        post \u003d []"},{"line_number":869,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2BRE%3D","line":866,"in_reply_to":"AAAAD3%2F%2F%2Bd4%3D","updated":"2012-01-13 18:38:16.000000000","message":"Done","commit_id":"c98434f052c5503b517127e2f938688954184228"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"01a92ec9795012dee62082bb89e9154f78237130","unresolved":false,"context_lines":[{"line_number":863,"context_line":""},{"line_number":864,"context_line":"        return deserializer().deserialize(body)"},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"    def preproc_extensions(self, extensions, request, action_args):"},{"line_number":867,"context_line":"        # List of callables for post-processing extensions"},{"line_number":868,"context_line":"        post \u003d []"},{"line_number":869,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2BU4%3D","line":866,"in_reply_to":"AAAAD3%2F%2F%2Bd4%3D","updated":"2012-01-13 16:24:20.000000000","message":"Well, \"pre_process_extensions\"...","commit_id":"c98434f052c5503b517127e2f938688954184228"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"d49ceda976193d25755234ea80bef3dad22b8c69","unresolved":false,"context_lines":[{"line_number":921,"context_line":"                    response \u003d Fault(ex)"},{"line_number":922,"context_line":"            else:"},{"line_number":923,"context_line":"                # Regular functions get post-processing..."},{"line_number":924,"context_line":"                try:"},{"line_number":925,"context_line":"                    response \u003d ext(req\u003drequest, resp_obj\u003dresp_obj,"},{"line_number":926,"context_line":"                                   **action_args)"},{"line_number":927,"context_line":"                except TypeError as ex:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2BcU%3D","line":924,"updated":"2012-01-13 01:05:03.000000000","message":"Just thinking out-loud, I wish there was a way to DRY up the repeated exception handlers. Don\u0027t see anything immediately obvious though...","commit_id":"c98434f052c5503b517127e2f938688954184228"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"01a92ec9795012dee62082bb89e9154f78237130","unresolved":false,"context_lines":[{"line_number":921,"context_line":"                    response \u003d Fault(ex)"},{"line_number":922,"context_line":"            else:"},{"line_number":923,"context_line":"                # Regular functions get post-processing..."},{"line_number":924,"context_line":"                try:"},{"line_number":925,"context_line":"                    response \u003d ext(req\u003drequest, resp_obj\u003dresp_obj,"},{"line_number":926,"context_line":"                                   **action_args)"},{"line_number":927,"context_line":"                except TypeError as ex:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2BU8%3D","line":924,"in_reply_to":"AAAAD3%2F%2F%2Ba0%3D","updated":"2012-01-13 16:24:20.000000000","message":"Yeah, it is possible.  I think the best means of approaching it would be with a context handler, though, and I\u0027m not sure it really reduces duplication enough.  Consider this example, for instance:\n\n    try:\n        with self.process_exceptions():\n            response \u003d ext.send(resp_obj)\n    except StopIteration:\n        continue\n    except Fault as ex:\n        response \u003d ex\n\nThere\u0027s at least one other example where the assignment in the \u0027try\u0027 part of the block is to resp_obj rather than response, while all the exceptions do get assignments to response, which is why we have to do this.  The process_exceptions() thing would be able to handle the TypeError, Fault, and HTTPException catches and logging, and would just have to throw a Fault, but at the expense of having to define the context handler…","commit_id":"c98434f052c5503b517127e2f938688954184228"},{"author":{"_account_id":642,"name":"Matt Dietz","email":"matthew.dietz@gmail.com","username":"cerberus"},"change_message_id":"e283678ef957b837af97b8d4800273ac4e82fa2f","unresolved":false,"context_lines":[{"line_number":921,"context_line":"                    response \u003d Fault(ex)"},{"line_number":922,"context_line":"            else:"},{"line_number":923,"context_line":"                # Regular functions get post-processing..."},{"line_number":924,"context_line":"                try:"},{"line_number":925,"context_line":"                    response \u003d ext(req\u003drequest, resp_obj\u003dresp_obj,"},{"line_number":926,"context_line":"                                   **action_args)"},{"line_number":927,"context_line":"                except TypeError as ex:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2Ba0%3D","line":924,"in_reply_to":"AAAAD3%2F%2F%2BcU%3D","updated":"2012-01-13 05:45:06.000000000","message":"Couldn\u0027t you? if you crafted the method and argument lists ahead of time and then called them in the single try/except. If nothing else, functools has the partial() method...","commit_id":"c98434f052c5503b517127e2f938688954184228"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"82f845ed087c12f6a90e2f4f7b7145f87e86cdc9","unresolved":false,"context_lines":[{"line_number":921,"context_line":"                    response \u003d Fault(ex)"},{"line_number":922,"context_line":"            else:"},{"line_number":923,"context_line":"                # Regular functions get post-processing..."},{"line_number":924,"context_line":"                try:"},{"line_number":925,"context_line":"                    response \u003d ext(req\u003drequest, resp_obj\u003dresp_obj,"},{"line_number":926,"context_line":"                                   **action_args)"},{"line_number":927,"context_line":"                except TypeError as ex:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2BRA%3D","line":924,"in_reply_to":"AAAAD3%2F%2F%2BcU%3D","updated":"2012-01-13 18:38:16.000000000","message":"Done","commit_id":"c98434f052c5503b517127e2f938688954184228"}]}
