)]}'
{"nova/api/openstack/placement/handler.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"c1e328321be520301e4dc4818d4bc017f9b41fc2","unresolved":false,"context_lines":[{"line_number":144,"context_line":"    return handler(environ, start_response)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"def handle_405(environ, start_response):"},{"line_number":148,"context_line":"    \"\"\"Return a 405 response when method is not allowed."},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    If _methods are in routing_args, send an allow header listing"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_d28a54bd","line":147,"updated":"2017-08-03 05:53:27.000000000","message":"A question, why we don\u0027t use decorator \u0027webob.dec.wsgify\u0027 for all the middleware? Then we needn\u0027t care about raise or return.","commit_id":"ecabfc45c9e75003c9eb4499ed06800c8e88dbc9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"9fe20a7f1de773dbcc4010a4b806c5c9c77ec522","unresolved":false,"context_lines":[{"line_number":144,"context_line":"    return handler(environ, start_response)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"def handle_405(environ, start_response):"},{"line_number":148,"context_line":"    \"\"\"Return a 405 response when method is not allowed."},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    If _methods are in routing_args, send an allow header listing"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_fd5cfced","line":147,"in_reply_to":"df3967d1_b148e55b","updated":"2017-08-03 13:43:28.000000000","message":"Thanks for the answer!","commit_id":"ecabfc45c9e75003c9eb4499ed06800c8e88dbc9"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"72032e8f777e59d0b36bf669dfe323c576bad321","unresolved":false,"context_lines":[{"line_number":144,"context_line":"    return handler(environ, start_response)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"def handle_405(environ, start_response):"},{"line_number":148,"context_line":"    \"\"\"Return a 405 response when method is not allowed."},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    If _methods are in routing_args, send an allow header listing"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_b148e55b","line":147,"in_reply_to":"df3967d1_d28a54bd","updated":"2017-08-03 11:06:30.000000000","message":"It was mostly just a design decision, with the purpose of enhancing inspectability. Only something that was specifically at the end of route/url would get the decorator. It\u0027s those things which get the most advantage from the cost of creating the Request and Response objects. Elsewhere, not as much, so why bother?\n\nThis method is a bit of a special case: it\u0027s not middleware but an application but isn\u0027t directly tied to a specific URL. Fixing this issue could have been handled by using wsgify decorator, but since it isn\u0027t used anywhere else in this file, I decided not to here.\n\nThis could also have been fixed within the PlacementHandler (look for the comment \"Trap the HTTPNotFound\" for a related comment) but this seemed like the cleaner and enclosed fix more in keeping with the intent of the handle_405 method.\n\nThanks for asking the question, because coming up with the answer has helped identify a bit of a mistruth in the commit message, which I\u0027ll fix.","commit_id":"ecabfc45c9e75003c9eb4499ed06800c8e88dbc9"}]}
