Author scoder
Recipients Mark.Shannon, scoder, vstinner
Date 2020-05-08.06:51:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Adding to the list above:

"f_lasti" is used in "", which is an almost exact copy of the one in CPython's "Tools/gdb/" for debugging Python code in gdb. If that implementation changes, we can probably adapt, especially since it uses runtime generated code. I don't find a C function for this necessary at this point, given that CPython will also need to access its own internals here in some way.

"f_localsplus" is used in the FASTCALL implementation and seems specific to Py3.6/7(?) which lacks the vectorcall protocol. So I guess it won't impact 3.8+ anymore. (The reason why its access is so complex is that StacklessPython has a slightly different frame struct, but we need to be binary(!) compatible with both.)

"f_back" is used in the coroutine implementation for correct exception traceback building, and the usage is pretty much copied from CPython. I doubt that there is much use for setting it outside of "code that tries to reimplement CPython behaviour", but Cython has to do exactly that here.

"f_lineno" is also used for traceback generation, because Cython creates frames when an exception occurs and needs to tell it what the current code line is. It's only used on newly created frames, although I can't guarantee that that will never change. Being able to read and set it seems reasonable.

"f_trace" is obviously used for tracing/profiling, and there isn't currently a good C-API for that, besides talking to frame struct fields (which is quite efficient when it comes to performance).
Date User Action Args
2020-05-08 06:51:12scodersetrecipients: + scoder, vstinner, Mark.Shannon
2020-05-08 06:51:12scodersetmessageid: <>
2020-05-08 06:51:12scoderlinkissue40421 messages
2020-05-08 06:51:12scodercreate