[issue47046] Add `f_state` attribute to FrameObjects.

2022-04-08 Thread Mark Shannon


Mark Shannon  added the comment:

Don't you need to know if a "call" event is a call or the resumption of a 
generator?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue47046] Add `f_state` attribute to FrameObjects.

2022-03-17 Thread Ned Batchelder


Ned Batchelder  added the comment:

These look great.  Currently, coverage.py only tries to distinguish between 
return/yield, which I guess will now be COMPLETED and SUSPENDED?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue47046] Add `f_state` attribute to FrameObjects.

2022-03-17 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue47046] Add `f_state` attribute to FrameObjects.

2022-03-17 Thread Mark Shannon


New submission from Mark Shannon :

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 `f_lasti` or other 
frame attributes.

The proposed states would be:

FRAME_CREATED# Frame created, but not executed at all
FRAME_SUSPENDED  # Frame suspended after yield or yield from
FRAME_EXECUTING  # Frame is executed normally
FRAME_COMPLETED  # Frame has completed 
FRAME_CLEARED# Frame has been cleared


Ned, any other states that you might need to know about?

--
messages: 415427
nosy: Mark.Shannon, nedbat
priority: normal
severity: normal
status: open
title: Add `f_state` attribute to FrameObjects.

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com