Author serhiy.storchaka
Recipients rbcollins, serhiy.storchaka
Date 2015-09-14.17:48:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Since 3.5 traceback.extract_tb() and traceback.extract_stack() return a list (actually list's subclass StackSummary) of FrameSummary objects instead of a list of tuples. FrameSummary is not fully compatible with tuple. One important incompatibility is in the comparing.

>>> import traceback
>>> traceback.extract_stack()[0] == ('<stdin>', 1, '<module>', '')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/serhiy/py/cpython-3.5/Lib/", line 254, in __eq__
    return (self.filename == other.filename and
AttributeError: 'tuple' object has no attribute 'filename'

In general __eq__ shouldn't raise an exception. Issue25108 is needed to be fixed first for tests.

Here is a patch that restores compatibility.

An alternative solution would be to make FrameSummary a subclass of tuple (namedtuple).
Date User Action Args
2015-09-14 17:48:43serhiy.storchakasetrecipients: + serhiy.storchaka, rbcollins
2015-09-14 17:48:43serhiy.storchakasetmessageid: <>
2015-09-14 17:48:43serhiy.storchakalinkissue25111 messages
2015-09-14 17:48:43serhiy.storchakacreate