-
Laurent Bachelier authored
There were several issues: - json.dumps does not have an encoding parameter in Python 3. - Forcing the json.dumps encoding to ASCII prevents any non-ASCII character in the message. To avoid having non-ASCII characters in the *dump*, the only needed parameter is ensure_ascii=True which is the default. - To coerce a str to bytes in Python 3, an encoding must be provided even when it only contains ASCII characters. The solution is to use the encode() method which is available in both versions.
Laurent Bachelier authoredThere were several issues: - json.dumps does not have an encoding parameter in Python 3. - Forcing the json.dumps encoding to ASCII prevents any non-ASCII character in the message. To avoid having non-ASCII characters in the *dump*, the only needed parameter is ensure_ascii=True which is the default. - To coerce a str to bytes in Python 3, an encoding must be provided even when it only contains ASCII characters. The solution is to use the encode() method which is available in both versions.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.