Fixed #20984 -- Stopped decoding bytes in sqlite3 adapter on Python 3
Thanks lvella at gmail.com for the report.
This commit is contained in:
parent
112799e9a8
commit
169637649b
|
@ -84,8 +84,9 @@ Database.register_converter(str("decimal"), decoder(util.typecast_decimal))
|
||||||
|
|
||||||
Database.register_adapter(datetime.datetime, adapt_datetime_with_timezone_support)
|
Database.register_adapter(datetime.datetime, adapt_datetime_with_timezone_support)
|
||||||
Database.register_adapter(decimal.Decimal, util.rev_typecast_decimal)
|
Database.register_adapter(decimal.Decimal, util.rev_typecast_decimal)
|
||||||
Database.register_adapter(str, lambda s: s.decode('utf-8'))
|
if not six.PY3:
|
||||||
Database.register_adapter(SafeBytes, lambda s: s.decode('utf-8'))
|
Database.register_adapter(str, lambda s: s.decode('utf-8'))
|
||||||
|
Database.register_adapter(SafeBytes, lambda s: s.decode('utf-8'))
|
||||||
|
|
||||||
|
|
||||||
class DatabaseFeatures(BaseDatabaseFeatures):
|
class DatabaseFeatures(BaseDatabaseFeatures):
|
||||||
|
|
Loading…
Reference in New Issue