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 — Infinite Loop in `typing.get_type_hints()` via Circular `__wrapped__` · Issue #146553 · python/cpython Closed Labels stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-typingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportBug description:
Minimal Reproducerimport typing def f(): pass f.__wrapped__ = f # direct self-reference typing.get_type_hints(f) # hangs forever - process must be killed Longer cycle: def a(): pass def b(): pass a.__wrapped__ = b b.__wrapped__ = a # mutual cycle typing.get_type_hints(a) # also hangs forever Root CauseFile: # Find globalns for the unwrapped object. while hasattr(nsobj, '__wrapped__'): nsobj = nsobj.__wrapped__ # NO cycle detection The loop walks the Comparison with
|
| You are visitor 01402520 — 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. |