"sanic tried to use loop.add_signal_handler but it is not implemented on this platform" windows 10

"sanic tried to use loop.add_signal_handler but it is not implemented on this platform" windows 10

我正在尝试 运行 windows 10 上的基本 sanic 应用程序。

from sanic import Sanic
from sanic.response import json
app = Sanic('just-try')

@app.route("/")
async def test(request):
  return json({"hello": "world"})

if __name__ == "__main__":
  app.run(host="0.0.0.0", port=8000,workers=1)

但它只是卡在那里显示此警告

sanic tried to use loop.add_signal_handler but it is not implemented on this platform

sanic - 19.12.2

python - 3.7.6(蟒蛇环境)

OS - windows 10

由 运行ning-

安装了 sanic
set SANIC_NO_UVLOOP=true
set SANIC_NO_UJSON=true
pip install sanic

注意:我必须手动下载 aiofiles、hpack、hyperframe、h11、rfc3986 和 hstspreload 并将其复制到站点包文件夹。否则得到 import error.

需要从 git 安装 sanic。

set SANIC_NO_UVLOOP=true
set SANIC_NO_UJSON=true
pip install git+https://github.com/huge-success/sanic.git

他们将发布 20.3 版,修复了 windows 相关错误。