[New-bugs-announce] [issue44815] asyncio.gather no DeprecationWarning if task are passed

Sam Bull report at bugs.python.org
Mon Aug 2 14:29:57 EDT 2021


New submission from Sam Bull <m6f6g7 at sambull.org>:

When calling asyncio.gather() a DeprecationWarning is only emitted if no tasks are passed (which is probably the exceptional case, rather than the standard one).

This has resulted in us missing this deprecated argument in aiohttp until we received a bug report from a user trying it out against the 3.10 beta.

For some reason the warning only appears under a `if not coros_or_futures:` block. I think it should be run regardless:
https://github.com/python/cpython/blob/3.9/Lib/asyncio/tasks.py#L757

----------
components: asyncio
messages: 398794
nosy: asvetlov, dreamsorcerer, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.gather no DeprecationWarning if task are passed
versions: Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44815>
_______________________________________


More information about the New-bugs-announce mailing list