)]}'
{"swift/common/wsgi.py":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"cd93fe7eb3ee85858daec93d44bb7d034c88a225","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        self.filename \u003d \"string\""},{"line_number":116,"context_line":"        defaults \u003d {"},{"line_number":117,"context_line":"            \u0027here\u0027: \"string\","},{"line_number":118,"context_line":"            \u0027__file__\u0027: self.contents,"},{"line_number":119,"context_line":"        }"},{"line_number":120,"context_line":"        self.parser \u003d loadwsgi.NicerConfigParser(\"string\", defaults\u003ddefaults)"},{"line_number":121,"context_line":"        self.parser.optionxform \u003d str  # Don\u0027t lower-case keys"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff0f0b1f_f5cf5a26","line":118,"updated":"2017-05-24 00:28:10.000000000","message":"This cannot possibly be right, are you sure you\u0027re on the master branch, or perhaps you want a dependency in there? I did git pull just now and for sure the __file__ is a filename (well, \"string\"). The code you\u0027re replacing, with StringIO(), is not there on master.","commit_id":"4999b9fc9a0026a79982baebd6094b3ce465319e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f111691222974c9ea317dcf3acd16726b396270f","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        self.filename \u003d \"string\""},{"line_number":116,"context_line":"        defaults \u003d {"},{"line_number":117,"context_line":"            \u0027here\u0027: \"string\","},{"line_number":118,"context_line":"            \u0027__file__\u0027: self.contents,"},{"line_number":119,"context_line":"        }"},{"line_number":120,"context_line":"        self.parser \u003d loadwsgi.NicerConfigParser(\"string\", defaults\u003ddefaults)"},{"line_number":121,"context_line":"        self.parser.optionxform \u003d str  # Don\u0027t lower-case keys"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff0f0b1f_18056511","line":118,"in_reply_to":"ff0f0b1f_f5cf5a26","updated":"2017-05-24 00:35:27.000000000","message":"It\u0027s a follow-up for https://review.openstack.org/#/c/448240/ -- I maybe should have dropped a Related-Change tag in the commit message.","commit_id":"4999b9fc9a0026a79982baebd6094b3ce465319e"}],"swift/proxy/controllers/obj.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0584f4344055430399dc870bfe3756a9693fa659","unresolved":false,"context_lines":[{"line_number":148,"context_line":"            return self.app.iter_nodes(ring, partition, policy\u003dpolicy)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        primary_nodes \u003d ring.get_part_nodes(partition)"},{"line_number":151,"context_line":"        num_locals \u003d policy_options.write_affinity_node_count_fn("},{"line_number":152,"context_line":"            len(primary_nodes))"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        all_nodes \u003d itertools.chain(primary_nodes,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_0b439b43","line":151,"updated":"2017-05-25 10:19:54.000000000","message":"FWIW I made a deliberate choice to not rename the proxy app attrs to make it easier to grok that they had simply been relocated into another class.\n\nBut this is probably better and I kinda wish the original had been this way.","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0584f4344055430399dc870bfe3756a9693fa659","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        all_nodes \u003d itertools.chain(primary_nodes,"},{"line_number":155,"context_line":"                                    ring.get_more_nodes(partition))"},{"line_number":156,"context_line":"        first_n_local_nodes \u003d list(itertools.islice("},{"line_number":157,"context_line":"            (node for node in all_nodes if is_local(node)), num_locals))"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        # refresh it; it moved when we computed first_n_local_nodes"},{"line_number":160,"context_line":"        all_nodes \u003d itertools.chain(primary_nodes,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_f0f6168f","line":157,"updated":"2017-05-25 10:19:54.000000000","message":"I don\u0027t understand the need for this change and it seems unrelated to the per-policy config changes. What\u0027s wrong with filter?","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"eee5e8736e98b0d88f96bdf9b1b434cda09da239","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        all_nodes \u003d itertools.chain(primary_nodes,"},{"line_number":155,"context_line":"                                    ring.get_more_nodes(partition))"},{"line_number":156,"context_line":"        first_n_local_nodes \u003d list(itertools.islice("},{"line_number":157,"context_line":"            (node for node in all_nodes if is_local(node)), num_locals))"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        # refresh it; it moved when we computed first_n_local_nodes"},{"line_number":160,"context_line":"        all_nodes \u003d itertools.chain(primary_nodes,"}],"source_content_type":"text/x-python","patch_set":3,"id":"df140735_d15e2de5","line":157,"in_reply_to":"ff0f0b1f_f0f6168f","updated":"2017-06-01 20:39:36.000000000","message":"I don\u0027t mind this one so much; it\u0027s actually fairly clear. As much as anything, I just want to have py2/py3-friendly code that doesn\u0027t require the mental overhead of a six import and thinking about \"ok, so does this behave like py2 filter or py3 filter?\"","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"eee5e8736e98b0d88f96bdf9b1b434cda09da239","unresolved":false,"context_lines":[{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        # refresh it; it moved when we computed first_n_local_nodes"},{"line_number":160,"context_line":"        all_nodes \u003d itertools.chain(primary_nodes,"},{"line_number":161,"context_line":"                                    ring.get_more_nodes(partition))"},{"line_number":162,"context_line":"        local_first_node_iter \u003d itertools.chain("},{"line_number":163,"context_line":"            first_n_local_nodes,"},{"line_number":164,"context_line":"            (node for node in all_nodes if node not in first_n_local_nodes))"}],"source_content_type":"text/x-python","patch_set":3,"id":"df140735_91ae752c","line":161,"updated":"2017-06-01 20:39:36.000000000","message":"Hmm... It just occurred to me that this could trigger a ring reload, which may in turn lead to a funny circumstance wherein the get_more_nodes iter includes nodes already present in primary_nodes. I wonder if itertools.tee would be worth the extra memory?\n\nExcept we\u0027ve already got a similar race between get_part_nodes and the first call to get_more_nodes... :-/","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0584f4344055430399dc870bfe3756a9693fa659","unresolved":false,"context_lines":[{"line_number":161,"context_line":"                                    ring.get_more_nodes(partition))"},{"line_number":162,"context_line":"        local_first_node_iter \u003d itertools.chain("},{"line_number":163,"context_line":"            first_n_local_nodes,"},{"line_number":164,"context_line":"            (node for node in all_nodes if node not in first_n_local_nodes))"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        return self.app.iter_nodes("},{"line_number":167,"context_line":"            ring, partition, node_iter\u003dlocal_first_node_iter, policy\u003dpolicy)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_7030c656","line":164,"updated":"2017-05-25 10:19:54.000000000","message":"ditto","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"eee5e8736e98b0d88f96bdf9b1b434cda09da239","unresolved":false,"context_lines":[{"line_number":161,"context_line":"                                    ring.get_more_nodes(partition))"},{"line_number":162,"context_line":"        local_first_node_iter \u003d itertools.chain("},{"line_number":163,"context_line":"            first_n_local_nodes,"},{"line_number":164,"context_line":"            (node for node in all_nodes if node not in first_n_local_nodes))"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        return self.app.iter_nodes("},{"line_number":167,"context_line":"            ring, partition, node_iter\u003dlocal_first_node_iter, policy\u003dpolicy)"}],"source_content_type":"text/x-python","patch_set":3,"id":"df140735_711be11a","line":164,"in_reply_to":"ff0f0b1f_7030c656","updated":"2017-06-01 20:39:36.000000000","message":"*This* one, on the other hand, just feels silly. We make a lambda just so we have a callable to pass to filter, when a comprehension can just bake in the filtering?","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"}],"swift/proxy/server.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0584f4344055430399dc870bfe3756a9693fa659","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    return \u0027(default)\u0027"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"class ProxyOverrideOptions(object):"},{"line_number":92,"context_line":"    \"\"\""},{"line_number":93,"context_line":"    Encapsulates proxy server properties that may be overridden e.g. for"},{"line_number":94,"context_line":"    policy specific configurations."}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_6bee9722","line":91,"updated":"2017-05-25 10:19:54.000000000","message":"Options? Properties? Attrs?\n\nFWIW I did not choose \u0027options\u0027 originally, because often \u0027option\u0027 is used to describe the key-value pair in a config file. But then it was suggested that get_conf --\u003e get_options --\u003e get_policy_options and the inconsistency crept in.\n\nThe class they \u0027override\u0027 is called Application, not Proxy.\n\nNaming will be the last hard problem mankind will solve! :)","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0584f4344055430399dc870bfe3756a9693fa659","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"class ProxyOverrideOptions(object):"},{"line_number":92,"context_line":"    \"\"\""},{"line_number":93,"context_line":"    Encapsulates proxy server properties that may be overridden e.g. for"},{"line_number":94,"context_line":"    policy specific configurations."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    :param conf: the proxy-server config dict."}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_f1e3b803","line":93,"range":{"start_line":93,"start_character":30,"end_line":93,"end_character":40},"updated":"2017-05-25 10:19:54.000000000","message":"options? behaviours?","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"eee5e8736e98b0d88f96bdf9b1b434cda09da239","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"class ProxyOverrideOptions(object):"},{"line_number":92,"context_line":"    \"\"\""},{"line_number":93,"context_line":"    Encapsulates proxy server properties that may be overridden e.g. for"},{"line_number":94,"context_line":"    policy specific configurations."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    :param conf: the proxy-server config dict."}],"source_content_type":"text/x-python","patch_set":3,"id":"df140735_9d02c36e","line":93,"range":{"start_line":93,"start_character":30,"end_line":93,"end_character":40},"in_reply_to":"ff0f0b1f_f1e3b803","updated":"2017-06-01 20:39:36.000000000","message":"Done","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0584f4344055430399dc870bfe3756a9693fa659","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    :param override_conf: a dict of overriding configuration options."},{"line_number":98,"context_line":"    \"\"\""},{"line_number":99,"context_line":"    def __init__(self, base_conf, override_conf):"},{"line_number":100,"context_line":"        def _get(key, default):"},{"line_number":101,"context_line":"            return override_conf.get(key, base_conf.get(key, default))"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        self.sorting_method \u003d _get(\u0027sorting_method\u0027, \u0027shuffle\u0027).lower()"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_71d8c851","line":100,"range":{"start_line":100,"start_character":12,"end_line":100,"end_character":13},"updated":"2017-05-25 10:19:54.000000000","message":"the _ is now superfluous","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"eee5e8736e98b0d88f96bdf9b1b434cda09da239","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    :param override_conf: a dict of overriding configuration options."},{"line_number":98,"context_line":"    \"\"\""},{"line_number":99,"context_line":"    def __init__(self, base_conf, override_conf):"},{"line_number":100,"context_line":"        def _get(key, default):"},{"line_number":101,"context_line":"            return override_conf.get(key, base_conf.get(key, default))"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        self.sorting_method \u003d _get(\u0027sorting_method\u0027, \u0027shuffle\u0027).lower()"}],"source_content_type":"text/x-python","patch_set":3,"id":"df140735_fd077f81","line":100,"range":{"start_line":100,"start_character":12,"end_line":100,"end_character":13},"in_reply_to":"ff0f0b1f_71d8c851","updated":"2017-06-01 20:39:36.000000000","message":"Done","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0584f4344055430399dc870bfe3756a9693fa659","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        if self.sorting_method not in VALID_SORTING_METHODS:"},{"line_number":105,"context_line":"            raise ValueError("},{"line_number":106,"context_line":"                \u0027Invalid sorting_method value; must be one of %s, not %r\u0027 % ("},{"line_number":107,"context_line":"                    \u0027, \u0027.join(VALID_SORTING_METHODS), self.sorting_method))"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        self.read_affinity \u003d _get(\u0027read_affinity\u0027, \u0027\u0027)"},{"line_number":110,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_7689de72","line":107,"updated":"2017-05-25 10:19:54.000000000","message":"nice, but not tested?\n\nmaybe a separate patch?","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"eee5e8736e98b0d88f96bdf9b1b434cda09da239","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        if self.sorting_method not in VALID_SORTING_METHODS:"},{"line_number":105,"context_line":"            raise ValueError("},{"line_number":106,"context_line":"                \u0027Invalid sorting_method value; must be one of %s, not %r\u0027 % ("},{"line_number":107,"context_line":"                    \u0027, \u0027.join(VALID_SORTING_METHODS), self.sorting_method))"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        self.read_affinity \u003d _get(\u0027read_affinity\u0027, \u0027\u0027)"},{"line_number":110,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"df140735_9621cbb7","line":107,"in_reply_to":"ff0f0b1f_7689de72","updated":"2017-06-01 20:39:36.000000000","message":"Split out as https://review.openstack.org/469269","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0584f4344055430399dc870bfe3756a9693fa659","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        except ValueError as err:"},{"line_number":301,"context_line":"            raise ValueError(err.message + \u0027 for %s\u0027 % label_for_policy)"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def _load_per_policy_options(self, conf):"},{"line_number":304,"context_line":"        \"\"\""},{"line_number":305,"context_line":"        Loads per-policy config override values from proxy server conf file."},{"line_number":306,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_d1755433","line":303,"updated":"2017-05-25 10:19:54.000000000","message":"here I might push back - I see it as config that is being loaded, which results in options being instantiated - so I am loading the config","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"eee5e8736e98b0d88f96bdf9b1b434cda09da239","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        except ValueError as err:"},{"line_number":301,"context_line":"            raise ValueError(err.message + \u0027 for %s\u0027 % label_for_policy)"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def _load_per_policy_options(self, conf):"},{"line_number":304,"context_line":"        \"\"\""},{"line_number":305,"context_line":"        Loads per-policy config override values from proxy server conf file."},{"line_number":306,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df140735_1d4353b1","line":303,"in_reply_to":"ff0f0b1f_d1755433","updated":"2017-06-01 20:39:36.000000000","message":"Done","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0584f4344055430399dc870bfe3756a9693fa659","unresolved":false,"context_lines":[{"line_number":309,"context_line":"            :class:`ProxyOverrideOptions` that has policy-specific config"},{"line_number":310,"context_line":"            attributes"},{"line_number":311,"context_line":"        \"\"\""},{"line_number":312,"context_line":"        # the default conf will be used when looking up a policy that had no"},{"line_number":313,"context_line":"        # override conf"},{"line_number":314,"context_line":"        default_options \u003d self._make_policy_override(None, conf, {})"},{"line_number":315,"context_line":"        overrides \u003d defaultdict(lambda: default_options)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_ebf507cc","line":312,"updated":"2017-05-25 10:19:54.000000000","message":"change comment to match","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0584f4344055430399dc870bfe3756a9693fa659","unresolved":false,"context_lines":[{"line_number":310,"context_line":"            attributes"},{"line_number":311,"context_line":"        \"\"\""},{"line_number":312,"context_line":"        # the default conf will be used when looking up a policy that had no"},{"line_number":313,"context_line":"        # override conf"},{"line_number":314,"context_line":"        default_options \u003d self._make_policy_override(None, conf, {})"},{"line_number":315,"context_line":"        overrides \u003d defaultdict(lambda: default_options)"},{"line_number":316,"context_line":"        # force None key to be set in the defaultdict so that it is found when"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_f1c85855","line":313,"range":{"start_line":313,"start_character":19,"end_line":313,"end_character":23},"updated":"2017-05-25 10:19:54.000000000","message":"rename","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"eee5e8736e98b0d88f96bdf9b1b434cda09da239","unresolved":false,"context_lines":[{"line_number":310,"context_line":"            attributes"},{"line_number":311,"context_line":"        \"\"\""},{"line_number":312,"context_line":"        # the default conf will be used when looking up a policy that had no"},{"line_number":313,"context_line":"        # override conf"},{"line_number":314,"context_line":"        default_options \u003d self._make_policy_override(None, conf, {})"},{"line_number":315,"context_line":"        overrides \u003d defaultdict(lambda: default_options)"},{"line_number":316,"context_line":"        # force None key to be set in the defaultdict so that it is found when"}],"source_content_type":"text/x-python","patch_set":3,"id":"df140735_5d542b53","line":313,"range":{"start_line":313,"start_character":19,"end_line":313,"end_character":23},"in_reply_to":"ff0f0b1f_f1c85855","updated":"2017-06-01 20:39:36.000000000","message":"Done","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0584f4344055430399dc870bfe3756a9693fa659","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        \"\"\""},{"line_number":343,"context_line":"        return self._override_options[policy]"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def check_config(self):"},{"line_number":346,"context_line":"        \"\"\""},{"line_number":347,"context_line":"        Check the configuration for possible errors"},{"line_number":348,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_d1aaf46e","line":345,"range":{"start_line":345,"start_character":8,"end_line":345,"end_character":20},"updated":"2017-05-25 10:19:54.000000000","message":"but, but - this is checking options?!? :P\n\n(don\u0027t change this - it\u0027s a public method)","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0584f4344055430399dc870bfe3756a9693fa659","unresolved":false,"context_lines":[{"line_number":346,"context_line":"        \"\"\""},{"line_number":347,"context_line":"        Check the configuration for possible errors"},{"line_number":348,"context_line":"        \"\"\""},{"line_number":349,"context_line":"        for policy, conf in self._override_options.items():"},{"line_number":350,"context_line":"            if conf.read_affinity and conf.sorting_method !\u003d \u0027affinity\u0027:"},{"line_number":351,"context_line":"                self.logger.warning("},{"line_number":352,"context_line":"                    _(\"sorting_method is set to \u0027%(method)s\u0027, not \u0027affinity\u0027; \""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_31b370eb","line":349,"range":{"start_line":349,"start_character":20,"end_line":349,"end_character":24},"updated":"2017-05-25 10:19:54.000000000","message":"rename?","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"eee5e8736e98b0d88f96bdf9b1b434cda09da239","unresolved":false,"context_lines":[{"line_number":346,"context_line":"        \"\"\""},{"line_number":347,"context_line":"        Check the configuration for possible errors"},{"line_number":348,"context_line":"        \"\"\""},{"line_number":349,"context_line":"        for policy, conf in self._override_options.items():"},{"line_number":350,"context_line":"            if conf.read_affinity and conf.sorting_method !\u003d \u0027affinity\u0027:"},{"line_number":351,"context_line":"                self.logger.warning("},{"line_number":352,"context_line":"                    _(\"sorting_method is set to \u0027%(method)s\u0027, not \u0027affinity\u0027; \""}],"source_content_type":"text/x-python","patch_set":3,"id":"df140735_3d4df7c3","line":349,"range":{"start_line":349,"start_character":20,"end_line":349,"end_character":24},"in_reply_to":"ff0f0b1f_31b370eb","updated":"2017-06-01 20:39:36.000000000","message":"Done","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"3ec222fb29549e7d0ba96117221aedc8df207fbe","unresolved":false,"context_lines":[{"line_number":692,"context_line":"    :raises ValueError: if a policy config section has an invalid name"},{"line_number":693,"context_line":"    \"\"\""},{"line_number":694,"context_line":"    policy_config \u003d {}"},{"line_number":695,"context_line":"    all_conf \u003d readconf(conf[\u0027__file__\u0027])"},{"line_number":696,"context_line":"    policy_section_prefix \u003d conf[\u0027__name__\u0027] + \u0027:policy:\u0027"},{"line_number":697,"context_line":"    for section, options in all_conf.items():"},{"line_number":698,"context_line":"        if not section.startswith(policy_section_prefix):"}],"source_content_type":"text/x-python","patch_set":4,"id":"df140735_46877863","line":695,"updated":"2017-06-05 07:17:42.000000000","message":"Hmm... er - this is called as \"Stop trying to handle a KeyError that should never come up\".\n\nOk, I don\u0027t think this is trivial but the readconf should raise either ValueError or IOError [1] so that the KeyError is only from no item in the conf but the conf file which should be crafted by config loader. If the possibility that paste deploy tool could drop the __file__ attribute in the context dict, perhaps try/except could help us to know what happens at that time but I vote such a significant change may never come up so it looks fine to me.\n\n1: https://github.com/openstack/swift/blob/master/swift/common/utils.py#L2436-L2437","commit_id":"5ecf828b17cf01291ad5c9fafea3c7ddb621af18"}],"test/unit/proxy/test_server.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0584f4344055430399dc870bfe3756a9693fa659","unresolved":false,"context_lines":[{"line_number":1293,"context_line":"        # this is broken out to a method so that subclasses can override"},{"line_number":1294,"context_line":"        conf_path \u003d os.path.join(self.tempdir, \u0027proxy-server.conf\u0027)"},{"line_number":1295,"context_line":"        with open(conf_path, \u0027w\u0027) as f:"},{"line_number":1296,"context_line":"            f.write(conf_body)"},{"line_number":1297,"context_line":"        return conf_path"},{"line_number":1298,"context_line":""},{"line_number":1299,"context_line":"    def _write_conf_and_load_app(self, conf_sections, app_name\u003d\u0027proxy-server\u0027):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_50cf0228","line":1296,"updated":"2017-05-25 10:19:54.000000000","message":"what am I missing? instead of dedenting here, this now requires all the callers to dedent first?","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"eee5e8736e98b0d88f96bdf9b1b434cda09da239","unresolved":false,"context_lines":[{"line_number":1293,"context_line":"        # this is broken out to a method so that subclasses can override"},{"line_number":1294,"context_line":"        conf_path \u003d os.path.join(self.tempdir, \u0027proxy-server.conf\u0027)"},{"line_number":1295,"context_line":"        with open(conf_path, \u0027w\u0027) as f:"},{"line_number":1296,"context_line":"            f.write(conf_body)"},{"line_number":1297,"context_line":"        return conf_path"},{"line_number":1298,"context_line":""},{"line_number":1299,"context_line":"    def _write_conf_and_load_app(self, conf_sections, app_name\u003d\u0027proxy-server\u0027):"}],"source_content_type":"text/x-python","patch_set":3,"id":"df140735_fd965ff0","line":1296,"in_reply_to":"ff0f0b1f_50cf0228","updated":"2017-06-01 20:39:36.000000000","message":"I wanted to be able to indent the conf_sections below, where I defined the test helper in test_per_policy_conf_bad_section_name. Doing that turned into a whole thing because of inconsistent indentation, and it seemed better to dedent everybody in _write_conf_and_load_app. Continuing to dedent here seemed superfluous, given that there was only one other caller... but sure, I can put it back.","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0584f4344055430399dc870bfe3756a9693fa659","unresolved":false,"context_lines":[{"line_number":1314,"context_line":"            app \u003d loadapp(conf_path, allow_modify_pipeline\u003dFalse)"},{"line_number":1315,"context_line":"        return app"},{"line_number":1316,"context_line":""},{"line_number":1317,"context_line":"    def _check_policy_opts(self, app, exp_opts, exp_is_local):"},{"line_number":1318,"context_line":"        # verify expected config"},{"line_number":1319,"context_line":"        for policy, options in exp_opts.items():"},{"line_number":1320,"context_line":"            for k, v in options.items():"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_709a0614","line":1317,"range":{"start_line":1317,"start_character":22,"end_line":1317,"end_character":26},"updated":"2017-05-25 10:19:54.000000000","message":"if we\u0027re renaming then I\u0027d vote for spelling out \"options\"","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"eee5e8736e98b0d88f96bdf9b1b434cda09da239","unresolved":false,"context_lines":[{"line_number":1314,"context_line":"            app \u003d loadapp(conf_path, allow_modify_pipeline\u003dFalse)"},{"line_number":1315,"context_line":"        return app"},{"line_number":1316,"context_line":""},{"line_number":1317,"context_line":"    def _check_policy_opts(self, app, exp_opts, exp_is_local):"},{"line_number":1318,"context_line":"        # verify expected config"},{"line_number":1319,"context_line":"        for policy, options in exp_opts.items():"},{"line_number":1320,"context_line":"            for k, v in options.items():"}],"source_content_type":"text/x-python","patch_set":3,"id":"df140735_bd43476c","line":1317,"range":{"start_line":1317,"start_character":22,"end_line":1317,"end_character":26},"in_reply_to":"ff0f0b1f_709a0614","updated":"2017-06-01 20:39:36.000000000","message":"Done","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0584f4344055430399dc870bfe3756a9693fa659","unresolved":false,"context_lines":[{"line_number":1514,"context_line":"        \"\"\" % self.tempdir"},{"line_number":1515,"context_line":""},{"line_number":1516,"context_line":"        # Don\u0027t just use _write_conf_and_load_app, as we don\u0027t want to have"},{"line_number":1517,"context_line":"        # duplicate DEFAULT sections"},{"line_number":1518,"context_line":"        conf_path \u003d self._write_conf(dedent(conf_body))"},{"line_number":1519,"context_line":"        with mock.patch(\u0027swift.proxy.server.get_logger\u0027,"},{"line_number":1520,"context_line":"                        return_value\u003dFakeLogger()):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_4b33d362","line":1517,"updated":"2017-05-25 10:19:54.000000000","message":"+1","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0584f4344055430399dc870bfe3756a9693fa659","unresolved":false,"context_lines":[{"line_number":1600,"context_line":"                    POLICIES[0]: {\u0027sorting_method\u0027: \u0027affinity\u0027},"},{"line_number":1601,"context_line":"                    POLICIES[1]: {\u0027sorting_method\u0027: \u0027shuffle\u0027}}"},{"line_number":1602,"context_line":"        app \u003d self._write_conf_and_load_app(conf_sections, \u0027proxy-srv\u0027)"},{"line_number":1603,"context_line":"        self._check_policy_opts(app, exp_opts, {})"},{"line_number":1604,"context_line":""},{"line_number":1605,"context_line":"    def test_per_policy_conf_with_unknown_policy(self):"},{"line_number":1606,"context_line":"        # verify that unknown policy section is warned about but doesn\u0027t break"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_8b7b2bf3","line":1603,"updated":"2017-05-25 10:19:54.000000000","message":"nice addition","commit_id":"d4d2e37c51c272fe74fd11ed35914c1354ac73ed"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3e9b4a737fc34191b8b9646d47b010b9a3d18b56","unresolved":false,"context_lines":[{"line_number":1293,"context_line":"        # this is broken out to a method so that subclasses can override"},{"line_number":1294,"context_line":"        conf_path \u003d os.path.join(self.tempdir, \u0027proxy-server.conf\u0027)"},{"line_number":1295,"context_line":"        with open(conf_path, \u0027w\u0027) as f:"},{"line_number":1296,"context_line":"            f.write(dedent(conf_body))"},{"line_number":1297,"context_line":"        return conf_path"},{"line_number":1298,"context_line":""},{"line_number":1299,"context_line":"    def _write_conf_and_load_app(self, conf_sections, app_name\u003d\u0027proxy-server\u0027):"}],"source_content_type":"text/x-python","patch_set":4,"id":"df140735_0012b509","line":1296,"range":{"start_line":1296,"start_character":20,"end_line":1296,"end_character":27},"updated":"2017-06-02 09:39:02.000000000","message":"ok, now I understand the change you made but now reversed, I can see the logic in moving this to caller. But this is fine.","commit_id":"5ecf828b17cf01291ad5c9fafea3c7ddb621af18"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"3ec222fb29549e7d0ba96117221aedc8df207fbe","unresolved":false,"context_lines":[{"line_number":1734,"context_line":"        do_test(conf_sections, \u0027(default)\u0027)"},{"line_number":1735,"context_line":""},{"line_number":1736,"context_line":"    def test_per_policy_conf_bad_section_name(self):"},{"line_number":1737,"context_line":"        def do_test(policy):"},{"line_number":1738,"context_line":"            conf_sections \u003d \"\"\""},{"line_number":1739,"context_line":"                [app:proxy-server]"},{"line_number":1740,"context_line":"                use \u003d egg:swift#proxy"}],"source_content_type":"text/x-python","patch_set":4,"id":"df140735_9aaba473","line":1737,"range":{"start_line":1737,"start_character":20,"end_line":1737,"end_character":26},"updated":"2017-06-05 07:17:42.000000000","message":"nits) policy_index strictly.","commit_id":"5ecf828b17cf01291ad5c9fafea3c7ddb621af18"}]}
