GH-117087: Initial implementation of support for 'code like' objects in sys.monitoring#131414
GH-117087: Initial implementation of support for 'code like' objects in sys.monitoring#131414markshannon wants to merge 4 commits intopython:mainfrom
Conversation
|
As you say in the issue: some of this is only worth doing when most of the monitoring tools also accept code objects. So I suspect we'd have to make Cython switchable between real and fake code objects for a while. But it looks reasonably straightforward. |
|
A code object is "code like", so if Cython is already creating code objects, then it might as well continue to do so. However, Cython created code objects are never going to be "proper" code objects, as they won't have bytecode, so I think trying to find an interface that is sufficient to support coverage, pdb, inspect, etc. and is implementable by Cython, Numba, Mypyc, etc. is worthwhile. |
|
Elsewhere, we have seem to have settled on the approach of CPython understanding certain CodeObjects as artificial, probably |
Initial implementation of "code like" object support.
This is something to play with.
Obviously, this it will need more tests, especially for a C implemented code-like, and documentation.
@scoder @da-woods how does this look to you?