)]}'
{"oslo_concurrency/processutils.py":[{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c62c6a0378d2576ab607714028cc6458911d2470","unresolved":false,"context_lines":[{"line_number":100,"context_line":"@enum.unique"},{"line_number":101,"context_line":"class LogErrors(enum.IntEnum):"},{"line_number":102,"context_line":"    \"\"\"Enumerations that affect if stdout and stderr are logged on error.\"\"\""},{"line_number":103,"context_line":"    LOG_ALL_ERRORS \u003d 1"},{"line_number":104,"context_line":"    LOG_FINAL_ERROR \u003d 2"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_d7aaf270","line":103,"updated":"2015-08-11 19:46:41.000000000","message":"1. Names should be shortened. One of benefits of enums is namespacing. Let\u0027s use that. (I mean let\u0027s name them like DEFAULT, ALL, FINAL)\n\n2. Need documentation for each value.\n\n3. Need default value.","commit_id":"46148530ecb9e612b12479c86d18111e83f23587"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"1a838493f1c38bd7b08449ecdd34fc3a3ced2710","unresolved":false,"context_lines":[{"line_number":100,"context_line":"@enum.unique"},{"line_number":101,"context_line":"class LogErrors(enum.IntEnum):"},{"line_number":102,"context_line":"    \"\"\"Enumerations that affect if stdout and stderr are logged on error.\"\"\""},{"line_number":103,"context_line":"    LOG_ALL_ERRORS \u003d 1"},{"line_number":104,"context_line":"    LOG_FINAL_ERROR \u003d 2"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_e2f681f8","line":103,"in_reply_to":"1a4dcd0f_d7aaf270","updated":"2015-08-28 04:47:46.000000000","message":"So default doesn\u0027t seem possible,\n\nTried using None,\n\nBut got,\n\n  argument must be a string or a number, not \u0027NoneType\u0027\n\nSo just going to leave that as none and document it...","commit_id":"46148530ecb9e612b12479c86d18111e83f23587"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"6c560db5fc7f6ab10dd1554d4709cf3a7dd59b1e","unresolved":false,"context_lines":[{"line_number":100,"context_line":"@enum.unique"},{"line_number":101,"context_line":"class LogErrors(enum.IntEnum):"},{"line_number":102,"context_line":"    \"\"\"Enumerations that affect if stdout and stderr are logged on error.\"\"\""},{"line_number":103,"context_line":"    LOG_ALL_ERRORS \u003d 1"},{"line_number":104,"context_line":"    LOG_FINAL_ERROR \u003d 2"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_e0af8f29","line":103,"in_reply_to":"1a4dcd0f_d7aaf270","updated":"2015-08-23 16:36:04.000000000","message":"Will do!","commit_id":"46148530ecb9e612b12479c86d18111e83f23587"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c62c6a0378d2576ab607714028cc6458911d2470","unresolved":false,"context_lines":[{"line_number":146,"context_line":"    :param loglevel:        log level for execute commands."},{"line_number":147,"context_line":"    :type loglevel:         int.  (Should be logging.DEBUG or logging.INFO)"},{"line_number":148,"context_line":"    :param log_errors:      Should stdout and stderr be logged on error?"},{"line_number":149,"context_line":"                            Possible values are ``None`` (the default),"},{"line_number":150,"context_line":"                            ``LOG_FINAL_ERROR``, or ``LOG_ALL_ERRORS``."},{"line_number":151,"context_line":"                            Using ``None`` implies no logging on errors. The"},{"line_number":152,"context_line":"                            values ``LOG_FINAL_ERROR`` and ``LOG_ALL_ERRORS``"},{"line_number":153,"context_line":"                            are relevant when multiple attempts of command"},{"line_number":154,"context_line":"                            execution are requested using the"},{"line_number":155,"context_line":"                            \u0027attempts\u0027 parameter. If ``LOG_FINAL_ERROR``"},{"line_number":156,"context_line":"                            is specified then only log an error on the"},{"line_number":157,"context_line":"                            last attempt, and ``LOG_ALL_ERRORS`` requires"},{"line_number":158,"context_line":"                            logging on each occurence of an error."},{"line_number":159,"context_line":"    :type log_errors:       integer."},{"line_number":160,"context_line":"    :param binary:          On Python 3, return stdout and stderr as bytes if"},{"line_number":161,"context_line":"                            binary is True, as Unicode otherwise."}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_97b78ad7","line":158,"range":{"start_line":149,"start_character":28,"end_line":158,"end_character":66},"updated":"2015-08-11 19:46:41.000000000","message":"Should be replaced with link to LogErrors enum.","commit_id":"46148530ecb9e612b12479c86d18111e83f23587"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"4435b579a90fd356d9bb93761ed056d076ddb046","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                            \u0027attempts\u0027 parameter. If ``LOG_FINAL_ERROR``"},{"line_number":156,"context_line":"                            is specified then only log an error on the"},{"line_number":157,"context_line":"                            last attempt, and ``LOG_ALL_ERRORS`` requires"},{"line_number":158,"context_line":"                            logging on each occurence of an error."},{"line_number":159,"context_line":"    :type log_errors:       integer."},{"line_number":160,"context_line":"    :param binary:          On Python 3, return stdout and stderr as bytes if"},{"line_number":161,"context_line":"                            binary is True, as Unicode otherwise."}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_02905542","line":158,"in_reply_to":"1a4dcd0f_97b78ad7","updated":"2015-08-28 04:54:22.000000000","message":"Done","commit_id":"46148530ecb9e612b12479c86d18111e83f23587"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c62c6a0378d2576ab607714028cc6458911d2470","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                            is specified then only log an error on the"},{"line_number":157,"context_line":"                            last attempt, and ``LOG_ALL_ERRORS`` requires"},{"line_number":158,"context_line":"                            logging on each occurence of an error."},{"line_number":159,"context_line":"    :type log_errors:       integer."},{"line_number":160,"context_line":"    :param binary:          On Python 3, return stdout and stderr as bytes if"},{"line_number":161,"context_line":"                            binary is True, as Unicode otherwise."},{"line_number":162,"context_line":"    :type binary:           boolean"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_77e99eb6","line":159,"range":{"start_line":159,"start_character":28,"end_line":159,"end_character":35},"updated":"2015-08-11 19:46:41.000000000","message":"ditto","commit_id":"46148530ecb9e612b12479c86d18111e83f23587"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c62c6a0378d2576ab607714028cc6458911d2470","unresolved":false,"context_lines":[{"line_number":196,"context_line":"    root_helper \u003d kwargs.pop(\u0027root_helper\u0027, \u0027\u0027)"},{"line_number":197,"context_line":"    shell \u003d kwargs.pop(\u0027shell\u0027, False)"},{"line_number":198,"context_line":"    loglevel \u003d kwargs.pop(\u0027loglevel\u0027, logging.DEBUG)"},{"line_number":199,"context_line":"    log_errors \u003d kwargs.pop(\u0027log_errors\u0027, None)"},{"line_number":200,"context_line":"    binary \u003d kwargs.pop(\u0027binary\u0027, False)"},{"line_number":201,"context_line":"    on_execute \u003d kwargs.pop(\u0027on_execute\u0027, None)"},{"line_number":202,"context_line":"    on_completion \u003d kwargs.pop(\u0027on_completion\u0027, None)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_7700be66","line":199,"updated":"2015-08-11 19:46:41.000000000","message":"Default value should be LogErrors.DEFAULT","commit_id":"46148530ecb9e612b12479c86d18111e83f23587"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"db4a2200767ba06a56729c253470f128b30c025f","unresolved":false,"context_lines":[{"line_number":196,"context_line":"    root_helper \u003d kwargs.pop(\u0027root_helper\u0027, \u0027\u0027)"},{"line_number":197,"context_line":"    shell \u003d kwargs.pop(\u0027shell\u0027, False)"},{"line_number":198,"context_line":"    loglevel \u003d kwargs.pop(\u0027loglevel\u0027, logging.DEBUG)"},{"line_number":199,"context_line":"    log_errors \u003d kwargs.pop(\u0027log_errors\u0027, None)"},{"line_number":200,"context_line":"    binary \u003d kwargs.pop(\u0027binary\u0027, False)"},{"line_number":201,"context_line":"    on_execute \u003d kwargs.pop(\u0027on_execute\u0027, None)"},{"line_number":202,"context_line":"    on_completion \u003d kwargs.pop(\u0027on_completion\u0027, None)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_e244411c","line":199,"in_reply_to":"1a4dcd0f_7700be66","updated":"2015-08-28 04:52:48.000000000","message":"That doesn\u0027t seem to work, int enum doesn\u0027t like none values...","commit_id":"46148530ecb9e612b12479c86d18111e83f23587"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c62c6a0378d2576ab607714028cc6458911d2470","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    if kwargs:"},{"line_number":212,"context_line":"        raise UnknownArgumentError(_(\u0027Got unknown keyword args: %r\u0027) % kwargs)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    if log_errors not in [None, LOG_ALL_ERRORS, LOG_FINAL_ERROR]:"},{"line_number":215,"context_line":"        raise InvalidArgumentError(_(\u0027Got invalid arg log_errors: %r\u0027) %"},{"line_number":216,"context_line":"                                   log_errors)"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_97054a7b","line":214,"updated":"2015-08-11 19:46:41.000000000","message":"Should be replaced with isinstance check.","commit_id":"46148530ecb9e612b12479c86d18111e83f23587"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"db4a2200767ba06a56729c253470f128b30c025f","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    if kwargs:"},{"line_number":212,"context_line":"        raise UnknownArgumentError(_(\u0027Got unknown keyword args: %r\u0027) % kwargs)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    if log_errors not in [None, LOG_ALL_ERRORS, LOG_FINAL_ERROR]:"},{"line_number":215,"context_line":"        raise InvalidArgumentError(_(\u0027Got invalid arg log_errors: %r\u0027) %"},{"line_number":216,"context_line":"                                   log_errors)"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_020615ce","line":214,"in_reply_to":"1a4dcd0f_97054a7b","updated":"2015-08-28 04:52:48.000000000","message":"Integers are still valid though, so isinstance wouldn\u0027t work...\n\n  \u003e\u003e\u003e a \u003d processutils.LogErrors.ALL\n  \u003e\u003e\u003e isinstance(a, processutils.LogErrors) \n  True\n  \u003e\u003e\u003e isinstance(2, processutils.LogErrors)\n  False\n  \u003e\u003e\u003e isinstance(1, processutils.LogErrors)\n  False\n\nThe reason int enum is used as the enum base is so that int comparisons and equality still work, since that was the API before this change and shouldn\u0027t be broken.","commit_id":"46148530ecb9e612b12479c86d18111e83f23587"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"c62c6a0378d2576ab607714028cc6458911d2470","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        except (ProcessExecutionError, OSError) as err:"},{"line_number":296,"context_line":"            # if we want to always log the errors or if this is"},{"line_number":297,"context_line":"            # the final attempt that failed and we want to log that."},{"line_number":298,"context_line":"            if log_errors \u003d\u003d LOG_ALL_ERRORS or ("},{"line_number":299,"context_line":"                    log_errors \u003d\u003d LOG_FINAL_ERROR and not attempts):"},{"line_number":300,"context_line":"                if isinstance(err, ProcessExecutionError):"},{"line_number":301,"context_line":"                    format \u003d _(\u0027%(desc)r\\ncommand: %(cmd)r\\n\u0027"},{"line_number":302,"context_line":"                               \u0027exit code: %(code)r\\nstdout: %(stdout)r\\n\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_5732625f","line":299,"range":{"start_line":298,"start_character":15,"end_line":299,"end_character":49},"updated":"2015-08-11 19:46:41.000000000","message":"Should use comparison with LogErrors values (probably even using `is`)","commit_id":"46148530ecb9e612b12479c86d18111e83f23587"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"db4a2200767ba06a56729c253470f128b30c025f","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            # if we want to always log the errors or if this is"},{"line_number":297,"context_line":"            # the final attempt that failed and we want to log that."},{"line_number":298,"context_line":"            if log_errors \u003d\u003d LOG_ALL_ERRORS or ("},{"line_number":299,"context_line":"                    log_errors \u003d\u003d LOG_FINAL_ERROR and not attempts):"},{"line_number":300,"context_line":"                if isinstance(err, ProcessExecutionError):"},{"line_number":301,"context_line":"                    format \u003d _(\u0027%(desc)r\\ncommand: %(cmd)r\\n\u0027"},{"line_number":302,"context_line":"                               \u0027exit code: %(code)r\\nstdout: %(stdout)r\\n\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_82fa25bc","line":299,"in_reply_to":"1a4dcd0f_5732625f","updated":"2015-08-28 04:52:48.000000000","message":"Same answer as above, int values are still valid due to legacy API and its usage.","commit_id":"46148530ecb9e612b12479c86d18111e83f23587"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"581036f04c6c92234977282bc03f290a8696ff48","unresolved":false,"context_lines":[{"line_number":199,"context_line":"    root_helper \u003d kwargs.pop(\u0027root_helper\u0027, \u0027\u0027)"},{"line_number":200,"context_line":"    shell \u003d kwargs.pop(\u0027shell\u0027, False)"},{"line_number":201,"context_line":"    loglevel \u003d kwargs.pop(\u0027loglevel\u0027, logging.DEBUG)"},{"line_number":202,"context_line":"    log_errors \u003d kwargs.pop(\u0027log_errors\u0027, None)"},{"line_number":203,"context_line":"    binary \u003d kwargs.pop(\u0027binary\u0027, False)"},{"line_number":204,"context_line":"    on_execute \u003d kwargs.pop(\u0027on_execute\u0027, None)"},{"line_number":205,"context_line":"    on_completion \u003d kwargs.pop(\u0027on_completion\u0027, None)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_68089dda","line":202,"updated":"2015-08-31 18:26:07.000000000","message":"Replace this with:\n\n  log_errors \u003d kwargs.pop(\u0027log_errors\u0027, LogErrors.DEFAULT)\n  if log_errors is None:\n    log_errors \u003d LogErrors.DEFAULT","commit_id":"433ee16f939ee3c2d560ecc14602c166a5c82186"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"581036f04c6c92234977282bc03f290a8696ff48","unresolved":false,"context_lines":[{"line_number":214,"context_line":"    if kwargs:"},{"line_number":215,"context_line":"        raise UnknownArgumentError(_(\u0027Got unknown keyword args: %r\u0027) % kwargs)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    if log_errors not in [None, LOG_ALL_ERRORS, LOG_FINAL_ERROR]:"},{"line_number":218,"context_line":"        raise InvalidArgumentError(_(\u0027Got invalid arg log_errors: %r\u0027) %"},{"line_number":219,"context_line":"                                   log_errors)"},{"line_number":220,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_c81449ea","line":217,"updated":"2015-08-31 18:26:07.000000000","message":"And replace this with:\n\n  if isinstance(log_errors, int):\n    log_errors \u003d LogErrors(log_errors)\n  if not isinstance(log_errors, LogErrors):","commit_id":"433ee16f939ee3c2d560ecc14602c166a5c82186"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"f98ed61c9ef947c22316a266ffdc98fc303d8167","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    :param loglevel:        log level for execute commands."},{"line_number":155,"context_line":"    :type loglevel:         int.  (Should be logging.DEBUG or logging.INFO)"},{"line_number":156,"context_line":"    :param log_errors:      Should stdout and stderr be logged on error?"},{"line_number":157,"context_line":"                            Possible values are ``None`` (this is equivalent"},{"line_number":158,"context_line":"                            to :py:attr:`~.LogErrors.DEFAULT`),"},{"line_number":159,"context_line":"                            :py:attr:`~.LogErrors.FINAL`, or"},{"line_number":160,"context_line":"                            :py:attr:`~.LogErrors.ALL`. Note that the"},{"line_number":161,"context_line":"                            values :py:attr:`~.LogErrors.FINAL` and"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_ed6c7fd2","line":158,"range":{"start_line":157,"start_character":28,"end_line":158,"end_character":62},"updated":"2015-09-01 19:11:55.000000000","message":"Sorry for nitpicking, but shouldn\u0027t we remove None entirely from docs to prevent someone from using explicit None in new code?","commit_id":"aee162ce65214f94d5fdd6d46f5485f7773eef33"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"13a73b51b87cd496b74714d2ea8b0cbad4604677","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    :type loglevel:         int.  (Should be logging.DEBUG or logging.INFO)"},{"line_number":156,"context_line":"    :param log_errors:      Should stdout and stderr be logged on error?"},{"line_number":157,"context_line":"                            Possible values are ``None`` (this is equivalent"},{"line_number":158,"context_line":"                            to :py:attr:`~.LogErrors.DEFAULT`),"},{"line_number":159,"context_line":"                            :py:attr:`~.LogErrors.FINAL`, or"},{"line_number":160,"context_line":"                            :py:attr:`~.LogErrors.ALL`. Note that the"},{"line_number":161,"context_line":"                            values :py:attr:`~.LogErrors.FINAL` and"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_1016ac55","line":158,"in_reply_to":"da20952f_ed6c7fd2","updated":"2015-09-01 19:47:53.000000000","message":"Sure, fine with me.","commit_id":"aee162ce65214f94d5fdd6d46f5485f7773eef33"}]}
