)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a874475a4358476600d9260fc6654aa3d86b03a3","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Allow to call initialize_app when running --help"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently initialize_app is not called when running --help. Some"},{"line_number":10,"context_line":"applications define sub-commands in initialize_app so they will be"},{"line_number":11,"context_line":"hidden when running \u0027--help\u0027."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This change defines a new option to allow deferring help printing and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba7be1f8_e1478849","line":10,"updated":"2015-02-23 21:59:02.000000000","message":"Can you be more specific about which applications do this?","commit_id":"b818456f03e2d454845d03419eb50f2523098544"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e80fa7b79c3e866d835f1fdfffe3f5a59c03708f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Allow to call initialize_app when running --help"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently initialize_app is not called when running --help. Some"},{"line_number":10,"context_line":"applications define sub-commands in initialize_app so they will be"},{"line_number":11,"context_line":"hidden when running \u0027--help\u0027."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This change defines a new option to allow deferring help printing and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba7be1f8_b4711b78","line":10,"in_reply_to":"ba7be1f8_e1478849","updated":"2015-02-24 20:36:35.000000000","message":"Done","commit_id":"b818456f03e2d454845d03419eb50f2523098544"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"0debe4ffcd9ec3e57cf6ca5d601c4faa5f759406","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Allow to call initialize_app when running --help"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently initialize_app is not called when running --help. Some"},{"line_number":10,"context_line":"applications define sub-commands in initialize_app so they will be"},{"line_number":11,"context_line":"hidden when running \u0027--help\u0027."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This change defines a new option to allow deferring help printing and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba7be1f8_61ed588b","line":10,"in_reply_to":"ba7be1f8_e1478849","updated":"2015-02-23 22:40:42.000000000","message":"openstackclient loads most of its commands in initialize_app and hacks (badly, but there is not choice) App.__init__ to defer HelpAction.__call__","commit_id":"b818456f03e2d454845d03419eb50f2523098544"}],"cliff/app.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a874475a4358476600d9260fc6654aa3d86b03a3","unresolved":false,"context_lines":[{"line_number":207,"context_line":"            self.configure_logging()"},{"line_number":208,"context_line":"            self.interactive_mode \u003d not remainder"},{"line_number":209,"context_line":"            self.initialize_app(remainder)"},{"line_number":210,"context_line":"            if self.deferred_help and self.options.deferred_help:"},{"line_number":211,"context_line":"                action \u003d HelpAction(None, None, default\u003dself)"},{"line_number":212,"context_line":"                action(self.parser, self.parser, None, None)"},{"line_number":213,"context_line":"        except Exception as err:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_41593435","line":210,"updated":"2015-02-23 21:59:02.000000000","message":"Would it make sense to always use this approach, and defer the help until the application is initialized?\n\nHow does this change interact with the openstackclient? We don\u0027t want, for example, to require authentication against a cloud before we can print help text.","commit_id":"b818456f03e2d454845d03419eb50f2523098544"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"0debe4ffcd9ec3e57cf6ca5d601c4faa5f759406","unresolved":false,"context_lines":[{"line_number":207,"context_line":"            self.configure_logging()"},{"line_number":208,"context_line":"            self.interactive_mode \u003d not remainder"},{"line_number":209,"context_line":"            self.initialize_app(remainder)"},{"line_number":210,"context_line":"            if self.deferred_help and self.options.deferred_help:"},{"line_number":211,"context_line":"                action \u003d HelpAction(None, None, default\u003dself)"},{"line_number":212,"context_line":"                action(self.parser, self.parser, None, None)"},{"line_number":213,"context_line":"        except Exception as err:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_f3359bf7","line":210,"in_reply_to":"ba7be1f8_41593435","updated":"2015-02-23 22:40:42.000000000","message":"Good question! As i don\u0027t know which type of initialization is done by applications so i prefer by default to be backward compatible. \nSetting deferred_help\u003dTrue prints help after initialize_app but applications print help before but adding L210-212 in their initialize_app to run it partially.\n\nThat\u0027s typically what does openstackclient with the same sort of hack. And a follow-up change will replace such hack +replace[1] with L210-212 to print help before authentication configuration in initialize_app. The change is currently not implemented as i don\u0027t know if/how we can express cross-project dependencies.\n\n[1]https://github.com/openstack/python-openstackclient/blob/bc11c4d7d8fef1d8eef3bb8f5fa18e27b9ea2964/openstackclient/shell.py#L287-L288","commit_id":"b818456f03e2d454845d03419eb50f2523098544"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"e360e77c8775c73aa8d177d1681652632c005c22","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            const\u003d0,"},{"line_number":147,"context_line":"            help\u003d\u0027suppress output except warnings and errors\u0027,"},{"line_number":148,"context_line":"        )"},{"line_number":149,"context_line":"        if self.deferred_help:"},{"line_number":150,"context_line":"            parser.add_argument("},{"line_number":151,"context_line":"                \u0027-h\u0027, \u0027--help\u0027,"},{"line_number":152,"context_line":"                dest\u003d\u0027deferred_help\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_52119a50","line":149,"updated":"2015-02-25 21:01:33.000000000","message":"I still suspect we can always do this, but I\u0027m OK leaving it as an option for now until we verify that more carefully.","commit_id":"9d37798bc123910952a53630ba22f70c1997529d"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"e360e77c8775c73aa8d177d1681652632c005c22","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        root_logger.addHandler(console)"},{"line_number":197,"context_line":"        return"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def print_help_if_requested(self):"},{"line_number":200,"context_line":"        if self.deferred_help and self.options.deferred_help:"},{"line_number":201,"context_line":"            action \u003d HelpAction(None, None, default\u003dself)"},{"line_number":202,"context_line":"            action(self.parser, self.parser, None, None)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_cc2ed4a4","line":199,"updated":"2015-02-25 21:01:33.000000000","message":"Since this is a public method, it should have a docstring explaining what it does and what its preconditions are (the options have to have been parsed, for example).","commit_id":"9d37798bc123910952a53630ba22f70c1997529d"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"ebad341e6835058136fc954f7b77289b42e4174d","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        root_logger.addHandler(console)"},{"line_number":197,"context_line":"        return"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def print_help_if_requested(self):"},{"line_number":200,"context_line":"        if self.deferred_help and self.options.deferred_help:"},{"line_number":201,"context_line":"            action \u003d HelpAction(None, None, default\u003dself)"},{"line_number":202,"context_line":"            action(self.parser, self.parser, None, None)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_d5370de1","line":199,"updated":"2015-02-26 16:21:55.000000000","message":"https://bugs.launchpad.net/python-cliff/+bug/1426009","commit_id":"9d37798bc123910952a53630ba22f70c1997529d"}]}
