Open jakirkham opened 1 year ago
cc @mattip (in case you have thoughts on how this could be adapted for PyPy)
Ah, I didn't think line_profiler was supposed to support PyPy, so I didn't test for it originally. @Erotemic should I put time into making line_profiler 4.x work for PyPy too, or is this a niche use case that doesn't need to be supported?
In my experience, many projects that use C-extensions don't support PyPy because it introduces a bunch of headaches, but I'm willing to try and work on supporting PyPy once my exam season finishes.
It would be really nice if we could add PyPy support. I don't think the project ever supported it officially, otherwise we would have CI tests that would have prevented us from merging 4.0. Not sure how conda forge ever had it working in the first place. If you guys have thoughts on how we can update our build to support PyPy, I'd be happy to add it.
I am not sure that supporting PyPy in a line-profiler would be a good use of scarce developer resources. What happens once the JIT kicks in and the code is mutated? In the main use case for PyPy this would happen in the very places profiling is desired, since that is the hot code path. In general, a profiling strategy that requires analyzing frames is going to have a hard time with PyPy.
Running into an issue building
line_profiler
on PyPy 3.8. In particular am seeing an error with this line whereco_code
appears undefined?https://github.com/pyutils/line_profiler/blob/83e4332c065d8f8b8bc602b99c908955a11aacc2/line_profiler/_line_profiler.pyx#L20
Here's the CI build. Also have attached the log file. This affects PyPy 3.9 as well (CI build and attached log file).