)]}'
{"oslo_serialization/jsonutils.py":[{"author":{"_account_id":20864,"name":"Gevorg Davoian","email":"gdavoian@gmail.com","username":"gdavoian"},"change_message_id":"d0175cfe7edbd60617442f58554f9fa4b1a03306","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        # __iter__ defined but it isn\u0027t callable as list()."},{"line_number":159,"context_line":"        return six.text_type(value)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    return value"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"def _serialize(obj):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9abb7d3a_77848dd3","line":161,"range":{"start_line":161,"start_character":11,"end_line":161,"end_character":16},"updated":"2016-05-31 08:09:09.000000000","message":"I would suggest to simply raise ValueError like \"Cannot convert to primitive\" explicitly here. It won\u0027t break libraries which already use jsonutils and have handlers for ValueError, but at least it will give us the adequate cause of errors.","commit_id":"4156486188fb60cf8faec4c6a2a785c438066316"},{"author":{"_account_id":18152,"name":"Benoît Knecht","email":"benoit.knecht@fsfe.org","username":"byte"},"change_message_id":"f6527e025937c6d4a71dbff36b987a9f9cb83343","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        # __iter__ defined but it isn\u0027t callable as list()."},{"line_number":159,"context_line":"        return six.text_type(value)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    return value"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"def _serialize(obj):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9abb7d3a_f2636bda","line":161,"range":{"start_line":161,"start_character":11,"end_line":161,"end_character":16},"in_reply_to":"9abb7d3a_77848dd3","updated":"2016-05-31 08:14:45.000000000","message":"That\u0027s a good idea, but I would raise TypeError instead. The json.dump() documentation states that:\n\ndefault(obj) is a function that should return a serializable version of obj or raise TypeError. The default simply raises TypeError.","commit_id":"4156486188fb60cf8faec4c6a2a785c438066316"},{"author":{"_account_id":20864,"name":"Gevorg Davoian","email":"gdavoian@gmail.com","username":"gdavoian"},"change_message_id":"94e25bd2abac9f0495db8dcf241ca404f041af47","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        # __iter__ defined but it isn\u0027t callable as list()."},{"line_number":159,"context_line":"        return six.text_type(value)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    return value"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"def _serialize(obj):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9abb7d3a_b26e032d","line":161,"range":{"start_line":161,"start_character":11,"end_line":161,"end_character":16},"in_reply_to":"9abb7d3a_f2636bda","updated":"2016-05-31 08:24:47.000000000","message":"Yes, I know that TypeError is more appropriate here, but it will break libraries already using json. I already encountered with this problem when trying to use msgpack as a default serializer instead of json in oslo.messaging. Some tests suddenly failed since msgpack raises TypeErrors on failures instead of ValueErrors, and these exceptions remain unhandled.","commit_id":"4156486188fb60cf8faec4c6a2a785c438066316"}]}
