Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Bump canonicaljson to version 1.4.0 (#8262)
Browse files Browse the repository at this point in the history
The version 1.3.0 has a bug with unicode charecters:
```
>>> from canonicaljson import encode_pretty_printed_json
>>> encode_pretty_printed_json({'a': 'à'})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/erdnaxeli/.pyenv/versions/3.6.7/lib/python3.6/site-packages/canonicaljson.py", line 96, in encode_pretty_printed_json
    return _pretty_encoder.encode(json_object).encode("ascii")
UnicodeEncodeError: 'ascii' codec can't encode character '\xe0' in position 12: ordinal not in range(128)
```

Signed-off-by: Alexandre Morignot <erdnaxeli@cervoi.se>

Co-authored-by: Alexandre Morignot <erdnaxeli@cervoi.se>
  • Loading branch information
erdnaxeli and erdnaxeli authored Sep 7, 2020
1 parent 5b452df commit 7586fdf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/8262.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade canonicaljson to version 1.4.0 to fix an unicode encoding issue.
2 changes: 1 addition & 1 deletion synapse/python_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"jsonschema>=2.5.1",
"frozendict>=1",
"unpaddedbase64>=1.1.0",
"canonicaljson>=1.3.0",
"canonicaljson>=1.4.0",
# we use the type definitions added in signedjson 1.1.
"signedjson>=1.1.0",
"pynacl>=1.2.1",
Expand Down

0 comments on commit 7586fdf

Please sign in to comment.