)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"ad5f1f044fb2677ee62ef85a93d8b9595b0db92a","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Remove logic of allowed methods list from object, container and account"},{"line_number":10,"context_line":"servers. Instead of it add replicator decorator to utils and use new"},{"line_number":11,"context_line":"decorator for REPLICATE methods in object/account/container servers."},{"line_number":12,"context_line":"This decorator mark method as special for using only by replication"},{"line_number":13,"context_line":"server."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"If option replication_server not used then this mechanism did not"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAP3%2F%2F9kI%3D","line":12,"updated":"2013-07-08 17:02:44.000000000","message":"Perhaps: \"for use only by the replication\"","commit_id":"2a489baa24611ebc5948bd57a541f0ba37ff79e6"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"ad5f1f044fb2677ee62ef85a93d8b9595b0db92a","unresolved":false,"context_lines":[{"line_number":12,"context_line":"This decorator mark method as special for using only by replication"},{"line_number":13,"context_line":"server."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"If option replication_server not used then this mechanism did not"},{"line_number":16,"context_line":"working. And if such option is set (not None) then this server is either"},{"line_number":17,"context_line":"replication (option value is True) and should use ONLY special methods."},{"line_number":18,"context_line":"Or it is object/account/container (option value is False) and should NOT"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAP3%2F%2F9j8%3D","line":15,"updated":"2013-07-08 17:02:44.000000000","message":"Perhaps: \"If the option replication_server is not used, then this mechanism is not enabled.\"","commit_id":"2a489baa24611ebc5948bd57a541f0ba37ff79e6"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"ad5f1f044fb2677ee62ef85a93d8b9595b0db92a","unresolved":false,"context_lines":[{"line_number":13,"context_line":"server."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"If option replication_server not used then this mechanism did not"},{"line_number":16,"context_line":"working. And if such option is set (not None) then this server is either"},{"line_number":17,"context_line":"replication (option value is True) and should use ONLY special methods."},{"line_number":18,"context_line":"Or it is object/account/container (option value is False) and should NOT"},{"line_number":19,"context_line":"use special methods."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAP3%2F%2F9jY%3D","line":16,"updated":"2013-07-08 17:02:44.000000000","message":"Instead of \"And if ...\", perhaps: \"If the replicaton_server option is set (not None) then the respective server is a replicator (option value is True) and should use ONLY the methods marked for replication server using the decorator, or it is a normal server type and should NOT use methods marked for the replication server.\"","commit_id":"2a489baa24611ebc5948bd57a541f0ba37ff79e6"}],"swift/account/server.py":[{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"823841a6cc8f0ca25f16ea7ada2791b80a58b246","unresolved":false,"context_lines":[{"line_number":342,"context_line":"                # disallow methods which are not publicly accessible"},{"line_number":343,"context_line":"                try:"},{"line_number":344,"context_line":"                    method \u003d getattr(self, req.method)"},{"line_number":345,"context_line":"                    getattr(method, \u0027publicly_accessible\u0027)"},{"line_number":346,"context_line":"                    if req.method not in self.allowed_methods:"},{"line_number":347,"context_line":"                        raise AttributeError(\u0027Not allowed method.\u0027)"},{"line_number":348,"context_line":"                except AttributeError:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FwkQ%3D","side":"PARENT","line":345,"updated":"2013-05-23 18:45:49.000000000","message":"why did you delete getattr function? I think, that you must check publicly_accessible too.","commit_id":"b4b35c25618e03ac7273d70d893de2417c021d24"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"a3b956d997d382c9e850d9ba09ac844e0ea9797d","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    def __init__(self, conf):"},{"line_number":47,"context_line":"        self.logger \u003d get_logger(conf, log_route\u003d\u0027account-server\u0027)"},{"line_number":48,"context_line":"        self.root \u003d conf.get(\u0027devices\u0027, \u0027/srv/node\u0027)"},{"line_number":49,"context_line":"        self.mount_check \u003d config_true_value(conf.get(\u0027mount_check\u0027, \u0027true\u0027))"},{"line_number":50,"context_line":"        replication_server \u003d conf.get(\u0027replication_server\u0027, None)"},{"line_number":51,"context_line":"        if replication_server is not None:"},{"line_number":52,"context_line":"            replication_server \u003d config_true_value(replication_server)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2Ft7I%3D","line":49,"updated":"2013-05-24 16:12:18.000000000","message":"I was going to suggest that the next 4 lines be replaced with:\n\n     self.replication_server \u003d config_true_value(conf.get(\u0027replication_server\u0027, \u0027false\u0027))\n\n...but then I re-read elsewhere and further down the code. l think etc/object-server.conf-sample\u0027s description of replication_server could be improved --- especially, when it indicates the default is False. In reality, replication_server is tri-valued:\n- Not in conf file (i.e. None): no dedicated replication network\n- True: Only handle replication verb\n- False: Handle all verbs except replication\n\nIf this is correct, could you update etc/object-server.conf-sample and put a comment after the \"...is not None:\" saying something like \"# Dedicated replication network in use\"\n\nThis will stop someone in the future naively refactoring this code.","commit_id":"32f439a579ce309c02c1a1c41e33af5e12de1c23"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"265b94859c0d36a47038372b758caf9f4df750f5","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        ret.charset \u003d \u0027utf-8\u0027"},{"line_number":271,"context_line":"        return ret"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    @replication"},{"line_number":274,"context_line":"    @public"},{"line_number":275,"context_line":"    @timing_stats()"},{"line_number":276,"context_line":"    def REPLICATE(self, req):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2Fq3U%3D","line":273,"updated":"2013-05-28 03:37:51.000000000","message":"Perhaps this should be listed after \"public\"?","commit_id":"3a3fabbd85b47a14579f103abdeab71566cf113d"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"265b94859c0d36a47038372b758caf9f4df750f5","unresolved":false,"context_lines":[{"line_number":337,"context_line":"                    method \u003d getattr(self, req.method)"},{"line_number":338,"context_line":"                    getattr(method, \u0027publicly_accessible\u0027)"},{"line_number":339,"context_line":"                    replication_method \u003d getattr(method, \u0027replication\u0027, False)"},{"line_number":340,"context_line":"                    if (self.replication_server !\u003d replication_method"},{"line_number":341,"context_line":"                            and self.replication_server is not None):"},{"line_number":342,"context_line":"                        raise AttributeError(\u0027Not allowed method.\u0027)"},{"line_number":343,"context_line":"                except AttributeError:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2Fq3Q%3D","line":340,"updated":"2013-05-28 03:37:51.000000000","message":"Could you switch the \"is not None\" check with the not equal check to avoid the comparison if it is not configured? Or do I misunderstand the intent?","commit_id":"3a3fabbd85b47a14579f103abdeab71566cf113d"},{"author":{"_account_id":917,"name":"Chuck Thier","email":"cthier@gmail.com","username":"cthier"},"change_message_id":"eedf433fb6cc017fffebf276efab9df3f7fedb03","unresolved":false,"context_lines":[{"line_number":338,"context_line":"                    getattr(method, \u0027publicly_accessible\u0027)"},{"line_number":339,"context_line":"                    replication_method \u003d getattr(method, \u0027replication\u0027, False)"},{"line_number":340,"context_line":"                    if (self.replication_server is not None and"},{"line_number":341,"context_line":"                            self.replication_server !\u003d replication_method):"},{"line_number":342,"context_line":"                        raise AttributeError(\u0027Not allowed method.\u0027)"},{"line_number":343,"context_line":"                except AttributeError:"},{"line_number":344,"context_line":"                    res \u003d HTTPMethodNotAllowed()"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPH%2F%2FpF8%3D","line":341,"updated":"2013-05-28 18:40:50.000000000","message":"Is there a reason that we can\u0027t do this type of check in the @replication decorator?","commit_id":"11e70f2e14191d7acc2a49b6397f51f17b9e4120"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"8b3af0f0fa17dac0986d65d5be9f2b828d113342","unresolved":false,"context_lines":[{"line_number":338,"context_line":"                    getattr(method, \u0027publicly_accessible\u0027)"},{"line_number":339,"context_line":"                    replication_method \u003d getattr(method, \u0027replication\u0027, False)"},{"line_number":340,"context_line":"                    if (self.replication_server is not None and"},{"line_number":341,"context_line":"                            self.replication_server !\u003d replication_method):"},{"line_number":342,"context_line":"                        raise AttributeError(\u0027Not allowed method.\u0027)"},{"line_number":343,"context_line":"                except AttributeError:"},{"line_number":344,"context_line":"                    res \u003d HTTPMethodNotAllowed()"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPX%2F%2Foc4%3D","line":341,"in_reply_to":"AAAAPH%2F%2Fnfo%3D","updated":"2013-06-13 21:36:02.000000000","message":"Why can\u0027t the replication decorator just return a function that checks the instance variable and only calls the method if it is set to true?","commit_id":"11e70f2e14191d7acc2a49b6397f51f17b9e4120"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"ad611c84d57b90a6874d73985931efd0a664cc2f","unresolved":false,"context_lines":[{"line_number":338,"context_line":"                    getattr(method, \u0027publicly_accessible\u0027)"},{"line_number":339,"context_line":"                    replication_method \u003d getattr(method, \u0027replication\u0027, False)"},{"line_number":340,"context_line":"                    if (self.replication_server is not None and"},{"line_number":341,"context_line":"                            self.replication_server !\u003d replication_method):"},{"line_number":342,"context_line":"                        raise AttributeError(\u0027Not allowed method.\u0027)"},{"line_number":343,"context_line":"                except AttributeError:"},{"line_number":344,"context_line":"                    res \u003d HTTPMethodNotAllowed()"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPH%2F%2Fnfo%3D","line":341,"in_reply_to":"AAAAPH%2F%2FpF8%3D","updated":"2013-05-29 08:24:46.000000000","message":"The fact that self.replication_server available only in an instance of AccountController class and the decorator is executed much earlier after the method declaration. Therefore, this check is meaningful only in the __call__, unless of course I understand the question correctly.","commit_id":"11e70f2e14191d7acc2a49b6397f51f17b9e4120"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"615825538e722b7c1af09ecd63ff236d0774eb15","unresolved":false,"context_lines":[{"line_number":338,"context_line":"                    getattr(method, \u0027publicly_accessible\u0027)"},{"line_number":339,"context_line":"                    replication_method \u003d getattr(method, \u0027replication\u0027, False)"},{"line_number":340,"context_line":"                    if (self.replication_server is not None and"},{"line_number":341,"context_line":"                            self.replication_server !\u003d replication_method):"},{"line_number":342,"context_line":"                        raise AttributeError(\u0027Not allowed method.\u0027)"},{"line_number":343,"context_line":"                except AttributeError:"},{"line_number":344,"context_line":"                    res \u003d HTTPMethodNotAllowed()"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2F%2Bh0%3D","line":341,"in_reply_to":"AAAAPX%2F%2Foc4%3D","updated":"2013-06-16 12:03:08.000000000","message":"Yes, you\u0027re right, it\u0027s possible, e.g.:\n\n    def replication(func):\n        @functools.wraps(func)\n        def decorator(controller, *args, **kwargs):\n            if (controller.replication_server is not None and\n                    not controller.replication_server):\n                return HTTPMethodNotAllowed()\n            return func(controller, *args, **kwargs)\n        return decorator\n\nThis decision has a positive side, the logic of check will be concentrated at the decorator only, not in each controller. Also, the check to be only for the REPLICATE request and not for any.","commit_id":"11e70f2e14191d7acc2a49b6397f51f17b9e4120"}],"swift/common/utils.py":[{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"f2cd827e1006bd8a375845b0e04656014c38a124","unresolved":false,"context_lines":[{"line_number":1613,"context_line":"    return result \u003d\u003d 0"},{"line_number":1614,"context_line":""},{"line_number":1615,"context_line":""},{"line_number":1616,"context_line":"def public(replication_server\u003dFalse):"},{"line_number":1617,"context_line":"    \"\"\""},{"line_number":1618,"context_line":"    Decorator maker which set for which type of server (replication or"},{"line_number":1619,"context_line":"    standart) function should be allowed"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fuxs%3D","line":1616,"updated":"2013-05-24 09:23:01.000000000","message":"A more proper name for this parameter is \u0027is_generic\u0027 of boolean type with default value equal to True. So, this parameter should to indicate which method are generic or appropriate for normal operations, I mean GET/HEAD/PUT/POST/DELETE. But this is obviously a very particular decision that complicates the addition of new methods.\n\nAlso, your change affect account and container controllers, that is not well.","commit_id":"853cabdae58f40a739e41b78b39c73117410e891"},{"author":{"_account_id":6529,"name":"Vladimir Vechkanov","email":"vvechkanov@mirantis.com","username":"vvechkanov"},"change_message_id":"17834699e280e4484dd2d9ded03d69b309373b0c","unresolved":false,"context_lines":[{"line_number":1613,"context_line":"    return result \u003d\u003d 0"},{"line_number":1614,"context_line":""},{"line_number":1615,"context_line":""},{"line_number":1616,"context_line":"def public(replication_server\u003dFalse):"},{"line_number":1617,"context_line":"    \"\"\""},{"line_number":1618,"context_line":"    Decorator maker which set for which type of server (replication or"},{"line_number":1619,"context_line":"    standart) function should be allowed"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FwxY%3D","line":1616,"updated":"2013-05-23 16:29:32.000000000","message":"It can be discussed should this option have default value, and what it[value] should be.","commit_id":"853cabdae58f40a739e41b78b39c73117410e891"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"823841a6cc8f0ca25f16ea7ada2791b80a58b246","unresolved":false,"context_lines":[{"line_number":1613,"context_line":"    return result \u003d\u003d 0"},{"line_number":1614,"context_line":""},{"line_number":1615,"context_line":""},{"line_number":1616,"context_line":"def public(replication_server\u003dFalse):"},{"line_number":1617,"context_line":"    \"\"\""},{"line_number":1618,"context_line":"    Decorator maker which set for which type of server (replication or"},{"line_number":1619,"context_line":"    standart) function should be allowed"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fwh0%3D","line":1616,"in_reply_to":"AAAAPH%2F%2FwxY%3D","updated":"2013-05-23 18:45:49.000000000","message":"I think we must use default value \u003d False. With this parameter code seemed more simple.","commit_id":"853cabdae58f40a739e41b78b39c73117410e891"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"f2cd827e1006bd8a375845b0e04656014c38a124","unresolved":false,"context_lines":[{"line_number":1616,"context_line":"def public(replication_server\u003dFalse):"},{"line_number":1617,"context_line":"    \"\"\""},{"line_number":1618,"context_line":"    Decorator maker which set for which type of server (replication or"},{"line_number":1619,"context_line":"    standart) function should be allowed"},{"line_number":1620,"context_line":""},{"line_number":1621,"context_line":"    :param server_type: type of the server"},{"line_number":1622,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fuw8%3D","line":1619,"updated":"2013-05-24 09:23:01.000000000","message":"If you choose to use is_generic, you should change this lines of documentation to detail describe a possible values (True/False) of this variable.","commit_id":"853cabdae58f40a739e41b78b39c73117410e891"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"823841a6cc8f0ca25f16ea7ada2791b80a58b246","unresolved":false,"context_lines":[{"line_number":1618,"context_line":"    Decorator maker which set for which type of server (replication or"},{"line_number":1619,"context_line":"    standart) function should be allowed"},{"line_number":1620,"context_line":""},{"line_number":1621,"context_line":"    :param server_type: type of the server"},{"line_number":1622,"context_line":"    \"\"\""},{"line_number":1623,"context_line":"    def dec_public(func):"},{"line_number":1624,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FwkE%3D","line":1621,"updated":"2013-05-23 18:45:49.000000000","message":"Parameter name in doc string and in function must be similar (replication_parameter)","commit_id":"853cabdae58f40a739e41b78b39c73117410e891"},{"author":{"_account_id":6529,"name":"Vladimir Vechkanov","email":"vvechkanov@mirantis.com","username":"vvechkanov"},"change_message_id":"17834699e280e4484dd2d9ded03d69b309373b0c","unresolved":false,"context_lines":[{"line_number":1628,"context_line":"        :param func: function to make public"},{"line_number":1629,"context_line":"        \"\"\""},{"line_number":1630,"context_line":"        func.replication_server \u003d replication_server"},{"line_number":1631,"context_line":"        func.publicly_accessible \u003d True"},{"line_number":1632,"context_line":""},{"line_number":1633,"context_line":"        @functools.wraps(func)"},{"line_number":1634,"context_line":"        def wrapped(*a, **kw):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fwxk%3D","line":1631,"updated":"2013-05-23 16:29:32.000000000","message":"It can be discussed how to call \"replication_server\" attribute and maybe how to use only it. Instead of both of them.","commit_id":"853cabdae58f40a739e41b78b39c73117410e891"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"265b94859c0d36a47038372b758caf9f4df750f5","unresolved":false,"context_lines":[{"line_number":1618,"context_line":"    Decorator to declare which methods are accessible for replication"},{"line_number":1619,"context_line":"    server"},{"line_number":1620,"context_line":""},{"line_number":1621,"context_line":"    :param func: function to make public"},{"line_number":1622,"context_line":"    \"\"\""},{"line_number":1623,"context_line":"    func.replication \u003d True"},{"line_number":1624,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2Fq3M%3D","line":1621,"updated":"2013-05-28 03:37:51.000000000","message":"Perhaps you would want this to say, \"function to mark accessible for replication\"?","commit_id":"3a3fabbd85b47a14579f103abdeab71566cf113d"},{"author":{"_account_id":1531,"name":"Ilya Kharin","email":"akscram@gmail.com","username":"akscram"},"change_message_id":"615825538e722b7c1af09ecd63ff236d0774eb15","unresolved":false,"context_lines":[{"line_number":1623,"context_line":"    func.replication \u003d True"},{"line_number":1624,"context_line":""},{"line_number":1625,"context_line":"    @functools.wraps(func)"},{"line_number":1626,"context_line":"    def wrapped(*a, **kw):"},{"line_number":1627,"context_line":"        return func(*a, **kw)"},{"line_number":1628,"context_line":"    return wrapped"},{"line_number":1629,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2F%2Bh4%3D","line":1626,"updated":"2013-06-16 12:03:08.000000000","message":"In this case it\u0027s unnecessary because you just modify an original function, you should to remove the wrapped function and just return the func.","commit_id":"11e70f2e14191d7acc2a49b6397f51f17b9e4120"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"262a12348494f0707c47dd7b2002329542bd81e1","unresolved":false,"context_lines":[{"line_number":1850,"context_line":"    \"\"\""},{"line_number":1851,"context_line":"    func.replication \u003d True"},{"line_number":1852,"context_line":""},{"line_number":1853,"context_line":"    return func"},{"line_number":1854,"context_line":""},{"line_number":1855,"context_line":""},{"line_number":1856,"context_line":"def public(func):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPn%2F%2FiRI%3D","line":1853,"updated":"2013-06-28 10:24:58.000000000","message":"beautiful!","commit_id":"d9b675029c827e08b270370081d8016cfe9631c3"}],"swift/container/server.py":[{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"265b94859c0d36a47038372b758caf9f4df750f5","unresolved":false,"context_lines":[{"line_number":446,"context_line":"        ret.charset \u003d \u0027utf-8\u0027"},{"line_number":447,"context_line":"        return ret"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"    @replication"},{"line_number":450,"context_line":"    @public"},{"line_number":451,"context_line":"    @timing_stats(sample_rate\u003d0.01)"},{"line_number":452,"context_line":"    def REPLICATE(self, req):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2Fq3I%3D","line":449,"updated":"2013-05-28 03:37:51.000000000","message":"Same comment as in account server ...","commit_id":"3a3fabbd85b47a14579f103abdeab71566cf113d"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"265b94859c0d36a47038372b758caf9f4df750f5","unresolved":false,"context_lines":[{"line_number":523,"context_line":"                    getattr(method, \u0027publicly_accessible\u0027)"},{"line_number":524,"context_line":"                    replication_method \u003d getattr(method, \u0027replication\u0027, False)"},{"line_number":525,"context_line":"                    if (self.replication_server !\u003d replication_method"},{"line_number":526,"context_line":"                            and self.replication_server is not None):"},{"line_number":527,"context_line":"                        raise AttributeError(\u0027Not allowed method.\u0027)"},{"line_number":528,"context_line":"                except AttributeError:"},{"line_number":529,"context_line":"                    res \u003d HTTPMethodNotAllowed()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2Fq3E%3D","line":526,"updated":"2013-05-28 03:37:51.000000000","message":"Same comment as in account server ...","commit_id":"3a3fabbd85b47a14579f103abdeab71566cf113d"}],"swift/obj/server.py":[{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"265b94859c0d36a47038372b758caf9f4df750f5","unresolved":false,"context_lines":[{"line_number":956,"context_line":"        resp \u003d response_class(request\u003drequest)"},{"line_number":957,"context_line":"        return resp"},{"line_number":958,"context_line":""},{"line_number":959,"context_line":"    @replication"},{"line_number":960,"context_line":"    @public"},{"line_number":961,"context_line":"    @timing_stats(sample_rate\u003d0.1)"},{"line_number":962,"context_line":"    def REPLICATE(self, request):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2Fq3A%3D","line":959,"updated":"2013-05-28 03:37:51.000000000","message":"Same comment as in account server ...","commit_id":"3a3fabbd85b47a14579f103abdeab71566cf113d"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"265b94859c0d36a47038372b758caf9f4df750f5","unresolved":false,"context_lines":[{"line_number":996,"context_line":"                    getattr(method, \u0027publicly_accessible\u0027)"},{"line_number":997,"context_line":"                    replication_method \u003d getattr(method, \u0027replication\u0027, False)"},{"line_number":998,"context_line":"                    if (self.replication_server !\u003d replication_method"},{"line_number":999,"context_line":"                            and self.replication_server is not None):"},{"line_number":1000,"context_line":"                        raise AttributeError(\u0027Not allowed method.\u0027)"},{"line_number":1001,"context_line":"                except AttributeError:"},{"line_number":1002,"context_line":"                    res \u003d HTTPMethodNotAllowed()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2Fq28%3D","line":999,"updated":"2013-05-28 03:37:51.000000000","message":"Same comment as in account server ...","commit_id":"3a3fabbd85b47a14579f103abdeab71566cf113d"}],"swift/proxy/controllers/account.py":[{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"823841a6cc8f0ca25f16ea7ada2791b80a58b246","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            resp \u003d HTTPNoContent(request\u003dreq, headers\u003dheaders)"},{"line_number":71,"context_line":"        return resp"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    @public()"},{"line_number":74,"context_line":"    def PUT(self, req):"},{"line_number":75,"context_line":"        \"\"\"HTTP PUT request handler.\"\"\""},{"line_number":76,"context_line":"        if not self.app.allow_account_management:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fwgk%3D","line":73,"updated":"2013-05-23 18:45:49.000000000","message":"Why do you use brackets there without parameter? I think in case with default value you can don\u0027t use brackets.","commit_id":"853cabdae58f40a739e41b78b39c73117410e891"}],"test/unit/account/test_server.py":[{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"823841a6cc8f0ca25f16ea7ada2791b80a58b246","unresolved":false,"context_lines":[{"line_number":1233,"context_line":"        outbuf \u003d StringIO()"},{"line_number":1234,"context_line":"        self.controller \u003d AccountController("},{"line_number":1235,"context_line":"                {\u0027devices\u0027: self.testdir, \u0027mount_check\u0027: \u0027false\u0027})"},{"line_number":1236,"context_line":"       #      \u0027replication_server\u0027: \u0027false\u0027})"},{"line_number":1237,"context_line":""},{"line_number":1238,"context_line":"        def start_response(*args):"},{"line_number":1239,"context_line":"            \"\"\" Sends args to outbuf \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fwfo%3D","line":1236,"updated":"2013-05-23 18:45:49.000000000","message":"Please, delete comment line.","commit_id":"853cabdae58f40a739e41b78b39c73117410e891"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9aaee52f9f1cf7bdba8fc532cce491617cd43146","unresolved":false,"context_lines":[{"line_number":1352,"context_line":"        for method_name in obj_methods:"},{"line_number":1353,"context_line":"            method \u003d getattr(self.controller, method_name)"},{"line_number":1354,"context_line":"            replication \u003d getattr(method, \u0027replication\u0027, False)"},{"line_number":1355,"context_line":"            self.assertEquals(replication, False)"},{"line_number":1356,"context_line":"        for method_name in repl_methods:"},{"line_number":1357,"context_line":"            method \u003d getattr(self.controller, method_name)"},{"line_number":1358,"context_line":"            self.assertEquals(method.replication, True)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPn%2F%2FgKQ%3D","line":1355,"updated":"2013-06-29 00:06:29.000000000","message":"hasattr again would be clearer, IMHO","commit_id":"c4d6634277b970b8a66e2d6fed872c2b0ba4e9d6"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9aaee52f9f1cf7bdba8fc532cce491617cd43146","unresolved":false,"context_lines":[{"line_number":1394,"context_line":""},{"line_number":1395,"context_line":"        with mock.patch.object(self.controller, method,"},{"line_number":1396,"context_line":"                               return_value\u003dmock.MagicMock()) as mock_method:"},{"line_number":1397,"context_line":"            mock_method.replication \u003d False"},{"line_number":1398,"context_line":"            response \u003d self.controller.__call__(env, start_response)"},{"line_number":1399,"context_line":"            self.assertNotEqual(response, answer)"},{"line_number":1400,"context_line":"            self.assertEqual(mock_method.call_count, 1)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPn%2F%2FgKM%3D","line":1397,"updated":"2013-06-29 00:06:29.000000000","message":"adding this stub here is artificial IMHO","commit_id":"c4d6634277b970b8a66e2d6fed872c2b0ba4e9d6"}],"test/unit/container/test_server.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"262a12348494f0707c47dd7b2002329542bd81e1","unresolved":false,"context_lines":[{"line_number":1440,"context_line":"        for method_name in obj_methods:"},{"line_number":1441,"context_line":"            method \u003d getattr(self.controller, method_name)"},{"line_number":1442,"context_line":"            replication \u003d getattr(method, \u0027replication\u0027, False)"},{"line_number":1443,"context_line":"            self.assertEquals(replication, False)"},{"line_number":1444,"context_line":"        for method_name in repl_methods:"},{"line_number":1445,"context_line":"            method \u003d getattr(self.controller, method_name)"},{"line_number":1446,"context_line":"            self.assertEquals(method.replication, True)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPn%2F%2FiRQ%3D","line":1443,"updated":"2013-06-28 10:24:58.000000000","message":"I think this would be better phrased\n\nself.assertFalse(hasattr(method, \u0027replication\u0027))","commit_id":"d9b675029c827e08b270370081d8016cfe9631c3"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"262a12348494f0707c47dd7b2002329542bd81e1","unresolved":false,"context_lines":[{"line_number":1483,"context_line":""},{"line_number":1484,"context_line":"        with mock.patch.object(self.controller, method,"},{"line_number":1485,"context_line":"                               return_value\u003dmock.MagicMock()) as mock_method:"},{"line_number":1486,"context_line":"            mock_method.replication \u003d False"},{"line_number":1487,"context_line":"            response \u003d self.controller.__call__(env, start_response)"},{"line_number":1488,"context_line":"            self.assertNotEqual(response, answer)"},{"line_number":1489,"context_line":"            self.assertEqual(mock_method.call_count, 1)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPn%2F%2FiRg%3D","line":1486,"updated":"2013-06-28 10:24:58.000000000","message":"When do we ever set the .replication attribute to False?","commit_id":"d9b675029c827e08b270370081d8016cfe9631c3"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9aaee52f9f1cf7bdba8fc532cce491617cd43146","unresolved":false,"context_lines":[{"line_number":1493,"context_line":"            response \u003d self.controller.__call__(env, start_response)"},{"line_number":1494,"context_line":"            self.assertNotEqual(response, answer)"},{"line_number":1495,"context_line":"            self.assertEqual(mock_method.call_count, 1)"},{"line_number":1496,"context_line":""},{"line_number":1497,"context_line":"    def test_not_allowed_method(self):"},{"line_number":1498,"context_line":"        \"\"\""},{"line_number":1499,"context_line":"        Test correct work for NOT allowed method using"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPn%2F%2FgKU%3D","side":"PARENT","line":1496,"updated":"2013-06-29 00:06:29.000000000","message":"Wait... so the response *wasn\u0027t* 405, but what was it?  Just whatever the mock returns right?  did the mock get called?","commit_id":"c6e53721e0dbacf84de956dbad85da444a455d20"},{"author":{"_account_id":6529,"name":"Vladimir Vechkanov","email":"vvechkanov@mirantis.com","username":"vvechkanov"},"change_message_id":"70d05b2fd0c3604ffc0174125edfa35aa477dcd2","unresolved":false,"context_lines":[{"line_number":1493,"context_line":"            response \u003d self.controller.__call__(env, start_response)"},{"line_number":1494,"context_line":"            self.assertNotEqual(response, answer)"},{"line_number":1495,"context_line":"            self.assertEqual(mock_method.call_count, 1)"},{"line_number":1496,"context_line":""},{"line_number":1497,"context_line":"    def test_not_allowed_method(self):"},{"line_number":1498,"context_line":"        \"\"\""},{"line_number":1499,"context_line":"        Test correct work for NOT allowed method using"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPn%2F%2FdZQ%3D","side":"PARENT","line":1496,"in_reply_to":"AAAAPn%2F%2FgKU%3D","updated":"2013-07-02 10:38:23.000000000","message":"Yes, possibly checking that mock was called is necessary.","commit_id":"c6e53721e0dbacf84de956dbad85da444a455d20"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9aaee52f9f1cf7bdba8fc532cce491617cd43146","unresolved":false,"context_lines":[{"line_number":1439,"context_line":"        repl_methods \u003d [\u0027REPLICATE\u0027]"},{"line_number":1440,"context_line":"        for method_name in obj_methods:"},{"line_number":1441,"context_line":"            method \u003d getattr(self.controller, method_name)"},{"line_number":1442,"context_line":"            self.assertFalse(hasattr(method, \u0027replication\u0027))"},{"line_number":1443,"context_line":"        for method_name in repl_methods:"},{"line_number":1444,"context_line":"            method \u003d getattr(self.controller, method_name)"},{"line_number":1445,"context_line":"            self.assertEquals(method.replication, True)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPn%2F%2FgKc%3D","line":1442,"updated":"2013-06-29 00:06:29.000000000","message":"thanks!","commit_id":"c4d6634277b970b8a66e2d6fed872c2b0ba4e9d6"}],"test/unit/obj/test_server.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9aaee52f9f1cf7bdba8fc532cce491617cd43146","unresolved":false,"context_lines":[{"line_number":2795,"context_line":"        for method_name in obj_methods:"},{"line_number":2796,"context_line":"            method \u003d getattr(self.object_controller, method_name)"},{"line_number":2797,"context_line":"            replication \u003d getattr(method, \u0027replication\u0027, False)"},{"line_number":2798,"context_line":"            self.assertEquals(replication, False)"},{"line_number":2799,"context_line":"        for method_name in repl_methods:"},{"line_number":2800,"context_line":"            method \u003d getattr(self.object_controller, method_name)"},{"line_number":2801,"context_line":"            self.assertEquals(method.replication, True)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPn%2F%2FgKE%3D","line":2798,"updated":"2013-06-29 00:06:29.000000000","message":"hasattr","commit_id":"c4d6634277b970b8a66e2d6fed872c2b0ba4e9d6"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9aaee52f9f1cf7bdba8fc532cce491617cd43146","unresolved":false,"context_lines":[{"line_number":2837,"context_line":""},{"line_number":2838,"context_line":"        with mock.patch.object(self.object_controller, method,"},{"line_number":2839,"context_line":"                               return_value\u003dmock.MagicMock()) as mock_method:"},{"line_number":2840,"context_line":"            mock_method.replication \u003d False"},{"line_number":2841,"context_line":"            response \u003d self.object_controller.__call__(env, start_response)"},{"line_number":2842,"context_line":"            self.assertNotEqual(response, answer)"},{"line_number":2843,"context_line":"            self.assertEqual(mock_method.call_count, 1)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPn%2F%2FgKA%3D","line":2840,"updated":"2013-06-29 00:06:29.000000000","message":"not a good representation of the implementation","commit_id":"c4d6634277b970b8a66e2d6fed872c2b0ba4e9d6"}]}
