[New-bugs-announce] [issue25108] traceback.extract_stack() compatibility break in 3.5
Antoine Pitrou
report at bugs.python.org
Mon Sep 14 12:13:43 CEST 2015
New submission from Antoine Pitrou:
This can be considered a regression, although perhaps it may not be desirable to fix it in a later release.
In 3.4:
>>> def f(): return traceback.extract_stack()
...
>>> print([x[0:3] for x in f()])
[('<stdin>', 1, '<module>'), ('<stdin>', 1, 'f')]
In 3.5:
>>> print([x[0:3] for x in f()])
[('<stdin>', 1, '<module>'), ('<stdin>', 1, 'f'), ('/home/antoine/35/lib/python3.5/traceback.py', 201, 'extract_stack')]
Note how the traceback module suddenly appears in the extracted stack. This breaks any application which uses a fixed offset into the returned stack to look up for information.
----------
components: Library (Lib)
messages: 250649
nosy: larry, ncoghlan, pitrou, rbcollins
priority: normal
severity: normal
status: open
title: traceback.extract_stack() compatibility break in 3.5
type: behavior
versions: Python 3.5, Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25108>
_______________________________________
More information about the New-bugs-announce
mailing list