From 6439a015c9550bc7a99641fbac7cb4fd83e8572a Mon Sep 17 00:00:00 2001 From: zevaryx Date: Tue, 21 Jun 2022 14:51:03 -0600 Subject: [PATCH] Add nest-asyncio --- poetry.lock | 14 +++++++++++++- pyproject.toml | 1 + run.py | 4 ++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index 57d4285..cf0685a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -570,6 +570,14 @@ category = "main" optional = false python-versions = "*" +[[package]] +name = "nest-asyncio" +version = "1.5.5" +description = "Patch asyncio to allow nested event loops" +category = "main" +optional = false +python-versions = ">=3.5" + [[package]] name = "numpy" version = "1.22.4" @@ -1159,7 +1167,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest- [metadata] lock-version = "1.1" python-versions = "^3.10" -content-hash = "c1a2a46f16c8966603c1e92166f4ad1e243b4425752f1cf8e78d2a421aacd0b9" +content-hash = "549486089ef65c69b0932e799efdbb0d22d6631d925de845ec4b6ba98d57c527" [metadata.files] aiofile = [ @@ -1558,6 +1566,10 @@ nanoid = [ {file = "nanoid-2.0.0-py3-none-any.whl", hash = "sha256:90aefa650e328cffb0893bbd4c236cfd44c48bc1f2d0b525ecc53c3187b653bb"}, {file = "nanoid-2.0.0.tar.gz", hash = "sha256:5a80cad5e9c6e9ae3a41fa2fb34ae189f7cb420b2a5d8f82bd9d23466e4efa68"}, ] +nest-asyncio = [ + {file = "nest_asyncio-1.5.5-py3-none-any.whl", hash = "sha256:b98e3ec1b246135e4642eceffa5a6c23a3ab12c82ff816a92c612d68205813b2"}, + {file = "nest_asyncio-1.5.5.tar.gz", hash = "sha256:e442291cd942698be619823a17a86a5759eabe1f8613084790de189fe9e16d65"}, +] numpy = [ {file = "numpy-1.22.4-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:ba9ead61dfb5d971d77b6c131a9dbee62294a932bf6a356e48c75ae684e635b3"}, {file = "numpy-1.22.4-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:1ce7ab2053e36c0a71e7a13a7475bd3b1f54750b4b433adc96313e127b870887"}, diff --git a/pyproject.toml b/pyproject.toml index d0dca4d..9c455c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,7 @@ aioredis = "^2.0.1" naff = { version = "^1.2.0", extras = ["orjson"] } nafftrack = {git = "https://github.com/artem30801/nafftrack.git", rev = "master"} ansitoimg = "^2022.1" +nest-asyncio = "^1.5.5" [tool.poetry.dev-dependencies] black = {version = "^22.3.0", allow-prereleases = true} diff --git a/run.py b/run.py index d53ee79..0b964f9 100755 --- a/run.py +++ b/run.py @@ -1,7 +1,11 @@ """Main run file for J.A.R.V.I.S.""" import asyncio +import nest_asyncio + from jarvis import run +nest_asyncio.apply() + if __name__ == "__main__": asyncio.run(run())