[issue2749] Raise a DeprecationWarning for warnings.showwarning(.., line)
Brett Cannon [EMAIL PROTECTED] added the comment: r62720 and r62722 have the fix (and a fix for the fix). In the Python code I check for an argument named 'line' and in the C code I make sure there are at least two default arguments. Both assume a Python implementation for showwarning(), which should be a reasonable assumption. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2749 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2749] Raise a DeprecationWarning for warnings.showwarning(.., line)
New submission from Brett Cannon [EMAIL PROTECTED]: In order to move the warnings.showwarning() API forward to support the new 'line' argument, a DeprecationWarning is needed for implementations that lack support for it. From the Python side a simple check for the 'line' argument using 'inspect' will work. For the C side, a check that there is more than 1 default argument should suffice, although a quick check of what other ways to introspect Python function objects from C code should be done first before settling on this solution. -- assignee: brett.cannon components: Interpreter Core keywords: easy messages: 66172 nosy: brett.cannon priority: critical severity: normal status: open title: Raise a DeprecationWarning for warnings.showwarning(.., line) type: behavior versions: Python 2.6 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2749 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2749] Raise a DeprecationWarning for warnings.showwarning(.., line)
Benjamin Peterson [EMAIL PROTECTED] added the comment: Brett, can you list the places showwarning is used? -- nosy: +benjamin.peterson __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2749 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2749] Raise a DeprecationWarning for warnings.showwarning(.., line)
Brett Cannon [EMAIL PROTECTED] added the comment: On Sat, May 3, 2008 at 2:11 PM, Benjamin Peterson [EMAIL PROTECTED] wrote: Benjamin Peterson [EMAIL PROTECTED] added the comment: Brett, can you list the places showwarning is used? Lib/warnings.py and Python/_warnings.c. In both cases just search for showwarning; there is only a single call site in both files. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2749 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com