From bab98dc8b9aef0b49237216942ab96fb7a94a229 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Thu, 4 Nov 2021 15:03:23 +0200 Subject: [PATCH] update quick start demo codes (#6240) (#6249) * update quick start demo codes * add CHANGES Co-authored-by: Lynwee.Hou (cherry picked from commit 9c316f12755ce4e1904337478760d926a0ff2cfb) Co-authored-by: d4x1 <1507509064@qq.com> Co-authored-by: Andrew Svetlov --- CHANGES/6240.doc | 1 + docs/client_quickstart.rst | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) create mode 100644 CHANGES/6240.doc diff --git a/CHANGES/6240.doc b/CHANGES/6240.doc new file mode 100644 index 00000000000..079548a93ca --- /dev/null +++ b/CHANGES/6240.doc @@ -0,0 +1 @@ +update quick starter demo codes. diff --git a/docs/client_quickstart.rst b/docs/client_quickstart.rst index 549c455ac9f..ade3678e18e 100644 --- a/docs/client_quickstart.rst +++ b/docs/client_quickstart.rst @@ -33,9 +33,7 @@ Now, let's try to get a web-page. For example let's query print(resp.status) print(await resp.text()) - - loop = asyncio.get_event_loop() - loop.run_until_complete(main()) + asyncio.run(main) Now, we have a :class:`ClientSession` called ``session`` and a :class:`ClientResponse` object called ``resp``. We can get all the