)]}'
{"keystone/tests/unit/common/test_notifications.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c0a7b1039e089c8d16623fa4ba25e27371b0e8dc","unresolved":false,"context_lines":[{"line_number":754,"context_line":"        class Foo(object):"},{"line_number":755,"context_line":"            def __init__(self):"},{"line_number":756,"context_line":"                self.event_callbacks \u003d {CREATED_OPERATION:"},{"line_number":757,"context_line":"                                        {\u0027project\u0027: Foo.callback}}"},{"line_number":758,"context_line":""},{"line_number":759,"context_line":"            def callback(self, *args):"},{"line_number":760,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_6ff879c5","line":757,"updated":"2015-08-07 18:51:57.000000000","message":"so, this fails because: \n\n    {\u0027project\u0027: Foo.callback}}\n\nversus:\n\n    {\u0027project\u0027: self.callback}}\n\nright?","commit_id":"e8ed0f28756f5c43a2fea4d7103d627705acd4d8"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"7b40d547f1925c666308cdfcead53a60627c1648","unresolved":false,"context_lines":[{"line_number":754,"context_line":"        class Foo(object):"},{"line_number":755,"context_line":"            def __init__(self):"},{"line_number":756,"context_line":"                self.event_callbacks \u003d {CREATED_OPERATION:"},{"line_number":757,"context_line":"                                        {\u0027project\u0027: Foo.callback}}"},{"line_number":758,"context_line":""},{"line_number":759,"context_line":"            def callback(self, *args):"},{"line_number":760,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_ef024972","line":757,"in_reply_to":"1a4dcd0f_6ff879c5","updated":"2015-08-07 18:55:58.000000000","message":"Yes, that\u0027s right. I wanted to show that we don\u0027t support unbound method, because we can\u0027t. Once this is merged I\u0027ll go back and fix up https://review.openstack.org/#/c/158777. There was a comment on there they my approach doesn\u0027t work for unbound methods, so now I can say \"it doesn\u0027t matter\".","commit_id":"e8ed0f28756f5c43a2fea4d7103d627705acd4d8"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0c01e1d8b2e1537ac1412c958ef71f7227532827","unresolved":false,"context_lines":[{"line_number":744,"context_line":""},{"line_number":745,"context_line":"        self.assertRaises(AttributeError, Foo)"},{"line_number":746,"context_line":""},{"line_number":747,"context_line":"    def test_using_an_unbound_method_as_a_callback_fails(self):"},{"line_number":748,"context_line":"        @notifications.listener"},{"line_number":749,"context_line":"        class Foo(object):"},{"line_number":750,"context_line":"            def __init__(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_9047221d","line":747,"updated":"2015-08-07 20:04:26.000000000","message":"what\u0027s an unbound method?","commit_id":"217e6c0b2d2e240ab47e9406ccaafe249783594f"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"5f1aeb6257af37f744c64e6a410030ca98ba40b5","unresolved":false,"context_lines":[{"line_number":744,"context_line":""},{"line_number":745,"context_line":"        self.assertRaises(AttributeError, Foo)"},{"line_number":746,"context_line":""},{"line_number":747,"context_line":"    def test_using_an_unbound_method_as_a_callback_fails(self):"},{"line_number":748,"context_line":"        @notifications.listener"},{"line_number":749,"context_line":"        class Foo(object):"},{"line_number":750,"context_line":"            def __init__(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_ba58f88b","line":747,"in_reply_to":"1a4dcd0f_9047221d","updated":"2015-08-07 21:44:28.000000000","message":"When you reference a method from a class object you get a method that isn\u0027t bound to a particular instance so there is no magic \u0027self\u0027. You can call it, but you have to pass in the instance manually like: C.m(C())\n\nIf you reference the method from an instance then you get a method that effectively curries the self argument for you (think functools.partial).","commit_id":"217e6c0b2d2e240ab47e9406ccaafe249783594f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"083bc394066cbcad5ccf0c7a5474338b6ebe21ed","unresolved":false,"context_lines":[{"line_number":744,"context_line":""},{"line_number":745,"context_line":"        self.assertRaises(AttributeError, Foo)"},{"line_number":746,"context_line":""},{"line_number":747,"context_line":"    def test_using_an_unbound_method_as_a_callback_fails(self):"},{"line_number":748,"context_line":"        @notifications.listener"},{"line_number":749,"context_line":"        class Foo(object):"},{"line_number":750,"context_line":"            def __init__(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_3d05c213","line":747,"in_reply_to":"1a4dcd0f_ba58f88b","updated":"2015-08-07 22:27:24.000000000","message":"Add a comment in the test where the unbound method is so that it\u0027s clear what\u0027s the important part amongst all the code.","commit_id":"217e6c0b2d2e240ab47e9406ccaafe249783594f"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"d80a311791e7632aa4810feaf3a155a4371fb640","unresolved":false,"context_lines":[{"line_number":764,"context_line":""},{"line_number":765,"context_line":"        # TODO(dstanek): it would probably be nice to fail early using"},{"line_number":766,"context_line":"        # something like:"},{"line_number":767,"context_line":"        #     self.assertRaises(TypeError, Foo)"},{"line_number":768,"context_line":"        Foo()"},{"line_number":769,"context_line":"        project_ref \u003d self.new_project_ref(domain_id\u003dself.domain_id)"},{"line_number":770,"context_line":"        self.assertRaises(TypeError, self.assignment_api.create_project,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_964924ba","line":767,"updated":"2015-08-24 13:31:30.000000000","message":"this is enough I think, TypeError raised just because how we call it but not tied with the callback directly.","commit_id":"972df7532642b3af39cc95b9d675d8b223b7c25e"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"607293d629668ee7e3b5d8cabba274478e4067a3","unresolved":false,"context_lines":[{"line_number":764,"context_line":""},{"line_number":765,"context_line":"        # TODO(dstanek): it would probably be nice to fail early using"},{"line_number":766,"context_line":"        # something like:"},{"line_number":767,"context_line":"        #     self.assertRaises(TypeError, Foo)"},{"line_number":768,"context_line":"        Foo()"},{"line_number":769,"context_line":"        project_ref \u003d self.new_project_ref(domain_id\u003dself.domain_id)"},{"line_number":770,"context_line":"        self.assertRaises(TypeError, self.assignment_api.create_project,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_4121684c","line":767,"in_reply_to":"fa1b9901_964924ba","updated":"2015-08-25 00:30:27.000000000","message":"yeah, server should not have started if the event callbacks don\u0027t work. I agree it should be done at startup. Having said that, can\u0027t we be a bit smarter? Like using inspect to ignore the first argument?","commit_id":"972df7532642b3af39cc95b9d675d8b223b7c25e"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"d80a311791e7632aa4810feaf3a155a4371fb640","unresolved":false,"context_lines":[{"line_number":767,"context_line":"        #     self.assertRaises(TypeError, Foo)"},{"line_number":768,"context_line":"        Foo()"},{"line_number":769,"context_line":"        project_ref \u003d self.new_project_ref(domain_id\u003dself.domain_id)"},{"line_number":770,"context_line":"        self.assertRaises(TypeError, self.assignment_api.create_project,"},{"line_number":771,"context_line":"                          project_ref[\u0027id\u0027], project_ref)"},{"line_number":772,"context_line":""},{"line_number":773,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_eb43d96a","line":770,"updated":"2015-08-24 13:31:30.000000000","message":"using `self.resource_api.create_project` instead since `self.assignment_api.create_project` is now deprecated.","commit_id":"972df7532642b3af39cc95b9d675d8b223b7c25e"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"054edb98a3ef50f8dcc2c29fafff2914c7bf369b","unresolved":false,"context_lines":[{"line_number":767,"context_line":"        #     self.assertRaises(TypeError, Foo)"},{"line_number":768,"context_line":"        Foo()"},{"line_number":769,"context_line":"        project_ref \u003d self.new_project_ref(domain_id\u003dself.domain_id)"},{"line_number":770,"context_line":"        self.assertRaises(TypeError, self.assignment_api.create_project,"},{"line_number":771,"context_line":"                          project_ref[\u0027id\u0027], project_ref)"},{"line_number":772,"context_line":""},{"line_number":773,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_fe3fd9b1","line":770,"in_reply_to":"fa1b9901_307020a4","updated":"2015-08-25 14:43:45.000000000","message":"bad luck :)","commit_id":"972df7532642b3af39cc95b9d675d8b223b7c25e"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"ff07037b2fd84dbe154840d91e2ec0440a598661","unresolved":false,"context_lines":[{"line_number":767,"context_line":"        #     self.assertRaises(TypeError, Foo)"},{"line_number":768,"context_line":"        Foo()"},{"line_number":769,"context_line":"        project_ref \u003d self.new_project_ref(domain_id\u003dself.domain_id)"},{"line_number":770,"context_line":"        self.assertRaises(TypeError, self.assignment_api.create_project,"},{"line_number":771,"context_line":"                          project_ref[\u0027id\u0027], project_ref)"},{"line_number":772,"context_line":""},{"line_number":773,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_307020a4","line":770,"in_reply_to":"fa1b9901_793a35cf","updated":"2015-08-25 14:14:58.000000000","message":"Looks like I had to make this change anyway. A change was merged to remove those methods and that broke my test.","commit_id":"972df7532642b3af39cc95b9d675d8b223b7c25e"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"999c969c129f93835fc966e391486165802de700","unresolved":false,"context_lines":[{"line_number":767,"context_line":"        #     self.assertRaises(TypeError, Foo)"},{"line_number":768,"context_line":"        Foo()"},{"line_number":769,"context_line":"        project_ref \u003d self.new_project_ref(domain_id\u003dself.domain_id)"},{"line_number":770,"context_line":"        self.assertRaises(TypeError, self.assignment_api.create_project,"},{"line_number":771,"context_line":"                          project_ref[\u0027id\u0027], project_ref)"},{"line_number":772,"context_line":""},{"line_number":773,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_793a35cf","line":770,"in_reply_to":"fa1b9901_eb43d96a","updated":"2015-08-24 17:36:40.000000000","message":"I did this in a new review since it was code I copied from other tests in this file and there were lots of places that needed the update.  https://review.openstack.org/216347","commit_id":"972df7532642b3af39cc95b9d675d8b223b7c25e"}]}
