[New-bugs-announce] [issue2749] Raise a DeprecationWarning for warnings.showwarning(.., line)

Brett Cannon report at bugs.python.org
Sat May 3 22:45:56 CEST 2008


New submission from Brett Cannon <brett at python.org>:

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 <report at bugs.python.org>
<http://bugs.python.org/issue2749>
__________________________________


More information about the New-bugs-announce mailing list