New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TryBegin object has no attribute name with python 3.12 in rewrite_to_fast_locals #548
Comments
Out of curiosity can you reproduce on 3.11 ? TryBegin was not introduced for 3.12 so I suspect the bug exists also on 3.11. |
I agree that a simple |
I was able to reproduce it by inlining the Spec argument in the AutoFormBody from the Eg replace template AutoFormBody(ModelType):
const Spec: tuple = form_spec(ModelType)
ForEach(Spec, FormItem):
pass with template AutoFormBody(ModelType):
const Spec: tuple = tuple([
(name, type(member))
for name, member in ModelType.members().items()
if not name.startswith('_')
])
ForEach(Spec, FormItem):
pass |
I cannot reproduce it with 3.11 |
Fix potential error in rewrite fast locals on 3.12 for #548
Not sure how to reproduce in a test yet but it seems like an
isinstance(instr, bc.Instr)
check is needed inrewrite_to_fast_locals
.It is when generating templates.
enaml==0.17.0
bytecode==0.15.1
The text was updated successfully, but these errors were encountered: