)]}'
{"oslo/config/generator.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"b0d5afc13f0c307178a6fe4866ee96621f641ced","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        self.output_file \u003d output_file or sys.stdout"},{"line_number":163,"context_line":"        self.wrap_width \u003d wrap_width"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def _is_string_template(self, value):"},{"line_number":166,"context_line":"        try:"},{"line_number":167,"context_line":"            return str(value)[0] is \u0027$\u0027"},{"line_number":168,"context_line":"        except IndexError:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9df570_0a572acb","line":165,"updated":"2014-09-25 14:00:41.000000000","message":"@staticmethod","commit_id":"01de66b31ed11e7197f0e0468ed546d980c67592"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"b7626dee1db48277223c2b821b5c4aaf41894238","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        self.output_file \u003d output_file or sys.stdout"},{"line_number":163,"context_line":"        self.wrap_width \u003d wrap_width"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def _is_string_template(self, value):"},{"line_number":166,"context_line":"        try:"},{"line_number":167,"context_line":"            return str(value)[0] is \u0027$\u0027"},{"line_number":168,"context_line":"        except IndexError:"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_bbf63b5b","line":165,"in_reply_to":"da9df570_0a572acb","updated":"2014-10-07 13:18:33.000000000","message":"Done","commit_id":"01de66b31ed11e7197f0e0468ed546d980c67592"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"09db657a3898529422366a57ec6c08842e7aa2e9","unresolved":false,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def _is_string_template(self, value):"},{"line_number":166,"context_line":"        try:"},{"line_number":167,"context_line":"            return str(value)[0] is \u0027$\u0027"},{"line_number":168,"context_line":"        except IndexError:"},{"line_number":169,"context_line":"            pass"},{"line_number":170,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_7b1fa808","line":167,"updated":"2014-10-03 20:47:33.000000000","message":"\"is\" is an identity operator. This should use \"\u003d\u003d\". Is it safe to assume that the first character is a $? Should we say\n\n  \"$\" in six.text_type(value)","commit_id":"01de66b31ed11e7197f0e0468ed546d980c67592"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"b7626dee1db48277223c2b821b5c4aaf41894238","unresolved":false,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def _is_string_template(self, value):"},{"line_number":166,"context_line":"        try:"},{"line_number":167,"context_line":"            return str(value)[0] is \u0027$\u0027"},{"line_number":168,"context_line":"        except IndexError:"},{"line_number":169,"context_line":"            pass"},{"line_number":170,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_7b005334","line":167,"in_reply_to":"baa201ad_7b1fa808","updated":"2014-10-07 13:18:33.000000000","message":"first character has to be a $","commit_id":"01de66b31ed11e7197f0e0468ed546d980c67592"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"09db657a3898529422366a57ec6c08842e7aa2e9","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            if opt.sample_default is not None:"},{"line_number":204,"context_line":"                default_str \u003d str(opt.sample_default)"},{"line_number":205,"context_line":"            elif (opt.default is None or"},{"line_number":206,"context_line":"                  self._is_string_template(opt.default)):"},{"line_number":207,"context_line":"                default_str \u003d \u0027\u003cNone\u003e\u0027"},{"line_number":208,"context_line":"            elif isinstance(opt, cfg.StrOpt):"},{"line_number":209,"context_line":"                assert(isinstance(opt.default, six.string_types))"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_3b13600e","line":206,"updated":"2014-10-03 20:47:33.000000000","message":"I\u0027m not sure this is valid. Shouldn\u0027t we output the template as the option default, to make it clear that we\u0027re taking the value from somewhere else?","commit_id":"01de66b31ed11e7197f0e0468ed546d980c67592"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"b7626dee1db48277223c2b821b5c4aaf41894238","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            if opt.sample_default is not None:"},{"line_number":204,"context_line":"                default_str \u003d str(opt.sample_default)"},{"line_number":205,"context_line":"            elif (opt.default is None or"},{"line_number":206,"context_line":"                  self._is_string_template(opt.default)):"},{"line_number":207,"context_line":"                default_str \u003d \u0027\u003cNone\u003e\u0027"},{"line_number":208,"context_line":"            elif isinstance(opt, cfg.StrOpt):"},{"line_number":209,"context_line":"                assert(isinstance(opt.default, six.string_types))"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_3e2319a8","line":206,"in_reply_to":"baa201ad_3b13600e","updated":"2014-10-07 13:18:33.000000000","message":"Doug, a beginner looking at the a config file and runs into this $ value may have trouble understanding what it is or if they could change it. so i\u0027d prefer to have it set to None so its clear that they can set it if needed.","commit_id":"01de66b31ed11e7197f0e0468ed546d980c67592"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"eaf08e798c130594546aac54c1ab69396c9b43c7","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            if opt.sample_default is not None:"},{"line_number":204,"context_line":"                default_str \u003d str(opt.sample_default)"},{"line_number":205,"context_line":"            elif (opt.default is None or"},{"line_number":206,"context_line":"                  self._is_string_template(opt.default)):"},{"line_number":207,"context_line":"                default_str \u003d \u0027\u003cNone\u003e\u0027"},{"line_number":208,"context_line":"            elif isinstance(opt, cfg.StrOpt):"},{"line_number":209,"context_line":"                assert(isinstance(opt.default, six.string_types))"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_e1eae4aa","line":206,"in_reply_to":"baa201ad_3e2319a8","updated":"2014-10-24 21:02:27.000000000","message":"I still don\u0027t like this.  I\u0027d argue that it\u0027s more confusing to tell the user that the default for the opt is None and then have an actual value filled in whether they set it or not.  To understand our config files you need to be able to figure out the template syntax anyway, and I don\u0027t really see it as that confusing.","commit_id":"01de66b31ed11e7197f0e0468ed546d980c67592"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"09db657a3898529422366a57ec6c08842e7aa2e9","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                assert(isinstance(opt.default, six.string_types))"},{"line_number":210,"context_line":"                default_str \u003d opt.default"},{"line_number":211,"context_line":"            elif isinstance(opt, cfg.BoolOpt):"},{"line_number":212,"context_line":"                assert(isinstance(opt.default, bool))"},{"line_number":213,"context_line":"                default_str \u003d str(opt.default).lower()"},{"line_number":214,"context_line":"            elif (isinstance(opt, cfg.IntOpt) or"},{"line_number":215,"context_line":"                  isinstance(opt, cfg.FloatOpt)):"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_9b18cc1f","line":212,"updated":"2014-10-03 20:47:33.000000000","message":"The fact that we have to repeat this assertion makes me think it should be done inside Opt instead of here. Do we have runtime any type safety checking for defaults? I suppose that wouldn\u0027t work because it would want to expand the template. I wonder, though, if we shouldn\u0027t add a get_sample_value() method to Opt to hide the details of all of the option types.","commit_id":"01de66b31ed11e7197f0e0468ed546d980c67592"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"eaf08e798c130594546aac54c1ab69396c9b43c7","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                assert(isinstance(opt.default, six.string_types))"},{"line_number":210,"context_line":"                default_str \u003d opt.default"},{"line_number":211,"context_line":"            elif isinstance(opt, cfg.BoolOpt):"},{"line_number":212,"context_line":"                assert(isinstance(opt.default, bool))"},{"line_number":213,"context_line":"                default_str \u003d str(opt.default).lower()"},{"line_number":214,"context_line":"            elif (isinstance(opt, cfg.IntOpt) or"},{"line_number":215,"context_line":"                  isinstance(opt, cfg.FloatOpt)):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_216cec34","line":212,"in_reply_to":"baa201ad_1b44a772","updated":"2014-10-24 21:02:27.000000000","message":"Yeah, we added default value validation to ConfigOpts a while back: https://github.com/openstack/oslo.config/blob/master/oslo/config/cfg.py#L2137\n\nIt\u0027s only a warning for now because making it an error would probably break a bunch of people.  I don\u0027t know if it\u0027s something we could leverage in the config generator, though it would be nice to catch issues at generation time instead of runtime.","commit_id":"01de66b31ed11e7197f0e0468ed546d980c67592"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"b7626dee1db48277223c2b821b5c4aaf41894238","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                assert(isinstance(opt.default, six.string_types))"},{"line_number":210,"context_line":"                default_str \u003d opt.default"},{"line_number":211,"context_line":"            elif isinstance(opt, cfg.BoolOpt):"},{"line_number":212,"context_line":"                assert(isinstance(opt.default, bool))"},{"line_number":213,"context_line":"                default_str \u003d str(opt.default).lower()"},{"line_number":214,"context_line":"            elif (isinstance(opt, cfg.IntOpt) or"},{"line_number":215,"context_line":"                  isinstance(opt, cfg.FloatOpt)):"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_1b44a772","line":212,"in_reply_to":"baa201ad_9b18cc1f","updated":"2014-10-07 13:18:33.000000000","message":"Doug, i am treating this as functionality that was left out when porting from oslo-incubator. we can talk about type safety in a later bug/review. is that ok?","commit_id":"01de66b31ed11e7197f0e0468ed546d980c67592"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"75bfad5e21d132a2e8c553c9acb1eb84598d0303","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    @staticmethod"},{"line_number":166,"context_line":"    def _is_string_template(value):"},{"line_number":167,"context_line":"        try:"},{"line_number":168,"context_line":"            return str(value)[0] \u003d\u003d \u0027$\u0027"},{"line_number":169,"context_line":"        except IndexError:"},{"line_number":170,"context_line":"            pass"},{"line_number":171,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_c156c0cd","line":168,"updated":"2014-10-24 21:02:56.000000000","message":"I don\u0027t think this will always work.  It\u0027s allowed to have templates inline (for example: sql_connection\u003dsqlite:///$state_path/baremetal_nova.sqlite)\n\nLooking for non-doubled $ characters (IIRC $$ is the escape sequence to make something a literal $ instead of a template value) in the string would be more robust.","commit_id":"fdbee66b34c480474cebde7afb7edd0606ace650"}],"tests/test_bad_generator.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"75bfad5e21d132a2e8c553c9acb1eb84598d0303","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class BadGeneratorTestCase(base.BaseTestCase):"},{"line_number":27,"context_line":"    opts \u003d {"},{"line_number":28,"context_line":"        \u0027foo\u0027: cfg.StrOpt(\u0027foo\u0027, default\u003d1.0, help\u003d\u0027foo option\u0027),"},{"line_number":29,"context_line":"        \u0027bar\u0027: cfg.BoolOpt(\u0027bar\u0027, default\u003d\u0027False\u0027, help\u003d\u0027bar option\u0027),"},{"line_number":30,"context_line":"        \u0027baz\u0027: cfg.IntOpt(\u0027baz\u0027, default\u003dFalse, help\u003d\u0027baz option\u0027),"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_81911849","line":27,"updated":"2014-10-24 21:02:56.000000000","message":"Nit: It seems like we\u0027re shadowing this name with the scenario opts.  It makes the logic a little harder to follow.","commit_id":"fdbee66b34c480474cebde7afb7edd0606ace650"}]}
