https://docs.python.org/3/library/asyncio-task.html#shielding-from-cancellation

In this endpoint there is a typo 

Namely,


The statement:

task = asyncio.create_task(something())
res = await shield(task)

is equivalent to:

res = await something()

should be 

The statement:

task = asyncio.create_task(something())
res = await shield(task)

is equivalent to:

res = await shield(something())

Respectfully,

Dyussenov Nuraly