)]}'
{"oslo/utils/strutils.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"b18fd10c05347bf4700bce91913806fcda48b978","unresolved":false,"context_lines":[{"line_number":224,"context_line":"    \"\"\""},{"line_number":225,"context_line":"    is_bytes \u003d isinstance(message, six.binary_type)"},{"line_number":226,"context_line":"    if is_bytes:"},{"line_number":227,"context_line":"        message \u003d message.decode(\u0027latin-1\u0027)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    # NOTE(ldbragst): Check to see if anything in message contains any key"},{"line_number":230,"context_line":"    # specified in _SANITIZE_KEYS, if not then just return the message since"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_130ef932","line":227,"updated":"2014-11-27 11:50:55.000000000","message":"If we wanted to decode, I think it\u0027d be better to use ascii if anything.","commit_id":"8e840c467dc23aeabd76bd75e4b0f996cf33d932"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"c3c86583307bdefdb1d48bc13bd46843b51f7264","unresolved":false,"context_lines":[{"line_number":224,"context_line":"    \"\"\""},{"line_number":225,"context_line":"    is_bytes \u003d isinstance(message, six.binary_type)"},{"line_number":226,"context_line":"    if is_bytes:"},{"line_number":227,"context_line":"        message \u003d message.decode(\u0027latin-1\u0027)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    # NOTE(ldbragst): Check to see if anything in message contains any key"},{"line_number":230,"context_line":"    # specified in _SANITIZE_KEYS, if not then just return the message since"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_ee518064","line":227,"in_reply_to":"5a890539_130ef932","updated":"2014-11-27 12:47:45.000000000","message":"To understand my change, the goal is to use mask_password() on Popen.stdout on Python 3, which is bytes by default, in processutils of oslo-incubator. See:\nhttps://review.openstack.org/#/c/137604/\n\nIf you use ASCII and the process returns any non-ASCII character, the function will fail.\n\nUsing ISO-8859-1 (latin-1) is a trick to not have to duplicate the whole function to have two paths: bytes and unicode. A similar trick was using the urllib.parse module of Python 3 to not duplicate the code:\nhttps://hg.python.org/cpython/file/1c97f373fe49/Lib/urllib/parse.py#l78","commit_id":"8e840c467dc23aeabd76bd75e4b0f996cf33d932"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"043e6855d4ae85d732450560631012b1b8fb8130","unresolved":false,"context_lines":[{"line_number":224,"context_line":"    \"\"\""},{"line_number":225,"context_line":"    is_bytes \u003d isinstance(message, six.binary_type)"},{"line_number":226,"context_line":"    if is_bytes:"},{"line_number":227,"context_line":"        message \u003d message.decode(\u0027latin-1\u0027)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    # NOTE(ldbragst): Check to see if anything in message contains any key"},{"line_number":230,"context_line":"    # specified in _SANITIZE_KEYS, if not then just return the message since"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_ce384440","line":227,"in_reply_to":"5a890539_130ef932","updated":"2014-11-27 12:45:37.000000000","message":"ascii decoding will fail on bytes 128-255\nin this case we should use \u0027latin-1\u0027 because it never fails","commit_id":"8e840c467dc23aeabd76bd75e4b0f996cf33d932"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"4bf04484b7e282b727f2c5fe3d5a9dfa369beb90","unresolved":false,"context_lines":[{"line_number":224,"context_line":"    \"\"\""},{"line_number":225,"context_line":"    is_bytes \u003d isinstance(message, six.binary_type)"},{"line_number":226,"context_line":"    if is_bytes:"},{"line_number":227,"context_line":"        message \u003d message.decode(\u0027latin-1\u0027)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    # NOTE(ldbragst): Check to see if anything in message contains any key"},{"line_number":230,"context_line":"    # specified in _SANITIZE_KEYS, if not then just return the message since"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_b45eea77","line":227,"in_reply_to":"5a890539_ee518064","updated":"2014-11-27 14:19:09.000000000","message":"\"If you use ASCII and the process returns any non-ASCII character, the function will fail.\"\n\nFortunately! There\u0027s no way to guess if the bytes are latin-1 or whatever else. So IMHO this should be ascii, or the app has to provides correctly decoded string, that\u0027s it.","commit_id":"8e840c467dc23aeabd76bd75e4b0f996cf33d932"}]}
