-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
interpreter-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
Description
Bug report
Bug description:
Found by OSS Fuzz in #491105000.
>>> class i: [__classdict__ for x in y]
SystemError: _PyST_GetScope(name='__classdict__') failed: unknown scope in unit <module> (93973616364240); symbols: {'i': 4098}; locals: {}; globals: {}>>> class i: [__conditional_annotations__ for x in y]
SystemError: _PyST_GetScope(name='__conditional_annotations__') failed: unknown scope in unit <module> (94200568314576); symbols: {'i': 4098}; locals: {}; globals: {}We need to expand the fix for __class__ (fedbf77), I will open a PR shortly.
CPython versions tested on:
3.14, CPython main branch
Operating systems tested on:
No response
Linked PRs
- gh-145701: Fix
__classdict__&__conditional_annotations__in class-scope inlined comprehensions #145702 - [3.14] gh-145701: Fix
__classdict__&__conditional_annotations__in class-scope inlined comprehensions (GH-145702) #145710 - [3.13] gh-145701: Fix
__classdict__&__conditional_annotations__in class-scope inlined comprehensions (GH-145702) #145711
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
interpreter-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