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 — asyncio.wait leaks completed tasks via the 3.14 await-graph when racing a long-lived Future (missing `future_discard_from_awaited_by`) · Issue #152569 · python/cpython Closed Labels 3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesstdlibStandard 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:On Python 3.14, This is the same omission already fixed for import asyncio, gc async def main(): loop = asyncio.get_running_loop() immortal = loop.create_future() # never resolves (e.g. a connection-close signal) def done_tasks(): gc.collect() return sum(1 for o in gc.get_objects() if isinstance(o, asyncio.Task) and o.done()) async def race_once(): await asyncio.wait( {asyncio.ensure_future(asyncio.sleep(0)), immortal}, return_when=asyncio.FIRST_COMPLETED, ) base = done_tasks() for _ in range(1000): await asyncio.create_task(race_once()) print("retained done tasks:", done_tasks() - base) immortal.cancel() asyncio.run(main()) Related
CPython versions tested on:CPython main branch, 3.14 Operating systems tested on:macOS Linked PRs
Activity
MetadataMetadataAssigneesLabels3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesstdlibStandard 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. |