1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-03 11:03:32 +02:00

Removed polyglot codepoint_to_chr

This commit is contained in:
2020-04-20 19:29:05 +02:00
parent 128705f258
commit eac0b98d6f
11 changed files with 20 additions and 25 deletions

View File

@@ -17,7 +17,7 @@ from ebook_converter import (isbytestring, as_unicode, get_types_map)
from ebook_converter.ebooks.oeb.parse_utils import barename, XHTML_NS, namespace, XHTML, parse_html, NotHTML
from ebook_converter.utils.cleantext import clean_xml_chars
from ebook_converter.utils.short_uuid import uuid4
from ebook_converter.polyglot.builtins import iteritems, string_or_bytes, itervalues, codepoint_to_chr
from ebook_converter.polyglot.builtins import iteritems, string_or_bytes, itervalues
from ebook_converter.polyglot.urllib import unquote as urlunquote
@@ -431,7 +431,7 @@ def serialize(data, media_type, pretty_print=False):
return bytes(data)
ASCII_CHARS = frozenset(codepoint_to_chr(x) for x in range(128))
ASCII_CHARS = frozenset(chr(x) for x in range(128))
UNIBYTE_CHARS = frozenset(x.encode('ascii') for x in ASCII_CHARS)
USAFE = ('ABCDEFGHIJKLMNOPQRSTUVWXYZ'
'abcdefghijklmnopqrstuvwxyz'