)]}'
{"nova/objects/base.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"539a704419e3f8b31a2cfaab63cee56864ce9be2","unresolved":false,"context_lines":[{"line_number":447,"context_line":"            entity \u003d NovaObject.obj_from_primitive(entity, context\u003dcontext)"},{"line_number":448,"context_line":"        elif isinstance(entity, (tuple, list, set)):"},{"line_number":449,"context_line":"            items \u003d [self.deserialize_entity(context, item) for item in entity]"},{"line_number":450,"context_line":"            entity \u003d self._coerce_iterable(entity.__class__, items)"},{"line_number":451,"context_line":"        return entity"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2F3BA%3D","line":450,"updated":"2013-06-19 16:31:00.000000000","message":"that\u0027s all pretty nasty and I\u0027m not sure I fully understand it from a glance\n\nthere\u0027s an obvious refactoring here to share all this code by having a helper method which you just pass the serialize/deserialize method to\n\n  else:\n      entity \u003d self._coerce_iterable(entity, self.deserialize_entity)","commit_id":"9368076ba09b7097b10ee5ce9b0a1951ce21d468"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"edc82717874826de49b7dc31f3eb494583d50b1b","unresolved":false,"context_lines":[{"line_number":447,"context_line":"            entity \u003d NovaObject.obj_from_primitive(entity, context\u003dcontext)"},{"line_number":448,"context_line":"        elif isinstance(entity, (tuple, list, set)):"},{"line_number":449,"context_line":"            items \u003d [self.deserialize_entity(context, item) for item in entity]"},{"line_number":450,"context_line":"            entity \u003d self._coerce_iterable(entity.__class__, items)"},{"line_number":451,"context_line":"        return entity"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2F28U%3D","line":450,"in_reply_to":"AAAAPn%2F%2F3BA%3D","updated":"2013-06-19 16:56:14.000000000","message":"Okay, what about it is nasty and/or doesn\u0027t make sense? It\u0027s creating a new list of deserialized items in the old iterable, and then converting the list to whatever type it was before (list, tuple, set, etc).\n\nThe refactor makes sense and I\u0027ll do it.","commit_id":"9368076ba09b7097b10ee5ce9b0a1951ce21d468"}],"nova/tests/objects/test_objects.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"3ae2f6d50c0aea48eff088163563d7f90edff689","unresolved":false,"context_lines":[{"line_number":529,"context_line":"        ser \u003d base.NovaObjectSerializer()"},{"line_number":530,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":531,"context_line":"        obj \u003d MyObj()"},{"line_number":532,"context_line":"        for iterable in (list, tuple, set):"},{"line_number":533,"context_line":"            thing \u003d iterable([obj])"},{"line_number":534,"context_line":"            primitive \u003d ser.serialize_entity(ctxt, thing)"},{"line_number":535,"context_line":"            self.assertEqual(1, len(primitive))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPn%2F%2F2FA%3D","line":532,"updated":"2013-06-19 22:15:11.000000000","message":"I\u0027d have made these separate tests, but no biggie:\n\n  def _test_object_serialization_iterable(self, cls):\n      ...\n\n  def test_object_serialization_set(self):\n      self._test_object_serialization_iterable(set)","commit_id":"4893b2086038a02c40eef52e4d38106b9526a0b8"}]}
