@@ -1686,19 +1686,22 @@ def getframeinfo(frame, context=1):
1686
1686
The optional second argument specifies the number of lines of context
1687
1687
to return, which are centered around the current line."""
1688
1688
if istraceback (frame ):
1689
- positions = _get_code_position_from_tb (frame )
1689
+ # XXX: RUSTPYTHON: we don't support _get_code_position yet
1690
+ # positions = _get_code_position_from_tb(frame)
1690
1691
lineno = frame .tb_lineno
1691
1692
frame = frame .tb_frame
1692
1693
else :
1693
1694
lineno = frame .f_lineno
1694
- positions = _get_code_position (frame .f_code , frame .f_lasti )
1695
+ # XXX: RUSTPYTHON: we don't support _get_code_position yet
1696
+ # positions = _get_code_position(frame.f_code, frame.f_lasti)
1695
1697
1696
- if positions [0 ] is None :
1697
- frame , * positions = (frame , lineno , * positions [1 :])
1698
- else :
1699
- frame , * positions = (frame , * positions )
1698
+ # XXX: RUSTPYTHON: we don't support _get_code_position yet
1699
+ # if positions[0] is None:
1700
+ # frame, *positions = (frame, lineno, *positions[1:])
1701
+ # else:
1702
+ # frame, *positions = (frame, *positions)
1700
1703
1701
- lineno = positions [0 ]
1704
+ # lineno = positions[0]
1702
1705
1703
1706
if not isframe (frame ):
1704
1707
raise TypeError ('{!r} is not a frame or traceback object' .format (frame ))
@@ -1718,7 +1721,10 @@ def getframeinfo(frame, context=1):
1718
1721
lines = index = None
1719
1722
1720
1723
return Traceback (filename , lineno , frame .f_code .co_name , lines ,
1721
- index , positions = dis .Positions (* positions ))
1724
+ index ,
1725
+ # XXX: RUSTPYTHON: we don't support _get_code_position yet
1726
+ # positions=dis.Positions(*positions)
1727
+ )
1722
1728
1723
1729
def getlineno (frame ):
1724
1730
"""Get the line number from a frame object, allowing for optimization."""
0 commit comments