-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
TypeError when using try/except with "as" in Enaml code #521
Comments
Closing in favor of #bytecode/4 |
The enaml compiler is doing something wrong at https://github.com/nucleic/enaml/blob/main/enaml/core/code_generator.py#L547 since before the cfg modification the CFG round trip properly |
Good news I believe I have a fix for this. It turns out I need a tiny fix in bytecode and a fix in enaml. I hope to land both by the end of the week. |
MatthieuDartiailh
added a commit
that referenced
this issue
May 23, 2023
MatthieuDartiailh
added a commit
that referenced
this issue
May 24, 2023
* core: only link the last block of a cfg to an artificial end block if it is a true terminal block By terminal block I mean a block ending on LOAD_CONST None RETURN_VALUE, in Python 3.11 we can often have exception handling block last. * tests: add a test for the code generation issue identified in #521 * cis: test PR branch of bytecode * revert ci modification * pyproject: request latest bytecode release
Great, thank you for fixing this!
…On Wed, May 24, 2023 at 11:39 AM Matthieu Dartiailh < ***@***.***> wrote:
Closed #521 <#521> as completed
via #528 <#528>.
—
Reply to this email directly, view it on GitHub
<#521 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACPSQWOUGYXYBVJATIZGDLXHZIVTANCNFSM6AAAAAAW6ZF5OM>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following code block in any Enaml file:
Results in the following traceback:
Other variations such as:
and:
are fine. It seems the "as" triggers an error. I have only seen this on Python 3.11. I believe Python 3.10 is fine.
The text was updated successfully, but these errors were encountered: