lisa.utils: Fix inspect.getsource() for newtype() in Python 3.13
FIX Python 3.13 inspect.getsource() uses the new __firstlineno__ attribute that allows getting the first line number of the class declaration. Unfortunately, this was set to the location inside newtype where the class is actually created, leading to problems in Sphinx autodoc. Set the __firstlineno__ attribute manually to the newtype() caller's location to preseve accurate source location.
Loading
Please register or sign in to comment