New submission from Petr Viktorin:

According to the docs [0], traceback.extract_tb should return 4-tuples 
(filename, line number, function name, text).

[0] https://docs.python.org/3/library/traceback.html#traceback.extract_tb

Instead, since Python 3.5, it returns FrameSummary objects, which are not 
tuples, nor tuple subclasses, nor even sequences. (This broke some code in the 
wild that called len() on FrameSummary.)

Issue 25111 pointed out another tuple incompatibility, which was fixed. Should 
__len__ be added as well? Or the whole Sequence ABC?

I can provide a patch when those questions are answered.

----------
assignee: docs@python
components: Documentation, Library (Lib)
messages: 261296
nosy: docs@python, encukou
priority: normal
severity: normal
status: open
title: traceback.extract_tb breaks compatibility by returning FrameSummary
versions: Python 3.5, Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26502>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to