/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/symbol_versioning.py

  • Committer: Richard Wilbur
  • Date: 2016-02-04 19:07:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6618.
  • Revision ID: richard.wilbur@gmail.com-20160204190728-p0zvfii6zase0fw7
Update COPYING.txt from the original http://www.gnu.org/licenses/gpl-2.0.txt  (Only differences were in whitespace.)  Thanks to Petr Stodulka for pointing out the discrepancy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
 
35
35
import warnings
36
 
# Import the 'warn' symbol so breezy can call it even if we redefine it
 
36
# Import the 'warn' symbol so bzrlib can call it even if we redefine it
37
37
from warnings import warn
38
38
 
39
 
import breezy
 
39
import bzrlib
40
40
 
41
41
 
42
42
DEPRECATED_PARAMETER = "A deprecated parameter marker."
49
49
    '%s was deprecated in version 1.4.0.'
50
50
    """
51
51
    return ("%%s was deprecated in version %s."
52
 
            % breezy._format_version_tuple(version_tuple))
 
52
            % bzrlib._format_version_tuple(version_tuple))
53
53
 
54
54
 
55
55
def set_warning_method(method):
81
81
        symbol = "%s.%s" % (a_callable.__module__,
82
82
                            a_callable.__name__)
83
83
    else:
84
 
        symbol = "%s.%s.%s" % (a_callable.__self__.__class__.__module__,
85
 
                               a_callable.__self__.__class__.__name__,
 
84
        symbol = "%s.%s.%s" % (a_callable.im_class.__module__,
 
85
                               a_callable.im_class.__name__,
86
86
                               a_callable.__name__
87
87
                               )
88
88
    return deprecation_version % symbol
96
96
 
97
97
        def decorated_function(*args, **kwargs):
98
98
            """This is the decorated function."""
99
 
            from . import trace
 
99
            from bzrlib import trace
100
100
            trace.mutter_callsite(4, "Deprecated function called")
101
101
            warn(deprecation_string(callable, deprecation_version),
102
102
                DeprecationWarning, stacklevel=2)
124
124
 
125
125
        def decorated_method(self, *args, **kwargs):
126
126
            """This is the decorated method."""
127
 
            from . import trace
 
127
            from bzrlib import trace
128
128
            if callable.__name__ == '__init__':
129
129
                symbol = "%s.%s" % (self.__class__.__module__,
130
130
                                    self.__class__.__name__,