Rev 3532: Add extra debugging for when a deprecated function/method are called in http://bzr.arbash-meinel.com/branches/bzr/jam-integration
John Arbash Meinel
john at arbash-meinel.com
Thu Jul 17 02:50:30 BST 2008
At http://bzr.arbash-meinel.com/branches/bzr/jam-integration
------------------------------------------------------------
revno: 3532
revision-id: john at arbash-meinel.com-20080717015002-uhhc7h8ssetsvm2c
parent: john at arbash-meinel.com-20080713164334-eu5xwg1046zxyz03
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: jam-integration
timestamp: Wed 2008-07-16 20:50:02 -0500
message:
Add extra debugging for when a deprecated function/method are called
-------------- next part --------------
=== modified file 'bzrlib/symbol_versioning.py'
--- a/bzrlib/symbol_versioning.py 2008-05-28 23:20:33 +0000
+++ b/bzrlib/symbol_versioning.py 2008-07-17 01:50:02 +0000
@@ -138,6 +138,8 @@
def decorated_function(*args, **kwargs):
"""This is the decorated function."""
+ from bzrlib import trace
+ trace.mutter_callsite(4, "Deprecated function called")
warn(deprecation_string(callable, deprecation_version),
DeprecationWarning, stacklevel=2)
return callable(*args, **kwargs)
@@ -164,6 +166,7 @@
def decorated_method(self, *args, **kwargs):
"""This is the decorated method."""
+ from bzrlib import trace
if callable.__name__ == '__init__':
symbol = "%s.%s" % (self.__class__.__module__,
self.__class__.__name__,
@@ -173,6 +176,7 @@
self.__class__.__name__,
callable.__name__
)
+ trace.mutter_callsite(4, "Deprecated method called")
warn(deprecation_version % symbol, DeprecationWarning, stacklevel=2)
return callable(self, *args, **kwargs)
_populate_decorated(callable, deprecation_version, "method",
More information about the bazaar-commits
mailing list