From ccba76846feb04ed94258796c0568d6133e8a828 Mon Sep 17 00:00:00 2001 From: euri10 Date: Fri, 18 Dec 2020 15:08:39 +0100 Subject: [PATCH 1/3] Change gunicorn worker to use loop and http protocols automatically --- uvicorn/workers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uvicorn/workers.py b/uvicorn/workers.py index 1ac036372..4cad6fef7 100644 --- a/uvicorn/workers.py +++ b/uvicorn/workers.py @@ -4,6 +4,7 @@ from gunicorn.workers.base import Worker from uvicorn.config import Config +from uvicorn.loops.auto import auto_loop_setup from uvicorn.main import Server @@ -13,7 +14,7 @@ class UvicornWorker(Worker): rather than a WSGI callable. """ - CONFIG_KWARGS = {"loop": "uvloop", "http": "httptools"} + CONFIG_KWARGS = {"loop": "auto", "http": "auto"} def __init__(self, *args, **kwargs): super(UvicornWorker, self).__init__(*args, **kwargs) From c856a4d15e03e145c54a8e07d52ce734156366fa Mon Sep 17 00:00:00 2001 From: euri10 Date: Fri, 18 Dec 2020 15:18:52 +0100 Subject: [PATCH 2/3] Change gunicorn worker to use loop and http protocols automatically --- uvicorn/workers.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/uvicorn/workers.py b/uvicorn/workers.py index 4cad6fef7..58f29655c 100644 --- a/uvicorn/workers.py +++ b/uvicorn/workers.py @@ -4,7 +4,6 @@ from gunicorn.workers.base import Worker from uvicorn.config import Config -from uvicorn.loops.auto import auto_loop_setup from uvicorn.main import Server @@ -13,7 +12,6 @@ class UvicornWorker(Worker): A worker class for Gunicorn that interfaces with an ASGI consumer callable, rather than a WSGI callable. """ - CONFIG_KWARGS = {"loop": "auto", "http": "auto"} def __init__(self, *args, **kwargs): From 8c011722214f3393b5b8444100ad0fc80c6d4019 Mon Sep 17 00:00:00 2001 From: euri10 Date: Fri, 18 Dec 2020 15:42:15 +0100 Subject: [PATCH 3/3] Lint --- uvicorn/workers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/uvicorn/workers.py b/uvicorn/workers.py index 58f29655c..e74065da0 100644 --- a/uvicorn/workers.py +++ b/uvicorn/workers.py @@ -12,6 +12,7 @@ class UvicornWorker(Worker): A worker class for Gunicorn that interfaces with an ASGI consumer callable, rather than a WSGI callable. """ + CONFIG_KWARGS = {"loop": "auto", "http": "auto"} def __init__(self, *args, **kwargs):