)]}'
{"oslo_serialization/jsonutils.py":[{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"0a2d4b9cc4c0208f6b5a6591fa27c7e2c0750df8","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    # For exceptions, return the \u0027repr\u0027 of the exception object"},{"line_number":187,"context_line":"    if isinstance(value, Exception):"},{"line_number":188,"context_line":"        return repr(value)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    # TODO(gcb) raise ValueError in version 3.0"},{"line_number":191,"context_line":"    warnings.warn(\"Cannot convert %r to primitive, will raise ValueError \""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_06415da9","line":188,"updated":"2017-10-03 10:07:43.000000000","message":"I think we want this to be further up the function, before L183 because otherwise we\u0027ll call the \"fallback\" function before we need too. I expect this check should really be around L134-138","commit_id":"551b44dc20be33e34aaf37a21b835938179b1df1"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"2ae2ef402c0df368d02af62cf00db3a50b837a99","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    # For exceptions, return the \u0027repr\u0027 of the exception object"},{"line_number":187,"context_line":"    if isinstance(value, Exception):"},{"line_number":188,"context_line":"        return repr(value)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    # TODO(gcb) raise ValueError in version 3.0"},{"line_number":191,"context_line":"    warnings.warn(\"Cannot convert %r to primitive, will raise ValueError \""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_1acf6db1","line":188,"in_reply_to":"7f515b1d_06415da9","updated":"2017-10-03 15:52:42.000000000","message":"I\u0027m not sure. You could be right. I put it here because it is that last case before the warning / future error will occur.","commit_id":"551b44dc20be33e34aaf37a21b835938179b1df1"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3a64fceba74eb9f33684f89b60f654264550b838","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    # For exceptions, return the \u0027repr\u0027 of the exception object"},{"line_number":187,"context_line":"    if isinstance(value, Exception):"},{"line_number":188,"context_line":"        return repr(value)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    # TODO(gcb) raise ValueError in version 3.0"},{"line_number":191,"context_line":"    warnings.warn(\"Cannot convert %r to primitive, will raise ValueError \""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_b2fd15b3","line":188,"in_reply_to":"7f515b1d_1acf6db1","updated":"2017-10-04 00:20:32.000000000","message":"I have moved this up as suggested","commit_id":"551b44dc20be33e34aaf37a21b835938179b1df1"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"cb5b8fdefb06ffb2ff89282ca7dde150439fb166","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        return repr(value)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    # TODO(gcb) raise ValueError in version 3.0"},{"line_number":191,"context_line":"    warnings.warn(\"Cannot convert %r to primitive, will raise ValueError \""},{"line_number":192,"context_line":"                  \"instead of warning in version 3.0\" % (value,))"},{"line_number":193,"context_line":"    return value"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_b9be39d2","line":191,"updated":"2017-10-02 20:46:20.000000000","message":"Note to other reviewers: Without this change serializing an Exception will break when this becomes an error.","commit_id":"551b44dc20be33e34aaf37a21b835938179b1df1"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"0a2d4b9cc4c0208f6b5a6591fa27c7e2c0750df8","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        return repr(value)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    # TODO(gcb) raise ValueError in version 3.0"},{"line_number":191,"context_line":"    warnings.warn(\"Cannot convert %r to primitive, will raise ValueError \""},{"line_number":192,"context_line":"                  \"instead of warning in version 3.0\" % (value,))"},{"line_number":193,"context_line":"    return value"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_c61fc5b4","line":191,"in_reply_to":"7f515b1d_b9be39d2","updated":"2017-10-03 10:07:43.000000000","message":"It actually already causes jsonutils.dumps to break when an Exception is passed in, it results in a weird circular reference:\n\n\u003e\u003e\u003e from oslo_serialization import jsonutils\n\u003e\u003e\u003e jsonutils.dumps(Exception(\"help\"))\n/home/sam/Work/ironic/.tox/py27/local/lib/python2.7/site-packages/oslo_serialization/jsonutils.py:173: UserWarning: Cannot convert Exception(\u0027help\u0027,) to primitive, will raise ValueError instead of warning in version 3.0\n  \"instead of warning in version 3.0\" % (value,))\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n  File \"/home/sam/Work/ironic/.tox/py27/local/lib/python2.7/site-packages/oslo_serialization/jsonutils.py\", line 194, in dumps\n    return json.dumps(obj, default\u003ddefault, **kwargs)\n  File \"/usr/lib/python2.7/json/__init__.py\", line 251, in dumps\n    sort_keys\u003dsort_keys, **kw).encode(obj)\n  File \"/usr/lib/python2.7/json/encoder.py\", line 207, in encode\n    chunks \u003d self.iterencode(o, _one_shot\u003dTrue)\n  File \"/usr/lib/python2.7/json/encoder.py\", line 270, in iterencode\n    return _iterencode(o, 0)\nValueError: Circular reference detected","commit_id":"551b44dc20be33e34aaf37a21b835938179b1df1"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"4d1843574464c0dab126963159b34ace86cf1a37","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        return repr(value)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    # TODO(gcb) raise ValueError in version 3.0"},{"line_number":191,"context_line":"    warnings.warn(\"Cannot convert %r to primitive, will raise ValueError \""},{"line_number":192,"context_line":"                  \"instead of warning in version 3.0\" % (value,))"},{"line_number":193,"context_line":"    return value"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_c9f4758a","line":191,"in_reply_to":"7f515b1d_c61fc5b4","updated":"2017-10-03 13:49:35.000000000","message":"Ah, I only checked to_primitive directly.  I didn\u0027t realize dumps was the problem.  Is there a bug open that could be linked to this to provide more context?","commit_id":"551b44dc20be33e34aaf37a21b835938179b1df1"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"2ae2ef402c0df368d02af62cf00db3a50b837a99","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        return repr(value)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    # TODO(gcb) raise ValueError in version 3.0"},{"line_number":191,"context_line":"    warnings.warn(\"Cannot convert %r to primitive, will raise ValueError \""},{"line_number":192,"context_line":"                  \"instead of warning in version 3.0\" % (value,))"},{"line_number":193,"context_line":"    return value"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_9ae11d2e","line":191,"in_reply_to":"7f515b1d_c9f4758a","updated":"2017-10-03 15:52:42.000000000","message":"I\u0027ve added a test case that exercises jsonutils.dumps() to show that it works as expected.","commit_id":"551b44dc20be33e34aaf37a21b835938179b1df1"}]}
