-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Add f_state
attribute to FrameObjects.
#91202
Comments
When tracing, the event supplied is insufficient to determine what is actually happening. E.g. A "call" event could be a call to a function or resuming a generator or coroutine. Adding a state field to the FrameObject would allow these cases to be disambiguated without having to make dubious deductions from The proposed states would be: FRAME_CREATED # Frame created, but not executed at all Ned, any other states that you might need to know about? |
These look great. Currently, coverage.py only tries to distinguish between return/yield, which I guess will now be COMPLETED and SUSPENDED? |
Don't you need to know if a "call" event is a call or the resumption of a generator? |
@markshannon Sorry, you are right, I also distinguish between call and resume:
|
As our automation doesn't seem to be quite there yet, here's a link to the PR implementing this: |
Unfortunately, this isn't useful for distinguishing events during tracing. Because "call" events occur immediately after the call or resumption, then We can't add new events, or change the sequencing without breaking things, so it looks like we will have to wait for PEP 669 and 3.12 to have a nice API for events. 😞 |
Can you make a recommendation for the best way to make this distinction in 3.11? |
We aren't going to change anything for 3.11, so your check of the |
I've fixed the coverage.py compilation errors in the nedbat/three-eleven-beta branch, but the results are wrong for generators. I'm not sure what detail I'm missing. @markshannon? @vstinner? |
Which compiler errors? Which Python version are you using (release or the current main branch)? |
Is your comment related to nedbat/coveragepy#1367 (comment) issue? |
I think this is obsolete thanks to sys.monitoring. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: