Hide Forgot
Description of problem: The documentation says that traceback.extract_bt() returns a list of tuples[1] but a list of FrameSymbols is returned instead. This is an unexpected API change that caused ABRT Python3 addon to stop working. Version-Release number of selected component (if applicable): python3-3.5.1-4.fc24.x86_64 How reproducible: always Steps to Reproduce: import sys import traceback try: tuple()[0] except IndexError: _, _, exc_traceback = sys.exc_info() tb = traceback.extract_tb(exc_traceback, limit=None) print(str(tb[0])) Actual results: <FrameSummary file tb.py, line 5 in <module>> Expected results: ('tb.py', 5, '<module>', 'tuple()[0]') 1: https://docs.python.org/3/library/traceback.html#traceback.extract_tb
Indeed, this is a compatibility break and a documentation bug. Filed upstream: http://bugs.python.org/issue26502 I don't think this will be fixed fast enough for you, so I suggest that ABRT works around the issue by converting to tuple. (This is a no-op in 3.4 and earlier. In 3.5+ it will do the work of looking up the corresponding line in the source file, since FrameSummary is lazy.) Sorry for the inconvenience! In abrt_exception_handler3.py, it should be enough to replace if len(tblast): tblast = tblast[len(tblast) - 1] by if tblast: tblast = tuple(tblast[-1])
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle. Changing version to '25'.