[issue33255] json.dumps has different behaviour if encoding='utf-8' or encoding='utf8'

2018-04-29 Thread Nicolás Hatcher
Nicolás Hatcher <nicoli...@gmail.com> added the comment: Hi Sehriy, I am ok with that change. I think it makes much more sense, but I also think it will break people's codes. At least with the simplest fix in which: >>> json.dumps({"g"}, ensure_ascii=False) u'"

[issue33255] json.dumps has different behaviour if encoding='utf-8' or encoding='utf8'

2018-04-18 Thread Nicolás Hatcher
Change by Nicolás Hatcher <nicoli...@gmail.com>: -- keywords: +patch pull_requests: +6217 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33255] json.dumps has different behaviour if encoding='utf-8' or encoding='utf8'

2018-04-10 Thread Nicolás Hatcher
New submission from Nicolás Hatcher <nicoli...@gmail.com>: Hey I'm new here, so please let me know what incorrect things I am doing! I _think_ `json.dumps(o, ensure_ascii=False)` is doing the wrong thing when `o` has both unicode and str keys/values. For instance: ``` import json