<!-- If you're new to Python and you're not sure whether what you're experiencing is a bug, the CPython issue tracker is not the right place to seek help. Consider the following options instead: - reading the Python tutorial: https://docs.python.org/3/tutorial/ - posting in the "Users" category on discuss.python.org: https://discuss.python.org/c/users/7 - emailing the Python-list mailing list: https://mail.python.org/mailman/listinfo/python-list - searching our issue tracker (https://github.com/python/cpython/issues) to see if your problem has already been reported --> # Bug report ```python 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()) ```