)]}'
{"keystone/common/dependency.py":[{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"25df8360ab6a93cbf9491444c2c647ffc588f5d2","unresolved":false,"context_lines":[{"line_number":123,"context_line":"def _notify_dependencies_injected(obj):"},{"line_number":124,"context_line":"    if (hasattr(obj, DEPENDENCIES_INJECECTED_CALLBACK)"},{"line_number":125,"context_line":"            and callable(getattr(obj, DEPENDENCIES_INJECECTED_CALLBACK))):"},{"line_number":126,"context_line":"        obj._dependencies_injected()"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"def _process_dependencies(obj):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_50fb717a","line":126,"updated":"2014-08-28 15:33:14.000000000","message":"If hard-coding of \u0027_dependencies_injected()\u0027 is being avoided, please invoke getattr(obj, DEPENDENCIES_INJECECTED_CALLBACK)() instead of obj._dependencies_injected()","commit_id":"c94905d2946e30087e6c49f20c0ef7e95a93a030"},{"author":{"_account_id":12215,"name":"Alexey Miroshkin","email":"alexey.miroshkin@ru.ibm.com","username":"amirosh"},"change_message_id":"59aea1a2aca16d9ac5e85a582fdf114e32ce60ff","unresolved":false,"context_lines":[{"line_number":123,"context_line":"def _notify_dependencies_injected(obj):"},{"line_number":124,"context_line":"    if (hasattr(obj, DEPENDENCIES_INJECECTED_CALLBACK)"},{"line_number":125,"context_line":"            and callable(getattr(obj, DEPENDENCIES_INJECECTED_CALLBACK))):"},{"line_number":126,"context_line":"        obj._dependencies_injected()"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"def _process_dependencies(obj):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_79bdb167","line":126,"in_reply_to":"1abeadc6_50fb717a","updated":"2014-08-28 19:49:04.000000000","message":"Done","commit_id":"c94905d2946e30087e6c49f20c0ef7e95a93a030"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"25df8360ab6a93cbf9491444c2c647ffc588f5d2","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                # We don\u0027t know about this dependency, so save it for later."},{"line_number":138,"context_line":"                unresolved_in_out.setdefault(dependency, []).append(obj)"},{"line_number":139,"context_line":"                if incomplete_objects is not None:"},{"line_number":140,"context_line":"                    incomplete_objects.setdefault(obj, []).append(dependency)"},{"line_number":141,"context_line":"                continue"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"            setattr(obj, dependency, REGISTRY[dependency])"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_10c81921","line":140,"updated":"2014-08-28 15:33:14.000000000","message":"In order to use obj as a dictionary key it has to be hashable - is it guaranteed?","commit_id":"c94905d2946e30087e6c49f20c0ef7e95a93a030"},{"author":{"_account_id":12215,"name":"Alexey Miroshkin","email":"alexey.miroshkin@ru.ibm.com","username":"amirosh"},"change_message_id":"59aea1a2aca16d9ac5e85a582fdf114e32ce60ff","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                # We don\u0027t know about this dependency, so save it for later."},{"line_number":138,"context_line":"                unresolved_in_out.setdefault(dependency, []).append(obj)"},{"line_number":139,"context_line":"                if incomplete_objects is not None:"},{"line_number":140,"context_line":"                    incomplete_objects.setdefault(obj, []).append(dependency)"},{"line_number":141,"context_line":"                continue"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"            setattr(obj, dependency, REGISTRY[dependency])"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_5c52a335","line":140,"in_reply_to":"1abeadc6_10c81921","updated":"2014-08-28 19:49:04.000000000","message":"In practice all such objects are hashable, but I\u0027m not sure we can guarantee that. So thanks for bringing this up, will use id(obj) as key.","commit_id":"c94905d2946e30087e6c49f20c0ef7e95a93a030"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"62588d5661695f5a20d8623a308268f7c381e1ef","unresolved":false,"context_lines":[{"line_number":35,"context_line":"_future_dependencies \u003d {}"},{"line_number":36,"context_line":"_future_optionals \u003d {}"},{"line_number":37,"context_line":"_factories \u003d {}"},{"line_number":38,"context_line":"_incomplete_objects \u003d {}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"DEPENDENCIES_INJECECTED_CALLBACK \u003d \u0027_dependencies_injected\u0027"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_ca2a758f","line":38,"updated":"2014-09-03 12:26:20.000000000","message":"It would be safer to use singletones instead of mutable global vars","commit_id":"0a266b46b146cae2f7738fe4462b33a762dbe99e"},{"author":{"_account_id":12215,"name":"Alexey Miroshkin","email":"alexey.miroshkin@ru.ibm.com","username":"amirosh"},"change_message_id":"b64dd7335a70c3beecaa5e23d660d55baa1943fe","unresolved":false,"context_lines":[{"line_number":35,"context_line":"_future_dependencies \u003d {}"},{"line_number":36,"context_line":"_future_optionals \u003d {}"},{"line_number":37,"context_line":"_factories \u003d {}"},{"line_number":38,"context_line":"_incomplete_objects \u003d {}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"DEPENDENCIES_INJECECTED_CALLBACK \u003d \u0027_dependencies_injected\u0027"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_a5c2c231","line":38,"in_reply_to":"fa98f980_ca2a758f","updated":"2014-09-03 14:11:19.000000000","message":"Following the original style of this code","commit_id":"0a266b46b146cae2f7738fe4462b33a762dbe99e"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"62588d5661695f5a20d8623a308268f7c381e1ef","unresolved":false,"context_lines":[{"line_number":123,"context_line":"def _notify_dependencies_injected(obj):"},{"line_number":124,"context_line":"    if (hasattr(obj, DEPENDENCIES_INJECECTED_CALLBACK)"},{"line_number":125,"context_line":"            and callable(getattr(obj, DEPENDENCIES_INJECECTED_CALLBACK))):"},{"line_number":126,"context_line":"        getattr(obj, DEPENDENCIES_INJECECTED_CALLBACK)()"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"def _process_dependencies(obj):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_0a68fd1b","line":126,"updated":"2014-09-03 12:26:20.000000000","message":"What about this?\n    cb \u003d getattr(obj, DEPENDENCIES_INJECECTED_CALLBACK, None)\n    callable(cb) and cb()\nNot a silver bullet, simply less code :)","commit_id":"0a266b46b146cae2f7738fe4462b33a762dbe99e"},{"author":{"_account_id":12215,"name":"Alexey Miroshkin","email":"alexey.miroshkin@ru.ibm.com","username":"amirosh"},"change_message_id":"b64dd7335a70c3beecaa5e23d660d55baa1943fe","unresolved":false,"context_lines":[{"line_number":123,"context_line":"def _notify_dependencies_injected(obj):"},{"line_number":124,"context_line":"    if (hasattr(obj, DEPENDENCIES_INJECECTED_CALLBACK)"},{"line_number":125,"context_line":"            and callable(getattr(obj, DEPENDENCIES_INJECECTED_CALLBACK))):"},{"line_number":126,"context_line":"        getattr(obj, DEPENDENCIES_INJECECTED_CALLBACK)()"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"def _process_dependencies(obj):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_656ffa2b","line":126,"in_reply_to":"fa98f980_0a68fd1b","updated":"2014-09-03 14:11:19.000000000","message":"Much nicer, thanks!","commit_id":"0a266b46b146cae2f7738fe4462b33a762dbe99e"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"62588d5661695f5a20d8623a308268f7c381e1ef","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        setattr(target, dependency, REGISTRY[dependency])"},{"line_number":242,"context_line":"        target_id \u003d id(target)"},{"line_number":243,"context_line":"        if (_incomplete_objects.get(target_id) and"},{"line_number":244,"context_line":"                dependency in _incomplete_objects[target_id]):"},{"line_number":245,"context_line":"            _incomplete_objects[target_id].remove(dependency)"},{"line_number":246,"context_line":"            if not _incomplete_objects[target_id]:"},{"line_number":247,"context_line":"                del _incomplete_objects[target_id]"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_aa91b1f2","line":244,"updated":"2014-09-03 12:26:20.000000000","message":"if dependency in _incomplete_objects.get(target_id, []):","commit_id":"0a266b46b146cae2f7738fe4462b33a762dbe99e"},{"author":{"_account_id":12215,"name":"Alexey Miroshkin","email":"alexey.miroshkin@ru.ibm.com","username":"amirosh"},"change_message_id":"b64dd7335a70c3beecaa5e23d660d55baa1943fe","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        setattr(target, dependency, REGISTRY[dependency])"},{"line_number":242,"context_line":"        target_id \u003d id(target)"},{"line_number":243,"context_line":"        if (_incomplete_objects.get(target_id) and"},{"line_number":244,"context_line":"                dependency in _incomplete_objects[target_id]):"},{"line_number":245,"context_line":"            _incomplete_objects[target_id].remove(dependency)"},{"line_number":246,"context_line":"            if not _incomplete_objects[target_id]:"},{"line_number":247,"context_line":"                del _incomplete_objects[target_id]"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_85013e3a","line":244,"in_reply_to":"fa98f980_aa91b1f2","updated":"2014-09-03 14:11:19.000000000","message":"Agree, shorter is better","commit_id":"0a266b46b146cae2f7738fe4462b33a762dbe99e"}]}
