Fix Python 3.10 collections import

This commit is contained in:
vslg 2021-11-19 13:12:42 -03:00
parent 9a4ababd9a
commit 4cffbaa68d

View File

@ -4,7 +4,6 @@
"""Various utilities that are used throughout the package."""
import asyncio
import collections
import html
import inspect
import io
@ -43,6 +42,11 @@ else:
from async_generator import asynccontextmanager
current_task = asyncio.Task.current_task
if sys.version_info >= (3, 10):
import collections.abc as collections
else:
import collections
Size = Tuple[int, int]
BytesOrPIL = Union[bytes, PILImage.Image]
auto = autostr