)]}'
{"taskflow/storage.py":[{"author":{"_account_id":11024,"name":"Dan Krause","email":"dan@dankrause.net","username":"dankrause"},"change_message_id":"743fc9d8eb3229be4d2d17e18ece44785d5a3a15","unresolved":false,"context_lines":[{"line_number":484,"context_line":"        \"\"\""},{"line_number":485,"context_line":"        return self._failures.copy()"},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"    def has_failures(self):"},{"line_number":488,"context_line":"        \"\"\"Returns True if there are failed tasks in the storage.\"\"\""},{"line_number":489,"context_line":"        return bool(self._failures)"},{"line_number":490,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_08be1ed5","line":487,"updated":"2015-03-09 13:00:37.000000000","message":"Why remove the lock here?","commit_id":"20fdbba14188c384dc0365d6451834b0887a6835"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"6e96367579a75ba135001fd17f049cc012fe896f","unresolved":false,"context_lines":[{"line_number":484,"context_line":"        \"\"\""},{"line_number":485,"context_line":"        return self._failures.copy()"},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"    def has_failures(self):"},{"line_number":488,"context_line":"        \"\"\"Returns True if there are failed tasks in the storage.\"\"\""},{"line_number":489,"context_line":"        return bool(self._failures)"},{"line_number":490,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_dc1f64b5","line":487,"in_reply_to":"9a80dd14_08be1ed5","updated":"2015-03-09 14:46:49.000000000","message":"Good question, its not really needed (this is a read-only operation, and therefore doesn\u0027t really need a lock as python itself will ensure this is ok to do safely); perhaps I should do that in another review though....\n\nIteration isn\u0027t safe though (I need to check if the above copy() is safe); due to things like:\n\nhttps://hg.python.org/releasing/2.7.9/file/753a8f457ddc/Objects/dictobject.c#l2536","commit_id":"20fdbba14188c384dc0365d6451834b0887a6835"}],"taskflow/utils/lock_utils.py":[{"author":{"_account_id":11024,"name":"Dan Krause","email":"dan@dankrause.net","username":"dankrause"},"change_message_id":"36c50da9009049be62121fd909ff16851eddfeec","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        return decorator"},{"line_number":122,"context_line":"    else:"},{"line_number":123,"context_line":"        if len(args) \u003d\u003d 1:"},{"line_number":124,"context_line":"            return decorator(args[0])"},{"line_number":125,"context_line":"        else:"},{"line_number":126,"context_line":"            return decorator"},{"line_number":127,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_eba704a5","line":124,"updated":"2015-03-09 13:31:05.000000000","message":"If I\u0027m not mistaken, this will break when you pass a single non-kwarg to the decorator. For exmaple:\n\n@lock_utils.read_lock(\"foo\")\ndef my_func():\n    pass\n\nThis will result in \"decorator\" being called with \"foo\" as an arg, and returning wrapper, which is then treated like a decorator.\n\nI don\u0027t know of a way to reliably make a decorator optionally callable with args. Maybe we\u0027re okay with this caveat, but I wanted to make sure you were aware of it.","commit_id":"20fdbba14188c384dc0365d6451834b0887a6835"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"6e96367579a75ba135001fd17f049cc012fe896f","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        return decorator"},{"line_number":122,"context_line":"    else:"},{"line_number":123,"context_line":"        if len(args) \u003d\u003d 1:"},{"line_number":124,"context_line":"            return decorator(args[0])"},{"line_number":125,"context_line":"        else:"},{"line_number":126,"context_line":"            return decorator"},{"line_number":127,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_3ccec02e","line":124,"in_reply_to":"9a80dd14_eba704a5","updated":"2015-03-09 14:46:49.000000000","message":"I think I\u0027m ok with that, python is weird here :-P\n\nThis stuff in utils hopefully people aren\u0027t using pubicly anyway so these kinds of restrictions I think are ok.","commit_id":"20fdbba14188c384dc0365d6451834b0887a6835"}]}
