[issue2743] Fix module output for warnings from the interpreter

2008-05-02 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: r62656 has the fix. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ __

[issue2743] Fix module output for warnings from the interpreter

2008-05-02 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: So I found the problem. The C implementation of 'warnings' is not handling the case where the module that triggered the exception does not define __file__, __name__ == '__main__', and sys.argv[0] is a false value in the same way as the Python

[issue2743] Fix module output for warnings from the interpreter

2008-05-02 Thread Brett Cannon
New submission from Brett Cannon <[EMAIL PROTECTED]>: In svn, the module name is lost if you raise an exception at the interpreter:: >>> import warnings >>> warnings.warn("foo") :1: UserWarning: foo It should be:: >>> import warnings >>> warnings.warn("foo") __main__:1: UserWarning: foo