Skip to content
This repository was archived by the owner on May 31, 2021. It is now read-only.

Commit 59291dd

Browse files
committed
fix errors
1 parent 5843ae2 commit 59291dd

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
# Add any paths that contain custom static files (such as style sheets) here,
179179
# relative to this directory. They are copied after the builtin static files,
180180
# so a file named "default.css" will overwrite the builtin "default.css".
181-
html_static_path = ['_static']
181+
html_static_path = ['_build/html/_static']
182182

183183
# Add any extra paths that contain custom files (such as robots.txt or
184184
# .htaccess) here, relative to this directory. These files are copied

hello_world.rst

+7-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ This is a series of examples showing the basics of how to write
99
Simple coroutine
1010
----------------
1111

12-
This example uses the :py:meth:`asyncio.BaseEventLoop.run_until_complete`
12+
This example uses the :py:meth:`asyncio.AbstractEventLoop.run_until_complete`
1313
method to schedule a simple function that will wait one second, print
1414
``hello`` and then finish.
1515

16-
Because it is launched with :py:meth:`run_until_complete`,
16+
Because it is launched with :py:meth:`asyncio.AbstractEventLoop.run_until_complete`,
1717
the :term:`event loop <event loop>` itself
1818
will terminate once the :term:`coroutine <coroutine>` is completed.
1919

@@ -49,7 +49,9 @@ all scheduled :term:`tasks <task>` could execute, which results in a warning.
4949

5050
Warning::
5151

52-
Task was destroyed but it is pending!
53-
task: <Task pending coro=<say() done, defined at examples/loop_stop.py:3>
54-
wait_for=<Future pending cb=[Task._wakeup()]>>
52+
.. highlight:: none
53+
54+
Task was destroyed but it is pending!
55+
task: <Task pending coro=<say() done, defined at examples/loop_stop.py:3>
56+
wait_for=<Future pending cb=[Task._wakeup()]>>
5557

webscraper.rst

+12
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ This is a very simple web server. (See below for the code.)
2121
Its only purpose is to wait for a given amount of time.
2222
Test it by running it from the command line::
2323

24+
.. highlight:: bash
25+
2426
$ python simple_server.py
2527

2628
It will answer like this::
@@ -125,6 +127,8 @@ difference provides the elapsed run time.
125127

126128
Finally, we can run our client::
127129

130+
.. highlight:: bash
131+
128132
$ python synchronous_client.py
129133

130134
and get this output::
@@ -254,6 +258,8 @@ This means, we wait until each pages has been retrieved before asking for
254258
the next.
255259
Let's run it from the command-line to see what happens::
256260

261+
.. highlight:: bash
262+
257263
$ async_client_blocking.py
258264
It took 11.06 seconds for a total waiting time of 11.00.
259265
Waited for 1.00 seconds.
@@ -320,6 +326,8 @@ So, for a list with 100 tasks it would mean:
320326
321327
Let's see if we got any faster::
322328

329+
.. highlight:: bash
330+
323331
$ async_client_nonblocking.py
324332
It took 5.08 seconds for a total waiting time of 11.00.
325333
Waited for 1.00 seconds.
@@ -359,6 +367,8 @@ The library aiohttp_ allows to write HTTP client and server applications,
359367
using a high-level approach.
360368
Install with::
361369

370+
.. highlight:: bash
371+
362372
$ pip install aiohttp
363373

364374

@@ -409,6 +419,8 @@ to ``fetch_page()`` as the first argument.
409419

410420
Finally, we run this program::
411421

422+
.. highlight:: bash
423+
412424
$ python aiohttp_client.py
413425
It took 5.04 seconds for a total waiting time of 11.00.
414426
Waited for 1.00 seconds.

0 commit comments

Comments
 (0)