diff --git a/src/webargs/aiohttpparser.py b/src/webargs/aiohttpparser.py index 00660614..774e1b9a 100644 --- a/src/webargs/aiohttpparser.py +++ b/src/webargs/aiohttpparser.py @@ -2,7 +2,6 @@ Example: :: - import asyncio from aiohttp import web from webargs import fields @@ -12,9 +11,8 @@ hello_args = {"name": fields.Str(required=True)} - @asyncio.coroutine @use_args(hello_args) - def index(request, args): + async def index(request, args): return web.Response(body="Hello {}".format(args["name"]).encode("utf-8"))