Skip to content

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Sep 29, 2025

Fix an unexpected undefined attribute error in a generator/async def.
The intent was to explicitly check if an attribute was undefined, but the
attribute read implicitly raised AttributeError, so the check was never
reached. Fixed by allowing error values to be read without raising
AttributeError.

The error this fixes would look like this (with no line number associated with it):

AttributeError("attribute '__mypyc_temp__12' of 'wait_Condition_gen' undefined")

Fix an unexpected undefined attribute error in a generator/async def.
The intent was to explicitly check if an attribute was undefined, but the
attribute read implicitly raised `AttributeError`, so the check was never
reached. Fixed by allowing error values to be read.

The error would looke like this (with no line number associated with it):
```
AttributeError("attribute '__mypyc_temp__12' of 'wait_Condition_gen' undefined")
```
@JukkaL JukkaL merged commit df4ae6a into master Sep 29, 2025
13 checks passed
@JukkaL JukkaL deleted the fix-gen-exceptions branch September 29, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants