)]}'
{"nova/objects/base.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ba761b97bfcd09f6c256f129e30479cd3794ea1e","unresolved":false,"context_lines":[{"line_number":248,"context_line":"                            \"have an \u0027objects\u0027 field\")"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def __radd__(self, other):"},{"line_number":251,"context_line":"        # Handling arbitrary fields may not make sense if those fields are not"},{"line_number":252,"context_line":"        # all concatenatable. Only concatenate if the base \u0027objects\u0027 field is"},{"line_number":253,"context_line":"        # the only one."},{"line_number":254,"context_line":"        if (self.__class__ \u003d\u003d other.__class__ and"},{"line_number":255,"context_line":"                self.__class__.fields.keys() \u003d\u003d [\u0027objects\u0027]):"},{"line_number":256,"context_line":"            # This should never be run in practice. If the above condition is"},{"line_number":257,"context_line":"            # met then __add__ would have been run."},{"line_number":258,"context_line":"            return self.__class__(objects\u003dother.objects + self.objects)"},{"line_number":259,"context_line":"        else:"},{"line_number":260,"context_line":"            raise TypeError(\"List Objects should be of the same type and only \""},{"line_number":261,"context_line":"                            \"have an \u0027objects\u0027 field\")"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"class NovaObjectSerializer(messaging.NoOpSerializer):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_4ae8e1e2","line":261,"range":{"start_line":251,"start_character":1,"end_line":261,"end_character":54},"updated":"2016-08-09 15:01:17.000000000","message":"Can we simply define __radd__ as the same as __add__ without duplicating the code itself? \nI.e.:\n    __radd__ \u003d __add__","commit_id":"8790646c08d15983bc7b5616cbe2f9b1d82c4937"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"f0760dfc63a4902622b48f4840dff1d1c6fd0776","unresolved":false,"context_lines":[{"line_number":248,"context_line":"                            \"have an \u0027objects\u0027 field\")"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def __radd__(self, other):"},{"line_number":251,"context_line":"        # Handling arbitrary fields may not make sense if those fields are not"},{"line_number":252,"context_line":"        # all concatenatable. Only concatenate if the base \u0027objects\u0027 field is"},{"line_number":253,"context_line":"        # the only one."},{"line_number":254,"context_line":"        if (self.__class__ \u003d\u003d other.__class__ and"},{"line_number":255,"context_line":"                self.__class__.fields.keys() \u003d\u003d [\u0027objects\u0027]):"},{"line_number":256,"context_line":"            # This should never be run in practice. If the above condition is"},{"line_number":257,"context_line":"            # met then __add__ would have been run."},{"line_number":258,"context_line":"            return self.__class__(objects\u003dother.objects + self.objects)"},{"line_number":259,"context_line":"        else:"},{"line_number":260,"context_line":"            raise TypeError(\"List Objects should be of the same type and only \""},{"line_number":261,"context_line":"                            \"have an \u0027objects\u0027 field\")"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"class NovaObjectSerializer(messaging.NoOpSerializer):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_b0d0ec54","line":261,"range":{"start_line":251,"start_character":1,"end_line":261,"end_character":54},"in_reply_to":"9ad45d7e_4ae8e1e2","updated":"2016-08-09 15:22:41.000000000","message":"The ordering of the underlying objects list concatenation is different, \u0027self.objects + other.object\u0027 vs \u0027other.objects + self.objects\u0027. I understand that there is duplication here and it would be nice to avoid it, but there is an actual difference in what they do.\n\nIn this situation I would rather have the little bit of duplication rather than the complexity of trying to factor out the common portions while still accounting for the difference in the two methods.","commit_id":"8790646c08d15983bc7b5616cbe2f9b1d82c4937"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b7083d60108e90e48f61187520fad595cb2694b2","unresolved":false,"context_lines":[{"line_number":248,"context_line":"                            \"have an \u0027objects\u0027 field\")"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def __radd__(self, other):"},{"line_number":251,"context_line":"        # Handling arbitrary fields may not make sense if those fields are not"},{"line_number":252,"context_line":"        # all concatenatable. Only concatenate if the base \u0027objects\u0027 field is"},{"line_number":253,"context_line":"        # the only one."},{"line_number":254,"context_line":"        if (self.__class__ \u003d\u003d other.__class__ and"},{"line_number":255,"context_line":"                self.__class__.fields.keys() \u003d\u003d [\u0027objects\u0027]):"},{"line_number":256,"context_line":"            # This should never be run in practice. If the above condition is"},{"line_number":257,"context_line":"            # met then __add__ would have been run."},{"line_number":258,"context_line":"            return self.__class__(objects\u003dother.objects + self.objects)"},{"line_number":259,"context_line":"        else:"},{"line_number":260,"context_line":"            raise TypeError(\"List Objects should be of the same type and only \""},{"line_number":261,"context_line":"                            \"have an \u0027objects\u0027 field\")"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"class NovaObjectSerializer(messaging.NoOpSerializer):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_f657fcff","line":261,"range":{"start_line":251,"start_character":1,"end_line":261,"end_character":54},"in_reply_to":"9ad45d7e_b0d0ec54","updated":"2016-08-09 15:47:19.000000000","message":"Good point, I missed the order difference.","commit_id":"8790646c08d15983bc7b5616cbe2f9b1d82c4937"},{"author":{"_account_id":22785,"name":"Tanvir Talukder","email":"tanvirt16@gmail.com","username":"tanvirt16"},"change_message_id":"e456403d7fce52f83532a9860ff8f198b06a40ba","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        # Handling arbitrary fields may not make sense if those fields are not"},{"line_number":251,"context_line":"        # all concatenatable. Only concatenate if the base \u0027objects\u0027 field is"},{"line_number":252,"context_line":"        # the only one and the classes match."},{"line_number":253,"context_line":"        if (self.__class__ \u003d\u003d other.__class__ and"},{"line_number":254,"context_line":"                list(self.__class__.fields.keys()) \u003d\u003d [\u0027objects\u0027]):"},{"line_number":255,"context_line":"            # This should never be run in practice. If the above condition is"},{"line_number":256,"context_line":"            # met then __add__ would have been run."},{"line_number":257,"context_line":"            return self.__class__(objects\u003dother.objects + self.objects)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_817512cc","line":254,"range":{"start_line":253,"start_character":8,"end_line":254,"end_character":67},"updated":"2016-08-11 19:24:56.000000000","message":"Is this \"if\" statement not the same as the one above it? What\u0027s to stop both of these blocks from executing and performing two concatenations? Or am I misunderstanding what\u0027s going on here?","commit_id":"c463d397671fdfebf1c77b4df6da630cc0b9214c"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"f272dc76f66eff996df1483686eb4fe91dd38bb3","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        # Handling arbitrary fields may not make sense if those fields are not"},{"line_number":251,"context_line":"        # all concatenatable. Only concatenate if the base \u0027objects\u0027 field is"},{"line_number":252,"context_line":"        # the only one and the classes match."},{"line_number":253,"context_line":"        if (self.__class__ \u003d\u003d other.__class__ and"},{"line_number":254,"context_line":"                list(self.__class__.fields.keys()) \u003d\u003d [\u0027objects\u0027]):"},{"line_number":255,"context_line":"            # This should never be run in practice. If the above condition is"},{"line_number":256,"context_line":"            # met then __add__ would have been run."},{"line_number":257,"context_line":"            return self.__class__(objects\u003dother.objects + self.objects)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_6f11e55c","line":254,"range":{"start_line":253,"start_character":8,"end_line":254,"end_character":67},"in_reply_to":"9ad45d7e_817512cc","updated":"2016-08-11 20:12:04.000000000","message":"I messed up the patch somehow. line 250 should be \"def __radd__(self, other):\"","commit_id":"c463d397671fdfebf1c77b4df6da630cc0b9214c"},{"author":{"_account_id":22785,"name":"Tanvir Talukder","email":"tanvirt16@gmail.com","username":"tanvirt16"},"change_message_id":"e456403d7fce52f83532a9860ff8f198b06a40ba","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        # the only one and the classes match."},{"line_number":253,"context_line":"        if (self.__class__ \u003d\u003d other.__class__ and"},{"line_number":254,"context_line":"                list(self.__class__.fields.keys()) \u003d\u003d [\u0027objects\u0027]):"},{"line_number":255,"context_line":"            # This should never be run in practice. If the above condition is"},{"line_number":256,"context_line":"            # met then __add__ would have been run."},{"line_number":257,"context_line":"            return self.__class__(objects\u003dother.objects + self.objects)"},{"line_number":258,"context_line":"        else:"},{"line_number":259,"context_line":"            raise TypeError(\"List Objects should be of the same type and only \""}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_213426fa","line":256,"range":{"start_line":255,"start_character":52,"end_line":256,"end_character":51},"updated":"2016-08-11 19:24:56.000000000","message":"This seems to not be updated since patch set 2. This part is still in the \"__add__\" method so the comment doesn\u0027t exactly make sense?","commit_id":"c463d397671fdfebf1c77b4df6da630cc0b9214c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"035788c1975caf0e8f3e2a0fa6ea3a4c098e49ae","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        # the only one and the classes match."},{"line_number":254,"context_line":"        if (self.__class__ \u003d\u003d other.__class__ and"},{"line_number":255,"context_line":"                list(self.__class__.fields.keys()) \u003d\u003d [\u0027objects\u0027]):"},{"line_number":256,"context_line":"            # This should never be run in practice. If the above condition is"},{"line_number":257,"context_line":"            # met then __add__ would have been run."},{"line_number":258,"context_line":"            return self.__class__(objects\u003dother.objects + self.objects)"},{"line_number":259,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3ac371cc_23c5f68d","line":256,"updated":"2016-08-15 16:56:05.000000000","message":"Why not raise NotImplemented here, then? Wouldn\u0027t that be a better indication that someone is misusing the object in this way?","commit_id":"af625cf956372b1c076466038da6421b24b4c716"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc078a6453434db640d99ffcbedaa7ef04ce975c","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        else:"},{"line_number":237,"context_line":"            return primitive.get(key, default)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def __add__(self, other):"},{"line_number":240,"context_line":"        # Handling arbitrary fields may not make sense if those fields are not"},{"line_number":241,"context_line":"        # all concatenatable. Only concatenate if the base \u0027objects\u0027 field is"},{"line_number":242,"context_line":"        # the only one and the classes match."}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_c63852d6","line":239,"updated":"2016-09-01 17:13:20.000000000","message":"We should probably do this in oslo.versionedobjects shouldn\u0027t we? It should eventually move there anyway.","commit_id":"bdedbffb8b90e04d0597326a382ae0138f119c0a"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"0933bc1803661005be8e3a81ea8a0a2412c361eb","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        else:"},{"line_number":237,"context_line":"            return primitive.get(key, default)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def __add__(self, other):"},{"line_number":240,"context_line":"        # Handling arbitrary fields may not make sense if those fields are not"},{"line_number":241,"context_line":"        # all concatenatable. Only concatenate if the base \u0027objects\u0027 field is"},{"line_number":242,"context_line":"        # the only one and the classes match."}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_26bbbee6","line":239,"in_reply_to":"fa7ab95a_c63852d6","updated":"2016-09-01 21:27:30.000000000","message":"Yeah, I was planning to propose it there next. I had been hoping to get this in for use by https://review.openstack.org/#/c/356138/22/nova/compute/api.py as you saw, but didn\u0027t quite happen.","commit_id":"bdedbffb8b90e04d0597326a382ae0138f119c0a"}],"nova/tests/unit/objects/test_objects.py":[{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"5df2d81671e25bfa1d48da3a795707d47ebab858","unresolved":false,"context_lines":[{"line_number":1442,"context_line":"        list1 \u003d MyList(objects\u003d[MyOwnedObject(baz\u003d1)])"},{"line_number":1443,"context_line":""},{"line_number":1444,"context_line":"        def add(obj):"},{"line_number":1445,"context_line":"            return [] + obj"},{"line_number":1446,"context_line":""},{"line_number":1447,"context_line":"        self.assertRaises(TypeError, add, list1)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_4b265dbb","line":1445,"range":{"start_line":1445,"start_character":12,"end_line":1445,"end_character":27},"updated":"2016-08-15 12:32:27.000000000","message":"This one will test __radd__, right? So, I wonder, will test_list_object_concat_fails_different_objects and this one be enough to say that __add__ will work well for built-in either?","commit_id":"77d3402b0be1e18696a328056b10bad8887d0402"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"7ba525c3066991163b1776a1ad04e7d795d96955","unresolved":false,"context_lines":[{"line_number":1442,"context_line":"        list1 \u003d MyList(objects\u003d[MyOwnedObject(baz\u003d1)])"},{"line_number":1443,"context_line":""},{"line_number":1444,"context_line":"        def add(obj):"},{"line_number":1445,"context_line":"            return [] + obj"},{"line_number":1446,"context_line":""},{"line_number":1447,"context_line":"        self.assertRaises(TypeError, add, list1)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_8e6ea3c7","line":1445,"range":{"start_line":1445,"start_character":12,"end_line":1445,"end_character":27},"in_reply_to":"3ac371cc_4b265dbb","updated":"2016-08-15 12:55:03.000000000","message":"Yes, this tests __radd__. I think test_list_object_concat_fails_different_objects and this are enough to show that \"obj + []\" would fail as well, but I\u0027m happy to add a test if desired.","commit_id":"77d3402b0be1e18696a328056b10bad8887d0402"}]}
