report the name of the deprecated class

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-06-23 00:44:23 +00:00
parent 94e26d00b7
commit 1270aa0e5f

View File

@@ -41,7 +41,7 @@ def deprecated(item, msg=''):
# It is a class. Make a subclass that raises a warning.
class DeprecatedClassProxy(item):
def __init__(*args, **kw):
warnings.warn("Using deprecated class. %s" % msg,
warnings.warn("Using deprecated class %s. %s" % (item.__name__, msg),
wxPyDeprecationWarning, stacklevel=2)
item.__init__(*args, **kw)
DeprecatedClassProxy.__name__ = item.__name__