-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Description
The codecs.Codec.decode()
and encode()
APIs return a tuple, while the current code is assuming its first item:
Lines 17 to 18 in e7f1a02
encoded = settings.get_text_codec().encode(obj) | |
cpython.PyBytes_AsStringAndSize(encoded, cstr, size) |
Lines 42 to 43 in e7f1a02
bytes = cpython.PyBytes_FromStringAndSize(data, len) | |
return settings.get_text_codec().decode(bytes) |
This leads to issues in asyncpg when client_encoding
is not UTF-8 - all text results are tuples, while text arguments fail to be encoded with errors.
Metadata
Metadata
Assignees
Labels
No labels