)]}'
{"openstack/common/db/api.py":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"a9a437a89ea3aa6057175693e2e2e94ba0043e25","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        backend_path \u003d self.__backend_mapping.get(backend_name,"},{"line_number":85,"context_line":"                                                  backend_name)"},{"line_number":86,"context_line":"        backend_mod \u003d importutils.import_module(backend_path)"},{"line_number":87,"context_line":"        self.__backend \u003d backend_mod.get_backend()"},{"line_number":88,"context_line":"        return self.__backend"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def __getattr__(self, key):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2B0j8%3D","line":87,"updated":"2013-02-18 16:09:09.000000000","message":"If get_backend() doesn\u0027t exist, just treat it as a module with functions to call","commit_id":"d88206d6964ebc9909fff0f9b94fc501f8703107"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"e7a1c73c582f107f6b6d6f19d3b25911636920d2","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        backend_path \u003d self.__backend_mapping.get(backend_name,"},{"line_number":85,"context_line":"                                                  backend_name)"},{"line_number":86,"context_line":"        backend_mod \u003d importutils.import_module(backend_path)"},{"line_number":87,"context_line":"        self.__backend \u003d backend_mod.get_backend()"},{"line_number":88,"context_line":"        return self.__backend"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def __getattr__(self, key):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2B0ZI%3D","line":87,"in_reply_to":"AAAAM3%2F%2B0j8%3D","updated":"2013-02-18 16:57:07.000000000","message":"I had it similar to that way to begin with... it seemed more clean to make this a hard requirement and get add get_backend() in nova\u0027s sqlalchemy/api.  I agree it\u0027s kind of odd to have to have it return its module as the API... but then it\u0027s also kind of silly of it to not have used a class ;)","commit_id":"d88206d6964ebc9909fff0f9b94fc501f8703107"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"85e0457b2e7181fba032f1dbd461b9947d12143a","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        def tpool_wrapper(*args, **kwargs):"},{"line_number":97,"context_line":"            return self.__tpool.execute(attr, *args, **kwargs)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        tpool_wrapper.__name__ \u003d attr.__name__"},{"line_number":100,"context_line":"        return tpool_wrapper"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2B0mM%3D","line":99,"updated":"2013-02-18 15:51:47.000000000","message":"functools.update_wrapper(wrapper, wrapped[, assigned][, updated]\n\nis a pretty way to wrap the function. :)","commit_id":"d88206d6964ebc9909fff0f9b94fc501f8703107"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"e7a1c73c582f107f6b6d6f19d3b25911636920d2","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        def tpool_wrapper(*args, **kwargs):"},{"line_number":97,"context_line":"            return self.__tpool.execute(attr, *args, **kwargs)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        tpool_wrapper.__name__ \u003d attr.__name__"},{"line_number":100,"context_line":"        return tpool_wrapper"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2B0ZE%3D","line":99,"in_reply_to":"AAAAM3%2F%2B0mM%3D","updated":"2013-02-18 16:57:07.000000000","message":"Ah nice.. I will change that.","commit_id":"d88206d6964ebc9909fff0f9b94fc501f8703107"}],"tests/unit/db/test_api.py":[{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"2ea44c8756f10c9a1f8464652546f4f623aab78c","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def get_backend():"},{"line_number":26,"context_line":"    return DBAPI()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class DBAPI(object):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2B0vw%3D","line":26,"updated":"2013-02-18 14:41:41.000000000","message":"Does this need to pass through *args and **kwargs?  If not, how do we pick which backend?","commit_id":"d88206d6964ebc9909fff0f9b94fc501f8703107"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"85e0457b2e7181fba032f1dbd461b9947d12143a","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def get_backend():"},{"line_number":26,"context_line":"    return DBAPI()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class DBAPI(object):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2B0nM%3D","line":26,"in_reply_to":"AAAAM3%2F%2B0vw%3D","updated":"2013-02-18 15:51:47.000000000","message":"The test is acting as an implementation of a backend.  The choice of backend is already made based on a CONF param.  See __get_backend() in api.py","commit_id":"d88206d6964ebc9909fff0f9b94fc501f8703107"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"2ea44c8756f10c9a1f8464652546f4f623aab78c","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class DBAPI(object):"},{"line_number":30,"context_line":"    def api_class_call1(_self, *args, **kwargs):"},{"line_number":31,"context_line":"        return args, kwargs"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2B0vo%3D","line":30,"updated":"2013-02-18 14:41:41.000000000","message":"_self?  Why not just self like every other Python class?","commit_id":"d88206d6964ebc9909fff0f9b94fc501f8703107"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"e7a1c73c582f107f6b6d6f19d3b25911636920d2","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class DBAPI(object):"},{"line_number":30,"context_line":"    def api_class_call1(_self, *args, **kwargs):"},{"line_number":31,"context_line":"        return args, kwargs"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2B0aM%3D","line":30,"in_reply_to":"AAAAM3%2F%2B0vo%3D","updated":"2013-02-18 16:57:07.000000000","message":"Yeah, as Brian said... this test module is just acting as an DB API backend..  Notice the tests below select this test module as the DB backend choice via self.config(db_backend\u003d\u0027.... \u0027)\n\nThis api_class_call1() is a test DB API method.  I\u0027m verifying that the args and response are passed through correctly via openstack/common/db/api.py:DBAPI()","commit_id":"d88206d6964ebc9909fff0f9b94fc501f8703107"}]}
