)]}'
{"bandit/formatters/xml.py":[{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"35f500d173296b14766a23b58bb49cb54129c0d8","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    else:"},{"line_number":79,"context_line":"        outfile \u003d sys.stdout.buffer"},{"line_number":80,"context_line":"    if filename is not None:"},{"line_number":81,"context_line":"        outfile \u003d open(filename, \"wb\")"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    tree.write(outfile, encoding\u003d\u0027utf-8\u0027, xml_declaration\u003dTrue)"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a7e1126_2415db9a","line":81,"range":{"start_line":81,"start_character":34,"end_line":81,"end_character":37},"updated":"2015-12-22 07:06:09.000000000","message":"So why do we open as binary anyway?  I would expect \u0027wU\u0027 might be better since the encoding should be utf-8.","commit_id":"571e03c76d0f255e6aa35a647647342ee63f2235"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"be76bc2e059eeb697ed91d2970b5169646f73e02","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    else:"},{"line_number":79,"context_line":"        outfile \u003d sys.stdout.buffer"},{"line_number":80,"context_line":"    if filename is not None:"},{"line_number":81,"context_line":"        outfile \u003d open(filename, \"wb\")"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    tree.write(outfile, encoding\u003d\u0027utf-8\u0027, xml_declaration\u003dTrue)"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a7e1126_6ad5ede2","line":81,"range":{"start_line":81,"start_character":34,"end_line":81,"end_character":37},"in_reply_to":"3a7e1126_2415db9a","updated":"2015-12-22 07:30:57.000000000","message":"`tree.write(out, ...)` requires `out` to be a binary file-like object in py3. This kind of makes sense if you have to pass the `encoding` - if it was a text file, `tree` wouldn\u0027t care about encoding.","commit_id":"571e03c76d0f255e6aa35a647647342ee63f2235"}]}
