Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc fix: Response does not take positional parameters. #2815

Merged
merged 1 commit into from
Mar 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/web_advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ For example the following snippet is not safe::
async def handler(request):
await asyncio.shield(write_to_redis(request))
await asyncio.shield(write_to_postgres(request))
return web.Response('OK')
return web.Response(text='OK')

Cancellation might be occurred just after saving data in REDIS,
``write_to_postgres`` will be not called.
Expand All @@ -53,7 +53,7 @@ spawned tasks::

async def handler(request):
request.loop.create_task(write_to_redis(request))
return web.Response('OK')
return web.Response(text='OK')

In this case errors from ``write_to_redis`` are not awaited, it leads
to many asyncio log messages *Future exception was never retrieved*
Expand Down
2 changes: 1 addition & 1 deletion docs/web_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ The common case for sending an answer from
:class:`Response` instance::

def handler(request):
return Response("All right!")
return Response(text="All right!")

Response classes are :obj:`dict` like objects,
allowing them to be used for :ref:`sharing
Expand Down