1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-03-13 21:25:54 +01:00

Removed polyglots unicode_type usage

This commit is contained in:
2020-04-20 19:25:28 +02:00
parent ef7e2b10be
commit 128705f258
130 changed files with 657 additions and 716 deletions

View File

@@ -1,4 +1,3 @@
from ebook_converter.polyglot.builtins import unicode_type
from ebook_converter.constants import ispy3
@@ -21,7 +20,7 @@ def create_encoder(for_json=False):
def encoder(obj):
if isinstance(obj, datetime):
return encoded(0, unicode_type(obj.isoformat()), ExtType)
return encoded(0, str(obj.isoformat()), ExtType)
if isinstance(obj, (set, frozenset)):
return encoded(1, tuple(obj), ExtType)
if getattr(obj, '__calibre_serializable__', False):