Closed
Description
Jumping to async function signatures raises ValueError: incompatible stacks
error.
Works for non async functions and python versions < 3.11
Environment:
- CPython versions tested on: Python 3.11.0
- Operating system and architecture: Linux q 5.4.0-42-generic x64
Full reproducer:
import asyncio
import sys
async def fun(): # <---- jump location
a = 1
b = 2
c = 3 # current location
def trace(frame, event, arg):
if event == "line" and frame.f_lineno == 10:
frame.f_lineno = 5
return trace
sys.settrace(trace)
if __name__ == "__main__":
asyncio.run(fun())
What's the use case of it?
Reloadium keeps debug code in the function signature.
Above exception prevents reloadium to work on async functions.