DeprecationWarning: loop argument is deprecated app = web.Application(loop=loop)
DeprecationWarning: Application.make_handler(…) is deprecated, use AppRunner API instead srv = await loop.create_server(app.make_handler(), ‘127.0.0.1’, 8000)
出错代码
asyncdefinit(loop):
app = web.Application(loop=loop)
app.router.add_route('GET','/', index)
app.router.add_route('GET','/hello/{name}', hello)
srv =await loop.create_server(app.make_handler(),'127.0.0.1',8000)print("Server started at http://127.0.0.1:8000...")return srv