)]}'
{"glance/api/v2/images.py":[{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"c93cceb8961707954d7ebf7713a0580feb20c2cb","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            for change in changes:"},{"line_number":144,"context_line":"                change_method_name \u003d \u0027_do_%s\u0027 % change[\u0027op\u0027]"},{"line_number":145,"context_line":"                assert hasattr(self, change_method_name)  # nosec"},{"line_number":146,"context_line":"                # nosec: This function runs safely if the assertion fails."},{"line_number":147,"context_line":"                change_method \u003d getattr(self, change_method_name)"},{"line_number":148,"context_line":"                change_method(req, image, change)"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_85e8027e","line":146,"updated":"2015-11-04 10:51:42.000000000","message":"If the assert is not needed, why don\u0027t we just remove it then?","commit_id":"e2e0f2a51470698b8a2056a0dfb46baba21e1329"}],"glance/common/rpc.py":[{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"c93cceb8961707954d7ebf7713a0580feb20c2cb","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        if refiner:"},{"line_number":129,"context_line":"            assert callable(refiner), \"Refiner must be callable\"  # nosec"},{"line_number":130,"context_line":"            # nosec: filter will raise an exception if the asserton is false"},{"line_number":131,"context_line":"            funcs \u003d filter(refiner, funcs)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        for name in funcs:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_a5ed068d","line":130,"updated":"2015-11-04 10:51:42.000000000","message":"I think we should get rid of this assert as well and document/expect the exception from the filter then.","commit_id":"e2e0f2a51470698b8a2056a0dfb46baba21e1329"},{"author":{"_account_id":17976,"name":"Drew Varner","email":"avarner@linux.vnet.ibm.com","username":"avarner"},"change_message_id":"2aa1922685a33ae0891c2137b46c285206e95428","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        if refiner:"},{"line_number":129,"context_line":"            assert callable(refiner), \"Refiner must be callable\"  # nosec"},{"line_number":130,"context_line":"            # nosec: filter will raise an exception if the asserton is false"},{"line_number":131,"context_line":"            funcs \u003d filter(refiner, funcs)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        for name in funcs:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_f4f4db87","line":130,"in_reply_to":"fa80f949_a5ed068d","updated":"2015-11-09 20:47:30.000000000","message":"Agreed - with the assert, the error message is `AssertionError`. Without, it is  `TypeError: \u0027int\u0027 object is not callable`. So removing the assertion results in an improvement.","commit_id":"e2e0f2a51470698b8a2056a0dfb46baba21e1329"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"6acedb770d7a69e68ec26e516e641aa618b6280d","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        :params excluded: List of methods to exclude."},{"line_number":115,"context_line":"        :params refiner: Callable to use as filter for methods."},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        :raises TypeError: If refiner is not callable."},{"line_number":118,"context_line":"        \"\"\""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        funcs \u003d filter(lambda x: not x.startswith(\"_\"), dir(resource))"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_97f623d6","line":117,"updated":"2015-11-16 11:46:00.000000000","message":"It worries me a bit that we\u0027re changing the error raised and the patch just updates the tests. That means we\u0027re not handling this (and the other one) exception somewhere (or our tests are not enough).","commit_id":"c9114bdbd916c0160a2636b966e7a733c954ba2d"},{"author":{"_account_id":17976,"name":"Drew Varner","email":"avarner@linux.vnet.ibm.com","username":"avarner"},"change_message_id":"21477f646a4ad079be162b7b1e197c90196091a3","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        :params excluded: List of methods to exclude."},{"line_number":115,"context_line":"        :params refiner: Callable to use as filter for methods."},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        :raises TypeError: If refiner is not callable."},{"line_number":118,"context_line":"        \"\"\""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        funcs \u003d filter(lambda x: not x.startswith(\"_\"), dir(resource))"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_c75299dd","line":117,"in_reply_to":"ba8a016a_97f623d6","updated":"2015-11-16 23:32:15.000000000","message":"Agreed - I grepped for AssertionError, and after applying this patch, there are no results (except in tests/ and hacking/ )","commit_id":"c9114bdbd916c0160a2636b966e7a733c954ba2d"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"b68f54a18c42ca0a65f2aaa1a3a580008d691167","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        :params excluded: List of methods to exclude."},{"line_number":115,"context_line":"        :params refiner: Callable to use as filter for methods."},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        :raises TypeError: If refiner is not callable."},{"line_number":118,"context_line":"        \"\"\""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        funcs \u003d filter(lambda x: not x.startswith(\"_\"), dir(resource))"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_583f79d6","line":117,"in_reply_to":"ba8a016a_c75299dd","updated":"2015-12-09 22:00:58.000000000","message":"We don\u0027t register our RPC Controller with a refiner so I feel this is safe to do.\n\nRef: https://github.com/openstack/glance/blob/master/glance/registry/api/v2/rpc.py#L47","commit_id":"c9114bdbd916c0160a2636b966e7a733c954ba2d"}],"glance/db/sqlalchemy/api.py":[{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"a1ce8cc616f2dd8a27423c88b40ccc2f90aa6a2b","unresolved":false,"context_lines":[{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    assert(len(sort_dirs) \u003d\u003d len(sort_keys))  # nosec"},{"line_number":345,"context_line":"    # nosec: This function runs safely if the assertion fails."},{"line_number":346,"context_line":"    if len(sort_dirs) \u003c len(sort_keys):"},{"line_number":347,"context_line":"        sort_dirs +\u003d [sort_dir] * (len(sort_keys) - len(sort_dirs))"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    # Add sorting"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_243971d7","line":346,"updated":"2015-11-12 09:57:04.000000000","message":"So we are finally in accordance with API-WG\u003d)","commit_id":"c9114bdbd916c0160a2636b966e7a733c954ba2d"}],"glance/db/sqlalchemy/artifacts.py":[{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"c93cceb8961707954d7ebf7713a0580feb20c2cb","unresolved":false,"context_lines":[{"line_number":328,"context_line":"def _do_paginate_query(query, sort_keys\u003dNone, sort_dirs\u003dNone,"},{"line_number":329,"context_line":"                       marker\u003dNone, limit\u003dNone):"},{"line_number":330,"context_line":"    # Default the sort direction to ascending"},{"line_number":331,"context_line":"    default_sort_dir \u003d \u0027asc\u0027"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    # Ensure a per-column sort direction"},{"line_number":334,"context_line":"    if sort_dirs is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_e5f30e72","line":331,"updated":"2015-11-04 10:51:42.000000000","message":"Could we be consistent here and either set sort_dir like in api.py or use default_sort_dir there as well.","commit_id":"e2e0f2a51470698b8a2056a0dfb46baba21e1329"}]}
