[issue4182] warnings.warn shows the wrong filename and line number for stacklevel of 0

2012-11-17 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue4182] warnings.warn shows the wrong filename and line number for stacklevel of 0

2009-06-12 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Perhaps the C implementation should interpret the stacklevel parameter differently so that it is compatible with the Python implementation. The stacklevel value is, after all, a very important part of the interface of warnings.warn, as it is the only way t

[issue4182] warnings.warn shows the wrong filename and line number for stacklevel of 0

2008-10-22 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: The reason for this is that the C implementation of warnings doesn't show up on the frame stack. (The pure Python implementation of warnings in 2.6 works like in 2.5.) The only solution for this one might be using the Python implementation.

[issue4182] warnings.warn shows the wrong filename and line number for stacklevel of 0

2008-10-22 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>: In Python 2.5 and earlier, passing stacklevel=0 to warnings.warn resulted in a warning shown which pointed to warnings.py. In Python 2.6, passing a stacklevel of 0 results in the warning shown pointing to the file containing the call t