-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
bpo-39166: Fix trace of last iteration of async for loops #17800
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
Conversation
|
@markshannon Could you take a look at this when you have time? I am not happy about this solution as is just adding more shrinkwrap but solving the general case is not immediate. Do you have a better idea for now? @nedbat Could you check if this breaks anything else in your test suite? |
|
All my tests pass with this change, thanks! |
Thanks for the catch! Will correct the other one in a separate PR! |
|
Unless I am misunderstanding the code, this seems rather fragile as it relies on the compiler emitting the Again, it seems like we need a way to signal that instructions are artificial and should be ignored by tracing. |
Not exactly, because other exception handlers will have
Yup, that is why I said:
Yup, I fully agree, but is not going to be that immediate, because we need to manage also pushing and poping blocks in the frame in the eval loop from artificial instructions. How do you want to proceed? Do you want to close this and wait until we have a more resilient solution or you want to merge this (and the tests) meanwhile? |
|
I'm going to merge this. |
|
None from my side. I'm still wondering if there's a lowish-cost way to transfer some of the coverage.py tests to the CPython test suite, to shrink the feedback loop. |
I have plans to work on this soonish, I will let you know once I have some free cycles. :) |
Nop, thanks for the review! Let's sync in the future to try to work on a more resilient solution :) |
|
@markshannon: Please replace |
https://bugs.python.org/issue39166