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 — dict.fromkeys() GC-tracks a non-GC object returned by a subclass constructor (3.15 regression) · Issue #161690 · python/cpython Open Labels 3.15bugs and security fixesbugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionCrash reportWhen a dict subclass's import gc xs = [bytes(40) for _ in range(2000)] class D(dict): __new__ = lambda cls, *a: xs[1000] r = D.fromkeys([]) assert r is xs[1000] print("fromkeys returned", type(r).__name__, flush=True) gc.collect() print("survived gc.collect()", flush=True) Recorded on 3.15.2 and main: prints Cause: Objects/dictobject.c:3430 accepts any object returned by CPython versions tested on:3.15, CPython main branch Operating systems tested on:Linux Output from running 'python -VV' on the command line:Python 3.15.2 (tags/v3.15.2:5e58eaa, Nov 5 2026, 20:20:36) [GCC 11.4.0] Found while building a Lean 4 model of CPython (https://broyojo.com/python-formalization/). AI tools (Claude and Codex) helped investigate the findings and prepare this report. The examples were rerun on CPython 3.15.2 and main, and the report received technical review. Record: dictset-fromkeys-gc-track-non-gc Activity
MetadataMetadataAssigneesLabels3.15bugs and security fixesbugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue 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. |