◐ Shell
clean mode source ↗

Message 351482 - Python tracker

We want to add TaskGroups to asyncio (a similar concept to Trio's nurseries).  TaskGroups use the `async with` statement to clearly define where Tasks are created and at which point they are expected to be completed or destroyed.

asyncio.gather(), asyncio.as_completed(), and few others will be considered legacy APIs after we implement TaskGroups.  Implementing rate limiting on top of TaskGroups is easier and more reliable.

I'd really prefer to keep as_completed() and especially gather() as is, as I consider them a bit broken already.