)]}'
{"oslo/db/api.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"a550adf4d02b897ab8f7909acb221e47796bec8a","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    Database connection retries will be enabled for the decorated api method."},{"line_number":43,"context_line":"    Database connection failure can have many causes, which could be temporary,"},{"line_number":44,"context_line":"    like database lock. In such cases retry may increase the likelihood of"},{"line_number":45,"context_line":"    connection."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    Usage::"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_1ecf7080","line":44,"updated":"2014-05-14 20:25:35.000000000","message":"This is only for retrying of a DB API method in case if there was a disconnect in the middle of calling one and has nothing to do with locks","commit_id":"06ea36d66283310c3c80f504f18a7af7a4c09970"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"a550adf4d02b897ab8f7909acb221e47796bec8a","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    Usage::"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        @safe_for_db_retry"},{"line_number":50,"context_line":"        def api_method(self):"},{"line_number":51,"context_line":"            self.engine.connect()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        ..."}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_3e918c52","line":50,"updated":"2014-05-14 20:25:35.000000000","message":"IMO, this looks too synthetic, can we use one of Nova DB API methods as an example instead?","commit_id":"06ea36d66283310c3c80f504f18a7af7a4c09970"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"a550adf4d02b897ab8f7909acb221e47796bec8a","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        ..."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        # Somewhere in code"},{"line_number":56,"context_line":"        if hasattr(self.api_method, \u0027enable_retry\u0027):"},{"line_number":57,"context_line":"            self.api_method \u003d wrap_db_retry("},{"line_number":58,"context_line":"                retry_interval\u003dself.retry_interval,"},{"line_number":59,"context_line":"                max_retries\u003dself.max_retries,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_9ea2a0ac","line":56,"updated":"2014-05-14 20:25:35.000000000","message":"This makes no sense to me: it shows how retries are implemented, not how they are used.","commit_id":"06ea36d66283310c3c80f504f18a7af7a4c09970"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"a550adf4d02b897ab8f7909acb221e47796bec8a","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class wrap_db_retry(object):"},{"line_number":73,"context_line":"    \"\"\"Decorator class. Retry db.api methods, if DBConnectionError() raised."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    Retry decorated db.api methods. If we enabled `use_db_reconnect`"},{"line_number":76,"context_line":"    in config, this decorator will be applied to all db.api functions,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_9e90e044","line":73,"updated":"2014-05-14 20:25:35.000000000","message":"I\u0027d like to see something like:\n\n\"Retries the wrapped method, if there was a disconnect during the call.\"","commit_id":"06ea36d66283310c3c80f504f18a7af7a4c09970"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"a550adf4d02b897ab8f7909acb221e47796bec8a","unresolved":false,"context_lines":[{"line_number":72,"context_line":"class wrap_db_retry(object):"},{"line_number":73,"context_line":"    \"\"\"Decorator class. Retry db.api methods, if DBConnectionError() raised."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    Retry decorated db.api methods. If we enabled `use_db_reconnect`"},{"line_number":76,"context_line":"    in config, this decorator will be applied to all db.api functions,"},{"line_number":77,"context_line":"    marked with @safe_for_db_retry decorator."},{"line_number":78,"context_line":"    Decorator catches DBConnectionError() and retries function in a"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_3e9fcc51","line":75,"updated":"2014-05-14 20:25:35.000000000","message":"this is outdated - this method knows nothing about config","commit_id":"06ea36d66283310c3c80f504f18a7af7a4c09970"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"a550adf4d02b897ab8f7909acb221e47796bec8a","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"class DBAPI(object):"},{"line_number":134,"context_line":"    \"\"\"Initialize the chosen DB API backend."},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    After initialization API methods is available as normal attributes of"},{"line_number":137,"context_line":"    ``DBAPI`` subcluss."}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_feeba4ad","line":134,"updated":"2014-05-14 20:25:35.000000000","message":"DB API backend loader.","commit_id":"06ea36d66283310c3c80f504f18a7af7a4c09970"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"a550adf4d02b897ab8f7909acb221e47796bec8a","unresolved":false,"context_lines":[{"line_number":133,"context_line":"class DBAPI(object):"},{"line_number":134,"context_line":"    \"\"\"Initialize the chosen DB API backend."},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    After initialization API methods is available as normal attributes of"},{"line_number":137,"context_line":"    ``DBAPI`` subcluss."},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    :param backend_name: name of the backend to load"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_5edc9812","line":136,"updated":"2014-05-14 20:25:35.000000000","message":"s/is/are","commit_id":"06ea36d66283310c3c80f504f18a7af7a4c09970"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"a550adf4d02b897ab8f7909acb221e47796bec8a","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    \"\"\"Initialize the chosen DB API backend."},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    After initialization API methods is available as normal attributes of"},{"line_number":137,"context_line":"    ``DBAPI`` subcluss."},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    :param backend_name: name of the backend to load"},{"line_number":140,"context_line":"    :type backend_name: str"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_3ecd0c5e","line":137,"updated":"2014-05-14 20:25:35.000000000","message":"typo: subclass","commit_id":"06ea36d66283310c3c80f504f18a7af7a4c09970"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"a550adf4d02b897ab8f7909acb221e47796bec8a","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def _load_backend(self):"},{"line_number":185,"context_line":"        \"\"\"Lazy backend loading."},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        Load backend if it has not loaded earlier. Loaded backend will be"},{"line_number":188,"context_line":"        stored in the private attribute to be able at attribute getting."},{"line_number":189,"context_line":"        At normal circumstances you shouldn\u0027t care about this method, it will"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_b97db6e9","line":186,"updated":"2014-05-14 20:25:35.000000000","message":"this is an implementation detail, i\u0027m not sure it\u0027s worth documenting at all (the only thing I\u0027d document is double-checked locking pattern used here)","commit_id":"06ea36d66283310c3c80f504f18a7af7a4c09970"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"a550adf4d02b897ab8f7909acb221e47796bec8a","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                self._backend \u003d backend_mod.get_backend()"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def __getattr__(self, key):"},{"line_number":202,"context_line":"        \"\"\"Get a backend method as a regular attribute."},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        Database re-connection will be carried if it is forced with"},{"line_number":205,"context_line":"        use_db_reconnect attribute and retry is enabled for a given method."}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_597832f2","line":202,"updated":"2014-05-14 20:25:35.000000000","message":"ditto","commit_id":"06ea36d66283310c3c80f504f18a7af7a4c09970"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"bdb3f5181468c84e96b6771e313cce6d9e0c6b61","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    \"\"\"Indicate api method as safe for re-connection to database."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    Database connection retries will be enabled for the decorated api method."},{"line_number":43,"context_line":"    Database connection failure can have many causes, which could be temporary,"},{"line_number":44,"context_line":"    like database lock. In such cases retry may increase the likelihood of"},{"line_number":45,"context_line":"    connection."},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_b1e17100","line":43,"updated":"2014-06-02 13:40:22.000000000","message":"s/could/can","commit_id":"dd31489c5df095b86de48dfa59ac52807285be3b"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"c0b5dd0addf2c05e74cf746598951fd684471c75","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    \"\"\"Indicate api method as safe for re-connection to database."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    Database connection retries will be enabled for the decorated api method."},{"line_number":43,"context_line":"    Database connection failure can have many causes, which could be temporary,"},{"line_number":44,"context_line":"    like database lock. In such cases retry may increase the likelihood of"},{"line_number":45,"context_line":"    connection."},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_8d111f06","line":43,"in_reply_to":"1ae5cdf2_b1e17100","updated":"2014-06-06 10:15:50.000000000","message":"Done","commit_id":"dd31489c5df095b86de48dfa59ac52807285be3b"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"bdb3f5181468c84e96b6771e313cce6d9e0c6b61","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    Usage::"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        @safe_for_db_retry"},{"line_number":50,"context_line":"        def api_method(self):"},{"line_number":51,"context_line":"            self.engine.connect()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        ..."}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_51d4ad1f","line":50,"updated":"2014-06-02 13:40:22.000000000","message":"perhaps, we could use code of some Nova DB API method here","commit_id":"dd31489c5df095b86de48dfa59ac52807285be3b"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"c0b5dd0addf2c05e74cf746598951fd684471c75","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    Usage::"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        @safe_for_db_retry"},{"line_number":50,"context_line":"        def api_method(self):"},{"line_number":51,"context_line":"            self.engine.connect()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        ..."}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_a8dfa967","line":50,"in_reply_to":"1ae5cdf2_51d4ad1f","updated":"2014-06-06 10:15:50.000000000","message":"Unfortunately we have no usage of this decorator in projects known to me (Nova, Keystone). Should I check every OpenStack project to find a real usage?","commit_id":"dd31489c5df095b86de48dfa59ac52807285be3b"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"bdb3f5181468c84e96b6771e313cce6d9e0c6b61","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        ..."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        # Somewhere in code"},{"line_number":56,"context_line":"        if hasattr(self.api_method, \u0027enable_retry\u0027):"},{"line_number":57,"context_line":"            self.api_method \u003d wrap_db_retry("},{"line_number":58,"context_line":"                retry_interval\u003dself.retry_interval,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_f11bf919","line":55,"updated":"2014-06-02 13:40:22.000000000","message":"this is how retries are implemented, not how they are used","commit_id":"dd31489c5df095b86de48dfa59ac52807285be3b"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"c0b5dd0addf2c05e74cf746598951fd684471c75","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        ..."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        # Somewhere in code"},{"line_number":56,"context_line":"        if hasattr(self.api_method, \u0027enable_retry\u0027):"},{"line_number":57,"context_line":"            self.api_method \u003d wrap_db_retry("},{"line_number":58,"context_line":"                retry_interval\u003dself.retry_interval,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_7382f2c8","line":55,"in_reply_to":"1ae5cdf2_f11bf919","updated":"2014-06-06 10:15:50.000000000","message":"Done","commit_id":"dd31489c5df095b86de48dfa59ac52807285be3b"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"bdb3f5181468c84e96b6771e313cce6d9e0c6b61","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    :param f: database api method."},{"line_number":64,"context_line":"    :type f: function."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    :returns: decorated API method with ``enable_retry`` attribute on it."},{"line_number":67,"context_line":"    \"\"\""},{"line_number":68,"context_line":"    f.__dict__[\u0027enable_retry\u0027] \u003d True"},{"line_number":69,"context_line":"    return f"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_11c94578","line":66,"updated":"2014-06-02 13:40:22.000000000","message":"this is an implementation detail, not sure it\u0027s useful","commit_id":"dd31489c5df095b86de48dfa59ac52807285be3b"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"c0b5dd0addf2c05e74cf746598951fd684471c75","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    :param f: database api method."},{"line_number":64,"context_line":"    :type f: function."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    :returns: decorated API method with ``enable_retry`` attribute on it."},{"line_number":67,"context_line":"    \"\"\""},{"line_number":68,"context_line":"    f.__dict__[\u0027enable_retry\u0027] \u003d True"},{"line_number":69,"context_line":"    return f"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_1371ae0b","line":66,"in_reply_to":"1ae5cdf2_11c94578","updated":"2014-06-06 10:15:50.000000000","message":"Done","commit_id":"dd31489c5df095b86de48dfa59ac52807285be3b"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"bdb3f5181468c84e96b6771e313cce6d9e0c6b61","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    \"\"\"Initialize the chosen DB API backend."},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    After initialization API methods is available as normal attributes of"},{"line_number":137,"context_line":"    ``DBAPI`` subcluss."},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    :param backend_name: name of the backend to load"},{"line_number":140,"context_line":"    :type backend_name: str"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_91839503","line":137,"updated":"2014-06-02 13:40:22.000000000","message":"subclass","commit_id":"dd31489c5df095b86de48dfa59ac52807285be3b"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"c0b5dd0addf2c05e74cf746598951fd684471c75","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    \"\"\"Initialize the chosen DB API backend."},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    After initialization API methods is available as normal attributes of"},{"line_number":137,"context_line":"    ``DBAPI`` subcluss."},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    :param backend_name: name of the backend to load"},{"line_number":140,"context_line":"    :type backend_name: str"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_13452e42","line":137,"in_reply_to":"1ae5cdf2_91839503","updated":"2014-06-06 10:15:50.000000000","message":"Done","commit_id":"dd31489c5df095b86de48dfa59ac52807285be3b"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"bdb3f5181468c84e96b6771e313cce6d9e0c6b61","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        self.max_retries \u003d kwargs.get(\u0027max_retries\u0027, 20)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _load_backend(self):"},{"line_number":184,"context_line":"        \"\"\"Lazy backend loading."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        Load backend if it has not loaded earlier. Loaded backend will be"},{"line_number":187,"context_line":"        stored in the private attribute to be able at attribute getting."}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_f19e9953","line":184,"updated":"2014-06-02 13:40:22.000000000","message":"this is a private method, not sure how useful this is","commit_id":"dd31489c5df095b86de48dfa59ac52807285be3b"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"c0b5dd0addf2c05e74cf746598951fd684471c75","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        self.max_retries \u003d kwargs.get(\u0027max_retries\u0027, 20)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def _load_backend(self):"},{"line_number":184,"context_line":"        \"\"\"Lazy backend loading."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        Load backend if it has not loaded earlier. Loaded backend will be"},{"line_number":187,"context_line":"        stored in the private attribute to be able at attribute getting."}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_f38e0278","line":184,"in_reply_to":"1ae5cdf2_f19e9953","updated":"2014-06-06 10:15:50.000000000","message":"Done","commit_id":"dd31489c5df095b86de48dfa59ac52807285be3b"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"bdb3f5181468c84e96b6771e313cce6d9e0c6b61","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                self._backend \u003d backend_mod.get_backend()"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def __getattr__(self, key):"},{"line_number":201,"context_line":"        \"\"\"Get a backend method as a regular attribute."},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        Database re-connection will be carried if it is forced with"},{"line_number":204,"context_line":"        use_db_reconnect attribute and retry is enabled for a given method."}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_f1c5b93d","line":201,"updated":"2014-06-02 13:40:22.000000000","message":"again, this is just an implementation detail, IMO it\u0027s just worth mentioning in the class docstring, that users of DB API methods are supposed to call them as methods of DBAPI class instance.","commit_id":"dd31489c5df095b86de48dfa59ac52807285be3b"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"c0b5dd0addf2c05e74cf746598951fd684471c75","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                self._backend \u003d backend_mod.get_backend()"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def __getattr__(self, key):"},{"line_number":201,"context_line":"        \"\"\"Get a backend method as a regular attribute."},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        Database re-connection will be carried if it is forced with"},{"line_number":204,"context_line":"        use_db_reconnect attribute and retry is enabled for a given method."}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_33ecea29","line":201,"in_reply_to":"1ae5cdf2_f1c5b93d","updated":"2014-06-06 10:15:50.000000000","message":"Done","commit_id":"dd31489c5df095b86de48dfa59ac52807285be3b"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"51ace487b712b7540950399b925592428ff3b536","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    :param lazy: load the DB backend lazily on the first DB API method call"},{"line_number":136,"context_line":"    :type lazy: bool"},{"line_number":137,"context_line":"    :default backend_mapping: False"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    :keyword use_db_reconnect: retry DB transactions on disconnect or not"},{"line_number":140,"context_line":"    :type use_db_reconnect: bool"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_81ec7e91","line":137,"updated":"2014-06-06 14:54:07.000000000","message":"s/backend_mapping/lazy","commit_id":"1953c8144367285e5c75c324528d576bd3086b23"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"5c05c8e62127b9c6e64ab1aa862985a9ea20781c","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    :param lazy: load the DB backend lazily on the first DB API method call"},{"line_number":136,"context_line":"    :type lazy: bool"},{"line_number":137,"context_line":"    :default backend_mapping: False"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    :keyword use_db_reconnect: retry DB transactions on disconnect or not"},{"line_number":140,"context_line":"    :type use_db_reconnect: bool"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_e80edee4","line":137,"in_reply_to":"1ae5cdf2_81ec7e91","updated":"2014-06-09 08:29:39.000000000","message":"Done","commit_id":"1953c8144367285e5c75c324528d576bd3086b23"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"51ace487b712b7540950399b925592428ff3b536","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                backend_mod \u003d importutils.import_module(backend_path)"},{"line_number":179,"context_line":"                self._backend \u003d backend_mod.get_backend()"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def __getattr__(self, key):"},{"line_number":182,"context_line":"        if not self._backend:"},{"line_number":183,"context_line":"            self._load_backend()"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_a4118855","line":181,"updated":"2014-06-06 14:54:07.000000000","message":"see Roman\u0027s comment to the previous patch-set","commit_id":"1953c8144367285e5c75c324528d576bd3086b23"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"9f3c0415d368752b096bc5e436716cc42a9ac331","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                backend_mod \u003d importutils.import_module(backend_path)"},{"line_number":179,"context_line":"                self._backend \u003d backend_mod.get_backend()"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def __getattr__(self, key):"},{"line_number":182,"context_line":"        if not self._backend:"},{"line_number":183,"context_line":"            self._load_backend()"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_af34eafb","line":181,"in_reply_to":"1ae5cdf2_34d39460","updated":"2014-06-16 14:12:34.000000000","message":"Done","commit_id":"1953c8144367285e5c75c324528d576bd3086b23"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"5c05c8e62127b9c6e64ab1aa862985a9ea20781c","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                backend_mod \u003d importutils.import_module(backend_path)"},{"line_number":179,"context_line":"                self._backend \u003d backend_mod.get_backend()"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def __getattr__(self, key):"},{"line_number":182,"context_line":"        if not self._backend:"},{"line_number":183,"context_line":"            self._load_backend()"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_c83be29a","line":181,"in_reply_to":"1ae5cdf2_a4118855","updated":"2014-06-09 08:29:39.000000000","message":"It is already done in line #125 #126. If you mean something else which I don\u0027t know or can\u0027t imagine please specify your suggestions.","commit_id":"1953c8144367285e5c75c324528d576bd3086b23"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"b20df3386363386916aae745ae67aa364d99ccd2","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                backend_mod \u003d importutils.import_module(backend_path)"},{"line_number":179,"context_line":"                self._backend \u003d backend_mod.get_backend()"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def __getattr__(self, key):"},{"line_number":182,"context_line":"        if not self._backend:"},{"line_number":183,"context_line":"            self._load_backend()"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_34d39460","line":181,"in_reply_to":"1ae5cdf2_c83be29a","updated":"2014-06-10 07:40:28.000000000","message":"what about \"mentioning in the class docstring, that users of DB API methods are supposed to call them as methods of DBAPI class instance.\" ?","commit_id":"1953c8144367285e5c75c324528d576bd3086b23"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"527d2d4e4ad0382db8b94530ddd54b50c42e6998","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    Keyword arguments:"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    :keyword retry_interval: seconds between transaction retries"},{"line_number":74,"context_line":"    :type retry_interval: int"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    :keyword max_retries: max number of retries before an error is raised"},{"line_number":77,"context_line":"    :type max_retries: int"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_de324a5e","line":74,"updated":"2014-07-03 15:26:24.000000000","message":"I understood you copied these from below, but these are not keyword arguments. They are just (required) parameters.","commit_id":"f5a0cac613b531997fc12842f4e508f3720086fe"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"e3c794e33c01193ba213c3183bb3ec38de6fe18a","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    Keyword arguments:"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    :keyword retry_interval: seconds between transaction retries"},{"line_number":74,"context_line":"    :type retry_interval: int"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    :keyword max_retries: max number of retries before an error is raised"},{"line_number":77,"context_line":"    :type max_retries: int"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_fc553350","line":74,"in_reply_to":"baada198_de324a5e","updated":"2014-07-10 07:30:05.000000000","message":"Done","commit_id":"f5a0cac613b531997fc12842f4e508f3720086fe"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"19331d23cc7a6cab79b9cfe412249599f2127243","unresolved":false,"context_lines":[{"line_number":90,"context_line":"class DBAPI(object):"},{"line_number":91,"context_line":"    def __init__(self, backend_name, backend_mapping\u003dNone, lazy\u003dFalse,"},{"line_number":92,"context_line":"                 **kwargs):"},{"line_number":93,"context_line":"        \"\"\"Initialize the chosen DB API backend."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        :param backend_name: name of the backend to load"},{"line_number":96,"context_line":"        :type backend_name: str"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_0b5fe6e5","side":"PARENT","line":93,"updated":"2014-07-27 10:05:58.000000000","message":"Not sure why this is transformed into a class docstring by your change. IMO, this docstring belongs to __init__() method.","commit_id":"9c423b43e6096c533f6bf442be93da6b635af0dd"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"cdee391b6b0fcf1495770e1dc6924657cba6b2ac","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    Database connection retries will be enabled for the decorated api method."},{"line_number":44,"context_line":"    Database connection failure can have many causes, which can be temporary,"},{"line_number":45,"context_line":"    like database lock. In such cases retry may increase the likelihood of"},{"line_number":46,"context_line":"    connection."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    Usage::"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_9573a8e6","line":45,"range":{"start_line":45,"start_character":9,"end_line":45,"end_character":22},"updated":"2014-07-09 17:28:59.000000000","message":"a connection failure due to database lock?\nis it common?","commit_id":"ca034b65c89e13a69c1b9e7c7fd48d28d6d94314"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"4e37c8a6076436df26b0f5644393b2fdcd830579","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    Database connection retries will be enabled for the decorated api method."},{"line_number":44,"context_line":"    Database connection failure can have many causes, which can be temporary,"},{"line_number":45,"context_line":"    like database lock. In such cases retry may increase the likelihood of"},{"line_number":46,"context_line":"    connection."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    Usage::"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_8c1ce2c3","line":45,"in_reply_to":"baada198_2b62eaac","updated":"2014-07-28 08:33:54.000000000","message":"Done","commit_id":"ca034b65c89e13a69c1b9e7c7fd48d28d6d94314"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"d4461f0fbeaa4ebd9bfcaa50f0c67affa085114f","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    Database connection retries will be enabled for the decorated api method."},{"line_number":44,"context_line":"    Database connection failure can have many causes, which can be temporary,"},{"line_number":45,"context_line":"    like database lock. In such cases retry may increase the likelihood of"},{"line_number":46,"context_line":"    connection."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    Usage::"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_f505a814","line":45,"in_reply_to":"baada198_9573a8e6","updated":"2014-07-10 07:29:40.000000000","message":"This is not too common but possible. Please see http://www.methodsandtools.com/archive/archive.php?id\u003d83 5.1 Lock Contention topic.","commit_id":"ca034b65c89e13a69c1b9e7c7fd48d28d6d94314"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"19331d23cc7a6cab79b9cfe412249599f2127243","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    Database connection retries will be enabled for the decorated api method."},{"line_number":44,"context_line":"    Database connection failure can have many causes, which can be temporary,"},{"line_number":45,"context_line":"    like database lock. In such cases retry may increase the likelihood of"},{"line_number":46,"context_line":"    connection."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    Usage::"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_2b62eaac","line":45,"in_reply_to":"baada198_f505a814","updated":"2014-07-27 10:05:58.000000000","message":"Agreed with Yamamoto, this sounds weird. I believe, this is a red herring. Let\u0027s remove notion of database locks.","commit_id":"ca034b65c89e13a69c1b9e7c7fd48d28d6d94314"}]}
