add hacky patch for python 3.10

This commit is contained in:
Luna 2021-11-01 21:48:14 -03:00
parent b6b07073bc
commit b0096f119a
1 changed files with 6 additions and 0 deletions

6
run.py
View File

@ -107,6 +107,12 @@ from litecord.gateway.gateway import websocket_handler
from litecord.utils import LitecordJSONEncoder from litecord.utils import LitecordJSONEncoder
# == HACKY PATCH ==
# this MUST be removed once Hypercorn gets py3.10 support.
from asyncio import start_server as _start_server
asyncio.start_server = lambda *args, loop=None, **kwargs: _start_server(*args, **kwargs)
# setup logbook # setup logbook
handler = StreamHandler(sys.stdout, level=logbook.INFO) handler = StreamHandler(sys.stdout, level=logbook.INFO)
handler.push_application() handler.push_application()