diff --git a/sanic/app.py b/sanic/app.py index 5d1e5547..1704aa67 100644 --- a/sanic/app.py +++ b/sanic/app.py @@ -206,7 +206,7 @@ class Sanic(BaseSanic, metaclass=TouchUpMeta): if self.config.REGISTER: self.__class__.register_app(self) - if not self.config.NO_UVLOOP: + if self.config.USE_UVLOOP: use_uvloop() self.router.ctx.app = self diff --git a/sanic/config.py b/sanic/config.py index 310a289b..847815ab 100644 --- a/sanic/config.py +++ b/sanic/config.py @@ -27,7 +27,6 @@ DEFAULT_CONFIG = { "GRACEFUL_SHUTDOWN_TIMEOUT": 15.0, # 15 sec "KEEP_ALIVE_TIMEOUT": 5, # 5 seconds "KEEP_ALIVE": True, - "NO_UVLOOP": False, "PROXIES_COUNT": None, "REAL_IP_HEADER": None, "REGISTER": True, @@ -37,6 +36,7 @@ DEFAULT_CONFIG = { "REQUEST_MAX_SIZE": 100000000, # 100 megabytes "REQUEST_TIMEOUT": 60, # 60 seconds "RESPONSE_TIMEOUT": 60, # 60 seconds + "USE_UVLOOP": False, "WEBSOCKET_MAX_SIZE": 2 ** 20, # 1 megabyte "WEBSOCKET_PING_INTERVAL": 20, "WEBSOCKET_PING_TIMEOUT": 20, @@ -52,7 +52,6 @@ class Config(dict): GRACEFUL_SHUTDOWN_TIMEOUT: float KEEP_ALIVE_TIMEOUT: int KEEP_ALIVE: bool - NO_UVLOOP: bool PROXIES_COUNT: Optional[int] REAL_IP_HEADER: Optional[str] REGISTER: bool @@ -63,6 +62,7 @@ class Config(dict): REQUEST_TIMEOUT: int RESPONSE_TIMEOUT: int SERVER_NAME: str + USE_UVLOOP: bool WEBSOCKET_MAX_SIZE: int WEBSOCKET_PING_INTERVAL: int WEBSOCKET_PING_TIMEOUT: int