)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"a1af97710d21600f0cbfc98b29c714a6635e6993","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Don\u0027t decode on Python 2 because these functions are sometimes used to"},{"line_number":17,"context_line":"retrieve a pure binary output (ex: encryption key): see the nova"},{"line_number":18,"context_line":"bug #1410348. To support this use case on Python 3, we may accept"},{"line_number":19,"context_line":"encoding\u003dNone or add an optional binary parameter (default\u003dFalse)."},{"line_number":20,"context_line":"First, strutils.mask_password() should support this parameter too, or"},{"line_number":21,"context_line":"the function should not be called for binary output. I prefer to support"},{"line_number":22,"context_line":"this use case in a different changeset."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9aa53dc9_7f366653","line":19,"updated":"2015-04-08 14:50:08.000000000","message":"So, if I\u0027m not mistaken, what we do here is the former, right? People calling execute/ssh_execute are supposed to pass \"encoding\u003dNone\" if they want to retrieve a pure binary? In this case, please remove the reference to \"an optional binary parameter\" which is just confusing.\n\nAlson what should be the default value for the \"encoding\" parameter? I\u0027m afraid the called might have to write Python3 -specific code to retrieve a binary.","commit_id":"bb479d880be473ff6a85e9f1e20f903df9a9d24d"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"3038d334d1703dffa3c051994aeb0bc0ee47207e","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Don\u0027t decode on Python 2 because these functions are sometimes used to"},{"line_number":17,"context_line":"retrieve a pure binary output (ex: encryption key): see the nova"},{"line_number":18,"context_line":"bug #1410348. To support this use case on Python 3, we may accept"},{"line_number":19,"context_line":"encoding\u003dNone or add an optional binary parameter (default\u003dFalse)."},{"line_number":20,"context_line":"First, strutils.mask_password() should support this parameter too, or"},{"line_number":21,"context_line":"the function should not be called for binary output. I prefer to support"},{"line_number":22,"context_line":"this use case in a different changeset."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9aa53dc9_e6478f49","line":19,"in_reply_to":"9aa53dc9_7f366653","updated":"2015-04-08 16:04:06.000000000","message":"\u003e I\u0027m afraid the called might have to write Python3 -specific code to retrieve a binary.\n\nSee my second patch (I283cadf04781942b65f211237070cc2354939cdb): binary\u003dTrue must be used on Python 2 *and* Python 3. ssh_execute() already retruns Unicode on Python 2. For execute, nova will have to be modified to be called with binary\u003dTrue when a binary output is required.","commit_id":"bb479d880be473ff6a85e9f1e20f903df9a9d24d"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"d75de704404a9e59423f3fc6b6360fadbda353b6","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Don\u0027t decode on Python 2 because these functions are sometimes used to"},{"line_number":17,"context_line":"retrieve a pure binary output (ex: encryption key): see the nova"},{"line_number":18,"context_line":"bug #1410348. To support this use case on Python 3, we may accept"},{"line_number":19,"context_line":"encoding\u003dNone or add an optional binary parameter (default\u003dFalse)."},{"line_number":20,"context_line":"First, strutils.mask_password() should support this parameter too, or"},{"line_number":21,"context_line":"the function should not be called for binary output. I prefer to support"},{"line_number":22,"context_line":"this use case in a different changeset."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9aa53dc9_0692739e","line":19,"in_reply_to":"9aa53dc9_e6478f49","updated":"2015-04-09 12:47:35.000000000","message":"\u003e For execute, nova will have to be modified to be called with binary\u003dTrue when a binary output is required.\n\nHum, when I read my comment, I realized that it can be misunderstood. Python 2 is *not* changed. nova only has to call execute() with binary\u003dTrue *to support Python 3*.\n\nCurrently, nova doesn\u0027t support Python 3.","commit_id":"bb479d880be473ff6a85e9f1e20f903df9a9d24d"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"a1af97710d21600f0cbfc98b29c714a6635e6993","unresolved":false,"context_lines":[{"line_number":19,"context_line":"encoding\u003dNone or add an optional binary parameter (default\u003dFalse)."},{"line_number":20,"context_line":"First, strutils.mask_password() should support this parameter too, or"},{"line_number":21,"context_line":"the function should not be called for binary output. I prefer to support"},{"line_number":22,"context_line":"this use case in a different changeset."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"FYI On Python 2, mask_password() decodes from the default encoding which"},{"line_number":25,"context_line":"is ASCII. Decoding error are ignored: the input is used unchanged."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9aa53dc9_df733214","line":22,"updated":"2015-04-08 14:50:08.000000000","message":"So, are both changes needed? Why not have a single patch?","commit_id":"bb479d880be473ff6a85e9f1e20f903df9a9d24d"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"3038d334d1703dffa3c051994aeb0bc0ee47207e","unresolved":false,"context_lines":[{"line_number":19,"context_line":"encoding\u003dNone or add an optional binary parameter (default\u003dFalse)."},{"line_number":20,"context_line":"First, strutils.mask_password() should support this parameter too, or"},{"line_number":21,"context_line":"the function should not be called for binary output. I prefer to support"},{"line_number":22,"context_line":"this use case in a different changeset."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"FYI On Python 2, mask_password() decodes from the default encoding which"},{"line_number":25,"context_line":"is ASCII. Decoding error are ignored: the input is used unchanged."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9aa53dc9_ab35d0f7","line":22,"in_reply_to":"9aa53dc9_df733214","updated":"2015-04-08 16:04:06.000000000","message":"IMO this change is already complex enough (ex: it was not merged in 4 months...). And there are multiple options for the \"return stdout and stderr as bytes\" use case (encoding\u003dNone or binary\u003dNone), I prefer to implement it in a separated change.\n\nI just updated this change to cleanup the changelog and I wrote a new patch to support the bytes use case: I added an optional binary parameter.","commit_id":"bb479d880be473ff6a85e9f1e20f903df9a9d24d"}],"oslo_concurrency/processutils.py":[{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"d080102a0c0afc4cb4303d7d55549e08171a2f91","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                            on Python 3, sys.getfilesystemencoding()"},{"line_number":148,"context_line":"                            by default."},{"line_number":149,"context_line":"    :type encoding:         str"},{"line_number":150,"context_line":"    :param errors:          error handler used to decode stdout and stderr"},{"line_number":151,"context_line":"                            on Python 3, \u0027surrogateescape\u0027 by default."},{"line_number":152,"context_line":"    :type errors:           str"},{"line_number":153,"context_line":"    :returns:               (stdout, stderr) from process execution"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_db05ad10","line":150,"updated":"2015-01-16 14:11:50.000000000","message":"I think this should be named like \u0027encoding_errors\u0027 to not think that this has smth to do with subprocess\u0027 errors.","commit_id":"7a2782bbe2b76a28587c72b2b8590cc8c3a0245b"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"0f2815b05fba78110ad87ef6df68bd898b21e738","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                            on Python 3, sys.getfilesystemencoding()"},{"line_number":148,"context_line":"                            by default."},{"line_number":149,"context_line":"    :type encoding:         str"},{"line_number":150,"context_line":"    :param errors:          error handler used to decode stdout and stderr"},{"line_number":151,"context_line":"                            on Python 3, \u0027surrogateescape\u0027 by default."},{"line_number":152,"context_line":"    :type errors:           str"},{"line_number":153,"context_line":"    :returns:               (stdout, stderr) from process execution"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_3f2e8dfb","line":150,"in_reply_to":"3a961159_db05ad10","updated":"2015-02-06 11:54:13.000000000","message":"Done","commit_id":"7a2782bbe2b76a28587c72b2b8590cc8c3a0245b"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"d080102a0c0afc4cb4303d7d55549e08171a2f91","unresolved":false,"context_lines":[{"line_number":309,"context_line":"def ssh_execute(ssh, cmd, process_input\u003dNone,"},{"line_number":310,"context_line":"                addl_env\u003dNone, check_exit_code\u003dTrue,"},{"line_number":311,"context_line":"                encoding\u003dsys.getfilesystemencoding(),"},{"line_number":312,"context_line":"                errors\u003d\u0027surrogateescape\u0027):"},{"line_number":313,"context_line":"    sanitized_cmd \u003d strutils.mask_password(cmd)"},{"line_number":314,"context_line":"    LOG.debug(\u0027Running cmd (SSH): %s\u0027, sanitized_cmd)"},{"line_number":315,"context_line":"    if addl_env:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_edd3905c","line":312,"updated":"2015-01-16 14:11:50.000000000","message":"ditto","commit_id":"7a2782bbe2b76a28587c72b2b8590cc8c3a0245b"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"0f2815b05fba78110ad87ef6df68bd898b21e738","unresolved":false,"context_lines":[{"line_number":309,"context_line":"def ssh_execute(ssh, cmd, process_input\u003dNone,"},{"line_number":310,"context_line":"                addl_env\u003dNone, check_exit_code\u003dTrue,"},{"line_number":311,"context_line":"                encoding\u003dsys.getfilesystemencoding(),"},{"line_number":312,"context_line":"                errors\u003d\u0027surrogateescape\u0027):"},{"line_number":313,"context_line":"    sanitized_cmd \u003d strutils.mask_password(cmd)"},{"line_number":314,"context_line":"    LOG.debug(\u0027Running cmd (SSH): %s\u0027, sanitized_cmd)"},{"line_number":315,"context_line":"    if addl_env:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_5f318158","line":312,"in_reply_to":"3a961159_edd3905c","updated":"2015-02-06 11:54:13.000000000","message":"Done","commit_id":"7a2782bbe2b76a28587c72b2b8590cc8c3a0245b"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"d080102a0c0afc4cb4303d7d55549e08171a2f91","unresolved":false,"context_lines":[{"line_number":330,"context_line":"    sanitized_stdout \u003d strutils.mask_password(stdout)"},{"line_number":331,"context_line":"    stderr \u003d stderr_stream.read()"},{"line_number":332,"context_line":"    if six.PY3:"},{"line_number":333,"context_line":"        stderr \u003d stderr.decode(encoding, errors)"},{"line_number":334,"context_line":"    sanitized_stderr \u003d strutils.mask_password(stderr)"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    stdin_stream.close()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_8d512cdb","line":333,"range":{"start_line":333,"start_character":8,"end_line":333,"end_character":14},"updated":"2015-01-16 14:11:50.000000000","message":"Maybe unite these if\u0027s?","commit_id":"7a2782bbe2b76a28587c72b2b8590cc8c3a0245b"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"0f2815b05fba78110ad87ef6df68bd898b21e738","unresolved":false,"context_lines":[{"line_number":330,"context_line":"    sanitized_stdout \u003d strutils.mask_password(stdout)"},{"line_number":331,"context_line":"    stderr \u003d stderr_stream.read()"},{"line_number":332,"context_line":"    if six.PY3:"},{"line_number":333,"context_line":"        stderr \u003d stderr.decode(encoding, errors)"},{"line_number":334,"context_line":"    sanitized_stderr \u003d strutils.mask_password(stderr)"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    stdin_stream.close()"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_7f0ba57c","line":333,"in_reply_to":"3a961159_8d512cdb","updated":"2015-02-06 11:54:13.000000000","message":"I prefer to not change the order of these instructions. It may have an impact on the code.","commit_id":"7a2782bbe2b76a28587c72b2b8590cc8c3a0245b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d76569e1f129192cbe8509ca35211357ca9b41b0","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    shell \u003d kwargs.pop(\u0027shell\u0027, False)"},{"line_number":172,"context_line":"    loglevel \u003d kwargs.pop(\u0027loglevel\u0027, logging.DEBUG)"},{"line_number":173,"context_line":"    log_errors \u003d kwargs.pop(\u0027log_errors\u0027, None)"},{"line_number":174,"context_line":"    encoding \u003d kwargs.pop(\u0027encoding\u0027, sys.getfilesystemencoding())"},{"line_number":175,"context_line":"    encoding_errors \u003d kwargs.pop(\u0027encoding_errors\u0027, \u0027surrogateescape\u0027)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    if isinstance(check_exit_code, bool):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa53dc9_47a614af","line":174,"updated":"2015-04-09 12:22:53.000000000","message":"I don\u0027t think we can set this as the default, to start. Existing calls expecting binary data will break immediately when we release a version of the library with this change, right? Unless you plan to find and update all of those calls before we release the change? If that\u0027s the case, this patch should have Depends-On entries for all of the other related patches to ensure that it doesn\u0027t merge before those updates.","commit_id":"d0de47ffcd1f40db0b843e022442cba4d056cd44"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"9894bb505a847648618e88850fd3f60e9ed0621d","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    shell \u003d kwargs.pop(\u0027shell\u0027, False)"},{"line_number":172,"context_line":"    loglevel \u003d kwargs.pop(\u0027loglevel\u0027, logging.DEBUG)"},{"line_number":173,"context_line":"    log_errors \u003d kwargs.pop(\u0027log_errors\u0027, None)"},{"line_number":174,"context_line":"    encoding \u003d kwargs.pop(\u0027encoding\u0027, sys.getfilesystemencoding())"},{"line_number":175,"context_line":"    encoding_errors \u003d kwargs.pop(\u0027encoding_errors\u0027, \u0027surrogateescape\u0027)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    if isinstance(check_exit_code, bool):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ab451fb_6cbf1cd1","line":174,"in_reply_to":"9aa53dc9_15ddd26e","updated":"2015-04-17 21:08:17.000000000","message":"\u003e OK, I should have read more closely.\n\nI modified the changelog of my new patch set to say explicitly that the change has no effect on Python 2.","commit_id":"d0de47ffcd1f40db0b843e022442cba4d056cd44"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"eddb3f0d1c4f1bbaecfc81e016a32265ec10a994","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    shell \u003d kwargs.pop(\u0027shell\u0027, False)"},{"line_number":172,"context_line":"    loglevel \u003d kwargs.pop(\u0027loglevel\u0027, logging.DEBUG)"},{"line_number":173,"context_line":"    log_errors \u003d kwargs.pop(\u0027log_errors\u0027, None)"},{"line_number":174,"context_line":"    encoding \u003d kwargs.pop(\u0027encoding\u0027, sys.getfilesystemencoding())"},{"line_number":175,"context_line":"    encoding_errors \u003d kwargs.pop(\u0027encoding_errors\u0027, \u0027surrogateescape\u0027)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    if isinstance(check_exit_code, bool):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa53dc9_eac3ad55","line":174,"in_reply_to":"9aa53dc9_47a614af","updated":"2015-04-09 12:46:57.000000000","message":"\u003e I don\u0027t think we can set this as the default, to start. Existing calls expecting binary data will break immediately when we release a version of the library with this change, right?\n\nThis change has no effect on Python 2: see \"if six.PY3\" below.\n\nThe change has an impact on applications already ported to Python 3. On Python 3, it\u0027s not convinient to get bytes, many Python 3 functions expect Unicode, not bytes.\n\nDo you know OpenStack applications already ported to Python 3?\n\nDid you notice my following commit adding an optional binary parameter? Using this parameter, it becomes possible to port applications expecting bytes to Python 3.\n\nNote: ssh_execute() returns Unicode on Python 2 (except if the conversion fails in mask_password).","commit_id":"d0de47ffcd1f40db0b843e022442cba4d056cd44"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"bd2fcf83fc515c10681ac94e0cf9c2e8c6dfbe80","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    shell \u003d kwargs.pop(\u0027shell\u0027, False)"},{"line_number":172,"context_line":"    loglevel \u003d kwargs.pop(\u0027loglevel\u0027, logging.DEBUG)"},{"line_number":173,"context_line":"    log_errors \u003d kwargs.pop(\u0027log_errors\u0027, None)"},{"line_number":174,"context_line":"    encoding \u003d kwargs.pop(\u0027encoding\u0027, sys.getfilesystemencoding())"},{"line_number":175,"context_line":"    encoding_errors \u003d kwargs.pop(\u0027encoding_errors\u0027, \u0027surrogateescape\u0027)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    if isinstance(check_exit_code, bool):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa53dc9_15ddd26e","line":174,"in_reply_to":"9aa53dc9_aa1fe56a","updated":"2015-04-09 13:09:35.000000000","message":"\u003e OK, I should have read more closely.\n\nI checked with Julien: Gnocchi is an OpenStack appplication running on Python 3 *but* it doesn\u0027t use oslo.concurrency (yet?).","commit_id":"d0de47ffcd1f40db0b843e022442cba4d056cd44"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6bf4c29312b0220ff0c4e45e629dc62441b8b24e","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    shell \u003d kwargs.pop(\u0027shell\u0027, False)"},{"line_number":172,"context_line":"    loglevel \u003d kwargs.pop(\u0027loglevel\u0027, logging.DEBUG)"},{"line_number":173,"context_line":"    log_errors \u003d kwargs.pop(\u0027log_errors\u0027, None)"},{"line_number":174,"context_line":"    encoding \u003d kwargs.pop(\u0027encoding\u0027, sys.getfilesystemencoding())"},{"line_number":175,"context_line":"    encoding_errors \u003d kwargs.pop(\u0027encoding_errors\u0027, \u0027surrogateescape\u0027)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    if isinstance(check_exit_code, bool):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa53dc9_aa1fe56a","line":174,"in_reply_to":"9aa53dc9_eac3ad55","updated":"2015-04-09 13:00:16.000000000","message":"OK, I should have read more closely.","commit_id":"d0de47ffcd1f40db0b843e022442cba4d056cd44"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6bf4c29312b0220ff0c4e45e629dc62441b8b24e","unresolved":false,"context_lines":[{"line_number":233,"context_line":"            end_time \u003d time.time() - start_time"},{"line_number":234,"context_line":"            LOG.log(loglevel, \u0027CMD \"%s\" returned: %s in %0.3fs\u0027 %"},{"line_number":235,"context_line":"                    (sanitized_cmd, _returncode, end_time))"},{"line_number":236,"context_line":"            if result is not None and six.PY3:"},{"line_number":237,"context_line":"                (stdout, stderr) \u003d result"},{"line_number":238,"context_line":"                stdout \u003d stdout.decode(encoding, encoding_errors)"},{"line_number":239,"context_line":"                stderr \u003d stderr.decode(encoding, encoding_errors)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa53dc9_0a05b112","line":236,"updated":"2015-04-09 13:00:16.000000000","message":"Should this also be checking that encoding is not None?","commit_id":"d0de47ffcd1f40db0b843e022442cba4d056cd44"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"bd2fcf83fc515c10681ac94e0cf9c2e8c6dfbe80","unresolved":false,"context_lines":[{"line_number":233,"context_line":"            end_time \u003d time.time() - start_time"},{"line_number":234,"context_line":"            LOG.log(loglevel, \u0027CMD \"%s\" returned: %s in %0.3fs\u0027 %"},{"line_number":235,"context_line":"                    (sanitized_cmd, _returncode, end_time))"},{"line_number":236,"context_line":"            if result is not None and six.PY3:"},{"line_number":237,"context_line":"                (stdout, stderr) \u003d result"},{"line_number":238,"context_line":"                stdout \u003d stdout.decode(encoding, encoding_errors)"},{"line_number":239,"context_line":"                stderr \u003d stderr.decode(encoding, encoding_errors)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa53dc9_750d3ee7","line":236,"in_reply_to":"9aa53dc9_0a05b112","updated":"2015-04-09 13:09:35.000000000","message":"What\u0027s the use case for encoding\u003dNone? If you want bytes, please see my following changeset which adds an optional binary parameter.\n\nFirst, I tried to use encoding\u003dNone, but mask_password() requires Unicode on Python 3. Somehow, you must decode stdout with an encoding. IMO it makes more sense to decode stdout, hide passwords, and then encode back to bytes. Because so you keep the ability to configure the encoding even if you expect bytes. The encoding is still used to hide passwords.\n\nAnother option would be to modify mask_password() to accept bytes, but in practice, it would only move the choice of the encoding somewhere else. And I already proposed to support bytes in mask_password() and my change was rejected.\n\nhttps://review.openstack.org/#/c/171710/","commit_id":"d0de47ffcd1f40db0b843e022442cba4d056cd44"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"7dd777cbab30987eea7187e39054044535f135c5","unresolved":false,"context_lines":[{"line_number":236,"context_line":"            if result is not None and six.PY3:"},{"line_number":237,"context_line":"                (stdout, stderr) \u003d result"},{"line_number":238,"context_line":"                stdout \u003d stdout.decode(encoding, encoding_errors)"},{"line_number":239,"context_line":"                stderr \u003d stderr.decode(encoding, encoding_errors)"},{"line_number":240,"context_line":"                result \u003d (stdout, stderr)"},{"line_number":241,"context_line":"            if not ignore_exit_code and _returncode not in check_exit_code:"},{"line_number":242,"context_line":"                (stdout, stderr) \u003d result"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ab451fb_4b79fc92","line":239,"updated":"2015-04-17 12:10:50.000000000","message":"It just came to me that if user set encoding_errors to \u0027strict\u0027 expecting proper Unicode output and the command returns error and outputs some malformed data, user will get UnicodeError instead of ProcessExecutionError here. We might want to force default value on encoding_errors if we\u0027re about to raise an exception.","commit_id":"d0de47ffcd1f40db0b843e022442cba4d056cd44"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"b7e479c963e694866e21c060e61ae280a51928a8","unresolved":false,"context_lines":[{"line_number":236,"context_line":"            if result is not None and six.PY3:"},{"line_number":237,"context_line":"                (stdout, stderr) \u003d result"},{"line_number":238,"context_line":"                stdout \u003d stdout.decode(encoding, encoding_errors)"},{"line_number":239,"context_line":"                stderr \u003d stderr.decode(encoding, encoding_errors)"},{"line_number":240,"context_line":"                result \u003d (stdout, stderr)"},{"line_number":241,"context_line":"            if not ignore_exit_code and _returncode not in check_exit_code:"},{"line_number":242,"context_line":"                (stdout, stderr) \u003d result"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ab451fb_649505e3","line":239,"in_reply_to":"3ab451fb_4b79fc92","updated":"2015-04-17 13:44:36.000000000","message":"By default, execute() and ssh_execute() use \"surrogateescape\" error handler. Using this error handler, str.decode() *cannot* fail (undecodable bytes are escaped as Unicode surrogates), it\u0027s the whole purpose of this error handler.\n\nI\u0027m not sure that it\u0027s useful to make encoding_errors confgurable. What do you think of always using surrogateescape and drop the parameter?\n\n\u003e user will get UnicodeError instead of ProcessExecutionError here\n\nIf I call execute() with encoding_errors\u003d\u0027strict\u0027, I expect a unicode error on decoding error, not a ProcessExecutionError.\n\nFYI the surrogateescape PEP:\nhttps://www.python.org/dev/peps/pep-0383/","commit_id":"d0de47ffcd1f40db0b843e022442cba4d056cd44"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"9894bb505a847648618e88850fd3f60e9ed0621d","unresolved":false,"context_lines":[{"line_number":236,"context_line":"            if result is not None and six.PY3:"},{"line_number":237,"context_line":"                (stdout, stderr) \u003d result"},{"line_number":238,"context_line":"                stdout \u003d stdout.decode(encoding, encoding_errors)"},{"line_number":239,"context_line":"                stderr \u003d stderr.decode(encoding, encoding_errors)"},{"line_number":240,"context_line":"                result \u003d (stdout, stderr)"},{"line_number":241,"context_line":"            if not ignore_exit_code and _returncode not in check_exit_code:"},{"line_number":242,"context_line":"                (stdout, stderr) \u003d result"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ab451fb_0c96584c","line":239,"in_reply_to":"3ab451fb_649505e3","updated":"2015-04-17 21:08:17.000000000","message":"Fixed in my new patch set: I simply removed the encoding_errors parameter. It may be added later if it\u0027s really needed. With binary\u003dTrue (my following patch), you can already decide how to decode bytes (use a different error handler). I believe that there is no use case which requires a different error handler.\n\nNote: the encoding is *not* currently configurable in subprocess.Popen with universal_newlines\u003dTrue.","commit_id":"d0de47ffcd1f40db0b843e022442cba4d056cd44"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6bf4c29312b0220ff0c4e45e629dc62441b8b24e","unresolved":false,"context_lines":[{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    exit_status \u003d channel.recv_exit_status()"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    if six.PY3:"},{"line_number":344,"context_line":"        stdout \u003d stdout.decode(encoding, encoding_errors)"},{"line_number":345,"context_line":"        stderr \u003d stderr.decode(encoding, encoding_errors)"},{"line_number":346,"context_line":"    stdout \u003d strutils.mask_password(stdout)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa53dc9_75077e18","line":343,"updated":"2015-04-09 13:00:16.000000000","message":"Should this also be checking that encoding is not None?","commit_id":"d0de47ffcd1f40db0b843e022442cba4d056cd44"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"bd2fcf83fc515c10681ac94e0cf9c2e8c6dfbe80","unresolved":false,"context_lines":[{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    exit_status \u003d channel.recv_exit_status()"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    if six.PY3:"},{"line_number":344,"context_line":"        stdout \u003d stdout.decode(encoding, encoding_errors)"},{"line_number":345,"context_line":"        stderr \u003d stderr.decode(encoding, encoding_errors)"},{"line_number":346,"context_line":"    stdout \u003d strutils.mask_password(stdout)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa53dc9_15f952c7","line":343,"in_reply_to":"9aa53dc9_75077e18","updated":"2015-04-09 13:09:35.000000000","message":"Ditto.","commit_id":"d0de47ffcd1f40db0b843e022442cba4d056cd44"}],"oslo_concurrency/tests/unit/test_processutils.py":[{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"8089328fcb85a82a981dbfb17195e16f2a615a58","unresolved":false,"context_lines":[{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        out, err \u003d processutils.execute(\u0027/usr/bin/env\u0027, env_variables\u003denv_vars)"},{"line_number":297,"context_line":"        self.assertEqual(type(out), str)"},{"line_number":298,"context_line":"        self.assertEqual(type(err), str)"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        self.assertIn(\u0027SUPER_UNIQUE_VAR\u003dThe answer is 42\u0027, out)"},{"line_number":301,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_ae8ac417","line":298,"updated":"2015-02-17 18:08:01.000000000","message":"nit: assertIsInstance would do this.","commit_id":"155922ee294a5d39949bd6bdfd19c6c0be2d560b"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"02a694a708db31b7564ab90ff1b38a98689a74b5","unresolved":false,"context_lines":[{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        out, err \u003d processutils.execute(\u0027/usr/bin/env\u0027, env_variables\u003denv_vars)"},{"line_number":297,"context_line":"        self.assertEqual(type(out), str)"},{"line_number":298,"context_line":"        self.assertEqual(type(err), str)"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        self.assertIn(\u0027SUPER_UNIQUE_VAR\u003dThe answer is 42\u0027, out)"},{"line_number":301,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa963961_f8777500","line":298,"in_reply_to":"da86d52c_ae8ac417","updated":"2015-03-27 10:29:08.000000000","message":"Done","commit_id":"155922ee294a5d39949bd6bdfd19c6c0be2d560b"}]}
