GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — TaskGroup fails to cancel tasks pending creation, if that task starts a failing task · Issue #128550 · python/cpython Closed Closed Copy link Labels stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-asynciotype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportBug description:this 'deadlocks' on eager tasks, but raises an EG as expected on regular 'lazy' tasks. import sys import asyncio if sys.version_info >= (3, 13): from asyncio import EventLoop elif sys.platform == "win32": from asyncio import ProactorEventLoop as EventLoop else: from asyncio import SelectorEventLoop as EventLoop def loop_factory(): loop = EventLoop() loop.set_task_factory(asyncio.eager_task_factory) return loop async def main(): async with asyncio.TaskGroup() as tg: async def third_task(): raise RuntimeError("third task failed") async def second_task(): tg.create_task(third_task()) await asyncio.Event().wait() tg.create_task(second_task()) # asyncio.run(main()) asyncio.run(main(), loop_factory=loop_factory) CPython versions tested on:3.12, 3.13, 3.14 Operating systems tested on:Linux Linked PRsActivity
MetadataMetadataAssigneesLabelsstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-asynciotype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error Projects
MilestoneRelationshipsDevelopmentIssue actions | ||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |