)]}'
{"oslo_config/cfg.py":[{"author":{"_account_id":27954,"name":"Moisés Guimarães de Medeiros","email":"guimaraes@pm.me","username":"moguimar"},"change_message_id":"f05d9fcccc6f7d03420e5d6dde63deb307ee1168","unresolved":false,"context_lines":[{"line_number":2377,"context_line":"        self._mutable_ns \u003d None"},{"line_number":2378,"context_line":"        self._mutate_hooks \u003d set([])"},{"line_number":2379,"context_line":"        self.__cache \u003d {}"},{"line_number":2380,"context_line":"        self.__cache_external_files \u003d {}"},{"line_number":2381,"context_line":"        self._config_opts \u003d []"},{"line_number":2382,"context_line":"        self._cli_opts \u003d collections.deque()"},{"line_number":2383,"context_line":"        self._validate_default_values \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_080dc033","line":2380,"updated":"2018-06-27 09:05:47.000000000","message":"There is no promise that the external source will always be files. I\u0027d call it `__sources_cache` or `__backend_drivers_cache` but this one is too long.","commit_id":"d1c85fbe8a6c32342bc346921d2edf2169dc21f4"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"cb1cef6a3f87f2e650eda2fd59145366f79b3b3c","unresolved":false,"context_lines":[{"line_number":2377,"context_line":"        self._mutable_ns \u003d None"},{"line_number":2378,"context_line":"        self._mutate_hooks \u003d set([])"},{"line_number":2379,"context_line":"        self.__cache \u003d {}"},{"line_number":2380,"context_line":"        self.__cache_external_files \u003d {}"},{"line_number":2381,"context_line":"        self._config_opts \u003d []"},{"line_number":2382,"context_line":"        self._cli_opts \u003d collections.deque()"},{"line_number":2383,"context_line":"        self._validate_default_values \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_b2bf57c8","line":2380,"in_reply_to":"5f7c97a3_080dc033","updated":"2018-06-27 13:52:27.000000000","message":"I\u0027d rather a long better name :) so, I\u0027ll change for the second option.","commit_id":"d1c85fbe8a6c32342bc346921d2edf2169dc21f4"},{"author":{"_account_id":27954,"name":"Moisés Guimarães de Medeiros","email":"guimaraes@pm.me","username":"moguimar"},"change_message_id":"f05d9fcccc6f7d03420e5d6dde63deb307ee1168","unresolved":false,"context_lines":[{"line_number":3077,"context_line":"                    % (opt.name, str(ve)))"},{"line_number":3078,"context_line":""},{"line_number":3079,"context_line":"        for source in self._sources:"},{"line_number":3080,"context_line":"            if isinstance(group, OptGroup):"},{"line_number":3081,"context_line":"                key \u003d (group.name, name)"},{"line_number":3082,"context_line":"            else:"},{"line_number":3083,"context_line":"                key \u003d (group, name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_c84a6822","line":3080,"updated":"2018-06-27 09:05:47.000000000","message":"move the cache pooling outside the for statement, there is no need to check the cache more than once.","commit_id":"d1c85fbe8a6c32342bc346921d2edf2169dc21f4"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"cb1cef6a3f87f2e650eda2fd59145366f79b3b3c","unresolved":false,"context_lines":[{"line_number":3077,"context_line":"                    % (opt.name, str(ve)))"},{"line_number":3078,"context_line":""},{"line_number":3079,"context_line":"        for source in self._sources:"},{"line_number":3080,"context_line":"            if isinstance(group, OptGroup):"},{"line_number":3081,"context_line":"                key \u003d (group.name, name)"},{"line_number":3082,"context_line":"            else:"},{"line_number":3083,"context_line":"                key \u003d (group, name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_127e4be2","line":3080,"in_reply_to":"5f7c97a3_c84a6822","updated":"2018-06-27 13:52:27.000000000","message":"Done","commit_id":"d1c85fbe8a6c32342bc346921d2edf2169dc21f4"},{"author":{"_account_id":27954,"name":"Moisés Guimarães de Medeiros","email":"guimaraes@pm.me","username":"moguimar"},"change_message_id":"f05d9fcccc6f7d03420e5d6dde63deb307ee1168","unresolved":false,"context_lines":[{"line_number":3081,"context_line":"                key \u003d (group.name, name)"},{"line_number":3082,"context_line":"            else:"},{"line_number":3083,"context_line":"                key \u003d (group, name)"},{"line_number":3084,"context_line":"            try:"},{"line_number":3085,"context_line":"                return self.__cache_external_files[key]"},{"line_number":3086,"context_line":"            except KeyError:  # nosec: Valid control flow instruction"},{"line_number":3087,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_487c1870","line":3084,"updated":"2018-06-27 09:05:47.000000000","message":"I like blank lines after if/else to have a visual feedback that they\u0027re done, kinda to separate statements. Or you could also do it in a single line instead of four like:\n\nkey \u003d (group.name if isinstance(group, OptGroup) else group, name)","commit_id":"d1c85fbe8a6c32342bc346921d2edf2169dc21f4"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"cb1cef6a3f87f2e650eda2fd59145366f79b3b3c","unresolved":false,"context_lines":[{"line_number":3081,"context_line":"                key \u003d (group.name, name)"},{"line_number":3082,"context_line":"            else:"},{"line_number":3083,"context_line":"                key \u003d (group, name)"},{"line_number":3084,"context_line":"            try:"},{"line_number":3085,"context_line":"                return self.__cache_external_files[key]"},{"line_number":3086,"context_line":"            except KeyError:  # nosec: Valid control flow instruction"},{"line_number":3087,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_2d7c466f","line":3084,"in_reply_to":"5f7c97a3_487c1870","updated":"2018-06-27 13:52:27.000000000","message":"Done","commit_id":"d1c85fbe8a6c32342bc346921d2edf2169dc21f4"},{"author":{"_account_id":27954,"name":"Moisés Guimarães de Medeiros","email":"guimaraes@pm.me","username":"moguimar"},"change_message_id":"f05d9fcccc6f7d03420e5d6dde63deb307ee1168","unresolved":false,"context_lines":[{"line_number":3087,"context_line":"                pass"},{"line_number":3088,"context_line":"            val \u003d source.get(group_name, name, opt)"},{"line_number":3089,"context_line":"            if val[0] !\u003d sources._NoValue:"},{"line_number":3090,"context_line":"                self.__cache_external_files[key] \u003d (convert(val[0]), val[1])"},{"line_number":3091,"context_line":"                return (convert(val[0]), val[1])"},{"line_number":3092,"context_line":""},{"line_number":3093,"context_line":"        if \u0027default\u0027 in info:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_e8c40494","line":3090,"updated":"2018-06-27 09:05:47.000000000","message":"You could extract to a var to avoid convert() twice and create the tuple twice as I think this makes the returned instance different from the cached one.\n\nsomething like:\n\nvalue \u003d (v0, v1)\nupdate cache[k] \u003d value\nreturn value","commit_id":"d1c85fbe8a6c32342bc346921d2edf2169dc21f4"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"cb1cef6a3f87f2e650eda2fd59145366f79b3b3c","unresolved":false,"context_lines":[{"line_number":3087,"context_line":"                pass"},{"line_number":3088,"context_line":"            val \u003d source.get(group_name, name, opt)"},{"line_number":3089,"context_line":"            if val[0] !\u003d sources._NoValue:"},{"line_number":3090,"context_line":"                self.__cache_external_files[key] \u003d (convert(val[0]), val[1])"},{"line_number":3091,"context_line":"                return (convert(val[0]), val[1])"},{"line_number":3092,"context_line":""},{"line_number":3093,"context_line":"        if \u0027default\u0027 in info:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_cd96f294","line":3090,"in_reply_to":"5f7c97a3_e8c40494","updated":"2018-06-27 13:52:27.000000000","message":"Done","commit_id":"d1c85fbe8a6c32342bc346921d2edf2169dc21f4"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"dd1beb85978ec35d5e929c590af58ef5198ff667","unresolved":false,"context_lines":[{"line_number":2377,"context_line":"        self._mutable_ns \u003d None"},{"line_number":2378,"context_line":"        self._mutate_hooks \u003d set([])"},{"line_number":2379,"context_line":"        self.__cache \u003d {}"},{"line_number":2380,"context_line":"        self.__backend_drivers_cache \u003d {}"},{"line_number":2381,"context_line":"        self._config_opts \u003d []"},{"line_number":2382,"context_line":"        self._cli_opts \u003d collections.deque()"},{"line_number":2383,"context_line":"        self._validate_default_values \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_98525012","line":2380,"range":{"start_line":2380,"start_character":15,"end_line":2380,"end_character":22},"updated":"2018-06-28 22:01:26.000000000","message":"Nit: I might have gone with just __drivers_cache for this since the backend part isn\u0027t really relevant here, but don\u0027t push a new patch set just for that.\n\nEdit: Okay, I think I have other reasons to -1 so up to you if you want to change this.  I wouldn\u0027t -1 for this alone though.","commit_id":"a706953f48e55081b4310d0c0d52eb600b9e646f"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"dd1beb85978ec35d5e929c590af58ef5198ff667","unresolved":false,"context_lines":[{"line_number":2667,"context_line":"                        \u0027group\u0027: group"},{"line_number":2668,"context_line":"                    }"},{"line_number":2669,"context_line":""},{"line_number":2670,"context_line":"    @__clear_cache"},{"line_number":2671,"context_line":"    def register_opt(self, opt, group\u003dNone, cli\u003dFalse):"},{"line_number":2672,"context_line":"        \"\"\"Register an option schema."},{"line_number":2673,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_980fb038","line":2670,"updated":"2018-06-28 22:01:26.000000000","message":"I\u0027m curious why we clear the cache when registering an opt, so I wonder if it applies to this new cache.  I don\u0027t see how a value could even have gotten cached before its corresponding opt was registered since we would have failed to look it up prior to that, right?  And you\u0027re not allowed to register two opts with the same name but different defaults.","commit_id":"a706953f48e55081b4310d0c0d52eb600b9e646f"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d9eba48a7c2bb6d4bbfca17b4dec373a90c3a193","unresolved":false,"context_lines":[{"line_number":2667,"context_line":"                        \u0027group\u0027: group"},{"line_number":2668,"context_line":"                    }"},{"line_number":2669,"context_line":""},{"line_number":2670,"context_line":"    @__clear_cache"},{"line_number":2671,"context_line":"    def register_opt(self, opt, group\u003dNone, cli\u003dFalse):"},{"line_number":2672,"context_line":"        \"\"\"Register an option schema."},{"line_number":2673,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_9af472d2","line":2670,"in_reply_to":"5f7c97a3_980fb038","updated":"2018-06-29 15:58:44.000000000","message":"I wonder if that has something to do with a test suite reusing a ConfigOpts instance.","commit_id":"a706953f48e55081b4310d0c0d52eb600b9e646f"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"dd1beb85978ec35d5e929c590af58ef5198ff667","unresolved":false,"context_lines":[{"line_number":3337,"context_line":"        return namespace"},{"line_number":3338,"context_line":""},{"line_number":3339,"context_line":"    @__clear_cache"},{"line_number":3340,"context_line":"    def reload_config_files(self):"},{"line_number":3341,"context_line":"        \"\"\"Reload configure files and parse all options"},{"line_number":3342,"context_line":""},{"line_number":3343,"context_line":"        :return: False if reload configure files failed or else return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_18f9604d","line":3340,"updated":"2018-06-28 22:01:26.000000000","message":"I think we may still need to clear this cache in some instances.  For example, it appears reload_config_files is called right before restarting services in some cases, and if that\u0027s the case then I think we do need to allow the driver cache to be invalidated.","commit_id":"a706953f48e55081b4310d0c0d52eb600b9e646f"}]}
