~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/symbol_versioning.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-05-19 06:14:38 UTC
  • mfrom: (1704.2.23 bzr.mbp.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060519061438-6300caf3926c3cff
(mbp) small fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
           'DEPRECATED_PARAMETER',
26
26
           'deprecated_passed',
27
27
           'warn', 'set_warning_method', 'zero_seven',
28
 
           'zero_eight', 'zero_nine'
 
28
           'zero_eight',
29
29
           ]
30
30
 
31
31
from warnings import warn
34
34
DEPRECATED_PARAMETER = "A deprecated parameter marker."
35
35
zero_seven = "%s was deprecated in version 0.7."
36
36
zero_eight = "%s was deprecated in version 0.8."
37
 
zero_nine = "%s was deprecated in version 0.9."
38
37
 
39
38
 
40
39
def set_warning_method(method):
114
113
 
115
114
def _decorate_docstring(callable, deprecation_version, label,
116
115
                        decorated_callable):
117
 
    if callable.__doc__:
118
 
        docstring_lines = callable.__doc__.split('\n')
119
 
    else:
120
 
        docstring_lines = []
 
116
    docstring_lines = callable.__doc__.split('\n')
121
117
    if len(docstring_lines) == 0:
122
118
        decorated_callable.__doc__ = deprecation_version % ("This " + label)
123
119
    elif len(docstring_lines) == 1: