[issue25108] traceback.extract_stack() compatibility break in 3.5

Serhiy Storchaka report at bugs.python.org
Mon Sep 14 19:29:07 CEST 2015


Serhiy Storchaka added the comment:

Here is a patch that restores compatibility. There were no tests for print_stack(), format_stack(), and extract_stack() without arguments. New tests are passed with 3.4.

There is a difference between this bug and warnings.warn(stacklevel=) at import time. In the latter the behavior is changed when we specify the stacklevel and we can't workaround this besides change the specified stacklevel depending on Python version. In the former the behavior is changed only when we don't specify a frame. The workaround is version independed: specify the frame explicitly. Therefore we will not break a code with a workaround for 3.5.0, but will fix a code without workaround.

----------
keywords: +patch
nosy: +serhiy.storchaka
stage:  -> patch review
Added file: http://bugs.python.org/file40462/traceback_extract_stack.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25108>
_______________________________________


More information about the Python-bugs-list mailing list