This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Windows OS-specific HACK to silence exception thrown on event loop being closed | |
# as part of the asyncio library's proactor | |
# Hack sourced from an issue on the aiohttp library: | |
# https://github.com/aio-libs/aiohttp/issues/4324#issuecomment-733884349 | |
# This assumes you have the asyncio library installed | |
import platform | |
if platform.system() == 'Windows': | |
from functools import wraps | |
from asyncio.proactor_events import _ProactorBasePipeTransport |