)]}'
{"glance/common/rpc.py":[{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"1eb3fed488326f8e337ed2c0abbf7dbb3e263169","unresolved":false,"context_lines":[{"line_number":51,"context_line":"CONF.register_opts(rpc_opts)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"class RPCJSONSerializer(wsgi.JSONResponseSerializer):"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _sanitizer(self, obj):"},{"line_number":57,"context_line":"        def to_primitive(_type, _value):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FqhU%3D","line":54,"updated":"2013-06-25 17:47:04.000000000","message":"My preference is usually to aggregate rather than inherit. In that context, this change might be restructured as adding a sanitizer class that is (optionally) passed into wsgi.JSONResponseSerializer, and defining this rpc serializer as  a class that fulfills the santizer interface and is passed in at the right time.\n\nHowever, I really think the benefits of changing to that approach are dubious at this point, just wanted to mention it.","commit_id":"9d28254354ff0007de6a7fdabeb2033f34c2b519"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"ea8da883e2ef92bd7f30970e73665dd23d55d8f3","unresolved":false,"context_lines":[{"line_number":51,"context_line":"CONF.register_opts(rpc_opts)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"class RPCJSONSerializer(wsgi.JSONResponseSerializer):"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _sanitizer(self, obj):"},{"line_number":57,"context_line":"        def to_primitive(_type, _value):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAP3%2F%2F%2BKg%3D","line":54,"in_reply_to":"AAAAPn%2F%2FqhU%3D","updated":"2013-07-08 10:39:12.000000000","message":"Agreed, We should re-factor JSONResponseSerializer in a separate patch. Aggregating makes way more sense fort this task.","commit_id":"9d28254354ff0007de6a7fdabeb2033f34c2b519"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"1eb3fed488326f8e337ed2c0abbf7dbb3e263169","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        if isinstance(obj, datetime.datetime):"},{"line_number":61,"context_line":"            return to_primitive(\"datetime\", timeutils.strtime(obj))"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        return super(RPCJSONSerializer, self)._sanitizer(obj)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"class RPCJSONDeserializer(wsgi.JSONRequestDeserializer):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fqhg%3D","line":63,"updated":"2013-06-25 17:47:04.000000000","message":"I don\u0027t think this line is getting tested in the unit tests you added. Is it something we should add a test for? I\u0027m not really sure it matters, and of course this code looks good to me, but I just wanted to check.","commit_id":"9d28254354ff0007de6a7fdabeb2033f34c2b519"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"ea8da883e2ef92bd7f30970e73665dd23d55d8f3","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        if isinstance(obj, datetime.datetime):"},{"line_number":61,"context_line":"            return to_primitive(\"datetime\", timeutils.strtime(obj))"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        return super(RPCJSONSerializer, self)._sanitizer(obj)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"class RPCJSONDeserializer(wsgi.JSONRequestDeserializer):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAP3%2F%2F%2BKY%3D","line":63,"in_reply_to":"AAAAPn%2F%2Fqhg%3D","updated":"2013-07-08 10:39:12.000000000","message":"It\u0027s already tested in the Base class tests, that\u0027s why I didn\u0027t add it. I\u0027ll though.","commit_id":"9d28254354ff0007de6a7fdabeb2033f34c2b519"}],"glance/common/wsgi.py":[{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"dfa91b338057e7323a57003bf9bea8641e99c09d","unresolved":false,"context_lines":[{"line_number":537,"context_line":"class JSONResponseSerializer(object):"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"    def _sanitizer(self, obj):"},{"line_number":540,"context_line":"        \"\"\"Sanitizer method that will be passed to json.dumps.\"\"\""},{"line_number":541,"context_line":"        if isinstance(obj, datetime.datetime):"},{"line_number":542,"context_line":"            return obj.isoformat()"},{"line_number":543,"context_line":"        if hasattr(obj, \"to_dict\"):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FQHc%3D","line":540,"updated":"2013-07-06 03:19:11.000000000","message":"Should we use a decorator here instead rather than having a explicit private method which could be mishandled/ignored?\n\nbasically, to_json does not seem necessary- openstack common jsonutils could be useful otherwise, no?\n(really think what Mark mentions the previos page makes sense)","commit_id":"9d28254354ff0007de6a7fdabeb2033f34c2b519"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"ea8da883e2ef92bd7f30970e73665dd23d55d8f3","unresolved":false,"context_lines":[{"line_number":537,"context_line":"class JSONResponseSerializer(object):"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"    def _sanitizer(self, obj):"},{"line_number":540,"context_line":"        \"\"\"Sanitizer method that will be passed to json.dumps.\"\"\""},{"line_number":541,"context_line":"        if isinstance(obj, datetime.datetime):"},{"line_number":542,"context_line":"            return obj.isoformat()"},{"line_number":543,"context_line":"        if hasattr(obj, \"to_dict\"):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAP3%2F%2F%2BK8%3D","line":540,"in_reply_to":"AAAAPn%2F%2FQHc%3D","updated":"2013-07-08 10:39:12.000000000","message":"The idea here is to allow other implementations to extend this method and add their custom calls. \n\nI\u0027m not a fan of to_json but, it was already there and removing it might make sense in a separate patch.","commit_id":"9d28254354ff0007de6a7fdabeb2033f34c2b519"}],"glance/tests/unit/common/test_rpc.py":[{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"d3c782c16cff117eae7cf5e889e0512a92721e82","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        self.assertTrue(\u0027transfer-encoding\u0027 in request.headers)"},{"line_number":341,"context_line":"        self.assertTrue(rpc.RPCJSONDeserializer().has_body(request))"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def test_get_bind_addr_default_value(self):"},{"line_number":344,"context_line":"        expected \u003d (\u00270.0.0.0\u0027, \u0027123456\u0027)"},{"line_number":345,"context_line":"        actual \u003d wsgi.get_bind_addr(default_port\u003d\"123456\")"},{"line_number":346,"context_line":"        self.assertEqual(expected, actual)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FQjc%3D","line":343,"updated":"2013-07-05 20:29:09.000000000","message":"Did you mean for this test to be here?","commit_id":"9d28254354ff0007de6a7fdabeb2033f34c2b519"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"6d71746f2ac3c199947ec0cd602607509e408119","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        self.assertTrue(\u0027transfer-encoding\u0027 in request.headers)"},{"line_number":341,"context_line":"        self.assertTrue(rpc.RPCJSONDeserializer().has_body(request))"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def test_get_bind_addr_default_value(self):"},{"line_number":344,"context_line":"        expected \u003d (\u00270.0.0.0\u0027, \u0027123456\u0027)"},{"line_number":345,"context_line":"        actual \u003d wsgi.get_bind_addr(default_port\u003d\"123456\")"},{"line_number":346,"context_line":"        self.assertEqual(expected, actual)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAP3%2F%2F7ao%3D","line":343,"in_reply_to":"AAAAP3%2F%2F%2BLY%3D","updated":"2013-07-09 01:33:49.000000000","message":"thought so ;)","commit_id":"9d28254354ff0007de6a7fdabeb2033f34c2b519"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"ea8da883e2ef92bd7f30970e73665dd23d55d8f3","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        self.assertTrue(\u0027transfer-encoding\u0027 in request.headers)"},{"line_number":341,"context_line":"        self.assertTrue(rpc.RPCJSONDeserializer().has_body(request))"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def test_get_bind_addr_default_value(self):"},{"line_number":344,"context_line":"        expected \u003d (\u00270.0.0.0\u0027, \u0027123456\u0027)"},{"line_number":345,"context_line":"        actual \u003d wsgi.get_bind_addr(default_port\u003d\"123456\")"},{"line_number":346,"context_line":"        self.assertEqual(expected, actual)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAP3%2F%2F%2BLY%3D","line":343,"in_reply_to":"AAAAPn%2F%2FQjc%3D","updated":"2013-07-08 10:39:12.000000000","message":"nope, it\u0027s a leftover from a nasty copy / paste.","commit_id":"9d28254354ff0007de6a7fdabeb2033f34c2b519"}]}
