Closed
Description
Bug report
import asyncio
class MyException(Exception):
pass
async def async_fn():
await asyncio.sleep(0)
raise MyException
async def main():
task = asyncio.current_task()
try:
async with asyncio.TaskGroup() as tg:
tg.create_task(async_fn())
try:
await asyncio.sleep(1)
except asyncio.CancelledError:
pass
except* MyException:
print("done!")
print(f"{task.cancelling()=} should be 0")
asyncio.run(main())
Metadata
Metadata
Assignees
Projects
Status
Done