Closed frmdstryr closed 4 years ago
Could you make a minimal reproducer ? I will try to have a look tomorow night
If you do not have a minimal reproducer could you share the relevant enaml block for me to investigate ? It may be that the logic to handle flags update in bytecode need some refinement but having an example to work with would make figuring out the issue much easier.
Sorry, don't have much time to look into this, just reverted for now. It's a client's code so it can't be shared.
It's like 800 loc with multiple enamldefs and multiple async fn's... There's a few places where it's doing item = next(iter(a_set))
, there's also an async with
block so maybe one of those is causing it.
I could probably reduce it if the error had the line where it fails or some hints as to what to look for.
Looking at the traceback I would look for an async function which contains a yield
or yield from
statement and some other asynchronous construct. I will try to also have a look on my side. I never used async func in enaml so I am have missed something either in enaml or in how bytecode do flag inference.
I figured out what is the issue and I need to fix some logic in bytecode. I had no time to finish tonight but I will try to do it ASAP and publish a bugfix release of bytecode. In the meantime if you can propose some additional tests for enaml (typically any async func with an await will trigger the bug) that would be great.
The fix for the issue is in https://github.com/vstinner/bytecode/pull/56 I will try to merge and release over the weekend and bump enaml dependency.
The current master now requires the most recent version of bytecode in which the issue causing this has been fixed. Please close when you can confirm.
Working with the latest bytecode, thanks!!
When attempting to run the current master + changes from #348 using a project with enaml-web on python 3.7 I'm getting:
I'm guessing it's because it doesn't like using
values = list(somedict.values())
in an async fn?